from_dlpack¶
- 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
.Note
The returned array may be either a copy or a view. See Data interchange mechanisms for details.