(self, data_type: DataType)
| 842 | return ret |
| 843 | |
| 844 | def astype(self, data_type: DataType) -> LazyTensor: |
| 845 | self.validate_conversion_to(data_type) |
| 846 | |
| 847 | def load() -> Tensor: |
| 848 | return self.load().astype(data_type) |
| 849 | return LazyTensor(load, self.shape, data_type, f'convert({data_type}) {self.description}') |
| 850 | |
| 851 | def validate_conversion_to(self, data_type: DataType) -> None: |
| 852 | if data_type != self.data_type and data_type.name not in self.data_type.valid_conversions: |
nothing calls this directly
no test coverage detected