simetenn / uncertainpy

Uncertainpy: a Python toolbox for uncertainty quantification and sensitivity analysis, tailored towards computational neuroscience.
http://uncertainpy.readthedocs.io
GNU General Public License v3.0
220 stars 50 forks source link

AttributeError: module 'numpoly' has no attribute 'variable for the coffe cup example #48

Closed moja84 closed 3 years ago

moja84 commented 3 years ago

Hello I used chaospy in order to perform sensitivity analsises some time ago and want now to continue this work but get the following error. In order to exclude the error in my program I tried the example https://uncertainpy.readthedocs.io/en/latest/examples/coffee_cup.html On Fedora 33 with chaospy-4.2.5, and Python 3.8.7 And get the same error

Traceback (most recent call last): File "test_chaospy.py", line 40, in data = UQ.quantify(seed=10) File "/usr/local/lib/python3.8/site-packages/uncertainpy/uncertainty.py", line 415, in quantify data = self.polynomial_chaos(uncertain_parameters=uncertain_parameters, File "/usr/local/lib/python3.8/site-packages/uncertainpy/uncertainty.py", line 702, in polynomial_chaos self.data = self.uncertainty_calculations.polynomial_chaos( File "/usr/local/lib/python3.8/site-packages/uncertainpy/core/uncertainty_calculations.py", line 1351, in polynomial_chaos self.create_PCE_collocation(uncertain_parameters=uncertain_parameters, File "/usr/local/lib/python3.8/site-packages/uncertainpy/core/uncertainty_calculations.py", line 621, in create_PCE_collocation P = cp.orth_ttr(polynomial_order, distribution) File "/usr/local/lib/python3.8/site-packages/chaospy-4.2.5-py3.8.egg/chaospy/orthogonal/three_terms_recurrence.py", line 111, in orthttr , polynomials, norms, = chaospy.stieltjes(numpy.max(order), dist) File "/usr/local/lib/python3.8/site-packages/chaospy-4.2.5-py3.8.egg/chaospy/recurrence/stieltjes.py", line 68, in stieltjes return analytical_stieltjes(order=order, dist=dist) File "/usr/local/lib/python3.8/site-packages/chaospy-4.2.5-py3.8.egg/chaospy/recurrence/stieltjes.py", line 165, in analytical_stieltjes var = numpoly.variable(dimensions) AttributeError: module 'numpoly' has no attribute 'variable'

I will be very pleased to recieve help since I need chaospy for my research. Greets Momme

moja84 commented 3 years ago

A new installation/update of the numpoly library with the new git version solved my issue. :)