I have the following matrix / matrix of size 10 by 5, which has several values NaN:
array([[ 0., 0., 0., 0., 1.],
[ 1., 1., 0., nan, nan],
[ 0., nan, 1., nan, nan],
[ 1., 1., 1., 1., 0.],
[ 0., 0., 0., 1., 0.],
[ 0., 0., 0., 0., nan],
[ nan, nan, 1., 1., 1.],
[ 0., 1., 0., 1., 0.],
[ 1., 0., 1., 0., 0.],
[ 0., 1., 0., 0., 0.]])
How to determine exactly how sparse this array is? Is there a simple function in numpy to measure the percentage of missing values?