Skip to content

Commit 4380088

Browse files
committed
refactor example to use lists as inputs
1 parent 1bc82af commit 4380088

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/odrpack/odr_scipy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ def odr_fit(f: Callable[[F64Array, F64Array], F64Array],
221221
--------
222222
>>> import numpy as np
223223
>>> from odrpack import odr_fit
224-
>>> xdata = np.array([0.982, 1.998, 4.978, 6.01])
225-
>>> ydata = np.array([2.7, 7.4, 148.0, 403.0])
226-
>>> beta0 = np.array([2., 0.5])
227-
>>> bounds = (np.array([0., 0.]), np.array([10., 0.9]))
224+
>>> xdata = [0.982, 1.998, 4.978, 6.01]
225+
>>> ydata = [2.7, 7.4, 148.0, 403.0]
226+
>>> beta0 = [2., 0.5]
227+
>>> bounds = ([0., 0.], [10., 0.9])
228228
>>> def f(x: np.ndarray, beta: np.ndarray) -> np.ndarray:
229229
... return beta[0] * np.exp(beta[1]*x)
230230
>>> sol = odr_fit(f, xdata, ydata, beta0, bounds=bounds)

0 commit comments

Comments
 (0)