implement reinchards global operator. use numpy array to improve speed