()
| 520 | |
| 521 | |
| 522 | def test_array_view(): |
| 523 | a = np.ones(100 * 4).astype("uint8") |
| 524 | a_float_view = m.array_view(a, "float32") |
| 525 | assert a_float_view.shape == (100 * 1,) # 1 / 4 bytes = 8 / 32 |
| 526 | |
| 527 | a_int16_view = m.array_view(a, "int16") # 1 / 2 bytes = 16 / 32 |
| 528 | assert a_int16_view.shape == (100 * 2,) |
| 529 | |
| 530 | |
| 531 | def test_array_view_invalid(): |
nothing calls this directly
no outgoing calls
no test coverage detected