jorisvandenbossche commented on code in PR #41904:
URL: https://github.com/apache/arrow/pull/41904#discussion_r1636275217
##########
python/pyarrow/lib.pyx:
##########
@@ -21,8 +21,10 @@
import datetime
import decimal as _pydecimal
+HAS_NUMPY=False
try:
import numpy as np
+ HAS_NUMPY=True
except ImportError:
np = None
Review Comment:
That was my suggestion to have a `HAS_NUMPY` or similar variable. This can
then be used in other pyx/pxi files (which won't necessarily have a numpy
import at the top of the file), I personally find that a bit easier to read
than `np is not None`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]