Alias for `phi.field.pad()`. Pads this `Field` using its extrapolation. Unlike padding the values, this function also affects the `geometry` of the field, changing its size and origin depending on `widths`. Args: widths: Either `int` or `(lower, upper)
(self, widths: Union[int, tuple, list, dict])
| 519 | return self.with_geometry(self.geometry.at(position)) |
| 520 | |
| 521 | def pad(self, widths: Union[int, tuple, list, dict]) -> 'Field': |
| 522 | """ |
| 523 | Alias for `phi.field.pad()`. |
| 524 | |
| 525 | Pads this `Field` using its extrapolation. |
| 526 | |
| 527 | Unlike padding the values, this function also affects the `geometry` of the field, changing its size and origin depending on `widths`. |
| 528 | |
| 529 | Args: |
| 530 | widths: Either `int` or `(lower, upper)` to pad the same number of cells in all spatial dimensions |
| 531 | or `dict` mapping dimension names to `(lower, upper)`. |
| 532 | |
| 533 | Returns: |
| 534 | Padded `Field` |
| 535 | """ |
| 536 | from ._field_math import pad |
| 537 | return pad(self, widths) |
| 538 | |
| 539 | def gradient(self, |
| 540 | boundary: Extrapolation = None, |