[Numpy-discussion] help(numpy.dot) Hmmm.

Wayne Watson sierra_mtnview at sbcglobal.net
Sun Dec 20 23:44:08 EST 2009


1.2.0. Did you find the description in the reference manual?

Charles R Harris wrote:
>
>
> On Sun, Dec 20, 2009 at 7:37 PM, Wayne Watson 
> <sierra_mtnview at sbcglobal.net <mailto:sierra_mtnview at sbcglobal.net>> 
> wrote:
>
>     I've just become acquainted with the help command in WinXP IDLE.
>     help(numyp.sin) works fine. What's going on with dot?
>
>      >>> help(numpy.core.multiarray.dot)
>     Help on built-in function dot in module numpy.core.multiarray:
>
>     dot(...)
>
>     Is there help for dot?
>
>
> Yes, but you may be using an old version of numpy. What does 
> numpy.__version__ say? You can also find documentation on the 
> scipy.org <http://scipy.org> site. Here is part of the current help:
>
> Help on built-in function dot in module numpy.core._dotblas:
>
> dot(...)
>     dot(a, b)
>    
>     Dot product of two arrays.
>    
>     For 2-D arrays it is equivalent to matrix multiplication, and for 1-D
>     arrays to inner product of vectors (without complex conjugation). For
>     N dimensions it is a sum product over the last axis of `a` and
>     the second-to-last of `b`::
>    
>         dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])
>    
>     Parameters
>     ----------
>     a : array_like
>         First argument.
>     b : array_like
>         Second argument.
>    
>     Returns
>     -------
>     output : ndarray
>         Returns the dot product of `a` and `b`.  If `a` and `b` are both
>         scalars or both 1-D arrays then a scalar is returned; otherwise
>         an array is returned.
>    
>     Raises
>     ------
>     ValueError
>         If the last dimension of `a` is not the same size as
>         the second-to-last dimension of `b`.
>    
>     See Also
>     --------
>     vdot : Complex-conjugating dot product.
>     tensordot : Sum products over arbitrary axes.
>    
>     Examples
>     --------
> ...
>
> Chuck
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>   

-- 
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
              Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet  
                
             "... humans'innate skills with numbers isn't much
              better than that of rats and dolphins." 
                       -- Stanislas Dehaene, neurosurgeon 
 
                    Web Page: <www.speckledwithstars.net/>




More information about the NumPy-Discussion mailing list