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

Charles R Harris charlesr.harris@gmail....
Sun Dec 20 20:52:18 CST 2009


On Sun, Dec 20, 2009 at 7:37 PM, Wayne Watson
<sierra_mtnview@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.orgsite. 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091220/ca8cfd38/attachment.html 


More information about the NumPy-Discussion mailing list