File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ def __eq__(self, other: object) -> bool:
236
236
237
237
def __hash__(self) -> int:
238
238
# multiply Z by 1000 to avoid hash collisions of element N with isotopes of elements N+/-1,2,3...
239
- return self.Z * 1000 + self.A if self._is_named_isotope else self.Z
239
+ return self.Z * 1000 + self.A if self._is_named_isotope else self.Z * 137 * 100
240
240
241
241
def __repr__(self) -> str:
242
242
return f"Element {self.symbol}"
@@ -1605,7 +1605,7 @@ def get_el_sp(obj: SpeciesLike) -> Element | Species | DummySpecies:
1605
1605
pass
1606
1606
1607
1607
1608
- @functools.lru_cache
1608
+ @functools.lru_cache(maxsize=1024)
1609
1609
def get_el_sp(obj: int | SpeciesLike) -> Element | Species | DummySpecies:
1610
1610
"""Utility function to get an Element, Species or DummySpecies from any input.
1611
1611
You can’t perform that action at this time.
0 commit comments