from_dlpack — Python array API standard 2022.12 documentation (original) (raw)

from_dlpack(x: object, /) → array

Returns a new array containing the data from another (array) object with a __dlpack__ method.

Parameters:

x (object) – input (array) object.

Returns:

out (array) – an array containing the data in x.