Skip to content

Commit 460dc4c

Browse files
committed
format literal constants
1 parent 1debe5b commit 460dc4c

3 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ the explanatory and response variables have significant errors.
2626

2727
You can install the package via pip:
2828

29-
```bash
29+
```sh
3030
pip install odrpack
3131
```
3232

@@ -41,9 +41,9 @@ import numpy as np
4141
x = np.array([0.982, 1.998, 4.978, 6.01])
4242
y = np.array([2.7, 7.4, 148.0, 403.0])
4343

44-
beta0 = np.array([2., 0.5])
45-
lower = np.array([0., 0.])
46-
upper = np.array([10., 0.9])
44+
beta0 = np.array([2.0, 0.5])
45+
lower = np.array([0.0, 0.0])
46+
upper = np.array([10.0, 0.9])
4747

4848
def f(beta: np.ndarray, x: np.ndarray) -> np.ndarray:
4949
"Model function."

docs/examples/explicit-model.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
"metadata": {},
7474
"outputs": [],
7575
"source": [
76-
"beta0 = np.array([1., 1.])\n",
76+
"beta0 = np.array([1.0, 1.0])\n",
7777
"\n",
78-
"lower = np.array([0., 0.])\n",
79-
"upper = np.array([2., 2.])"
78+
"lower = np.array([0.0, 0.0])\n",
79+
"upper = np.array([2.0, 2.0])"
8080
]
8181
},
8282
{
@@ -202,7 +202,7 @@
202202
"ax.plot(x, y, 'o')\n",
203203
"\n",
204204
"# Plot fitted model\n",
205-
"xm = np.linspace(0., 1., 100)\n",
205+
"xm = np.linspace(0.0, 1.0, 100)\n",
206206
"ym = f(sol.beta, xm)\n",
207207
"ax.plot(xm, ym)\n",
208208
"ax.set_xlabel('x')\n",

0 commit comments

Comments
 (0)