8000 ENH: Make numpy.array_api more portable by asmeurer · Pull Request #25370 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Make numpy.array_api more portable #25370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update some items in the array_api compatibility document
  • Loading branch information
asmeurer committed Dec 12, 2023
commit 84a4605a965540631ca5b1633eaa4c39d715519b
28 changes: 26 additions & 2 deletions doc/source/reference/array_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,20 @@ Manipulation functions differences
- **Compatible**
- See https://github.com/numpy/numpy/issues/9818.

Searching functions differences
-------------------------------

.. list-table::
:header-rows: 1

* - Feature
- Type
- Notes
* - ``nonzero`` disallows 0-dimensional inputs
- **Breaking**
- This behavior is already deprecated for ``np.nonzero``. See
https://github.com/numpy/numpy/pull/13708.

Set functions differences
-------------------------

Expand All @@ -737,8 +751,8 @@ Set functions differences

.. _array_api-set-functions-differences:

Set functions differences
-------------------------
Sorting functions differences
-----------------------------

.. list-table::
:header-rows: 1
Expand Down Expand Up @@ -790,6 +804,16 @@ Other differences
- **Strictness**
- For example, ``numpy.array_api.asarray([0], dtype='int32')`` is not
allowed.
* - Dtype objects are wrapped so that they only implement the required
``__eq__`` method, which only compares against dtype objects.
- **Strictness**
- For example, ``float32 == 'float32'`` is not allowed.
* - ``arr.device`` always returns a ``CPU_DEVICE`` object (which is not
part of the namespace). This is the only valid non-default value for
``device`` keyword arguments to creation functions like ``asarray()``.
- **Compatible**
- CPU is the only device supported by NumPy. The standard does not
require device objects to be accessible other than via ``arr.device``.
* - ``asarray`` is not implicitly called in any function.
- **Strictness**
- The exception is Python operators, which accept Python scalars in
Expand Down
0