I have checked the earlier versions again, and found that I was
mistaken. Roger had infinite values in x equivalent to the length of
the axis (again, this is exactly as the Dictionary prescribes). I
messed it up when I rewrote u;.n. I will restore the Dictionary
behavior (which I now agree is correct). I will fix the result of
non-infinite values of x longer than the axis to return an empty array
of items of the specified length.
Henry Rich
On 11/1/2019 5:30 PM, Henry Rich wrote:
The case I had in mind was an x argument of
2 0 3
5 _ 5
for example, where the _ would allow you to take that axis in full
while tessellating over the others. That is the best argument for
treating _ as special in u;._3.
Infinity doesn't MEAN empty - it PRODUCES empty, just as asking for
subarrays of length 11 in a list of length 10 gives you 0 such
subarrays. If every actual integer greater than the length of the
dimension produces 0 subarrays, it is reasonable that _ do so as well.
After writing out the arguments for and against, I am looking more
favorably on the idea of treating _ and __ as special, being unlike
any given large integer. The large integer should give a result with
shape (0,the large integer), while _ and __ would stand for the size
of the dimension. In short, doing it exactly the way the Dictionary
says. If I still feel that way after a few days to think about it,
and there are no other objections, I will make that change and change
NuVoc accordingly.
Henry Rich
On 11/1/2019 5:01 PM, Raul Miller wrote:
On Fri, Nov 1, 2019 at 4:46 PM Henry Rich <[email protected]> wrote:
There is a reasonable counterargument that if you want to have
subarrays in one dimension that include all of another dimension,
_ is the easiest way to do it.
You do realize, I hope, that this conflicts with what the dictionary
said. The dictionary definition was that _ represented the size of the
corresponding dimension, not the size of a different dimension. It was
a simple wildcard for cases where the size of a dimension of the right
argument was variable, and we just wanted all of it.
(I don't see how _ could represent another dimension - that seems
unimplementable.)
I also see no utility in "infinity means empty" in this context. Why
bother?
But that doesn't mean this is a high priority issue - it could be one
that's put off for later versions. But that wouldn't be because the
current implementation is correct - that would be only that we haven't
fixed it, yet.
Does my point of view here make sense to you?
Do you feel that I am overlooking some other key issue?
Thanks,
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm