-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
The code is comparing to None with the operators == and != instead of the correct (and more efficient) pythonic idiom is or is not. Thus, an if clause fails on a numpy array because == and != operate elementwise, while is and is not return a scalar bool
The lines that require modifications are
regis@gatito ~/git/CO-Ori-VLTI % for file in /usr/local/lib/python3.7/dist-packages/pydream/*.py; do echo $file; egrep -n '[!=]=\s*None' $file; done
/usr/local/lib/python3.7/dist-packages/pydream/convergence.py
/usr/local/lib/python3.7/dist-packages/pydream/core.py
43: if start == None:
218: #On first iteration without starting points this will fail because q0 == None
284: if step_instance.crossover_burnin == None:
287: if start_pt != None:
/usr/local/lib/python3.7/dist-packages/pydream/Dream.py
158: if self.nseedchains == None:
227: if last_loglike != None:
253: if self.last_logp == None:
421: if self.nchains == None:
425: if self.chain_n == None:
/usr/local/lib/python3.7/dist-packages/pydream/Dream_shared_vars.py
/usr/local/lib/python3.7/dist-packages/pydream/__init__.py
/usr/local/lib/python3.7/dist-packages/pydream/model.py
/usr/local/lib/python3.7/dist-packages/pydream/parameters.py
Metadata
Metadata
Assignees
Labels
No labels