Skip to content

Commit

Permalink
Slice padding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Dec 17, 2023
1 parent 7b3cf7e commit 3d4b9d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phiml/math/_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def to_lower_upper(s: slice, size: int) -> Tuple[int, int]:
for width_i in widths_i:
dim, lu = next(iter(width_i.items()))
sum_widths_i[dim] += lu
padded_slices.append(mode[i].pad(x[i], sum_widths_i, **kwargs))
padded_slices.append(mode[i].pad(x[i], {k: tuple(v) for k, v in sum_widths_i.items()}, **kwargs))
return stack(padded_slices, sel_dims)
# for w in widths:
# selection = {dim: i for dim, i in w.items() if not isinstance(i, slice)}
Expand Down

0 comments on commit 3d4b9d4

Please sign in to comment.