python nan的数量_在Python中计算一个numpy ndarray中非NaN元素的数量
I need to calculate the number of non-NaN elements in a numpy ndarray matrix. How would one efficiently do this in Python? Here is my simple code for achieving this:import numpy as npdef numberOfNonNa...