Skip to content

Commit

Permalink
Fix padding width (#333)
Browse files Browse the repository at this point in the history
Fix issues for NN-based methods with larger number of CVs.
  • Loading branch information
pabloferz committed Aug 22, 2024
1 parent 9c8d2a4 commit aa4c027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysages/ml/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def convolve(data, kernel, boundary="edge"):
if n == 1:
padding = (kernel.size - 1) // 2
else:
padding = [tuple((s - 1) // 2 for _ in range(n)) for s in kernel.shape]
padding = [((s - 1) // 2, (s - 1) // 2) for s in kernel.shape]

def pad(slice):
return np.pad(slice, padding, mode=boundary)
Expand Down

0 comments on commit aa4c027

Please sign in to comment.