I don't know in either case. It behaves the same way in J6.02. I don't
know what the proper spec should be, and the code is so big that I don't
want to change anything without understanding it. As Captain Oates
would say, it may be some time before I get to it.
Re 2, the code appears to produce a sparse result when it can. That
makes some sense: you wouldn't want a +"0 1 b to produce a dense
result. I don't know what the rules should be for deciding when to make
the result sparse.
Henry Rich
On 7/10/2021 9:27 AM, Igor Zhuravlov wrote:
On 7/10/2021 0:37 AM, Henry Rich wrote:
Your last 2 sentences, (4&$.)"1 sa and (3&$.)"1 sa, give me the same
results on older systems and I am assuming they are OK.
1. Why the domain error for the sentence
(4&$.)"1 sa
is OK? (4&$.) returns dense integer array of rank 2. The equivalent sentence
for dense array, say:
(42 $~ ?@5 , 2:)"1 i. 4 4
produces a valid result without errors.
2. Why the sparse result for the sentence
(3&$.)"1 sa
is OK? (3&$.) returns dense scalar number, so the result of the sentence above
should be the dense numeric vector. The resulting datatype should differ from
datatype of argument just like this occurs in, say:
'abc'"1 i. 4 4
P.S. Henry, I'm sorry to bother you again with all these sparse datatype
bugreports :-).
--
Regards
Igor
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
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