[NumPy-Tickets] [NumPy] #2096: ndarray.dot rejects "out" argument

NumPy Trac numpy-tickets@scipy....
Mon Apr 2 23:18:36 CDT 2012


#2096: ndarray.dot rejects "out" argument
------------------------------------+---------------------------------------
 Reporter:  JLull                   |       Owner:  somebody   
     Type:  defect                  |      Status:  new        
 Priority:  normal                  |   Milestone:  Unscheduled
Component:  numpy.core              |     Version:  1.6.1      
 Keywords:  ndarray matrix dot out  |  
------------------------------------+---------------------------------------

Comment(by JLull):

 I apologize for the really horrible formatting of my original description.
 This should be clearer.

 Testing with:
 {{{
 python 2.7.2\
 Pywin32 build 217
 numpy-1.6.1-win32-superpack-python2.7.exe
 }}}
 Any call to ndarray.dot() with an "out" argument fails:
 {{{
 >>> import numpy
 >>> numpy.version.version
 '1.6.1'
 >>> a=numpy.array(((1,2),(3,4)))
 >>> b=numpy.array((5,6))
 >>> c=numpy.array((7,8))
 >>> a.dot(b)
 array([17, 39])
 >>> a.dot(b,c)
 Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
 TypeError: function takes exactly 1 argument (2 given)
 >>> a.dot(b,out=c)
 Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
 TypeError: dot() takes no keyword arguments
 }}}
 Equivalent calls to numpy.dot() succeed:
 {{{
 >>> numpy.dot(a,b,c)
 array([17, 39])
 >>> numpy.dot(a,b,out=c)
 array([17, 39])
 }}}
 Similar calls to matrix.dot() with an "out" argument also fail (not shown)

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


More information about the NumPy-Tickets mailing list