We surely can't deprecate them, but the naming of axes is done at the
dunder level, not at the client level. and if the idea were to add a
new dunder, then of course you can always name them post-facto, and
pass through to your older __getitem__ function. if you so wish.

I need to take a look at xarray tonight. I am not familiar with its interface.

On Thu, 27 Aug 2020 at 02:27, Todd <toddr...@gmail.com> wrote:
>
> On Wed, Aug 26, 2020 at 7:11 PM Stefano Borini <stefano.bor...@gmail.com> 
> wrote:
>>
>> On Wed, 26 Aug 2020 at 23:56, Todd <toddr...@gmail.com> wrote:
>> > Again, implicit on your argument here is the assumption that all keyword 
>> > indices necessarily map into positional indices.  This may be the case 
>> > with the use-case you had in mind.  But for other use-cases brought up so 
>> > far that assumption is false.  Your approach would make those use cases 
>> > extremely difficult if not impossible.
>>
>> Please remind me of one. I'm literally swamped.
>
>
> xarray, which is the primary python package for numpy arrays with labelled 
> dimensions.  It supports adding and indexing by additional dimensions that 
> don't correspond directly to the dimensions of the underlying numpy array, 
> and those have no position to match up to.  They are called "non-dimension 
> coordinates".
>
> Other people have wanted to allow parameters to be added when indexing, 
> arguments in the index that change how the indexing behaves.  These don't 
> correspond to any dimension, either.
>
>> In any case, this leads to a different question: should we deprecate
>> anonymous axes, and if not, what is the intrinsic meaning and
>> difference between anonymous axes and named axes?
>
>
> Anonymous axes are axes that someone hasn't spent the time adding names to.  
> Although they are unsafe, there is an absolutely immense amount of code built 
> around them.  And it takes a lot of additional work for simple cases.  So I 
> think deprecated them at this point would be completely unworkable.
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-le...@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at 
> https://mail.python.org/archives/list/python-ideas@python.org/message/NJM5HO5ROVPO3ES73PV633UNUCJD22ZI/
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
Kind regards,

Stefano Borini
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/NTRKX44IBMIZ3QGZSYEATZGMW4B72XOZ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to