[Numpy-discussion] forwarded article (embracing tensors)

2013-05-30 Thread Neal Becker
I thought the topic of this article might be of interest here: https://groups.google.com/forum/?fromgroups#!topic/julia-dev/GAdcYzmibyo ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] forwarded article (embracing tensors)

2013-05-30 Thread Suzen, Mehmet
On 30 May 2013 13:44, Neal Becker ndbeck...@gmail.com wrote: I thought the topic of this article might be of interest here: https://groups.google.com/forum/?fromgroups#!topic/julia-dev/GAdcYzmibyo I think Julia has great potential, and can, unlike Matlab, rid itself of its tunnel vision on

Re: [Numpy-discussion] __array_priority__ ignored if __array__ is present

2013-05-30 Thread Thomas Robitaille
Hi Frederic, On 16 May 2013 15:58, Frédéric Bastien no...@nouiz.org wrote: I looked yesterday rapidly in the code and didn't find the reason (I don't know it well, that is probably why). But last night I think of one possible cause. I found this code 2 times in the file

[Numpy-discussion] __getitem__ and creating an array of objects

2013-05-30 Thread Aldcroft, Thomas
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

Re: [Numpy-discussion] __array_priority__ ignored if __array__ is present

2013-05-30 Thread Frédéric Bastien
I think so. Changing the order between np.array([1,2,3]) * a and a * np.array([1,2,3]) should return the same type I think, specificaly when array_priority is defined. Fred On Thu, May 30, 2013 at 3:28 PM, Thomas Robitaille thomas.robitai...@gmail.com wrote: Hi Frederic, On 16 May 2013

Re: [Numpy-discussion] __getitem__ and creating an array of objects

2013-05-30 Thread Robert Kern
On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu 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

Re: [Numpy-discussion] __getitem__ and creating an array of objects

2013-05-30 Thread Aldcroft, Thomas
On Thu, May 30, 2013 at 4:27 PM, Robert Kern robert.k...@gmail.com wrote: On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu wrote: I'm seeing some behavior that I can't understand when creating a numpy array of Python objects. Basically it seems that

Re: [Numpy-discussion] __getitem__ and creating an array of objects

2013-05-30 Thread Aldcroft, Thomas
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 robert.k...@gmail.comwrote: On Thu, May 30, 2013 at 9:21 PM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu wrote: I'm seeing some behavior that I can't

Re: [Numpy-discussion] __getitem__ and creating an array of objects

2013-05-30 Thread Robert Kern
On Thu, May 30, 2013 at 10:31 PM, Aldcroft, Thomas aldcr...@head.cfa.harvard.edu 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