segmentation fault in scipy?

Robert Kern robert.kern at
Thu May 11 01:48:33 CEST 2006

conor.robinson at wrote:
> Good point.  Finding the SSE using an absolute error matrix of (25000 x
> 1) is insane.  I pulled out the error function (for now) and I'm back
> in business.  Thanks for all the great advise.

Could you go back for a second and describe your problem a little bit more. It
sounds like you were doing the wrong operation. By SSE, you mean "Sum of Squared
Errors" of the 25000 length-80 vectors, right? In that case, using matrix
multiplication won't give you that. That will, in essence calculate the
dot-product of each of the 25000 length-80 vectors with *each* of the other
25000 length-80 vectors in addition to themselves. It seems to me like you want
something like this:

  SSE = sum(error * error, axis=-1)

Then SSE.shape == (25000,).

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the Python-list mailing list