(self)
| 40 | assert dat.shape == (0,) |
| 41 | |
| 42 | def test_data_uint8(self): |
| 43 | a = Tensor([1,2,3,4], dtype=dtypes.uint8) |
| 44 | dat = a.data() |
| 45 | assert dat.format == "B" |
| 46 | assert dat.itemsize == 1 |
| 47 | assert dat[0] == 1 |
| 48 | assert dat[1] == 2 |
| 49 | |
| 50 | def test_data_nested(self): |
| 51 | a = Tensor([[1,2],[3,4]], dtype=dtypes.int32) |