[Numpy-discussion] Automatic matrices

Sven Schreiber svetosch at gmx.net
Sat Dec 16 14:27:14 CST 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.


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

should cover most cases (at least for me)


More information about the Numpy-discussion mailing list