8000 Compatibility with CuPy · Issue #17516 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Compatibility with CuPy #17516
Closed
Closed
@raeubaen

Description

@raeubaen

Cupy is a library for vectorized operations on GPU. It's very similar to NumPy;
cupy.ndarray implements array, but it doesn't work since np.asarray(cupy_array) raises an exception. This was done intentionally by the creators to avoid hidden performance issues.
However to convert a cupy array in a numpy array there is the function cupy.asnumpy(...).
As a result, matplotlib cannot natively plot data in cupy arrays: they must converted to numpy before.
Maybe, given that cupy is fairly spread, should be written a workaround so that matplotlib can optionally make the conversion itself.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0