[NumPy-Tickets] [NumPy] #2032: cross doesn't broadcast correctly

NumPy Trac numpy-tickets@scipy....
Fri Jan 27 15:13:12 CST 2012


#2032: cross doesn't broadcast correctly
--------------------+-------------------------------------------------------
 Reporter:  irving  |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.1      
 Keywords:          |  
--------------------+-------------------------------------------------------
 cross doesn't broadcast correctly in all cases.  Here's an example:

     >>> cross(random.randn(2,1,3),random.randn(5,3))
     Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File
 "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
 /site-packages/numpy/core/numeric.py", line 1377, in cross
         x = a[1]*b[2] - a[2]*b[1]
     ValueError: operands could not be broadcast together with shapes (1,2)
 (5)

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2032>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list