(N=1)
| 131 | |
| 132 | |
| 133 | def test_minkowski(N=1): |
| 134 | np.random.seed(12345) |
| 135 | i = 0 |
| 136 | while i < N: |
| 137 | N = np.random.randint(1, 100) |
| 138 | p = 1 + np.random.rand() * 10 |
| 139 | x = np.random.rand(N) |
| 140 | y = np.random.rand(N) |
| 141 | mine = minkowski(x, y, p) |
| 142 | theirs = scipy.spatial.distance.minkowski(x, y, p) |
| 143 | np.testing.assert_almost_equal(mine, theirs) |
| 144 | print("PASSED") |
| 145 | i += 1 |
| 146 | |
| 147 | |
| 148 | def test_chebyshev(N=1): |
nothing calls this directly
no test coverage detected