Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7c41164 + 9dff602 commit cd39348Copy full SHA for cd39348
numpy/lib/tests/test_histograms.py
@@ -794,3 +794,20 @@ def test_density_non_uniform_1d(self):
794
hist_dd, edges_dd = histogramdd((v,), (bins,), density=True)
795
assert_equal(hist, hist_dd)
796
assert_equal(edges, edges_dd[0])
797
+
798
+ def test_density_via_normed(self):
799
+ # normed should simply alias to density argument
800
+ v = np.arange(10)
801
+ bins = np.array([0, 1, 3, 6, 10])
802
+ hist, edges = histogram(v, bins, density=True)
803
+ hist_dd, edges_dd = histogramdd((v,), (bins,), normed=True)
804
+ assert_equal(hist, hist_dd)
805
+ assert_equal(edges, edges_dd[0])
806
807
+ def test_density_normed_redundancy(self):
808
809
810
+ with assert_raises_regex(TypeError, "Cannot specify both"):
811
+ hist_dd, edges_dd = histogramdd((v,), (bins,),
812
+ density=True,
813
+ normed=True)
0 commit comments