8000 Tomography L1 reconstruction example: use dot product operator by nils-werner · Pull Request #18722 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Tomography L1 reconstruction example: use dot product operator #18722

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

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

nils-werner
Copy link
Contributor

Reference Issues/PRs

None

What does this implement/fix? Explain your changes.

In the compressive sensing example, there is a line that looks like a hadamard product

proj = proj_operator * data.ravel()[:, np.newaxis]

but, because proj_operator is a scipy.sparse.coo.coo_matrix, this line is actually a dot product. To make this clear and to improve readability, the operator was changed to @

proj = proj_operator @ data.ravel()[:, np.newaxis]

Copy link
Member
@rth rth left a comment

Choose a reason for hiding this comment

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

Thanks @nils-werner ! LGTM. I can also confirm the the generated figures are unchanged.

@glemaitre glemaitre merged commit d619d96 into scikit-learn:master Nov 2, 2020
@glemaitre
Copy link
Member

Thanks @nils-werner

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

Successfully merging this pull request may close these issues.

3 participants
0