[SciPy-user] Pros and Cons of Python verses other array environments

Otto Tronarp otto at tronarp.se
Fri Sep 29 02:24:42 CDT 2006

Quoting Perry Greenfield <perry at stsci.edu>:
> Despite others' comments to the contrary, that Python is more general
> than matlab will make it less seamless. Beginners can get confused
> over simple things like why math.add doesn't work on an array. The
> fact is that most of the rest of the Python world isn't array aware
> (and don't care). Matlab or IDL pretty much ensure that everything
> integrates with arrays.

This touches the subject of inconsistency with math.add as one  
example. One of my "favorite" peeve's is how the size (shape) is given  
to functions that generate matrices. In some functions the size is  
given as a tuple, in other the size in different dimensions are given  
as seperate arguments. Here are some examples:

To to create an array with shape M, N you do:
zeros((M, N))
ones((M, N))
rand(M, N)
eye(M, N)

I'm sure more examples exists.

Is it only me that find that increadible irretating?


More information about the SciPy-user mailing list