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

Adds sample selection to equivariant power spectrum #376

Merged
merged 5 commits into from
Jan 30, 2025

Conversation

bananenpampe
Copy link
Contributor

Adds sample selection to the equivariant power spectrum convenience class.

@@ -4,6 +4,7 @@
import numpy as np
import pytest
from metatensor import Labels, TensorBlock, TensorMap
from metatensor.operations import equal, join
Copy link
Member

Choose a reason for hiding this comment

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

Please don't import from metatensor.operations. This could be written

from metatensor import equal, join

Or even better

Suggested change
from metatensor.operations import equal, join
import metatensor as mts

and down the line mts.equal, mts.join

(like you would not do from numpy import log but instead use np.log where required)

@Luthaf
Copy link
Member

Luthaf commented Jan 29, 2025

Thanks, looks very good overall! I just have one style comment about importing metatensor operations.

Copy link
Member

@jwa7 jwa7 left a comment

Choose a reason for hiding this comment

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

Thanks @bananenpampe !

@bananenpampe
Copy link
Contributor Author

test makes the naming consitent with the other tests

@Luthaf Luthaf merged commit 5b04644 into metatensor:main Jan 30, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants