Skip to content

Adds sample selection to equivariant power spectrum#376

Merged
Luthaf merged 5 commits intometatensor:mainfrom
bananenpampe:master
Jan 30, 2025
Merged

Adds sample selection to equivariant power spectrum#376
Luthaf merged 5 commits intometatensor:mainfrom
bananenpampe:master

Conversation

@bananenpampe
Copy link
Contributor

Adds sample selection to the equivariant power spectrum convenience class.

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 !

…m.py

Co-authored-by: Joseph W. Abbott <joseph.william.abbott@gmail.com>
@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