Skip to content

Commit fbaf586

Browse files
committed
Add a comment with known differences from the spec to the docstring
1 parent 0686979 commit fbaf586

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

numpy_array_api_compat/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
to ensure they are not using functionality outside of the standard, but prefer
1717
this implementation for the default when working with NumPy arrays.
1818
19+
Known differences from the Array API spec:
20+
21+
- The array methods __array_namespace__, device, to_device, and mT are not
22+
defined. This reuses np.ndarray and we don't want to monkeypatch or wrap it.
23+
24+
- NumPy value-based casting for scalars will be in effect unless explicitly
25+
disabled with the environment variable NPY_PROMOTION_STATE=weak or
26+
np._set_promotion_state('weak') (requires NumPy 1.24 or newer, see NEP 50
27+
and https://github.com/numpy/numpy/issues/22341)
28+
1929
"""
2030

2131
from numpy import *

0 commit comments

Comments
 (0)