()
| 321 | assert_raises(ValueError, lambda: asarray(a, device='gpu')) |
| 322 | |
| 323 | def test_array_properties(): |
| 324 | a = ones((1, 2, 3)) |
| 325 | b = ones((2, 3)) |
| 326 | assert_raises(ValueError, lambda: a.T) |
| 327 | |
| 328 | assert isinstance(b.T, Array) |
| 329 | assert b.T.shape == (3, 2) |
| 330 | |
| 331 | assert isinstance(a.mT, Array) |
| 332 | assert a.mT.shape == (1, 3, 2) |
| 333 | assert isinstance(b.mT, Array) |
| 334 | assert b.mT.shape == (3, 2) |
| 335 | |
| 336 | def test___array__(): |
| 337 | a = ones((2, 3), dtype=int16) |
nothing calls this directly
no test coverage detected