(self)
| 542 | return LazyTensor(load, self.shape, data_type, f'convert({data_type}) {self.description}') |
| 543 | |
| 544 | def transposed(self) -> LazyTensor: |
| 545 | def load() -> Tensor: |
| 546 | loaded = self.load() |
| 547 | assert isinstance(loaded, UnquantizedTensor), f'Cannot transpose {loaded}' |
| 548 | loaded.ndarray = loaded.ndarray.T |
| 549 | return loaded |
| 550 | return LazyTensor(load, self.shape[::-1], self.data_type, f'transpose {self.description}') |
| 551 | |
| 552 | def validate_conversion_to(self, data_type: DataType) -> None: |
| 553 | if data_type != self.data_type and data_type.name not in self.data_type.valid_conversions: |
no test coverage detected