CAVEconnectome/CAVEclient

Annotation uploading is not robust to some types

ceesem opened this issue · 1 comments

JSON encoding errors can occur with certain combinations of types. In particular, a list of numpy.int32s throws an error when used as a pt_position.

np.integer might make some type checking more robust

print(isinstance(np.array([3], dtype=np.int64)[0], np.integer))
print(isinstance(np.array([3], dtype=np.int32)[0], np.integer))
True
True