Skip to content

Commit e4acdad

Browse files
committed
Remove size specialization of StringTensor which should have been nbytes
Signed-off-by: Christoph Berganski <[email protected]>
1 parent 55512d0 commit e4acdad

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/onnx_ir/_core.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -836,15 +836,10 @@ def shape(self) -> Shape:
836836
"""The shape of the tensor. Immutable."""
837837
return self._shape
838838

839-
@property
840-
def size(self) -> int:
841-
"""The number of elements in the tensor."""
842-
return sum(len(string) for string in self.string_data())
843-
844839
@property
845840
def nbytes(self) -> int:
846841
"""The number of bytes in the tensor."""
847-
return self.size
842+
return sum(len(string) for string in self.string_data())
848843

849844
@property
850845
def raw(self) -> Sequence[bytes] | npt.NDArray[np.bytes_]:

0 commit comments

Comments
 (0)