use numpy now, hopefully correctly implemented n-dimensional case