[yt-dev] Issue #940: Projection Warning: invalid value encountered in divide (yt_analysis/yt)
Cameron Hummels
issues-reply at bitbucket.org
Thu Nov 20 18:50:37 PST 2014
New issue 940: Projection Warning: invalid value encountered in divide
https://bitbucket.org/yt_analysis/yt/issue/940/projection-warning-invalid-value
Cameron Hummels:
I oftentimes get the following warning when I generate projections in 3.0:
```
#!python
/var/lib/jenkins/jobs/yt-docs-3.0/workspace/yt/data_objects/construction_data_containers.py:320: RuntimeWarning: invalid value encountered in divide
np.divide(nvals, nwvals[:,None], nvals)
```
In fact, this error and a few other related errors show up on one of the notebooks in the docs:
http://yt-project.org/docs/dev/analyzing/filtering.html
It appears that sometimes the weight field in a projection has zeros in it, so that dividing by the weight field results in this error. I don't think it is a big deal, because in the end, we mask out the `nan`s that are created by such an operation, but to a new user, it might set off red alerts that something major is wrong.
Responsible: chummels
More information about the yt-dev
mailing list