diff options
author | Ross Barnowski <rossbar@berkeley.edu> | 2020-05-13 16:16:04 -0700 |
---|---|---|
committer | Ross Barnowski <rossbar@berkeley.edu> | 2020-05-13 16:16:04 -0700 |
commit | 8922a6e025d53d5aaccba02b76dbef5a43afe768 (patch) | |
tree | b14bc769c1339e4e43570d3ecef29072f45b30cf /numpy/polynomial/_polybase.py | |
parent | 66365a57ff9b68a191fd232dc823cc2cf69d267f (diff) | |
download | numpy-8922a6e025d53d5aaccba02b76dbef5a43afe768.tar.gz |
STY: Move comment outside of try/except.
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 7616b95c7..30887b670 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -347,14 +347,14 @@ class ABCPolyBase(abc.ABC): out += " " power = str(i + 1) # Polynomial coefficient + # The coefficient array can be an object array with elements that + # will raise a TypeError with >= 0 (e.g. strings or Python + # complex). In this case, represent the coeficient as-is. try: if coef >= 0: next_term = f"+ {coef}" else: next_term = f"- {-coef}" - # The coefficient array can be an object array with elements that - # will raise a TypeError with >= 0 (e.g. strings or Python - # complex). In this case, represent the coeficient as-is. except TypeError: next_term = f"+ {coef}" # Polynomial term |