Skip to content

Commit

Permalink
Fix Sympy warning by import numbers from sympy.numbers.core
Browse files Browse the repository at this point in the history
  • Loading branch information
brocksam committed Sep 6, 2020
1 parent 23c494a commit 24eb461
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions pycollo/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
from .utils import cachedproperty


SYMPY_ZERO = sym.numbers.Zero()
SYMPY_ONE = sym.numbers.One()
SYMPY_TWO = sym.numbers.Integer(2)
SYMPY_THREE = sym.numbers.Integer(3)
SYMPY_HALF = sym.numbers.Half()
SYMPY_THIRD = sym.numbers.Rational(1/3)
SYMPY_2THIRDS = sym.numbers.Rational(2/3)
SYMPY_NEG_ONE = sym.numbers.Integer(-1)
SYMPY_NEG_TWO = sym.numbers.Integer(-2)
SYMPY_NEG_THREE = sym.numbers.Integer(-3)
SYMPY_NEG_HALF = sym.numbers.Rational(-1/2)
SYMPY_NEG_THIRD = sym.numbers.Rational(-1/3)
SYMPY_NEG_2THIRDS = sym.numbers.Rational(-2/3)
SYMPY_ZERO = sym.core.numbers.Zero()
SYMPY_ONE = sym.core.numbers.One()
SYMPY_TWO = sym.core.numbers.Integer(2)
SYMPY_THREE = sym.core.numbers.Integer(3)
SYMPY_HALF = sym.core.numbers.Half()
SYMPY_THIRD = sym.core.numbers.Rational(1/3)
SYMPY_2THIRDS = sym.core.numbers.Rational(2/3)
SYMPY_NEG_ONE = sym.core.numbers.Integer(-1)
SYMPY_NEG_TWO = sym.core.numbers.Integer(-2)
SYMPY_NEG_THREE = sym.core.numbers.Integer(-3)
SYMPY_NEG_HALF = sym.core.numbers.Rational(-1/2)
SYMPY_NEG_THIRD = sym.core.numbers.Rational(-1/3)
SYMPY_NEG_2THIRDS = sym.core.numbers.Rational(-2/3)


class PycolloOp(abc.ABC):
Expand Down
2 changes: 1 addition & 1 deletion pycollo/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class SparseCOOMatrix:

ZERO = sym.numbers.Zero()
ZERO = sym.core.numbers.Zero()

def __new__(cls, entries, n_rows, n_cols, expr_graph):
self = object.__new__(cls)
Expand Down

0 comments on commit 24eb461

Please sign in to comment.