simplify numpy-scipy step