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:
236236
237237 def __hash__ (self ) -> int :
238238 # 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
240240
241241 def __repr__ (self ) -> str :
242242 return f"Element { self .symbol } "
@@ -1605,7 +1605,7 @@ def get_el_sp(obj: SpeciesLike) -> Element | Species | DummySpecies:
16051605 pass
16061606
16071607
1608- @functools .lru_cache
1608+ @functools .lru_cache ( maxsize = 1024 )
16091609def get_el_sp (obj : int | SpeciesLike ) -> Element | Species | DummySpecies :
16101610 """Utility function to get an Element, Species or DummySpecies from any input.
16111611
You can’t perform that action at this time.
0 commit comments