jax.dlpack.from_dlpack#

jax.dlpack.from_dlpack(external_array)[source]#

Returns a Array representation of a DLPack tensor.

The returned Array shares memory with external_array.

Parameters:

external_array – an array object that has __dlpack__ and __dlpack_device__ methods, or a DLPack tensor on either CPU or GPU (legacy API).

Returns:

A jax.Array