[SciPy-dev] What is this dispatch thing ?
david.huard at gmail.com
Fri Jul 21 07:48:18 CDT 2006
Thanks a lot. Sorry for the bother.
2006/7/20, Robert Kern <robert.kern at gmail.com>:
> David Huard wrote:
> > Hi,
> > I just updated scipy from svn and stats.linregress(x,y) returns
> > /usr/lib/python2.4/site-packages/stats.py in __call__(self, arg1, *args,
> > **kw)
> > 244 def __call__(self, arg1, *args, **kw):
> > 245 if type(arg1) not in self._types:
> > --> 246 raise TypeError, "don't know how to dispatch %s
> > arguments" % type(arg1)
> > 247 return apply(self._dispatch[type(arg1)], (arg1,) + args,
> > 248
> > TypeError: don't know how to dispatch <type ' numpy.ndarray'> arguments
> > Also, in ipython, linregress? returns a doc about the dispatch class. Is
> > this intended ?
> That version of stats.py is not from scipy. That version tried to handle
> as well as arrays. The functions for each type were wrapped by a
> class that would call the appropriate version depending on the argument
> That version of stats.py was written for Numeric and cannot deal with
> numpy arrays.
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> that is made terrible by our own mad attempt to interpret it as though
> it had
> an underlying truth."
> -- Umberto Eco
> Scipy-dev mailing list
> Scipy-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev