Not only leading-- any position of shape expanded with 1 won't change
capacity.


Oleg


On Oct 5, 2007, at 17:35, "Raul Miller" <[EMAIL PROTECTED]> wrote:

On 10/5/07, Oleg Kobchenko <[EMAIL PROTECTED]> wrote:
--- Terrence Brannon <[EMAIL PROTECTED]> wrote:
But 3 $ 1 2 3
has zero magnitude in the 2nd dimension, no? So it would seem to be
equivalent 0 3 $ 1 2 3 but per the interpreter it is not.

It's not zero magnitude in higher dimension, it's _empty_ magnitude.
Same as scalar has empty dimention, but itself represents one
data location. Shape 3 is not (0,3) it's ('',3).

In other words, shape vectors can be extended with leading 1s
without changing the number of elements in the array.  You find
the number of elements in the array by multiplying the dimensions
together, and 1 is the identity for multiplication.

  */''
1

This is analogous to using leading leading zeros for a regular number
(though, of course, not quite the same).

(That said, those leading 1s do make a difference.  2 2+/ .*3 3 is
not the same as 2 2+/ .*1 2$3 3 and the latter results in a lengt
error.)

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



      
____________________________________________________________________________________
Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.
http://tv.yahoo.com/ 

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to