warp.from_dlpack#
- warp.from_dlpack(source, dtype=None)[source]#
Convert a source array or DLPack capsule into a Warp array without copying.
- Parameters:
source – A DLPack-compatible array or PyCapsule
dtype – An optional Warp data type to interpret the source data.
- Returns:
A new Warp array that uses the same underlying memory as the input pycapsule.
- Return type: