Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid numpy.trace docstring (Trac #532) #1130

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 3 comments
Closed

Invalid numpy.trace docstring (Trac #532) #1130

numpy-gitbot opened this issue Oct 19, 2012 · 3 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/532 on 2007-06-01 by @pv, assigned to unknown.

The numpy.trace docstring is invalid, trace actually sums over the diagonal in the first two axes by default:

import numpy as N
print N.__version__
N.info(N.trace)
x = N.zeros((4,4,5,6))
print N.trace(x).shape
x = N.zeros((5,6,4,4))
print N.trace(x).shape

outputs

1.0.3
 trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None)

trace(a,offset=0, axis1=0, axis2=1) returns the sum along diagonals
(defined by the last two dimenions) of the array.
(5, 6)
(4, 4)
@numpy-gitbot
Copy link
Author

Attachment added by @pv on 2007-06-01: 0001-Fix-trace-docstring.patch

@numpy-gitbot
Copy link
Author

Milestone changed to 1.0.4 Release by @alberts on 2007-07-10

@numpy-gitbot
Copy link
Author

@stefanv wrote on 2007-09-30

Fixed by charris.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant