The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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, 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
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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.