Skip to content

Commit 2a528f9

Browse files
bwengalsAlexAndorra
authored andcommitted
add a bit more detail to docstring of set_boundary
1 parent 5281d33 commit 2a528f9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pymc/gp/hsgp_approx.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@
3131

3232

3333
def set_boundary(Xs: TensorLike, c: numbers.Real | TensorLike) -> np.ndarray:
34-
"""Set the boundary using the `Xs` centered around 0 and `c`. `c` is usually a scalar
35-
multiplier greater than 1.0, but it may be one value per dimension or column of `Xs`.
34+
"""Set the boundary using the `Xs` and `c`. `Xs` must be centered around zero, and `c`
35+
is usually a scalar multiplier greater than 1.0, but it may also be one value per dimension
36+
or column of `Xs`.
3637
"""
37-
S = pt.max(pt.abs(Xs), axis=0) # important: the Xs should be centered around 0
38+
S = pt.max(
39+
pt.abs(Xs), axis=0
40+
) # important: the Xs should have previously been centered around 0
3841
L = (c * S).eval() # eval() makes sure L is not changed with out-of-sample preds
3942
return L
4043

0 commit comments

Comments
 (0)