Skip to content

Fix __getitem__ in LabelTensor#546

Merged
dario-coscia merged 4 commits into
mathLab:masterfrom
FilippoOlivo:fix-lt
Apr 14, 2025
Merged

Fix __getitem__ in LabelTensor#546
dario-coscia merged 4 commits into
mathLab:masterfrom
FilippoOlivo:fix-lt

Conversation

@FilippoOlivo
Copy link
Copy Markdown
Member

Fixes #545

@FilippoOlivo FilippoOlivo self-assigned this Apr 11, 2025
@FilippoOlivo FilippoOlivo added bug Something isn't working high priority Higher priority pr-to-review Label for PR that are ready to been reviewed labels Apr 11, 2025
Copy link
Copy Markdown
Collaborator

@GiovanniCanali GiovanniCanali left a comment

Choose a reason for hiding this comment

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

Everything ok for me, @FilippoOlivo! Check comment on missing docstring!

Comment thread pina/label_tensor.py Outdated
Comment thread pina/label_tensor.py Outdated

old_dof = old_labels[to_update_dim]["dof"]
old_dof = old_labels[dim]["dof"]
label_name = old_labels[dim]["name"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do we use old_labels and don't simply pass self.labels?

Comment thread pina/label_tensor.py
Comment thread pina/label_tensor.py Outdated
@dario-coscia
Copy link
Copy Markdown
Collaborator

@FilippoOlivo great PR! I removed a print statement which was left unintentionally. I'll wait for the tests to run, and if all pass, I will merge in the master. Great job!

@dario-coscia
Copy link
Copy Markdown
Collaborator

All tests passed, except for coverage, which is linked to #548. Merge in master

@dario-coscia dario-coscia merged commit 6ed3ca0 into mathLab:master Apr 14, 2025
18 of 19 checks passed
FilippoOlivo added a commit to FilippoOlivo/PINA that referenced this pull request Apr 17, 2025
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
dario-coscia added a commit that referenced this pull request Apr 17, 2025
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
GiovanniCanali pushed a commit to GiovanniCanali/PINA that referenced this pull request Dec 2, 2025
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
GiovanniCanali pushed a commit to GiovanniCanali/PINA that referenced this pull request Dec 2, 2025
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
GiovanniCanali pushed a commit to GiovanniCanali/PINA that referenced this pull request Dec 2, 2025
* Fix LabelTensor
* Cleaning label_tensor.py

---------

Co-authored-by: Dario Coscia <93731561+dario-coscia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working high priority Higher priority pr-to-review Label for PR that are ready to been reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

__getitem__ in LabelTensor bug with int indexes

3 participants