Skip to content

Commit

Permalink
Fix Python Dundee method
Browse files Browse the repository at this point in the history
  • Loading branch information
sudarsan2k5 committed Feb 13, 2023
1 parent cd83a1e commit 1354dab
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aesara/scalar/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def __sub__(self, other):
def __mul__(self, other):
return mul(self, other)

def __truedivide__(self, other):
def __truediv__(self, other):
return true_divide(self, other)

def __floordiv__(self, other):
Expand Down
2 changes: 1 addition & 1 deletion aesara/sparse/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def to_dense(self, *args, **kwargs):
"__pow__",
"__mod__",
"__divmod__",
"__truedivide__",
"__truediv__",
"__floordiv__",
"reshape",
"dimshuffle",
Expand Down
2 changes: 1 addition & 1 deletion aesara/tensor/var.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __mod__(self, other):
def __divmod__(self, other):
return at.math.divmod(self, other)

def __truedivide__(self, other):
def __truediv__(self, other):
return at.math.true_divide(self, other)

def __floordiv__(self, other):
Expand Down
2 changes: 1 addition & 1 deletion doc/library/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ import ``aesara`` and print the config variable, as in:
release of Aesara). It raises an error when one tries to perform such an
operation, enforcing the use of the integer division operator (``//``). If a
float result is desired, either cast one of the arguments to a float, or use
``x.__truedivide__(y)``.
``x.__truediv__(y)``.

.. attribute:: mode

Expand Down
2 changes: 1 addition & 1 deletion tests/sparse/test_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def test_unary(self, method, exp_type, cm, x):
("__pow__", DenseTensorType),
("__mod__", DenseTensorType),
("__divmod__", DenseTensorType),
("__truedivide__", DenseTensorType),
("__truediv__", DenseTensorType),
("__floordiv__", DenseTensorType),
],
)
Expand Down

0 comments on commit 1354dab

Please sign in to comment.