Permalink
Browse files

Merge pull request #213 from oew1v07/fix-numpy

Fix numpy patch to patch the load function (which was missed before)
  • Loading branch information...
robintw committed Nov 5, 2018
2 parents d262929 + 35b9450 commit 3bd7bace8915871fc88d4a70505a4bf5a15b4d00
@@ -154,6 +154,8 @@ test_cases:
inputs: [ data.csv ]
- arguments: [ genfromtxt ]
inputs: [ data_incomplete.csv ]
- arguments: [ load ]
inputs: [ out.npy ]
- arguments: [ save ]
outputs: [ out.npy ]
- arguments: [ savez ]
View
Binary file not shown.
@@ -62,6 +62,13 @@ def genfromtxt(self):
np.genfromtxt(file_name, delimiter=",",
missing_values="", filling_values=-1)
def load(self):
"""
Use numpy.load to load out.npy.
"""
file_name = os.path.join(self.data_dir, "out.npy")
np.load(file_name)
def save(self):
"""
Use numpy.savetxt to save a file out.npy.
@@ -43,7 +43,7 @@ class PatchNumpy(PatchSimple):
# The `load` function is *deliberately* not included here
# as it calls fromfile internally, and then we get two duplicate
# entries recorded in the log
input_functions = ['genfromtxt', 'loadtxt', 'fromfile']
input_functions = ['genfromtxt', 'loadtxt', 'fromfile', 'load']
output_functions = ['save', 'savez', 'savez_compressed', 'savetxt']
input_wrapper = create_wrapper(log_input, 0, 'numpy')

0 comments on commit 3bd7bac

Please sign in to comment.