[SciPy-Dev] empty input to spline from UnivariateSpline
Wed Jul 28 08:59:39 CDT 2010
On Wed, Jul 28, 2010 at 6:55 PM, Pauli Virtanen <email@example.com> wrote:
> Wed, 28 Jul 2010 18:36:12 +0800, Ralf Gommers wrote:
> > In ticket http://projects.scipy.org/scipy/ticket/1014 there is a request
> > to return an empty array instead of getting an error when an empty array
> > is passed to the spline object generated by UnivariateSpline. This is
> > easy to fix, but is it the desired behavior? The submitter wants an
> > empty array, maybe other users would want an exception. Change this or
> > not?
> x = UnivariateSpline(...)
> x() == np.array()
> is the correct behavior, IMO. The user is asking for the interpolant
> evaluated at 0 input points -- so the correct result is the interpolant
> at 0 input points, i.e., an empty array.
> That's what we do with sin, cos, and other ufuncs, and since the
> interpolant is also essentially a function, it should behave in the same
> Makes sense. Done in r6642.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev