Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: List vs. array in Mathematica

  • To: mathgroup at
  • Subject: [mg132575] Re: List vs. array in Mathematica
  • From: Richard Fateman <fateman at>
  • Date: Sun, 13 Apr 2014 05:26:57 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • References: <lib06v$i5p$>

On 4/12/2014 2:15 AM, andymhancock at wrote:
> In mathematica, is an array simply a list of uniform depth?
No. An Array is a List. For example,

z=  Array[f,4]   returns{f[1],f[2],f[3],f[4]}
Head[z]  returns List

is perfectly legal.

Note, there is a program Array[ ]  which can be used to initially
construct Lists.
> 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.

They aren't.  The term "array" is used in computer science and 
conventional programming languages for a different data structure
with different storage requirements and different access efficiencies.

   So I'm wondering if their relationship is.

Their relationship with respect to Mathematica is:  the proprietors
of the program define arrays as lists, ignoring conventions in computer
science.  One can speculate as to why.

  • Prev by Date: Re: Do we need a When function?
  • Next by Date: Re: List vs. array in Mathematica
  • Previous by thread: Re: List vs. array in Mathematica
  • Next by thread: Using FindRoot with free parameters