RF: replace old code that has been included in numpy with corresponding numpy calls