Skip to content

Commit fc7283b

Browse files
authored
Update docstring of xp keyword in dpnp.interp (#2506)
The PR adds `strict` word in the docstring of `xp` keyword in `dpnp.interp` following similar change implemented in NumPy.
1 parent c15f738 commit fc7283b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
* Improved validation of `--target-hip` build option to only accept a gfx-prefixed value [#2481](https://github.com/IntelPython/dpnp/pull/2481)
1818
* Simplifies backend implementation of `dpnp.kaiser` by getting rid of unnecessary template [#2472](https://github.com/IntelPython/dpnp/pull/2472)
1919
* `--onemkl-interfaces` and `--onemkl-interfaces-dir` options for building script are deprecated, instead `--onemath` and `--onemath-dir` are introduced to be aligned with [oneMath specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onemath/source/) [#2487](https://github.com/IntelPython/dpnp/pull/2487)
20+
* Clarified description of `xp` keyword in docstring of `dpnp.interp` [#2506](https://github.com/IntelPython/dpnp/pull/2506)
2021

2122
### Deprecated
2223

dpnp/dpnp_iface_mathematical.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2784,7 +2784,7 @@ def gradient(f, *varargs, axis=None, edge_order=1):
27842784

27852785

27862786
def interp(x, xp, fp, left=None, right=None, period=None):
2787-
"""
2787+
r"""
27882788
One-dimensional linear interpolation.
27892789
27902790
Returns the one-dimensional piecewise linear interpolant to a function
@@ -2800,11 +2800,11 @@ def interp(x, xp, fp, left=None, right=None, period=None):
28002800
to evaluate the interpolated values.
28012801
28022802
xp : {dpnp.ndarray, usm_ndarray}
2803-
Input 1-D array, expected to have a real-valued
2804-
floating-point data type. The x-coordinates of the data points,
2805-
must be increasing if argument `period` is not specified.
2806-
Otherwise, `xp` is internally sorted after normalizing
2807-
the periodic boundaries with ``xp = xp % period``.
2803+
Input 1-D array, expected to have a real-valued floating-point data
2804+
type. The x-coordinates of the data points, must be strictly increasing
2805+
if argument `period` is not specified. Otherwise, `xp` is internally
2806+
sorted after normalizing the periodic boundaries with
2807+
:math:`xp = xp \% period`.
28082808
28092809
fp : {dpnp.ndarray, usm_ndarray}
28102810
Input 1-D array. The y-coordinates of the data points,

0 commit comments

Comments
 (0)