I'm afraid the matrix is not available anywhere and I would not be able to
make it available.
However I can demonstrate by simply generating a random number and filling a
10x10 matrix with it.
I generated a random number in numpy and used that to do the same exercise
in numarray.
In numpy:
>>> matrix = numpy.zeros((10,10),'f')
>>> matrix
array([[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32)
>>> number = numpy.random.random_sample()
>>> number
0.41582016134572475
>>> matrix.setfield(number,'f',0)
>>> matrix
array([[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567],
[ 0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567, 0.415820151567, 0.415820151567,
0.415820151567, 0.415820151567]], dtype=float32)
>>> matrix.mean()
0.41582069396972654
In numarray:
>>> matrix = numarray.zeros((10,10),'f')
>>> matrix
array([[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], type=Float32)
>>> number = 0.41582015156745911
>>> for i, item in enumerate(matrix):
... matrix[i] = number
...
>>> matrix
array([[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015],
[ 0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015, 0.41582015, 0.41582015,
0.41582015, 0.41582015]], type=Float32)
>>> matrix.mean()
0.41582015156745911
2008/9/3 David Cournapeau <[EMAIL PROTECTED]>
> Hanni Ali wrote:
> > Hi Matthieu,
> >
> > I thought as much, regarding the computations, but was just presenting
> > the information.
>
> Is your matrix available somewhere so that we can reproduce the problem
> ? Off-hand, I can't see any explanation, but I am not familiar with
> numarray, so maybe I am missing something obvious,
>
> cheers,
>
> David
> _______________________________________________
> Numpy-discussion mailing list
> [email protected]
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion