Skip to content

Commit

Permalink
Merge pull request #4 from pkhalaj/fix/typo-with-n_dim
Browse files Browse the repository at this point in the history
Fix #3 by replacing `self.n_dims` (typo) with `self.n_dim` (correct)
  • Loading branch information
simonpf authored Nov 25, 2024
2 parents 10f0fba + 132b49d commit 1feefac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chimp/data/gridsat.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def load_sample(
rel_scale = self.scale / base_scale

if isinstance(crop_size, int):
crop_size = (crop_size,) * self.n_dims
crop_size = (crop_size,) * self.n_dim
crop_size = tuple((int(size / rel_scale) for size in crop_size))

if input_file is not None:
Expand Down
2 changes: 1 addition & 1 deletion chimp/data/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def load_sample(
rel_scale = self.scale / base_scale

if isinstance(crop_size, int):
crop_size = (crop_size,) * self.n_dims
crop_size = (crop_size,) * self.n_dim
crop_size = tuple((int(size / rel_scale) for size in crop_size))

if input_file is not None:
Expand Down
2 changes: 1 addition & 1 deletion chimp/data/patmosx.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def load_sample(
rel_scale = self.scale / base_scale

if isinstance(crop_size, int):
crop_size = (crop_size,) * self.n_dims
crop_size = (crop_size,) * self.n_dim
crop_size = tuple((int(size / rel_scale) for size in crop_size))

if input_file is not None:
Expand Down
2 changes: 1 addition & 1 deletion chimp/data/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def load_sample(
from pytorch_retrieve.tensors.masked_tensor import MaskedTensor
rel_scale = self.scale / base_scale
if isinstance(crop_size, int):
crop_size = (crop_size,) * self.n_dims
crop_size = (crop_size,) * self.n_dim
crop_size = tuple((int(size / rel_scale) for size in crop_size))
row_slice, col_slice = scale_slices(slices, rel_scale)

Expand Down

0 comments on commit 1feefac

Please sign in to comment.