[Numpy-discussion] Automatic matrices

Sven Schreiber svetosch at gmx.net
Sat Dec 16 15:27:14 EST 2006


Paulo Jose da Silva e Silva schrieb:

> 
> Obs: I remember reading somewhere in the list that we can change the
> behavior of numpy to make it return matrices as default, even in calls
> for functions like zeros or ones. I don't have the reference now. Anyhow
> I wanted a solution that can make any module play nice with matrices.
> 

Yes,

from numpy.matlib import ones, zeros, empty, rand, eye

should cover most cases (at least for me)

-sven



More information about the NumPy-Discussion mailing list