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

Method test_exp_strides

numpy/_core/tests/test_umath.py:1511–1523  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1509 assert_almost_equal(np.exp(yf), xf)
1510
1511 def test_exp_strides(self):
1512 np.random.seed(42)
1513 strides = np.array([-4, -3, -2, -1, 1, 2, 3, 4])
1514 sizes = np.arange(2, 100)
1515 for ii in sizes:
1516 x_f64 = np.float64(np.random.uniform(low=0.01, high=709.1, size=ii))
1517 y_true = np.exp(x_f64)
1518 for jj in strides:
1519 assert_array_almost_equal_nulp(
1520 np.exp(x_f64[::jj]),
1521 y_true[::jj],
1522 nulp=2,
1523 )
1524
1525class TestSpecialFloats:
1526 def test_exp_values(self):

Callers

nothing calls this directly

Calls 2

uniformMethod · 0.80

Tested by

no test coverage detected