How can I calculate matrix mean values along a matrix, but to remove nan values from calculation? (For R people, think na.rm = TRUE).
nan
na.rm = TRUE
Here
Assuming you've also got SciPy installed:
http://www.scipy.org/doc/api_docs/SciPy.stats.stats.html#nanmean