We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 329a798 commit a002db1Copy full SHA for a002db1
src/onnx_ir/_core.py
@@ -512,7 +512,10 @@ def tobytes(self) -> bytes:
512
}:
513
# Pack the array into int4
514
array = _type_casting.pack_4bitx2(array)
515
- else:
+ elif self.dtype not in {
516
+ _enums.DataType.STRING,
517
+ _enums.DataType.UNDEFINED,
518
+ }:
519
assert self.dtype.itemsize == array.itemsize, "Bug: The itemsize should match"
520
if not _IS_LITTLE_ENDIAN:
521
array = array.view(array.dtype.newbyteorder("<"))
0 commit comments