summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-11-19 12:53:42 -0600
committerSebastian Berg <sebastian@sipsolutions.net>2020-11-19 13:09:37 -0600
commit5f316a85dd205cb0a6134a5a1e6b5bc76943f17c (patch)
tree287bb2c8036eb103dd1c4e1b726729797aecc49d /numpy/lib/index_tricks.py
parent44d66b8a3fbc88998b98d7bffc20bc9fa89251a5 (diff)
downloadnumpy-5f316a85dd205cb0a6134a5a1e6b5bc76943f17c.tar.gz
BUG: Fix pickling of scalars with NPY_LISTPICKLE
Structured void scalars (or potentially other dtypes using LISTPICKLE) were incorrectly pickled and unpickled previously. While the pickled value was valid and could have been used to reconstruct the data, the reconstruction itself would always fail. The approach here is to always pickle the full array and use the arrays pickle/unpickle machinery which handles structured void correctly. Future work could improve on this probably. In the (hopefully impossible) case that someone tries to unpickle a numpy object scalar, the code is now fixed to return the pickled value unmodified (but INCREF'd), however a deprecation-warning is given, since such an object should never be created.
Diffstat (limited to 'numpy/lib/index_tricks.py')
0 files changed, 0 insertions, 0 deletions