jonathf / chaospy

Chaospy - Toolbox for performing uncertainty quantification.
https://chaospy.readthedocs.io/
MIT License
433 stars 87 forks source link

former expons attribute of Poly class #28

Closed davidovitch closed 7 years ago

davidovitch commented 7 years ago

I was checking out the examples from jp5000/PCE-4-WindEnergy and noticed the usage of the expons attribute of Poly classes. This works for chaospy v1.0 (to be specific, at this commit: jonathf/chaospy@b6e236cbfb901e00da35866d4aa90d67fd8c4fa3, or as in this fork: jp5000/chaospy), but not for the latest version. If I understand it correctly, the exponents are now in the keys attribute and are ordered corresponding to Poly.coeffs. In chaospy v1.0 the ordering of Poly.expons and Poly.keys is different. It also seems that the ordering of chaospy v1.0 Poly.expons is different compared to the ordering of chaospy v2.0+ Poly.keys. I don't know if a certain ordering has any real practical usefulness (I am a PCE noob).

And finally my question: was expons removed and replaced by keys for a specific reason, or is this a mistake?

jonathf commented 7 years ago

Ah, yes. The expon included a in-place sort, which isn't allowed in python 3. I therefore changed it. I might have been a bit greedy deleting it not realisings that it was in use.

To answer your questions:

davidovitch commented 7 years ago

Thanks again for a very quick and clear response :-) This issue can be closed as far as I am concerned.