Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions onnxscript/ir/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __init__(
self._shape = Shape(getattr(value, "shape"), frozen=True) # noqa: B009
else:
self._shape = shape
self._shape._frozen = True
self._shape.freeze()
if dtype is None:
if isinstance(value, np.ndarray):
self._dtype = _enums.DataType.from_numpy(value.dtype)
Expand Down Expand Up @@ -564,7 +564,7 @@ def __init__(
self._dtype: _enums.DataType = dtype
self.name: str = name # mutable
self._shape: Shape = shape
self._shape._frozen = True
self._shape.freeze()
self.doc_string: str | None = doc_string # mutable
self._array: np.ndarray | None = None
self.raw: mmap.mmap | None = None
Expand Down Expand Up @@ -783,7 +783,7 @@ def __init__(
self._shape = Shape(getattr(value, "shape"), frozen=True) # noqa: B009
else:
self._shape = shape
self._shape._frozen = True
self._shape.freeze()
self._raw = value
self.name = name
self.doc_string = doc_string
Expand Down
Loading