summaryrefslogtreecommitdiff
path: root/numpy/core/_internal.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-06-10 01:55:48 +0000
committercookedm <cookedm@localhost>2006-06-10 01:55:48 +0000
commit4d4224461cf4e33b6ee66006254ea5273fc82583 (patch)
tree967d38caf79664703ab27dda77cee4db7c1ef47d /numpy/core/_internal.py
parentde1dedc34a2ec31c35a108b9d558484e81c17bb1 (diff)
downloadnumpy-4d4224461cf4e33b6ee66006254ea5273fc82583.tar.gz
Add a version number to pickles of ndarray and dtype.
This is backwards compatible. Also added test cases to make sure.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r--numpy/core/_internal.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index 20117d4fd..abd0342b6 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -100,6 +100,10 @@ def _array_descr(descriptor):
return result
+# Build a new array from the information in a pickle.
+# Note that the name numpy.core._internal._reconstruct is embedded in
+# the pickles of ndarrays, so don't remove the name here, or you'll
+# break backward compatibilty.
def _reconstruct(subtype, shape, dtype):
return ndarray.__new__(subtype, shape, dtype)