MCPcopy Index your code
hub / github.com/numpy/numpy / test_shape_4d

Method test_shape_4d

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

Source from the content-addressed store, hash-verified

693 assert_(H.shape == b)
694
695 def test_shape_4d(self):
696 # All possible permutations for bins of different lengths in 4D.
697 bins = ((7, 4, 5, 6), (4, 5, 7, 6), (5, 6, 4, 7), (7, 6, 5, 4),
698 (5, 7, 6, 4), (4, 6, 7, 5), (6, 5, 7, 4), (7, 5, 4, 6),
699 (7, 4, 6, 5), (6, 4, 7, 5), (6, 7, 5, 4), (4, 6, 5, 7),
700 (4, 7, 5, 6), (5, 4, 6, 7), (5, 7, 4, 6), (6, 7, 4, 5),
701 (6, 5, 4, 7), (4, 7, 6, 5), (4, 5, 6, 7), (7, 6, 4, 5),
702 (5, 4, 7, 6), (5, 6, 7, 4), (6, 4, 5, 7), (7, 5, 6, 4))
703
704 r = np.random.rand(10, 4)
705 for b in bins:
706 H, edges = histogramdd(r, b)
707 assert_(H.shape == b)
708
709 def test_weights(self):
710 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