Python Numpy Index Array Function In Php