Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
moja84 opened this issue Apr 19, 2021 · 1 comment

Comments

@moja84
Copy link

moja84 commented Apr 19, 2021

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 orth_ttr
_, 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
Copy link
Author

moja84 commented Apr 26, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant