Skip to content

Commit 92a8f9c

Browse files
committed
numpy_usm_shared module updated for Numpy 1.25.0
- changes to Numpy's functions means that inspect.isfunction(np.func) no longer returns true - numpy.testing.overrides submodule contains functions for getting sets of functions that subclasses of ndarray can override, which numpy_usm_shared uses
1 parent 179ce15 commit 92a8f9c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dpctl/tensor/numpy_usm_shared.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ def dprint(*args):
5555
elif isclass(s):
5656
class_list.append(o)
5757

58+
if int(np.__version__.replace(".", "")) >= 1250:
59+
s = set(
60+
map(
61+
lambda x: x.__name__,
62+
np.testing.overrides.get_overridable_numpy_array_functions(),
63+
)
64+
)
65+
s.update(set(functions_list))
66+
functions_list = list(s)
67+
5868

5969
array_interface_property = "__sycl_usm_array_interface__"
6070

0 commit comments

Comments
 (0)