[SciPy-user] array TypeError: expected a readable buffer object

BORGULYA Gábor borgulya@gyer2.sote...
Thu Sep 27 17:13:49 CDT 2007


> > BORGULYA Gábor wrote:
> > > In [1]: import scipy
> > >
> > > In [2]: a = scipy.array(['1','2','3',None,'4','5'])
> > > --------------------------------------------------------------------
> > >-- ----- exceptions.TypeError                                
> > > Traceback (most recent call last)
> > >
> > > /home/gab/<console>
> > >
> > > TypeError: expected a readable buffer object

> Thursday 27 September 2007 dátummal Robert Kern ezt írta:
> > What version of numpy are you using? With numpy 1.0.3 and a recent SVN
> > checkout, it works for me.

Friday 28 September 2007 dátummal BORGULYA Gábor ezt írta:
> *  dev-python/numpy
>       Latest version available: 1.0.3.1
>       Latest version installed: 1.0.1-r1

Robert, thank you very much for the solution! Upgrading numpy has solved 
the problem. This may have been a bug. It works now:

In [1]: import scipy
/usr/lib/python2.4/site-packages/scipy/misc/__init__.py:25: 
DeprecationWarning: ScipyTest is now called NumpyTest; please update your 
code
  test = ScipyTest().test

In [2]: a = scipy.array(['1','2','3',None,'4','5'])

In [3]: a
Out[3]: array([1, 2, 3, None, 4, 5], dtype=object)

Gábor


More information about the SciPy-user mailing list