diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-10-22 14:57:19 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-10-22 14:57:19 +0200 |
commit | d50bf3e52dae076d07cdc139243266c8808654c6 (patch) | |
tree | 4fabea0add203f68b15435f5701e23dc1ee5f118 | |
parent | fb540f6436d1116a00b01c62b77b2a21a439cfbc (diff) |
series_expansion: catch IndexError as well
It seems numpy arrays throw this instead of TypeError.
-rw-r--r-- | series_expansion.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/series_expansion.py b/series_expansion.py index 9cd7671..edee84e 100644 --- a/series_expansion.py +++ b/series_expansion.py @@ -19,7 +19,7 @@ class SeriesExpansion(object): if self._dim == 1: try: basis[0] - except TypeError: + except (TypeError, IndexError): basis = [basis] if len(basis) != coeffs.ndim: @@ -41,7 +41,7 @@ class SeriesExpansion(object): if self._dim == 1: try: coords[0][0] - except TypeError: + except (TypeError, IndexError): coords = [coords] if diff_order is None: |