Hi Nathaniel,
You're right, I shouldn't be righteous. Though I do think the
advantage of `asanyarray` inside numpy is remains that it is easy for
a user to add `asarray` to their input to a numpy function, and not
easy for a happily compatible subclass to avoid an `asarray` inside a
numpy function
On Nov 7, 2017 2:15 PM, "Chris Barker" wrote:
On Mon, Nov 6, 2017 at 6:14 PM, Charles R Harris
wrote:
> Also -- if py2.7 continues to see the use I expect it will well past when
>>> pyton.org officially drops it, I wouldn't be surprised if a Python2.7
>>> Windows build based on a newer compiler
On Nov 6, 2017 4:19 PM, "Chris Barker" wrote:
On Sat, Nov 4, 2017 at 6:47 AM, Marten van Kerkwijk <
m.h.vankerkw...@gmail.com> wrote:
>
> You just summarized excellently why I'm on a quest to change `asarray`
> to `asanyarray` within numpy
+1 -- we should all be using asanyarray() most of the
On Tue, Nov 7, 2017 at 12:23 PM Chris Barker wrote:
>
> And then a third abc for indexing support, although, I am not sure how
>> that could get implemented...
>
>
> This is the really tricky one -- all ABCs really check is the existence of
> methods -- making sure they behave the same way is up
On Tue, Nov 7, 2017 at 1:20 PM, Chris Barker wrote:
> On Mon, Nov 6, 2017 at 4:28 PM, Stephan Hoyer wrote:
>
>>
>>> What's needed, though, is not just a single ABC. Some thought and design
>>> needs to go into segmenting the ndarray API to declare certain behaviors,
>>> just like was done for co
On Mon, Nov 6, 2017 at 4:28 PM, Stephan Hoyer wrote:
>
>> What's needed, though, is not just a single ABC. Some thought and design
>> needs to go into segmenting the ndarray API to declare certain behaviors,
>> just like was done for collections:
>>
>> https://docs.python.org/3/library/collection
On Mon, Nov 6, 2017 at 6:14 PM, Charles R Harris
wrote:
> Also -- if py2.7 continues to see the use I expect it will well past when
>>> pyton.org officially drops it, I wouldn't be surprised if a Python2.7
>>> Windows build based on a newer compiler would come along -- perhaps by
>>> Anaconda or
Hi Benjamin,
For the shapes and reshaping, I wrote an ShapedLikeNDArray mixin/ABC
for astropy, which may be a useful starting point as it also provides
a way to implement the methods ndarray uses to reshape and get
elements: see
https://github.com/astropy/astropy/blob/master/astropy/utils/misc.py
Well, to get the ball rolling a bit, the key thing that matplotlib needs to
know is if `shape`, `reshape`, 'size', broadcasting, and logical indexing
is respected. So, I see three possible abc's here: one for attribute access
(things like `shape` and `size`) and another for shape manipulations
(bro