Python Check If Np Array Sort Function