[SciPy-user] array vs matrix, converting code from matlab
Robert Kern
robert.kern at gmail.com
Fri Apr 21 00:44:01 EDT 2006
David Cournapeau wrote:
> Gennan Chen wrote:
>
>>Hi! All,
>>
>>I am also in the same process. And I would like to add one more
>>question:
>>
>>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:
http://www.scipy.org/NumPy_for_Matlab_Users
--
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