>>> from numpy import * >>> n = 4 >>> a = zeros(n) # one-dim. array of length n >>> print a [ 0. 0. 0. 0.] >>> a array([ 0., 0., 0., 0.]) >>> p = q = 2 >>> a = zeros((p,q,3)) # p*q*3 three-dim. array >>> print a [[[ 0. 0. 0.] [ 0. 0. 0.]] [[ 0. 0. 0.] [ 0. 0. 0.]]] >>> a.shape # a's dimension (2, 2, 3)