numpy version of rdp