MDANSE
MDANSE copied to clipboard
[BUG] `Trajectory` `_atom_cache` issues
Description of the error
Atom cache could be implemented as a @functools.cached_property. However, it also creates duplicate cache entries for np.str_("C") and "C".
Describe the expected result No dups? Standard implementation.
Describe the actual result Custom implementation
Suggested fix
Use functools.cached_property ensure types are cast before entry (possibly using functools.singledispatchmethod to cast)
Additional details N/A