On Thu, May 30, 2013 at 10:31 PM, Aldcroft, Thomas
wrote:
> Now I realize what seemed curious. Here is a related example which shows
> that when initializing a numpy array of objects where __getitem__ and
> __len__ exist, np.array introspects the object item values for item in
> range(len(object
On Thu, May 30, 2013 at 4:58 PM, Aldcroft, Thomas <
aldcr...@head.cfa.harvard.edu> wrote:
>
>
>
> On Thu, May 30, 2013 at 4:27 PM, Robert Kern wrote:
>
>> On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas
>> wrote:
>> > I'm seeing some behavior that I can't understand when creating a numpy
>> arr
On Thu, May 30, 2013 at 4:27 PM, Robert Kern wrote:
> On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas
> wrote:
> > I'm seeing some behavior that I can't understand when creating a numpy
> array
> > of Python objects. Basically it seems that np.array() is calling the
> object
> > __getitem__ m
On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas
wrote:
> I'm seeing some behavior that I can't understand when creating a numpy array
> of Python objects. Basically it seems that np.array() is calling the object
> __getitem__ method for one object class but not another class, and I can't
> unde
I'm seeing some behavior that I can't understand when creating a numpy
array of Python objects. Basically it seems that np.array() is calling the
object __getitem__ method for one object class but not another class, and I
can't understand the difference.
Here is an example, starting with a simple