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

Method test_finite_range

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

Source from the content-addressed store, hash-verified

219 assert_raises(TypeError, histogram, vals, 2.4)
220
221 def test_finite_range(self):
222 # Normal ranges should be fine
223 vals = np.linspace(0.0, 1.0, num=100)
224 histogram(vals, range=[0.25,0.75])
225 assert_raises(ValueError, histogram, vals, range=[np.nan,0.75])
226 assert_raises(ValueError, histogram, vals, range=[0.25,np.inf])
227
228 def test_invalid_range(self):
229 # start of range must be < end of range

Callers

nothing calls this directly

Calls 3

histogramFunction · 0.90
assert_raisesFunction · 0.90
linspaceMethod · 0.80

Tested by

no test coverage detected