COMPAT: change neg of boolean to inv (deprecation in numpy 1.9)