Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: List vs. array in Mathematica
Replies: 2   Last Post: Apr 14, 2014 5:27 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Murray Eisenberg

Posts: 2,105
Registered: 12/6/04
Re: List vs. array in Mathematica
Posted: Apr 13, 2014 5:27 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The function Array does _not_ necessarily a list of uniform depth. For example:

f[n_] := Nest[List, x, n]
Array[f, 5]
(* {{x}, {{x}}, {{{x}}}, {{{{x}}}}, {{{{{x}}}}}} *)

However, the function ArrayQ does not return True for a "ragged" array but only she "all parts at a particular level must be lists of the same length.



On Apr 12, 2014, at 5:14 AM, andymhancock@gmail.com wrote:

> In mathematica, is an array simply a list of uniform depth? Both terms are used in the documentation, but I haven't run across an explicit explanation of why two terms are needed for the same construct. So I'm wondering if their relationship is.
>


Murray Eisenberg murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 240 246-7240 (H)
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305










Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.