These lines are too long, break them something like
```
            for code2 in 'BHILQP':
                assert_(np.array(1, dtype=code) < np.array(-1, dtype=code2),
                        "type %s and %s failed" % (code, code2))
                assert_(not np.array(1, dtype=code) > np.array(-1, dtype=code2),
                        "type %s and %s failed" % (code, code2))
                assert_(np.array(1, dtype=code) != np.array(-1, dtype=code2),
                        "type %s and %s failed" % (code, code2))
```
Which are still a bit long in some cases. You can use shorter variable names, `dt1`, `dt2`.