-
Notifications
You must be signed in to change notification settings - Fork 11
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
mishandled defaults None of type Param #152
Comments
I am pretty sure the problem is in lines 636-637 of |
… read correctly though which relates to issue #152 (thanks simone for spotting this!)
Ok. Bjoern looked at this, and it looks like it's actually the override of default in EvalDescriptor that causes this issue starting line 626. It basically prioritises being a Param over anything else. We'll take a look probably tomorrow now. |
Sorry I just realised that this was exactly what Pierre said too. My bad! |
It's interesting. ptypy/test/util_tests/descriptor_test.py seems to pass but it has similar uses inside to what we propose here. I will look to try and break this test tomorrow morning before applying the appropriate fix. |
This requires review if bug is still present today. Adding to the #449 issue |
Both in 'core/illumination.py' and 'core/sample.py' parameters of type Param (e.g. 'process' and 'diversity') should result as None by default; upon running ptypy without specifying a value for them (i.e. falling onto defaults) they result in Param containing the other default subparameters instead.
How should the defaults be rewritten to get the intended behaviour? E.g. diversity and process is None by default.
The text was updated successfully, but these errors were encountered: