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

MAINT: linalg: fix comment, simplify math #7631

Merged
merged 1 commit into from
May 15, 2016

Conversation

perimosocordiae
Copy link
Contributor

The comment was a simple copy-paste error.

I find the math easier to look at in this form, with the common terms factored out.

# cost2 = cost((AB)C)
cost2 = (B.shape[0] * B.shape[1] * C.shape[1] + # (BC)
A.shape[0] * A.shape[1] * C.shape[1]) # A(--)
cost1 = a0 * b1 * (a1 + b1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a0 * b1 * (a1 + c1).

@perimosocordiae
Copy link
Contributor Author

Oops, good catch. The math is fixed now, and the names and comments should be more informative. I'll wait to squash the commits until it's ready to go.

@jaimefrio
Copy link
Member

If you squash the commits I'll hit the merge button, LGTM now.

The comment was a simple copy-paste error.

I find the math easier to look at in this form,
with the common terms factored out.
@perimosocordiae
Copy link
Contributor Author

Squashed.

@jaimefrio jaimefrio merged commit e96ebfc into numpy:master May 15, 2016
@jaimefrio
Copy link
Member

Thanks CJ!

@perimosocordiae perimosocordiae deleted the patch-2 branch July 18, 2017 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants