MCPcopy Create free account
hub / github.com/numpy/numpy / test_shape_4d

Method test_shape_4d

numpy/lib/tests/test_histograms.py:656–668  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

654 assert_(H.shape == b)
655
656 def test_shape_4d(self):
657 # All possible permutations for bins of different lengths in 4D.
658 bins = ((7, 4, 5, 6), (4, 5, 7, 6), (5, 6, 4, 7), (7, 6, 5, 4),
659 (5, 7, 6, 4), (4, 6, 7, 5), (6, 5, 7, 4), (7, 5, 4, 6),
660 (7, 4, 6, 5), (6, 4, 7, 5), (6, 7, 5, 4), (4, 6, 5, 7),
661 (4, 7, 5, 6), (5, 4, 6, 7), (5, 7, 4, 6), (6, 7, 4, 5),
662 (6, 5, 4, 7), (4, 7, 6, 5), (4, 5, 6, 7), (7, 6, 4, 5),
663 (5, 4, 7, 6), (5, 6, 7, 4), (6, 4, 5, 7), (7, 5, 6, 4))
664
665 r = np.random.rand(10, 4)
666 for b in bins:
667 H, edges = histogramdd(r, b)
668 assert_(H.shape == b)
669
670 def test_weights(self):
671 v = np.random.rand(100, 2)

Callers

nothing calls this directly

Calls 2

histogramddFunction · 0.90
assert_Function · 0.90

Tested by

no test coverage detected