throw proper error if numpy array that contains object is serialized

This commit is contained in:
Philipp Moritz
2016-08-08 16:29:59 -07:00
parent 8e165d43d4
commit b6b2b03950
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -47,6 +47,13 @@ class SerializationTests(unittest.TestCase):
for t in ["int8", "uint8", "int16", "uint16", "int32", "uint32", "float32", "float64"]:
self.numpyTest(t)
def testNumpyObject(self):
a = np.array([np.zeros((2,2))], dtype=object)
try:
x = self.roundTripTest([a])
except:
pass
def testRay(self):
for obj in TEST_OBJECTS:
self.roundTripTest([obj])