On not quite the same problem but a related one:
If z is an integer table, under what conditions would you expect ": z
to have the same number of rows as z? Under more restricted
conditions, when is (z -: ". ": z) ?
Clearly you can't expect rank to be preserved if z=: i.1 3 --since
under ": the information gets lost to enable you to distinguish it
from i.3. But what about z=: i.3 1 ?
Consider the following:
(". ": i.z) ; i.z=: 3 2
+---+---+
|0 1|0 1|
|2 3|2 3|
|4 5|4 5|
+---+---+
(". ": i.z) ; i.z=: 3 1
+-----+-+
|0 1 2|0|
| |1|
| |2|
+-----+-+
Is this a bug or a feature? (It's breaking my code, for which I have
so far only found an inelegant fix).
Ian
On Fri, Apr 2, 2010 at 10:20 PM, Roger Hui <[email protected]> wrote:
> If x is a rank 2 or higher numeric array, how many
> lines are in the display of x? For example,
> there are 14 lines in the display of i. 3 4 5 .
>
> I've worked on a related problem on-and-off for years,
> starting in 1991, and only came to a good answer
> for this problem just a few days ago.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm