Peter Otten wrote:
> Peter Otten wrote:
>
>> # use at your own risk
>> import numpy
>>
>> N = 10**4 # I get a MemoryError for a bigger exponent
>> b = numpy.array(range(N))
>> a = numpy.zeros((N, N)) + b
>> a *= a.transpose()
>> a[0,0] = (b*b).sum()
>> print a
>
> Sorry, this is nonsense.
Mayb
Peter Otten wrote:
> # use at your own risk
> import numpy
>
> N = 10**4 # I get a MemoryError for a bigger exponent
> b = numpy.array(range(N))
> a = numpy.zeros((N, N)) + b
> a *= a.transpose()
> a[0,0] = (b*b).sum()
> print a
Sorry, this is nonsense.
--
http://mail.python.org/mailman/listin
[EMAIL PROTECTED] wrote:
> I was trying to create a sparse matrix using scipy.sparse (10 X
> 10) with just the first row and first column filled with ones.
> Lets call this matrix Asp. This is how I created Asp
>
> from scipy import sparse
> Asp = scipy.lil_matrix(10,10)
> for i i
I was trying to create a sparse matrix using scipy.sparse (10 X
10) with just the first row and first column filled with ones.
Lets call this matrix Asp. This is how I created Asp
from scipy import sparse
Asp = scipy.lil_matrix(10,10)
for i in range(10):
Asp[i,0] = i
Asp[