ezmsg-org / ezmsg

Pure-Python DAG-based high-performance SHM-backed pub-sub and multi-processing pattern
https://ezmsg.readthedocs.io/en/latest/
MIT License
9 stars 4 forks source link

[For Discussion] Should AxisArray.axes be a frozendict? #125

Open cboulay opened 1 month ago

cboulay commented 1 month ago

As mentioned in ezmsg-org/ezmsg-sigproc#7 , I sometimes bungle the AxisArray creation / copying / manipulation and end up mutating an object that is referenced elsewhere. At least some of my mistakes could have been prevented if AxisArray's .axes field was a frozendict. I understand the hesitation to bring in a 3rd party dependency so I won't push on this at all, but if not frozendict then it would be nice if there was another way to prevent mutating .axes.

griffinmilsap commented 1 month ago

agreed, and also manipulating AxisArrays is a bit of a pain in general. I don't like .ax and .axes etc.. I need to put some time into an axisarray refactor including a basic coords impl. soon