Tensor¶
- class madspace.Tensor¶
Bases:
pybind11_objectReference-counted, device-aware N-dimensional array.
The runtime’s tensor type: a typed, strided view onto a block of memory on a specific Device (CPU, CUDA, or HIP), shared through reference counting so copying a
Tensoris cheap. Compute-graph values, matrix element results, trainable globals and event data all flow through this type. From Python aTensoris only ever obtained from another madspace call, never constructed directly; it exports itself through the__dlpack__/__dlpack_device__protocol so it converts to a NumPy array or a PyTorch tensor without copying.- numpy()¶
- torch()¶