'Array' to include atoms violates normal usage. 'Array' in plain English refers to a bunch of things ordered in some way. Look up the dictionary definition. You'll find something like
regular order or arrangement; series The plain, non-tortured reading of this is that an array is something that has axes to be ordered along; in short, it is divisible. It is NOT an atom. I would use 'noun' to mean 'array or atom' in the cases you mention. Why have two words to mean the same thing? Currently, 'noun' = 'array'. I want 'array' to mean rank > 0 to avoid the clumsy 'non-atomic array'. For example, when I try to define what an 'item' is. It's a cell of rank one less than the noun's rank, unless the noun is an atom, which is a special case. I would like to say: An item of an array is a cell whose rank is 1 less than the array's rank. An atom has one item, itself. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Roger Hui > Sent: Saturday, October 06, 2007 11:23 AM > To: General forum > Subject: Re: [Jgeneral] Re: Empty dimensions confuse me > > > 'Array' means a noun of any rank, regrettably including 0, and so > > is synonymous with 'noun'. I wish we would agree to change > > all the documentation to say that 'array' means rank > > greater than 0. I'm ready with my part. > > Why do you wish for such a thing? If arrays exclude atoms, > every time you turn around you'd be saying things like > "arrays and atoms", as in, "functions take array and atom > arguments and return array and atom results". > > > > ----- Original Message ----- > From: Henry Rich <[EMAIL PROTECTED]> > Date: Friday, October 5, 2007 21:42 > Subject: RE: [Jgeneral] Re: Empty dimensions confuse me > To: 'General forum' <[email protected]> > > > > > > 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 > > > > > > I like scalar myself but "atom" is the proper J terminology. > > > I also like matrix > > > much more than array. > > > > A matrix is a 2-D array that follows the rules of matrix > > multiplication(So say I). So a 2-D array may not be a > > matrix, if it contains > > nonnumerics or doesn't follow matrix rules. > > > > I think the word for a rank-2 array is 'table'. > > > > 'Array' means a noun of any rank, regrettably including 0, and so > > is synonymous with 'noun'. I wish we would agree to change > > all the documentation to say that 'array' means rank > > greater than 0. I'm ready with my part. > > > > > > > But why sweat the small stuff? :) And > > > list? well that > > > totally aggravates me. Vector is great. List is stepping on > > > the toes of cons > > > cells that that particular data structure. > > > > Again, 'vector' suggests vector spaces which are numeric. > > > > > > data location. Shape 3 is not (0,3) it's ('',3). > > > > > > I see. Now, in terms of data storage: > > > > > > an array of shape 1,3 can store 1 vector of magnitude 3 which > > > can store 3 > > > "somethings". > > > > > > an array of shape '', 3 can store 3 somethings (it is a > > > vector of magnitude 3). > > > > > > but what about an array of shape 0,3? How can you index into > > > that vector of > > > magnitude 3 and get or store data? > > > > A table of shape n,3 contains n items, each a list of 3 atoms. > > If n is 0, the list is empty and contains no items. But > > you can > > add an item to it with , (as Bill pointed out). > > > > You can't index into an array along an axis that contains a > 0, because > > the index must be less than the length of the corresponding axis. > > Therefore you must get index error. > > > > Consider > > > > $ -.~ i. 3 3 > > 0 3 > > > > You had a table of 3 lists; you deleted some of the lists so > > none were left. > > The shape shuld be 0 3. It is. This is the meaning > > of an empty table. > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
