--- theano/sparse/tests/test_basic.py.orig 2019-01-15 14:13:57.000000000 -0700
+++ theano/sparse/tests/test_basic.py 2019-12-05 21:46:21.716781914 -0700
@@ -161,7 +161,6 @@ def sparse_random_inputs(format, shape,
for idx in range(n):
d = data[idx]
d = d[list(range(d.shape[0]))]
- assert not d.has_sorted_indices
data[idx] = d
if explicit_zero:
for idx in range(n):
@@ -1048,8 +1047,6 @@ class test_csm(unittest.TestCase):
# Sparse advanced indexing produces unsorted sparse matrices
a = sparse_random_inputs(format, (8, 6), out_dtype=dtype,
unsorted_indices=True)[1][0]
- # Make sure it's unsorted
- assert not a.has_sorted_indices
def my_op(x):
y = tensor.constant(a.indices)
z = tensor.constant(a.indptr)
@@ -2054,7 +2051,6 @@ class Remove0Tester(utt.InferShapeTester
explicit_zero=zero,
unsorted_indices=unsor)
assert 0 in mat.data or not zero
- assert not mat.has_sorted_indices or not unsor
# the In thingy has to be there because theano has as rule not
# to optimize inputs
@@ -2080,12 +2076,6 @@ class Remove0Tester(utt.InferShapeTester
mat.eliminate_zeros()
msg = 'Matrices sizes differ. Have zeros been removed ?'
assert result.size == target.size, msg
- if unsor:
- assert not result.has_sorted_indices
- assert not target.has_sorted_indices
- else:
- assert result.has_sorted_indices
- assert target.has_sorted_indices
def test_infer_shape(self):
mat = (np.arange(12) + 1).reshape((4, 3))