diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2017-10-26 12:45:29 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2017-10-26 13:26:29 -0600 |
commit | 8f3ee77dd2848640b5a5e7134729bc488f5c315f (patch) | |
tree | bdefb6938a4d1efc9e0cc22bd92d61e72928d7d3 /numpy/polynomial/hermite.py | |
parent | 1e494f1e283340d545b1c7c15dded04a4aaae939 (diff) | |
download | numpy-8f3ee77dd2848640b5a5e7134729bc488f5c315f.tar.gz |
MAINT: Add parameter checks to polynomial integration functions.
It was not being checked that the `lbnd` and `scl` parameters were
scalars as required.
Closes #9901.
Diffstat (limited to 'numpy/polynomial/hermite.py')
-rw-r--r-- | numpy/polynomial/hermite.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/polynomial/hermite.py b/numpy/polynomial/hermite.py index ba8af061e..58e9e180f 100644 --- a/numpy/polynomial/hermite.py +++ b/numpy/polynomial/hermite.py @@ -771,7 +771,7 @@ def hermint(c, m=1, k=[], lbnd=0, scl=1, axis=0): ------ ValueError If ``m < 0``, ``len(k) > m``, ``np.ndim(lbnd) != 0``, or - ``np.ndim(scl) != 0``. + ``np.ndim(scl) != 0``. See Also -------- @@ -818,6 +818,10 @@ def hermint(c, m=1, k=[], lbnd=0, scl=1, axis=0): raise ValueError("The order of integration must be non-negative") if len(k) > cnt: raise ValueError("Too many integration constants") + if np.ndim(lbnd) != 0: + raise ValueError("lbnd must be a scalar.") + if np.ndim(scl) != 0: + raise ValueError("scl must be a scalar.") if iaxis != axis: raise ValueError("The axis must be integer") iaxis = normalize_axis_index(iaxis, c.ndim) |