MCPcopy Create free account
hub / github.com/NVIDIA/DALI / to_numpy

Method to_numpy

dali/python/nvidia/dali/_tensor_formatting.py:211–214  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

209 """Adapter for ndd.Tensor. Implements TensorAdapter protocol."""
210
211 def to_numpy(self, obj):
212 cpu_obj = self.to_cpu(obj)
213 # Use numpy array protocol (public API)
214 return np.array(cpu_obj)
215
216
217class DynamicBatchAdapter(_BaseDynamicAdapter):

Callers

nothing calls this directly

Calls 1

to_cpuMethod · 0.45

Tested by

no test coverage detected