()
| 1352 | |
| 1353 | |
| 1354 | def test_quantitynd(): |
| 1355 | q = QuantityND([1, 2], "m") |
| 1356 | q0, q1 = q[:] |
| 1357 | assert np.all(q.v == np.asarray([1, 2])) |
| 1358 | assert q.units == "m" |
| 1359 | assert np.all((q0 + q1).v == np.asarray([3])) |
| 1360 | assert (q0 * q1).units == "m*m" |
| 1361 | assert (q1 / q0).units == "m/(m)" |
| 1362 | with pytest.raises(ValueError): |
| 1363 | q0 + QuantityND(1, "s") |
| 1364 | |
| 1365 | |
| 1366 | def test_imshow_quantitynd(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…