<p dir="ltr">On 7 Mar 2013 20:27, "Henry Gomersall" <<a href="mailto:heng@cantab.net">heng@cantab.net</a>> wrote:<br>
><br>
> On Thu, 2013-03-07 at 13:36 -0600, Mayank Daga wrote:<br>
> > Can someone point me to the definition of dot() in the numpy source?<br>
> > The only instance of 'def dot()' I found was in numpy/ma/extras.py but<br>
> > that does not seem to be the correct one.<br>
><br>
> It seems to be in a dynamic library.<br>
><br>
> In [9]: numpy.dot.__module__<br>
> Out[9]: 'numpy.core.multiarray'<br>
><br>
> In [10]: numpy.core.multiarray.__file__<br>
> Out[10]:<br>
> '/usr/local/lib/python2.7/dist-packages/numpy/core/multiarray.so'<br>
><br>
> so... in here perhaps?<br>
> <a href="https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/multiarraymodule.c">https://github.com/numpy/numpy/blob/master/numpy/core/src/multiarray/multiarraymodule.c</a></p>
<p dir="ltr">The actual entry point is array_matrixproduct in that file, which then calls PyArray_MatrixProduct2, which either does the work or dispatches through a dtype-specific function pointer ('dotfunc').</p>

<p dir="ltr">-n</p>