Closed gbrault closed 3 years ago
Hi Gilbert, Thanks for getting in touch. Yes this could definitely be managed better! In my experience the most Pythonic way to handle this would be to assume nothing is missing, but wrap the whole clause in a try/except. None is also more conventionally returned rather than nan, which tends to propagate and can be hard to track down the source whereas None fails when you try to do math on it.
Well spotted!
Sincerely, Caleb
Hi Gilbert, The development of thermo now contains those None return values. Sincerely, Caleb
Many thanks CalebBell!
When calculating Tm, Tb, Tc etc, the code looks for
but some time those values are not floats and the procedure fails.
I did a quick fix which protects the formula by checking the type, but maybe a better solution is needed
Here is a fix exemple for Pc
Same applies for all other Physical Properties