TST: use sweeargs instead of internal loop and added few more corner cases

attention was triggered by regression in numpy:
https://github.com/numpy/numpy/issues/4295