Construct a tensor from numpy constants.
(data)
| 113 | |
| 114 | @staticmethod |
| 115 | def from_const(data) -> "Tensor": |
| 116 | """Construct a tensor from numpy constants.""" |
| 117 | return Tensor(_expr=rx.const(data)) |
| 118 | |
| 119 | @staticmethod |
| 120 | def from_scalar(data: int | float, dtype: str) -> "Tensor": |