get.ensemble.samples rejects "torus" even though it is a documented sampling method
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read modules/uncertainty/R/ensemble.R, especially the supported-methods check at lines 81–85 and the existing torus branches. Add a test that get.ensemble.samples returns the requested number of samples for method = "torus" and still errors for an unknown method. The issue says to open the PR after #4229 merges, since it changes the same function signature.
Written by the indexing model from the issue text.
Description
Setting the ensemble sampling method to torus stops with "Invalid sampling method", even though torus is a documented option.
PEcAn.uncertainty::get.ensemble.samples(
3, list(a = data.frame(x = c(1, 5, 2, 8, 2))), list(), method = "torus"
)
#> Error in get.ensemble.samples(...): Invalid sampling method
(develop at 9fa7807, macOS arm64, R 4.5.2)
The @param method docs list torus, and the function already has torus branches (L115 and L152), but torus is missing from the supported-methods check:
The fix is adding "torus" to that vector, plus a test that torus returns the right number of samples and an unknown method still errors. Since #4229 edits the same function's signature, I'd open the PR after that one merges to avoid a conflict.
I didn't find an existing issue. (The same docstring also says "Default is uniform" while the default argument is "random", which falls through to uniform; I've left that out of this one.)
- Dominant language
- R
- Stars
- 246
- Forks
- 322
- Avg merge
- 5d 9h
- Merged PRs (30d)
- 21
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PecanProject/pecan
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PecanProject/pecan#4235 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/pecan#4234 · 2 comments ·
Maintainers usually reply within 1 day
-
write.config.SIPNET warns about multiple vegetation PFTs when there's only onePossibly taken @aarmens702-hub claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PecanProject/pecan#4225 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
download.SM_CDS: CDS rejects the request, then the retry loop never endsPossibly taken @S1DDHEY claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PecanProject/pecan#4219 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PecanProject/pecan#4218 · 1 comment ·
Maintainers usually reply within 1 day
All issues in PecanProject/pecan
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Open-Systems-Pharmacology/OSPSuite.ParameterIdentification#377 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
hubverse-org/hubAdmin#187 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
CREATE_ANNOTATED_TABLES reports r-ggplot2 version as null (packageVersion typo)Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
nf-core/nanostring#195 ·
Maintainers usually reply within 1 day