Update array2d.pyi

This commit is contained in:
blueloveTH 2024-02-07 20:14:32 +08:00
parent 6051652405
commit ca83cdf995

View File

@ -85,7 +85,7 @@ class array2d(Generic[T]):
for i in range(self.numel): for i in range(self.numel):
self.data[i] = f(self.data[i]) self.data[i] = f(self.data[i])
def copy_(self, other: 'array2d[T]' | list['T']) -> None: def copy_(self, other: 'array2d[T] | list[T]') -> None:
if isinstance(other, list): if isinstance(other, list):
assert len(other) == self.numel assert len(other) == self.numel
self.data = other.copy() self.data = other.copy()