Skip to content

Commit a887007

Browse files
author
[zebinyang]
committed
update diff function in smoothing spline; remove leaf node update option in simtree; update version 0.1.4
1 parent 11776cd commit a887007

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

simtree/smspline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def diff(self, x, order=1, delta=1e-5):
7373
if isinstance(self.sm_, (np.ndarray, np.int, int, np.floating, float)):
7474
derivative = np.zeros((x.shape[0], 1))
7575
else:
76+
x = np.array(x).reshape(1)
7677
if order == 1:
7778
derivative = (self.decision_function(x + delta / 2) - self.decision_function(x - delta / 2)) / delta
7879
elif order == 2:

0 commit comments

Comments
 (0)