Re: [Numpy-discussion] Handling methods of object-arrays

2009-01-06 Thread Robert Kern
On Tue, Jan 6, 2009 at 03:15, Stéfan van der Walt wrote: > Hi all, > > What is the exact protocol for evaluating functions like "real" and > "imag" on object arrays? > > For example, I'm looking at > > x = np.array([np.array(3+1j), np.array(4+1j)], dtype=object) > > For which both > > In [4]: x.r

[Numpy-discussion] Handling methods of object-arrays

2009-01-06 Thread Stéfan van der Walt
Hi all, What is the exact protocol for evaluating functions like "real" and "imag" on object arrays? For example, I'm looking at x = np.array([np.array(3+1j), np.array(4+1j)], dtype=object) For which both In [4]: x.real Out[4]: array([(3+1j), (4+1j)], dtype=object) and In [6]: np.real(x) Ou