Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
Related to e.g.#16402#21036#22560
We currently explicitly support numpy and pandas. What other array libraries are of interest to support natively (as in users can just feed an array and Matplotlib handles the conversion)? Should we test for them? (There seems to be a decision that only pandas will be tested for:#19574 (comment) )
Some alternatives:
- xarray: should work as later versions have
to_numpy
, so right now it works because of pandas using the same approach. But is not explicitly tested (seeImprove pandas/xarray/... conversion #22560). - polars: as for xarray,
to_numpy
exists. - cupy: inCompatibility with CuPy #17516 it was decided to not support it, has
tonumpy
method (that is quite costly) - tensorflow: see e.g.https://stackoverflow.com/questions/34097281/convert-a-tensor-to-numpy-array-in-tensorflow has
numpy()
method and numpy emulation - Python array:https://docs.python.org/3/library/array.html
- h5py
- pyarrow: has
to_numpy
https://arrow.apache.org/docs/python/numpy.html
Proposed solution
I think it can make sense to have a test that tests with "all" dependencies. It may not have to be executed on all platforms and all Python versions, but it will at least give some idea if things still work and when they break.
That is maybe not the same thing that we guarantee that these will always work.
cupy relies on GPUs so it is not clear if it is possible to test that.
We should also probably add something to the documentation about which are supported (and not). (Maybe there is, primarily looked at the code...)