MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / test_chebyshev

Function test_chebyshev

numpy_ml/tests/test_utils.py:148–159  ·  view source on GitHub ↗
(N=1)

Source from the content-addressed store, hash-verified

146
147
148def test_chebyshev(N=1):
149 np.random.seed(12345)
150 i = 0
151 while i < N:
152 N = np.random.randint(1, 100)
153 x = np.random.rand(N)
154 y = np.random.rand(N)
155 mine = chebyshev(x, y)
156 theirs = scipy.spatial.distance.chebyshev(x, y)
157 np.testing.assert_almost_equal(mine, theirs)
158 print("PASSED")
159 i += 1
160
161
162def test_manhattan(N=1):

Callers

nothing calls this directly

Calls 1

chebyshevFunction · 0.90

Tested by

no test coverage detected