[NumPy-Tickets] [NumPy] #2106: einsum crashes with repeated zero dimension arrays

NumPy Trac numpy-tickets@scipy....
Mon Apr 16 15:53:08 CDT 2012


#2106: einsum crashes with repeated zero dimension arrays
--------------------+-------------------------------------------------------
 Reporter:  rcl33   |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.1      
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by charris):

 There were several bug in einsum in the 1.6.1 release that have been
 fixed. This seems to be among them.

 {{{
 In [1]: a = zeros((3,3,0,0))

 In [2]: b = zeros((0,))

 In [3]: b
 Out[3]: array([], dtype=float64)

 In [4]: einsum('ijpr,p,r', a, b, b)
 Out[4]:
 array([[ 0.,  0.,  0.],
        [ 0.,  0.,  0.],
        [ 0.,  0.,  0.]])

 }}}

 Note that sums over empty arrays are 0.

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


More information about the NumPy-Tickets mailing list