[SciPy-user] array vs matrix, converting code from matlab

Robert Kern robert.kern at gmail.com
Thu Apr 20 23:44:01 CDT 2006

David Cournapeau wrote:
> Gennan Chen wrote:
>>Hi! All,
>>I am also in the same process. And I would like to add one more  
>>In Matlab, for a 3D array or matrix, the indexing is a(i,j,k). In  
>>numpy, it became a[k-1,i-1,j-1]. Is there any way to make it become
>>a[i-1,j-1,k-1]? Or I am doing something wrong here??
>     To be more specific, I am trying to convert a function which compute 
> multivariate Gaussian densities. It should be able to handle scalar 
> case, the case where the mean is a vector, and the case where va is a 
> vector (diagonal covariance matrix) or square matrix (full covariance 
> matrix).

Also, both of you might want to take a look at this page and its links:


Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the SciPy-user mailing list