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

Method test_simple

numpy/lib/tests/test_function_base.py:2122–2126  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2120class TestTrapz:
2121
2122 def test_simple(self):
2123 x = np.arange(-10, 10, .1)
2124 r = trapz(np.exp(-.5 * x ** 2) / np.sqrt(2 * np.pi), dx=0.1)
2125 # check integral of normal equals 1
2126 assert_almost_equal(r, 1, 7)
2127
2128 def test_ndim(self):
2129 x = np.linspace(0, 1, 3)

Callers

nothing calls this directly

Calls 2

trapzFunction · 0.90
assert_almost_equalFunction · 0.90

Tested by

no test coverage detected