-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Labels
backend: cudaSpecific to CUDA execution (GPUs)Specific to CUDA execution (GPUs)enhancementNew feature or requestNew feature or request
Description
For all objects that expose the __array_interface__, we should add a helper member function called .to_numpy() that does nothing but create a view:
np.array(self, copy=False, order='F')
cupy.array(self, copy=False, order='F')Similar to:
- https://github.com/openPMD/openPMD-api/blob/b05171d371fe9568149ef58ae60ee113f4d0c4b4/examples/11_particle_dataframe.py#L34
- https://github.com/openPMD/openPMD-api/blob/b05171d371fe9568149ef58ae60ee113f4d0c4b4/examples/11_particle_dataframe.py#L49
- https://github.com/openPMD/openPMD-api/blob/b05171d371fe9568149ef58ae60ee113f4d0c4b4/examples/11_particle_dataframe.py#L87
Equivalently, we want to add .to_copy() et al. functions for #30 and later DLPack interfaces.
Metadata
Metadata
Assignees
Labels
backend: cudaSpecific to CUDA execution (GPUs)Specific to CUDA execution (GPUs)enhancementNew feature or requestNew feature or request