Could someone explain this multidimensional list behaviour?
Fernando PĂ©rez
fperez528 at yahoo.com
Thu Nov 22 12:02:04 EST 2001
L wrote:
> So what is the easy way to allocate an n x n matrix with unique
> values?
If this is for numerical work, check out Numeric at
http://www.pfdubois.com/numpy
It will give you *much* faster performance than regular python lists, and
what you want to do is simply:
In[5]:= x=zeros([2,3],Float)
In[6]:= x
Out[6]= array([[ 0., 0., 0.],
[ 0., 0., 0.]])
Cheers,
f
More information about the Python-list
mailing list