[Numpy-discussion] combining recarrays

2008-12-30 Thread ctw
Hi! I'm a bit stumped by the following: suppose I have several recarrays with identical dtypes (identical field names, etc.) and would like to combine them into one rec array, what would be the best way to do that? I tried using np.rec.fromrecords, but that doesn't produce the desired result. As a

[Numpy-discussion] tried to set void-array with object members using buffer error message

2008-11-08 Thread ctw
;,np.int32),('b',list)]) > np.random.shuffle(tst2) --- ValueError Traceback (most recent call last) /home/ctw/ in () /home/ctw/mtrand.pyx in mtrand.RandomState.shuffle() ValueError: tried to set void-array with object members using buffer. I get the sa

[Numpy-discussion] dtype behavior

2008-10-09 Thread ctw
Hi -- Can somebody here explain the following behavior: In [1]: tst = np.array([5.]) In [2]: tst Out[2]: array([ 5.]) In [3]: tst.shape Out[3]: (1,) In [4]: tst.dtype Out[4]: dtype('float64') In [5]: tst.dtype = np.int In [6]: tst Out[6]: array([ 0, 1075052544]) In [7]: tst.dtype Out

[Numpy-discussion] Array finalize call from std/var?

2008-05-13 Thread ctw
Hi! Does anybody here know what's going on in the situation described in this ticket? http://scipy.org/scipy/numpy/ticket/791 Basically, it seems that __array_finalize__ is called after calls to most functions (such as mean), but not after calls to std or var. Thanks

Re: [Numpy-discussion] ndarray subclassing

2008-04-30 Thread ctw
would be great if somebody with write access to the wiki could make a note of this on the sublasses page: http://www.scipy.org/Subclasses CTW ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] ndarray subclassing

2008-04-30 Thread ctw
d am hoping that somebody here can shed some light on it. Thanks! CTW ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion