multiply each element of a list by a number

Brian Blais bblais at bryant.edu
Sat Dec 27 02:30:43 CET 2008


On Dec 26, 2008, at 19:05 , Robert.T.Lynch at seagate.com wrote:

> but this seems overkill to me.  Can you tell I am coming to Python  
> from Matlab?


if you're coming from matlab, then you should think of python lists  
more like cell arrays than matrices: you can have lists of arbitrary  
data types, so multiply is not going to work in the matrix way.

check out http://web.bryant.edu/~bblais/bryant/numerical_computing/ 
python_matlab.pdf

but more importantly, you need to install numpy (which has the matrix  
stuff) and scipy (which has the scientific packages).  What I do is  
go to www.enthought.com and they have a single-download package  
geared specifically for scientists.



					bb

-- 
Brian Blais
bblais at bryant.edu
http://web.bryant.edu/~bblais



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081226/e575af88/attachment.html>


More information about the Python-list mailing list