We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ArrayValue.__array__()
1 parent 7f810f8 commit 027cfb8Copy full SHA for 027cfb8
src/JlWrap/array.jl
@@ -365,7 +365,12 @@ function init_array()
365
except ImportError:
366
numpy = None
367
if numpy is not None:
368
- return numpy.array(arr, dtype=dtype, copy=copy)
+ # Numpy <2 does not support the `copy` argument, so we have to check the version
369
+ major_version = int(numpy.__version__.split(".")[0])
370
+ if major_version < 2:
371
+ return numpy.array(arr, dtype=dtype)
372
+ else:
373
+ return numpy.array(arr, dtype=dtype, copy=copy)
374
return arr
375
def to_numpy(self, dtype=None, copy=True, order="K"):
376
import numpy
0 commit comments