Fix: Issue with typing null monomial

This commit is contained in:
Bertrand Benjamin 2019-07-15 17:27:38 +02:00
parent beb319f21d
commit b53de690d5
1 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,17 @@ def multiply_filter(left, right):
:param right: MO
:returns: MO if it is a special case, nothing other wise
"""
try:
if left == 0:
return left
except TypeError:
pass
try:
if right == 0:
return right
except TypeError:
pass
try:
if left == 1:
return right