module uq : chaospy (3.2.9) chaospy.dot does not exist
When I run the confidence_interval notebook I get the following error:
AttributeError Traceback (most recent call last)
<ipython-input-2-637cb2ef6afe> in <module>
16
17 y_train, y_pred, y_lo, y_up = uq.confidence_interval(x_train, y_train, alpha=alpha,
---> 18 n_boot=n_boot, sample=sample)
19
20 plt.figure(figsize=(16, 9))
~/Documents/OPAL/pyOPALTools/surrogate/uq.py in confidence_interval(self, x, y, alpha, **kwargs)
129
130 lo, up = bs.confidence_interval(alpha=alpha)
--> 131 lo_pce = cp.dot(poly, np.asarray(lo))
132 up_pce = cp.dot(poly, np.asarray(up))
133
AttributeError: module 'chaospy' has no attribute 'dot'
For this I had to add the following fix to bootstrap.py:
- return 2.0 * fitted - qlo, 2.0 * fitted - qhi
+ return 2.0 * np.asarray(fitted) - qlo, 2.0 * np.asarray(fitted) - qhi
Edited by snuverink_j