Skip to content

Commit

Permalink
Fix variable typo, initialize sample_frames to [] instead of None
Browse files Browse the repository at this point in the history
The later fixes a bug as the rest of the class assumes sample_frames
is a list.

The former is currently dead code.
  • Loading branch information
zacps committed Aug 10, 2021
1 parent b810433 commit 8f4fd47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ml_tools/datasetstructures.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __init__(
self.median_mass = np.median(frame_mass)
self.mean_mass = np.mean(frame_mass)
self.ffc_frames = ffc_frames
self.sample_frames = None
self.sample_frames = []

if important_frames is not None:
self.set_sample_frames(important_frames)
Expand Down Expand Up @@ -128,7 +128,7 @@ def get_sample_frames(self):
return self.sample_frames

def remove_sample_frame(self, f):
self.important_frams.remove(f)
self.important_frames.remove(f)

def get_sample_frame(self, i=0, remove=False):
if len(self.sample_frames) == 0:
Expand Down

0 comments on commit 8f4fd47

Please sign in to comment.