Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/examples/debyemodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def makeRecipe():

# Load data and add it to the profile. It is our responsibility to get our
# data into the profile.
xydy = numpy.array(map(float, data.split()), dtype=float).reshape(-1, 3)
x, y, dy = numpy.hsplit(xydy, 3)
xydy = numpy.array(data.split(), dtype=float).reshape(-1, 3)
Copy link
Contributor Author

@ycexiao ycexiao Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is something like

data = """\
015.0 0.00334 0.00013
050.0 0.00508 0.00022
...
500.0 0.03946 0.00250
"""

Unpacking the data in this specific way is only applicable in this example.

x, y, dy = xydy.T
profile.setObservedProfile(x, y, dy)

# The FitContribution
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main():
# loosely tying parameters to a value.
r = FitRecipe()
r |= c
r += (c.A, 0.5), (c.x0, 5), "sig"
r += (c.A, 0.5), (c.x0, 5), ("sig", 1)
r *= c.sigma, "sig"
r %= c.A, 0.5, 0.5

Expand Down
23 changes: 23 additions & 0 deletions news/fix-examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: Fix examples.

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading