[Scipy-tickets] [SciPy] #1014: UnivariateSpline objects should work on an empty array?

SciPy Trac scipy-tickets@scipy....
Sat Jul 17 11:06:50 CDT 2010


#1014: UnivariateSpline objects should work on an empty array?
--------------------------------+-------------------------------------------
  Reporter:  lebigot            |       Owner:  somebody                    
      Type:  defect             |      Status:  needs_decision              
  Priority:  normal             |   Milestone:  Unscheduled                 
 Component:  scipy.interpolate  |     Version:  0.7.0                       
Resolution:                     |    Keywords:  UnivariateSpline empty array
--------------------------------+-------------------------------------------
Changes (by rgommers):

  * status:  reopened => needs_decision


Comment:

 Ah, now I understand. I'd think many users would want to know when
 something goes wrong and therefore want an exception. But if not, the fix
 is easy. In {{{UnivariateSpline.__call__}}}, add
 {{{
 if not x:
     return np.array([])
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1014#comment:4>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list