Joe Kington committed 2c07b05

Made sure writes new files relative to its directory and not the current directory.

Comments (0)

Files changed (1)

 import numpy as np
+import os
 import data
 import analysis
     #-- Save the key data that we need to do this same classification
     # on any given paw....
-'average_paw.npy', average_paw)
-'basis_stds.npy', basis_stds)
-'basis_vecs.npy', basis_vecs)
-'template_paws.npy', template_paws)
+    dir = os.path.dirname(__file__)
+    save = lambda filename, data:, filename), data)
+    save('average_paw.npy', average_paw)
+    save('basis_stds.npy', basis_stds)
+    save('basis_vecs.npy', basis_vecs)
+    save('template_paws.npy', template_paws)
     #- Optionally, we can save the raw training data for later analysis...'training_paw_data.npy', paw_data)