Data Structures and Algorithms with Object-Oriented Design Patterns in Python
next up previous index

Multi-Dimensional Arrays

 

A multi-dimensional array  of dimension n (i.e., an n-dimensional array or simply n-D array) is a collection of items which is accessed via n subscript expressions. For example, the tex2html_wrap_inline60455 element of a two-dimensional array x is accessed by writing x[i,j].

Python does not provide built-in support for multi-dimensional arrays. In this section, we will examine the implementation of a multi-dimensional array class, MultiDimensionalArray, that is based on the one-dimensional array class discussed in Section gif.




next up previous index

Bruno Copyright © 2003, 2004 by Bruno R. Preiss, P.Eng. All rights reserved.