update to replace deprecated numpy.rank (Numpy 1.9.0)