Fix test failures with numpy master. Closes gh-3554

- fixes for deprecations of subtracting boolean arrays and indexing with more than one ellipsis.
- fixes two out of three failures of gh-3554 (third one is a numpy regression).