Show More
@@ -94,8 +94,10 class SerializeIt(object): | |||
|
94 | 94 | self.data = None |
|
95 | 95 | self.obj = unSerialized.getObject() |
|
96 | 96 | if globals().has_key('numpy') and isinstance(self.obj, numpy.ndarray): |
|
97 |
|
|
|
98 | raise SerializationError("You cannot send a length 0 array") | |
|
97 | if len(self.obj.shape) == 0: # length 0 arrays are just pickled | |
|
98 | self.typeDescriptor = 'pickle' | |
|
99 | self.metadata = {} | |
|
100 | else: | |
|
99 | 101 | self.obj = numpy.ascontiguousarray(self.obj, dtype=None) |
|
100 | 102 | self.typeDescriptor = 'ndarray' |
|
101 | 103 | self.metadata = {'shape':self.obj.shape, |
General Comments 0
You need to be logged in to leave comments.
Login now