Skip to content

Commit

Permalink
Fix NumPy pad
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Nov 22, 2023
1 parent 2b79331 commit 8f3f646
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions phiml/backend/_numpy_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def pad(self, value, pad_width, mode='constant', constant_values=0):
if mode not in ('constant', 'symmetric', 'periodic', 'reflect', 'boundary'):
return NotImplemented
if mode == 'constant':
value, constant_values = self.auto_cast(value, constant_values)
return np.pad(value, pad_width, 'constant', constant_values=constant_values)
else:
if mode in ('periodic', 'boundary'):
Expand Down

0 comments on commit 8f3f646

Please sign in to comment.