rlmesh.numpy.from_array
Encode a NumPy array or scalar as an RLMesh value.
from_array(array: object) -> Tensor | PrimitiveValueParameters
| Name | Type | Description |
|---|---|---|
array | object | NumPy array or scalar to encode. |
Returns
| Type | Description |
|---|---|
Tensor | PrimitiveValue | Tensor for non-scalar arrays, or a primitive for scalar values. |