[Numpy-tickets] [NumPy] #432: cov segfaults when input is oriented incorrectly

NumPy numpy-tickets@scipy....
Mon Apr 9 13:08:14 CDT 2007


#432: cov segfaults when input is oriented incorrectly
--------------------+-------------------------------------------------------
 Reporter:  dhuard  |        Owner:  somebody
     Type:  defect  |       Status:  reopened
 Priority:  normal  |    Milestone:          
Component:  Other   |      Version:          
 Severity:  normal  |   Resolution:          
 Keywords:          |  
--------------------+-------------------------------------------------------
Comment (by charris):

 Another possibility is:

 X -= X.mean(axis=1-axis)[tup]

 Which for your array (X) would be


 {{{
 Y = X.mean(axis=0)
 X -= Y[slice(None),newaxis]
 }}}

 This checks the computation of the mean, then the -= operator. I am a bit
 suspicious of the latter.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/432#comment:8>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list