MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_quantitynd

Function test_quantitynd

lib/matplotlib/tests/test_image.py:1354–1363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1352
1353
1354def 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
1366def test_imshow_quantitynd():

Callers

nothing calls this directly

Calls 1

QuantityNDClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…