Skip to content

Commit b20f8b4

Browse files
committed
Use NumpyVersion in asarray
1 parent 476f45a commit b20f8b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

array_api_strict/_creation_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def asarray(
8383
if isinstance(obj, Array) and device is None:
8484
device = obj.device
8585

86-
if np.__version__[0] < '2':
86+
if np.lib.NumpyVersion(np.__version__) < '2.0.0':
8787
if copy is False:
8888
# Note: copy=False is not yet implemented in np.asarray for
8989
# NumPy 1

0 commit comments

Comments
 (0)