MDANSE icon indicating copy to clipboard operation
MDANSE copied to clipboard

[BUG] `Trajectory` `_atom_cache` issues

Open oerc0122 opened this issue 5 months ago • 0 comments

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

oerc0122 avatar Oct 14 '25 12:10 oerc0122