From 8f3ee77dd2848640b5a5e7134729bc488f5c315f Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Thu, 26 Oct 2017 12:45:29 -0600 Subject: 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. --- numpy/polynomial/hermite.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'numpy/polynomial/hermite.py') 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) -- cgit v1.2.1