Skip to content

fix(routines): mean/median plots TypeError

Arin Wongprommoon requested to merge issue-027 into dev

WHY IS THIS CHANGE NEEDED?:

  • bug discovered via strain report script (skeletons, arin)
  • TypeError raised if DataFrame from grouper output passed as input argument for mean or median plots
  • doesn't affect other plotting routines and doesn't happen with manually generated random DataFrame

HOW DOES THE CHANGE SOLVE THE PROBLEM?:

  • for some reason self.trace_time was defined as a numpy array with dtype=object, so forced it to be dtype=float. as the dtypes are consistent now, coercion of inputs should be possible

WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:

  • tech debt: other routines did not include converting to numpy arrays -- probably a simpler solution that works fine

EVIDENCE THAT COMMIT WORKS:

  • run strain report script with amended routines and error now disappears

REFERENCES:

Merge request reports