Download runtime/code/src/nnUNet/nnunetv2/preprocessing/resampling/no_resampling.py from edschen/eagle-u-pair-2c: direct link, hf CLI and curl.
- Browser
- Download file 375 Bytes
-
https://huggingface.co/edschen/eagle-u-pair-2c/resolve/main/runtime/code/src/nnUNet/nnunetv2/preprocessing/resampling/no_resampling.py
- Command line
-
hf download hf://edschen/eagle-u-pair-2c/runtime/code/src/nnUNet/nnunetv2/preprocessing/resampling/no_resampling.py
-
curl -L -o no_resampling.py https://huggingface.co/edschen/eagle-u-pair-2c/resolve/main/runtime/code/src/nnUNet/nnunetv2/preprocessing/resampling/no_resampling.py
375 Bytes
| from typing import Union, Tuple, List | |
| import numpy as np | |
| import torch | |
| def no_resampling_hack( | |
| data: Union[torch.Tensor, np.ndarray], | |
| new_shape: Union[Tuple[int, ...], List[int], np.ndarray], | |
| current_spacing: Union[Tuple[float, ...], List[float], np.ndarray], | |
| new_spacing: Union[Tuple[float, ...], List[float], np.ndarray] | |
| ): | |
| return data |