diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-02-04 15:24:39 -0600 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-02-04 16:46:32 -0600 |
commit | b765975ca89457fea91a63b94075c9e66465e2ea (patch) | |
tree | 6300720ff2675d9a185d10139e5fc95e3b8d1fb8 /numpy/lib/recfunctions.py | |
parent | d3763198673ffc1092539041b8bd23134ae22bee (diff) | |
download | numpy-b765975ca89457fea91a63b94075c9e66465e2ea.tar.gz |
BUG: Allow pickling all relevant DType types/classes
Introducing the metaclass without a canonical top-level name broke
pickling of `type(np.dtype(...))` (which was always just `np.dtype`).
While a better solution will likely be possible by making the
DTypes HeapTypes and this solution may not work for all imaginable
cases (i.e. it is plausible for a dtype to not have a scalar type
associated), using a `copyreg` registration for the metaclass
surprisingly works without any issues and seems like the simplest
solution right now.
Closes gh-16692, gh-18325
Diffstat (limited to 'numpy/lib/recfunctions.py')
0 files changed, 0 insertions, 0 deletions