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

Method test_circular

numpy/core/tests/test_multiarray.py:7515–7521  ·  view source on GitHub ↗
(self, dt)

Source from the content-addressed store, hash-verified

7513
7514 # Circular mode
7515 def test_circular(self, dt):
7516 x = np.linspace(1, 5, 5).astype(dt)
7517 r = np.array([[4, 5, 1, 2, 3], [5, 1, 2, 3, 4], [1, 2, 3, 4, 5],
7518 [2, 3, 4, 5, 1], [3, 4, 5, 1, 2]], dtype=dt)
7519 l = _multiarray_tests.test_neighborhood_iterator(
7520 x, [-2, 2], x[0], NEIGH_MODE['circular'])
7521 assert_array_equal(l, r)
7522
7523
7524# Test stacking neighborhood iterators

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
astypeMethod · 0.80
linspaceMethod · 0.80

Tested by

no test coverage detected