提交 d44a96b7 authored 作者: Hengjean's avatar Hengjean

Renamed function eq and neq

上级 d6c912e5
...@@ -298,11 +298,6 @@ class _sparse_py_operators: ...@@ -298,11 +298,6 @@ class _sparse_py_operators:
def __ge__(self, other): def __ge__(self, other):
pass pass
def __ne__(self, other):
pass
# extra pseudo-operator symbols # extra pseudo-operator symbols
def __dot__(left, right): def __dot__(left, right):
...@@ -2247,7 +2242,7 @@ class EqualSD(gof.op.Op): ...@@ -2247,7 +2242,7 @@ class EqualSD(gof.op.Op):
equal_s_d = EqualSD() equal_s_d = EqualSD()
def equal(x, y): def eq(x, y):
""" """
Add two matrices, the two of which are sparse. Add two matrices, the two of which are sparse.
...@@ -2365,7 +2360,7 @@ class NotEqualSD(gof.op.Op): ...@@ -2365,7 +2360,7 @@ class NotEqualSD(gof.op.Op):
not_equal_s_d = NotEqualSD() not_equal_s_d = NotEqualSD()
def notEqual(x, y): def neq(x, y):
""" """
Add two matrices, the two of which are sparse. Add two matrices, the two of which are sparse.
......
...@@ -40,7 +40,7 @@ from theano.sparse import ( ...@@ -40,7 +40,7 @@ from theano.sparse import (
Diag, diag, SquareDiagonal, square_diagonal, Diag, diag, SquareDiagonal, square_diagonal,
EnsureSortedIndices, ensure_sorted_indices, clean, EnsureSortedIndices, ensure_sorted_indices, clean,
ConstructSparseFromList, construct_sparse_from_list, ConstructSparseFromList, construct_sparse_from_list,
TrueDot, true_dot, equal, notEqual) TrueDot, true_dot, eq, neq)
# Probability distributions are currently tested in test_sp2.py # Probability distributions are currently tested in test_sp2.py
#from theano.sparse import ( #from theano.sparse import (
...@@ -666,7 +666,7 @@ class test_comparison(unittest.TestCase): ...@@ -666,7 +666,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csr_matrix() x = sparse.csr_matrix()
y = sparse.csr_matrix() y = sparse.csr_matrix()
equality = equal(x, y) equality = eq(x, y)
f = theano.function([x, y], equality) f = theano.function([x, y], equality)
...@@ -685,7 +685,7 @@ class test_comparison(unittest.TestCase): ...@@ -685,7 +685,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csc_matrix() x = sparse.csc_matrix()
y = sparse.csc_matrix() y = sparse.csc_matrix()
equality = equal(x, y) equality = eq(x, y)
f = theano.function([x, y], equality) f = theano.function([x, y], equality)
...@@ -704,7 +704,7 @@ class test_comparison(unittest.TestCase): ...@@ -704,7 +704,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csr_matrix() x = sparse.csr_matrix()
y = sparse.csr_matrix() y = sparse.csr_matrix()
unequality = notEqual(x, y) unequality = neq(x, y)
f = theano.function([x, y], unequality) f = theano.function([x, y], unequality)
...@@ -723,7 +723,7 @@ class test_comparison(unittest.TestCase): ...@@ -723,7 +723,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csc_matrix() x = sparse.csc_matrix()
y = sparse.csc_matrix() y = sparse.csc_matrix()
unequality = notEqual(x, y) unequality = neq(x, y)
f = theano.function([x, y], unequality) f = theano.function([x, y], unequality)
...@@ -742,7 +742,7 @@ class test_comparison(unittest.TestCase): ...@@ -742,7 +742,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csr_matrix() x = sparse.csr_matrix()
y = theano.tensor.matrix() y = theano.tensor.matrix()
equality = equal(x, y) equality = eq(x, y)
f = theano.function([x, y], equality) f = theano.function([x, y], equality)
...@@ -761,7 +761,7 @@ class test_comparison(unittest.TestCase): ...@@ -761,7 +761,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csc_matrix() x = sparse.csc_matrix()
y = theano.tensor.matrix() y = theano.tensor.matrix()
equality = equal(x, y) equality = eq(x, y)
f = theano.function([x, y], equality) f = theano.function([x, y], equality)
...@@ -780,7 +780,7 @@ class test_comparison(unittest.TestCase): ...@@ -780,7 +780,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csr_matrix() x = sparse.csr_matrix()
y = theano.tensor.matrix() y = theano.tensor.matrix()
unequality = notEqual(x, y) unequality = neq(x, y)
f = theano.function([x, y], unequality) f = theano.function([x, y], unequality)
...@@ -799,7 +799,7 @@ class test_comparison(unittest.TestCase): ...@@ -799,7 +799,7 @@ class test_comparison(unittest.TestCase):
x = sparse.csc_matrix() x = sparse.csc_matrix()
y = theano.tensor.matrix() y = theano.tensor.matrix()
unequality = notEqual(x, y) unequality = neq(x, y)
f = theano.function([x, y], unequality) f = theano.function([x, y], unequality)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论