[NumPy-Tickets] [NumPy] #2232: numpy.linalg.lstsq segfault

NumPy Trac numpy-tickets@scipy....
Thu Oct 18 14:55:23 CDT 2012


#2232: numpy.linalg.lstsq segfault
------------------------+---------------------------------------------------
 Reporter:  doompie     |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  1.6.2      
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by doompie):

 Obviously the returns got garbled


 {{{
 def newton(response,predictors,N):
  print(response.shape)
  print(predictors.shape)
  print("Guessing beta!")
  beta = numpy.linalg.lstsq(predictors,response)[0]
  print("beta guessed, converting to matrix")
  beta = numpy.matrix(beta)
  print("converted. transposing")
  beta = beta.T
  print("beta guessed")

  ...
 }}}

 as did the backtrace


 {{{
 (7676,)
 (32, 7676)
 Guessing beta!

 *** glibc detected *** python3: double free or corruption (!prev):
 0x000000000e62d440 ***
 ======= Backtrace: =========
 /lib64/libc.so.6[0x3f9227230f] /lib64/libc.so.6(cfree+0x4b)[0x3f9227276b]
 /home/unix/doompie/lib/python/lib/python3.2/site-
 packages/numpy/core/multiarray.cpython-32m.so[0x2b7ffc6e3cca]
 python3[0x4fa46a]

 (etc)



 and successful:

 (7664,)
 (25, 7664)
 Guessing beta!
 beta guessed, converting to matrix
 converted. transposing
 beta guessed
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2232#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list