-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
0 / 40 of 4 issues completedOpen
0 / 40 of 4 issues completed
Copy link
Labels
array typesItems related to array API support and input array validation (see gh-18286)Items related to array API support and input array validation (see gh-18286)enhancementA new feature or improvementA new feature or improvement
Description
EDIT(lucascolley): please keep the conversation below for higher-level topics, and use https://github.com/scipy/scipy/wiki/Array-types-support-information-tracker to jot down notes related to implementing these changes.
See gh-18286 for the proposed design changes, and gh-18668 for the main PR that laid the foundations (it supported all of scipy.cluster
, added a CI job that used both pytorch-cpu
and numpy.array_api
, and documented the design patterns).
This issue is to track the current status of support across submodules, and other larger tasks/TODOs. Submodules:
-
scipy.cluster
ENH: add machinery to support Array API #18668 -
scipy.constants
ENH: constants: add array api support #20593 -
scipy.datasets
ENH: datasets: array API standard support #20594 (no changes needed) -
scipy.fft
ENH: fft: support array API standard #19005 -
# Don't do,scipy.fftpack
fftpack
is legacy -
scipy.integrate
(see ENH: integrate: add array API standard support #20930 - PRs welcome!) -
scipy.interpolate
-
scipy.io
(no changes needed - all functions involve I/O through host memory) -
scipy.linalg
(in progress, see ENH: linalg: array library interoperability #19068) -
# Don't do, will be removedscipy.misc
-
scipy.ndimage
(initial conversion done in ENH: ndimage: add array API standard support #21150, follow-up tracked in TST/MAINT: ndimage: follow-ups for array API standard support #21280) -
scipy.odr
-
scipy.optimize
-
scipy.signal
ENH: signal: add array API standard support #20678 -
scipy.sparse
# TBD on whether to update functions in that namespace; the data structures are a different type of task, see ENH: sparse: first pass at array API standard compat #20190 -
scipy.sparse.csgraph
-
scipy.sparse.linalg
-
scipy.spatial
-
scipy.special
(initial set of functions done in ENH: special: dispatch to array library #19023) -
scipy.stats
(see ENH: stats: add array API-support #20544 - PRs welcome!)
Desirable for later:
- Once we're more confident that everything is in good shape, see if we should start emitting warnings for input types that may see a change in behavior (see this comment).
- Write a policy for cases where one wants to change existing pure Python code with array API support to compiled code (for performance improvements with
numpy
). See this comment). - Figure out if and how to deal with mixing multiple array types coming from the same library (see this comment).
- Once JAX and/or Dask are supported in the
array-api-compat
package, add support for them in SciPy (both can be tested in CI too). (JAX done in ENH: array types: add JAX support #20085, Dask WIP at ENH: array types: adddask.array
support #20956) - CuPy isn't testable in (free) CI easily, but it could be done (e.g. https://betatim.github.io/posts/github-action-with-gpu/ or with https://cirun.io/). Shouldn't be done before all this becomes stable/supported. Update 22 Oct 2024: it's about time now, see CI: adding a GPU-enabled CI job #21740.
izaid, agriyakhetarpal, mdhaber and BwL1289
Sub-issues
Metadata
Metadata
Assignees
Labels
array typesItems related to array API support and input array validation (see gh-18286)Items related to array API support and input array validation (see gh-18286)enhancementA new feature or improvementA new feature or improvement