| 2 | |
| 3 | |
| 4 | class AsContiguousArray: |
| 5 | def __init__(self): |
| 6 | super().__init__() |
| 7 | |
| 8 | def __call__(self, sample): |
| 9 | for key in sample: |
| 10 | if isinstance(sample[key], np.ndarray): |
| 11 | sample[key] = np.ascontiguousarray(sample[key]) |
| 12 | return sample |
nothing calls this directly
no outgoing calls
no test coverage detected