testing.py: new file, to be compatible with numpy