Skip to content

Commit dbcdb86

Browse files
committed
change bounds on example
1 parent e916165 commit dbcdb86

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/odrpack/odr_scipy.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,10 @@ def odr_fit(f: Callable[[NDArray[np.float64], NDArray[np.float64]], NDArray[np.f
228228
>>> xdata = np.array([0.982, 1.998, 4.978, 6.01])
229229
>>> ydata = np.array([2.7, 7.4, 148.0, 403.0])
230230
>>> beta0 = np.array([2., 0.5])
231-
>>> lower = np.array([0., 0.])
232-
>>> upper = np.array([10., 0.9])
231+
>>> bounds = (np.array([0., 0.]), np.array([10., 0.9]))
233232
>>> def f(beta: np.ndarray, x: np.ndarray) -> np.ndarray:
234233
... return beta[0] * np.exp(beta[1]*x)
235-
>>> sol = odr_fit(f, xdata, ydata, beta0, bounds=(lower, upper))
234+
>>> sol = odr_fit(f, xdata, ydata, beta0, bounds=bounds)
236235
>>> sol.beta
237236
array([1.63336897, 0.9 ])
238237
"""

0 commit comments

Comments
 (0)