()
| 26 | |
| 27 | |
| 28 | def test_tensor_from_numpy(): |
| 29 | x = np.random.rand(1, 10) |
| 30 | tensor_x = Tensor.from_const(x) |
| 31 | assert tensor_x.shape == [1, 10] |
| 32 | assert tensor_x.ndim == 2 |
| 33 | assert tensor_x.dtype == "float32" |
| 34 | assert repr(tensor_x) == 'Tensor([1, 10], "float32")' |
| 35 | |
| 36 | |
| 37 | def test_tensor_from_scalar(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…