Skip to content

Commit 0a3933d

Browse files
authored
Merge pull request #131 from ycexiao/fix-examples
chore: fix examples
2 parents de32312 + 65cb6de commit 0a3933d

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

docs/examples/debyemodel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def makeRecipe():
9191

9292
# Load data and add it to the profile. It is our responsibility to get our
9393
# data into the profile.
94-
xydy = numpy.array(map(float, data.split()), dtype=float).reshape(-1, 3)
95-
x, y, dy = numpy.hsplit(xydy, 3)
94+
xydy = numpy.array(data.split(), dtype=float).reshape(-1, 3)
95+
x, y, dy = xydy.T
9696
profile.setObservedProfile(x, y, dy)
9797

9898
# The FitContribution

docs/examples/interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def main():
5353
# loosely tying parameters to a value.
5454
r = FitRecipe()
5555
r |= c
56-
r += (c.A, 0.5), (c.x0, 5), "sig"
56+
r += (c.A, 0.5), (c.x0, 5), ("sig", 1)
5757
r *= c.sigma, "sig"
5858
r %= c.A, 0.5, 0.5
5959

news/fix-examples.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news added: Fix examples.
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

0 commit comments

Comments
 (0)