Skip to content

byte[] transformed to List[int]

Currently byte[] is mapped to List[int]. In general this is done because we couldn't map to numpy types and preserve the contained type. This limitation is beginning to be lifted with numpy 1.21 (where you can write things like npt.NDArray[np.int8]).

Perhaps we should move to the numpy standard form already, but if not, then we should map byte[] to bytearray rather than List[int]. I suggest bytearray rather than bytes because the former is mutable (like a Java array). The complexity in all of this is that byte is a signed integer, whereas bytes in Python are unsigned (https://stackoverflow.com/a/40951288/741316). For this reason, perhaps we should proceed with the npt.NDArray[np.int8] option (and require numpy 1.21 for array types).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information