numpy implementation of SRJ