Skip to content

Commit a77e39e

Browse files
committed
differences for PR #362
1 parent 5b328fe commit a77e39e

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

07-thresholding.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ measure_root_mass(filename="data/trial-016.jpg", sigma=1.5)
512512
```
513513

514514
```output
515-
0.0482436835106383`
515+
0.04907247340425532
516516
```
517517

518518
Now we can use the function to process the series of four images shown above.
@@ -525,20 +525,28 @@ and the filenames all start with the **trial-** prefix and
525525
end with the **.jpg** suffix.
526526

527527
```python
528-
all_files = glob.glob("data/trial-*.jpg")
528+
all_files = sorted(glob.glob("data/trial-*.jpg"))
529529
for filename in all_files:
530530
density = measure_root_mass(filename=filename, sigma=1.5)
531531
# output in format suitable for .csv
532532
print(filename, density, sep=",")
533533
```
534534

535535
```output
536-
data/trial-016.jpg,0.0482436835106383
537-
data/trial-020.jpg,0.06346941489361702
538-
data/trial-216.jpg,0.14073969414893617
539-
data/trial-293.jpg,0.13607895611702128
536+
data/trial-016.jpg,0.04907247340425532
537+
data/trial-020.jpg,0.06381366356382978
538+
data/trial-216.jpg,0.14205152925531914
539+
data/trial-293.jpg,0.13665791223404256
540540
```
541541

542+
::::::::::::::::::::::::::::::::::::::::: callout
543+
544+
Compare your results with the values above. Do they match exactly? You may find that certain decimal values differ slightly, even when using identical input parameters.
545+
546+
This variation often stems from the specific versions of your installed packages (such as `numpy` or `scikit-image`). As these libraries evolve, updates can introduce subtle changes in numerical handling, underlying algorithms, or rounding logic. This highlights why reproducible environments, as well as reproducible code, are essential for consistent scientific computing.
547+
548+
:::::::::::::::::::::::::::::::::::::::::
549+
542550
::::::::::::::::::::::::::::::::::::::: challenge
543551

544552
## Ignoring more of the images -- brainstorming (10 min)

md5sum.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"episodes/04-drawing.md" "d8c686bdf8b610fe5b66a669e3685fb5" "site/built/04-drawing.md" "2026-03-20"
1010
"episodes/05-creating-histograms.md" "309e406d538ff298286dd52175ec0692" "site/built/05-creating-histograms.md" "2026-03-20"
1111
"episodes/06-blurring.md" "3046847c190dd567652bb7cd0538ecd9" "site/built/06-blurring.md" "2026-03-20"
12-
"episodes/07-thresholding.md" "03bd0cd048d3b1d98aa9a8770517edfc" "site/built/07-thresholding.md" "2026-03-20"
12+
"episodes/07-thresholding.md" "7e6e160c7937a1d1825bde147bdba108" "site/built/07-thresholding.md" "2026-03-23"
1313
"episodes/08-connected-components.md" "d8f4a9616c448bd8b72d3877305b8201" "site/built/08-connected-components.md" "2026-03-20"
1414
"episodes/09-challenges.md" "7665ef69e61f7ea2184a58162c53aef2" "site/built/09-challenges.md" "2026-03-23"
1515
"instructors/instructor-notes.md" "e8e378a5dfaec7b2873d788be85003ce" "site/built/instructor-notes.md" "2024-06-18"

0 commit comments

Comments
 (0)