diff options
author | Lukas Geiger <lukas.geiger94@gmail.com> | 2020-06-21 01:31:05 +0200 |
---|---|---|
committer | Lukas Geiger <lukas.geiger94@gmail.com> | 2020-06-21 01:31:05 +0200 |
commit | 0e98bd6d1af7de18a43b60c2aa8001cf3b305b65 (patch) | |
tree | ba6b43c33e7eda712f0239fc8e7339a8693aa896 | |
parent | be8ab91f789c3b688d707940016b4c2d262913e9 (diff) | |
download | numpy-0e98bd6d1af7de18a43b60c2aa8001cf3b305b65.tar.gz |
MAINT: Prefer generator expressions over list comprehensions
-rw-r--r-- | numpy/polynomial/polyutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/polyutils.py b/numpy/polynomial/polyutils.py index b1cf07e8a..d81ee9754 100644 --- a/numpy/polynomial/polyutils.py +++ b/numpy/polynomial/polyutils.py @@ -176,12 +176,12 @@ def as_series(alist, trim=True): arrays = [np.array(a, ndmin=1, copy=False) for a in alist] if min([a.size for a in arrays]) == 0: raise ValueError("Coefficient array is empty") - if any([a.ndim != 1 for a in arrays]): + if any(a.ndim != 1 for a in arrays): raise ValueError("Coefficient array is not 1-d") if trim: arrays = [trimseq(a) for a in arrays] - if any([a.dtype == np.dtype(object) for a in arrays]): + if any(a.dtype == np.dtype(object) for a in arrays): ret = [] for a in arrays: if a.dtype != np.dtype(object): |