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
Also, how can I interactively develop an accessor? If I try to
re-register under the same name, I get the error
AccessorRegistrationError: cannot register accessor <class
'main.ExchAccessor'> under name 'exch' for type <class
'xarray.core.dataset.Dataset'> because an attribute with that name
already exists.
Btw, perhaps it might be better to (perhaps optionally) issue a warning when overriding an existing class attribute during registering instead of completely refusing to do so.
I think this is a good idea, and would nicely solve @rabernat's problem (which might be your problem, too). We could add a new keyword argument (e.g., allow_override=True or warn=True to register_*_accessor) which switches to this new mode.
Should it be the default behavior? It is also possible that warnings instead of errors are enough in general.
The text was updated successfully, but these errors were encountered:
Also, how can I interactively develop an accessor? If I try to
re-register under the same name, I get the error
AccessorRegistrationError: cannot register accessor <class
'main.ExchAccessor'> under name 'exch' for type <class
'xarray.core.dataset.Dataset'> because an attribute with that name
already exists.
Btw, perhaps it might be better to (perhaps optionally) issue a
warning when overriding an existing class attribute during registering
instead of completely refusing to do so.
I think this is a good idea, and would nicely solve @rabernat's problem
(which might be your problem, too). We could add a new keyword argument
(e.g., allow_override=True or warn=True to register_*_accessor)
which switches to this new mode.
Should it be the default behavior? It is also possible that warnings
instead of errors are enough in general.
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub: #1082
Sent from my Android device with K-9 Mail. Please excuse my brevity.
On the mailing list, @rabernat wrote:
In #1080, @smartass101 suggests:
I think this is a good idea, and would nicely solve @rabernat's problem (which might be your problem, too). We could add a new keyword argument (e.g.,
allow_override=True
orwarn=True
toregister_*_accessor
) which switches to this new mode.Should it be the default behavior? It is also possible that warnings instead of errors are enough in general.
The text was updated successfully, but these errors were encountered: