Skip to content

Conversation

@keviny2
Copy link
Collaborator

@keviny2 keviny2 commented Feb 25, 2025

No description provided.

@keviny2 keviny2 requested a review from jkanche February 25, 2025 17:27
@keviny2
Copy link
Collaborator Author

keviny2 commented Feb 25, 2025

@jkanche do you think it's appropriate to override __eq__ for SpatialImage?

i had to override __hash__ since lru_cache requires the class to be hashable. but this is problematic because the subclasses are mutable (in place operations).

@keviny2 keviny2 merged commit 9da8ad0 into main Feb 25, 2025
7 checks passed
@keviny2 keviny2 deleted the override-eq-spi branch February 25, 2025 22:09
@keviny2 keviny2 linked an issue Feb 25, 2025 that may be closed by this pull request
@jkanche
Copy link
Member

jkanche commented Feb 25, 2025

That should be ok. This is probably the only place we use lru cache i believe.

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.

override __eq__ for SpatialImage

3 participants