Skip to content

Commit f091c75

Browse files
author
Release Manager
committed
gh-35367: Add output documentation on monte_carlo_integral This small commit adds an OUTPUT description to the documentation of monte_carlo_integral. The wording of the output is essentially taken from numerical_integral. This is a nearly trivial documentation change, made after having a conversation with someone using monte-carlo-integration and being confused at the output. Specifically, the output is the tuple `(approximate_integral, approximate_error_bound)`. The error bound wasn't documented. I will also note that this is my first direct contribution in the github era - please let me know if there is something I should be doing here. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. URL: #35367 Reported by: David Lowry-Duda Reviewer(s): Matthias Köppe
2 parents 78f152e + 82d39e3 commit f091c75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/sage/calculus/integration.pyx

+5
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ def monte_carlo_integral(func, xl, xu, size_t calls, algorithm='plain',
457457
* 'vegas' -- The VEGAS algorithm of Lepage is based on importance
458458
sampling.
459459
460+
OUTPUT:
461+
462+
A tuple whose first component is the approximated integral and whose second
463+
component is an error estimate.
464+
460465
EXAMPLES::
461466
462467
sage: x, y = SR.var('x,y')

0 commit comments

Comments
 (0)