(self, n, dim=0)
| 52 | assert all(x >= 0 for x in self.shape if x is not None) |
| 53 | |
| 54 | def extend(self, n, dim=0): |
| 55 | shape = list(self.shape) |
| 56 | shape[dim] += n |
| 57 | return TensorSpec(tuple(shape), self.dtype) |
| 58 | |
| 59 | def __mul__(self, other): |
| 60 | assert isinstance(other, int) |