Show More
@@ -119,7 +119,7 b' class SerializeIt(object):' | |||
|
119 | 119 | elif self.typeDescriptor in ('bytes', 'buffer'): |
|
120 | 120 | self.data = self.obj |
|
121 | 121 | elif self.typeDescriptor == 'pickle': |
|
122 |
self.data = pickle.dumps(self.obj, |
|
|
122 | self.data = pickle.dumps(self.obj, -1) | |
|
123 | 123 | else: |
|
124 | 124 | raise SerializationError("Really wierd serialization error.") |
|
125 | 125 | del self.obj |
@@ -160,7 +160,7 b' def serialize_object(obj, threshold=64e-6):' | |||
|
160 | 160 | clist = canSequence(obj) |
|
161 | 161 | slist = map(serialize, clist) |
|
162 | 162 | for s in slist: |
|
163 | if s.getDataSize() > threshold: | |
|
163 | if s.typeDescriptor in ('buffer', 'ndarray') or s.getDataSize() > threshold: | |
|
164 | 164 | databuffers.append(s.getData()) |
|
165 | 165 | s.data = None |
|
166 | 166 | return pickle.dumps(slist,-1), databuffers |
General Comments 0
You need to be logged in to leave comments.
Login now