Numpy Apply Function To Array Python Question