# Matrix vs ndarray

4 messages
Open this post in threaded view
|

## Matrix vs ndarray

 Hi Numpy users,    I used MATLAB to do numerical calculations for a long time. Recently I am digging into python and numpy. I am wondering about the following question :1) What is the difference between ndarray and matrix in numpy? My idea is that having N-dimensional array is sufficient (of course a MATLAB users point of view). If anyone can provide some idea, I will appreciate it. Thanks & regards,Santanu _______________________________________________ Numpy-discussion mailing list [hidden email] http://projects.scipy.org/mailman/listinfo/numpy-discussion
Open this post in threaded view
|

## Re: Matrix vs ndarray

 You might find out a lot from reading through this page: http://www.scipy.org/NumPy_for_Matlab_UsersWhat I think that doesn't say is why the two classes are needed in NumPy.  Basically, the reason for that is that Matlab has .* and * which mean different things, but  Python only has the one * operator. Some people think that should mean .*,  some want it to mean *.  So NumPy offers two different classes with different behavior instead of two different operators. --bb On Fri, Apr 18, 2008 at 4:02 AM, Santanu Chatterjee <[hidden email]> wrote: > Hi Numpy users, >     I used MATLAB to do numerical calculations for a long time. Recently I > am digging into python and numpy. I am wondering about the following > question : > > 1) What is the difference between ndarray and matrix in numpy? My idea is > that having N-dimensional array is sufficient (of course a MATLAB users > point of view). If anyone can provide some idea, I will appreciate it. > > Thanks & regards, > Santanu > > _______________________________________________ >  Numpy-discussion mailing list >  [hidden email] >  http://projects.scipy.org/mailman/listinfo/numpy-discussion> > _______________________________________________ Numpy-discussion mailing list [hidden email] http://projects.scipy.org/mailman/listinfo/numpy-discussion