Re: [Numpy-discussion] Custom __array_interface__ error

2015-03-13 Thread Nathaniel Smith
On Mar 13, 2015 7:22 AM, "Daniel Smith" wrote: > > Greetings everyone, > I have a new project that deals with core and disk tensors wrapped into a single object so that the expressions are transparent to the user after the tensor is formed. I would like to add __array_interface__ to the core tenso

Re: [Numpy-discussion] Custom __array_interface__ error

2015-03-13 Thread Stephan Hoyer
In my experience writing ndarray-like objects, you likely want to implement __array__ instead of __array_interface__. The former gives you full control to create the ndarray yourself. On Fri, Mar 13, 2015 at 7:22 AM, Daniel Smith wrote: > Greetings everyone, > I have a new project that deals wit

[Numpy-discussion] Custom __array_interface__ error

2015-03-13 Thread Daniel Smith
Greetings everyone, I have a new project that deals with core and disk tensors wrapped into a single object so that the expressions are transparent to the user after the tensor is formed. I would like to add __array_interface__ to the core tensor and provide a reasonable error message if someone