[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: name an array function
From: |
Daniel Llorens |
Subject: |
Re: name an array function |
Date: |
Mon, 21 Nov 2016 14:10:12 +0100 |
On 21 Nov 2016, at 13:55, <address@hidden> <address@hidden> wrote:
> > it (numpy, to mention a popular one. You don't need to say A[i, :, :],
> > you can just say A[i].). However, the maintainers spoke against this,
> > so these functions need different names.
>
> Understandable... but a pity, really.
yeah...
> Uh, oh. That's NSFW material ;-) My head exploded (faint memories
> of APL).
check out ‘J for C programmers’, I think it has good explanations.
> I do like slice. But I'm perhaps off because I don't quite understand
> your mumblings about "the rank of the result would be positive".
> What do they return otherwise? Do they throw an exception?
They return the element itself. E.g.
(array-from #2((a b) (c d)) 0) => #1(a b)
(array-from #2((a b) (c d)) 0 0) => a
the rank of the second result would be zero (so #0(a)) if the result was always
a ‘slice’. This is what I meant. There's a variant which always returns a
‘slice’:
(array-from* #2((a b) (c d)) 0) => #1(a b)
(array-from* #2((a b) (c d)) 0 0) => #0(a)
- name an array function, Daniel Llorens, 2016/11/21
- Re: name an array function, Stefan Israelsson Tampe, 2016/11/21
- Re: name an array function, tomas, 2016/11/21
- Re: name an array function,
Daniel Llorens <=
- Re: name an array function, tomas, 2016/11/21
- Re: name an array function, Daniel Llorens, 2016/11/21
- Re: name an array function, tomas, 2016/11/21
- Re: name an array function, Daniel Llorens, 2016/11/23
- Re: name an array function, tomas, 2016/11/23
- Re: name an array function, David Pirotte, 2016/11/23
Re: name an array function, Panicz Maciej Godek, 2016/11/21