Skip to content

Commit f2709ba

Browse files
committed
doc-string improvements
1 parent c55884e commit f2709ba

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

adaptive/learner/average_learner1D.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,17 @@
2121
class AverageLearner1D(Learner1D):
2222
"""Learns and predicts a noisy function 'f:ℝ → ℝ^N'.
2323
24-
New parameters (wrt Learner1D)
25-
------------------------------
24+
Parameters
25+
----------
26+
function : callable
27+
The function to learn. Must take a tuple of ``(seed, x)`` and
28+
return a real number or vector.
29+
bounds : pair of reals
30+
The bounds of the interval on which to learn 'function'.
31+
loss_per_interval: callable, optional
32+
A function that returns the loss for a single interval of the domain.
33+
If not provided, then a default is used, which uses the scaled distance
34+
in the x-y plane as the loss. See the notes for more details.
2635
delta : float
2736
This parameter controls the resampling condition. A point is resampled
2837
if its uncertainty is larger than delta times the smallest neighboring

adaptive/learner/learner1D.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class Learner1D(BaseLearner):
171171
----------
172172
function : callable
173173
The function to learn. Must take a single real parameter and
174-
return a real number.
174+
return a real number or 1D array.
175175
bounds : pair of reals
176176
The bounds of the interval on which to learn 'function'.
177177
loss_per_interval: callable, optional

0 commit comments

Comments
 (0)