[Numpy-discussion] broken recarray

Jonathan Taylor jonathan.taylor at stanford.edu
Wed May 10 01:21:38 EDT 2006


hi,

sorry to sound like a broken recarray, but i {\em really} don't 
understand the origin of this error message. i have more complicated 
examples, but i don't even understand this very simple unpythonic 
behaviour. can anybody help me out? i have reproduced this error on 
three different machines with python2.4 (two debian unstables, one red 
hat ? (a redhat enterprise server at work that i installed numpy on)). 
my complicated examples also reproduce on these three different 
machines.....

------------------------------------------------------

[jtaylo at miller jtaylo]$ python2.4
Python 2.4 (#1, Feb  9 2006, 18:46:06)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import numpy as N
 >>>
 >>> desc = N.dtype({'names':['x'], 'formats':[N.Float]})
 >>>
 >>> print N.array([(3.,),(4.,)], dtype=desc)
[(3.0,) (4.0,)]
 >>> print N.array([[3.],[4.]], dtype=desc)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: expected a readable buffer object
 >>>
 >>>
---------------------------------------------------------------------------------------

any ideas?

jonathan

-- 
------------------------------------------------------------------------
I'm part of the Team in Training: please support our efforts for the
Leukemia and Lymphoma Society!

http://www.active.com/donate/tntsvmb/tntsvmbJTaylor

GO TEAM !!!

------------------------------------------------------------------------
Jonathan Taylor                           Tel:   650.723.9230
Dept. of Statistics                       Fax:   650.725.8977
Sequoia Hall, 137                         www-stat.stanford.edu/~jtaylo
390 Serra Mall
Stanford, CA 94305





More information about the NumPy-Discussion mailing list