segmentation fault in scipy?

py_genetic conor.robinson at
Thu May 11 22:49:05 CEST 2006

>Now I'm even more confused. What kind of array is "error" here? First you tell
>me it's a (25000, 80) array and now you are telling me it is a (25000,) array.
>Once you've defined what "error" is, then please tell me what the quantity is
>that you want to calculate. I think I told you several different wrong things,
>previously, based on wrong assumptions.

It's just in my original post I was trying to get across maximum size
of the arrays I'm using. sorry for the confusion, I didn't state actual
size of my output vectors.  I discovered the probelm when your first

>If error.shape == (25000, 80), then dot(error, transpose(error)) will be
>returning an array of shape (25000, 25000)

Which was exactly related to the excessive calculation I was running
and set off the red flags and made it very clear.

Later I was somewhat confused and believed that you we were talking
about two different things regarding SSE when you said:

SSE = sum(multiply(error, error), axis=None)

And didn't realize that multipy() was an efficient element mult method
for matricies, thinking it was like matrixmultiply() and gave you back
the old trace sse method but with the casting (not meaning to
contradict you).  However all is now very clear, and I agree with
element wise mult or even squaring the output error, and have no real
reason why I was using trace, except I had a faint memory of using it
in a class for small experiments in matlab (i guess the idea was to
keep everything in linear algebra) and I spit it up for some reason
when I was doing a quicky error function.

More information about the Python-list mailing list