I did it this way, as two other tests in this file already depend on numpy. Numpy is imported at the top of the file, and will be none if the import fails. I agree that the decorator may be cleaner though. If we do go with the decorator, should I fix the other two tests as well? Would it make sense to move the numpy import to inside the tests that depend on numpy? Or leave it at the top?