"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scipy/spatial/tests/test_distance.py" between
scipy-1.6.2.tar.xz and scipy-1.6.3.tar.xz

About: SciPy are tools for mathematics, science, and engineering (for Python).

test_distance.py  (scipy-1.6.2.tar.xz):test_distance.py  (scipy-1.6.3.tar.xz)
skipping to change at line 2099 skipping to change at line 2099
assert_equal(y.ndim, 1) assert_equal(y.ndim, 1)
assert_equal(y, [x]) assert_equal(y, [x])
x = np.arange(5).reshape(1, -1, 1) x = np.arange(5).reshape(1, -1, 1)
y = _validate_vector(x) y = _validate_vector(x)
assert_equal(y.ndim, 1) assert_equal(y.ndim, 1)
assert_array_equal(y, x[0, :, 0]) assert_array_equal(y, x[0, :, 0])
x = [[1, 2], [3, 4]] x = [[1, 2], [3, 4]]
assert_raises(ValueError, _validate_vector, x) assert_raises(ValueError, _validate_vector, x)
def test_yule_all_same():
# Test yule avoids a divide by zero when exactly equal
x = np.ones((2, 6), dtype=bool)
d = wyule(x[0], x[0])
assert d == 0.0
d = pdist(x, 'yule')
assert_equal(d, [0.0])
d = cdist(x[:1], x[:1], 'yule')
assert_equal(d, [[0.0]])
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)