You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding NDCollection, I suppose this means we would have to support __setitem__. Instead of raising an error, we could raise a warning saying that using __setitem__ is discouraged, and NDCollection.update is recommended.
I suspect both of these are about subtitles in how unpickling works, I don't think it calls the __init__. We can probably fix both of them by implementing things from the pickle interface: https://docs.python.org/3/library/pickle.html#pickle-inst or just refactoring weird things we do.
So by implementing some (all?) of those methods, we need to somehow capture/handle the attributes set in the __init__: self.meta, self._aligned_axes, and self.n_aligned_axes?
If I'm right so far, it's not clear to me which of those methods we would need, or how we need to implement them.
Activity
[-]`NDMeta` can not be pickled[/-][+]`NDMeta` and `NDCollection` can not be pickled[/+]DanRyanIrish commentedon Jun 12, 2025
I don't understand this bug for
NDMeta. It DOES have aself._axesattribute...DanRyanIrish commentedon Jun 12, 2025
Regarding
NDCollection, I suppose this means we would have to support__setitem__. Instead of raising an error, we could raise a warning saying that using__setitem__is discouraged, andNDCollection.updateis recommended.Cadair commentedon Jun 12, 2025
I suspect both of these are about subtitles in how unpickling works, I don't think it calls the
__init__. We can probably fix both of them by implementing things from the pickle interface: https://docs.python.org/3/library/pickle.html#pickle-inst or just refactoring weird things we do.DanRyanIrish commentedon Jun 12, 2025
So by implementing some (all?) of those methods, we need to somehow capture/handle the attributes set in the
__init__:self.meta,self._aligned_axes, andself.n_aligned_axes?If I'm right so far, it's not clear to me which of those methods we would need, or how we need to implement them.
Cadair commentedon Jun 12, 2025
I suspect the best thing to do would be to refactor the
__init__a bit. I'm not really sure how with out looking into it more.