From: Steve Schmerler <elcorto@gm...>  20070905 20:51:36

Robert Dailey wrote: > Hi, > > I have two questions: > > 1) Is there any way to represent vectors? Currently I'm using 'array' for > vectors. > I suppose you mean vectors in the Matlab way? Then you should have a look at http://scipy.org/NumPy_for_Matlab_Users#heade9a492daa18afcd86e84e07cd2824a9b1b651935 In short: of course you can do all linalg with numpy.array. With numpy.matrix, some operations (like dot products) can be written more conveniently. > 2) Is there a way to calculate the magnitude (length) of a vector? > a = array([3,1,4]) len(a) a.size # only for a rank1 array a.shape[0] For some basics on numpy, you may also check out: http://scipy.org/Documentation HTH  cheers, steve I love deadlines. I like the whooshing sound they make as they fly by.  Douglas Adams 