Skip to content

Commit 6ae1d9e

Browse files
committed
use builtin pow, since np.pow is only for numpy version 2.0.0 and later
1 parent a6f1b04 commit 6ae1d9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

forestci/calibration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def gfit(X, sigma, p=2, nbin=1000, unif_fraction=0.1):
6868
assert sum(mask) > 0
6969
g_eta_slab = mask / sum(mask)
7070

71-
XX = np.column_stack([ np.pow(xvals, exp) for exp in range(1, p+1)])
71+
XX = np.column_stack([ pow(xvals, exp) for exp in range(1, p+1)])
7272
XX /= np.sum(XX,axis = 0, keepdims=True) # normalize each feature column for better numerical stability
7373

7474
def neg_loglik(eta):

0 commit comments

Comments
 (0)