Definition of dot function
Hi, Can someone point me to the definition of dot() in the numpy source? The only instance of 'def dot()' I found was in numpy/ma/extras.py but that does not seem to be the correct one. ~mayank  Mayank Daga "Nothing Succeeds Like Success"
On Thu, 20130307 at 13:36 0600, Mayank Daga wrote:
Can someone point me to the definition of dot() in the numpy source? The only instance of 'def dot()' I found was in numpy/ma/extras.py but that does not seem to be the correct one.
It seems to be in a dynamic library. In [9]: numpy.dot.__module__ Out[9]: 'numpy.core.multiarray' In [10]: numpy.core.multiarray.__file__ Out[10]: '/usr/local/lib/python2.7/distpackages/numpy/core/multiarray.so' so... in here perhaps? https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/multiar... hen
On 7 Mar 2013 20:27, "Henry Gomersall" <heng@cantab.net> wrote:
On Thu, 20130307 at 13:36 0600, Mayank Daga wrote:
Can someone point me to the definition of dot() in the numpy source? The only instance of 'def dot()' I found was in numpy/ma/extras.py but that does not seem to be the correct one.
It seems to be in a dynamic library.
In [9]: numpy.dot.__module__ Out[9]: 'numpy.core.multiarray'
In [10]: numpy.core.multiarray.__file__ Out[10]: '/usr/local/lib/python2.7/distpackages/numpy/core/multiarray.so'
so... in here perhaps?
https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/multiar... The actual entry point is array_matrixproduct in that file, which then calls PyArray_MatrixProduct2, which either does the work or dispatches through a dtypespecific function pointer ('dotfunc'). n
participants (3)

Henry Gomersall

Mayank Daga

Nathaniel Smith