Skip to content

Commit e8948d3

Browse files
authored
Merge pull request #14 from fcatus/patch-1
Make all warnings suppressible
2 parents ed95860 + 4bb188d commit e8948d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

time_in_each_roi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from collections import namedtuple
33
from scipy.spatial import distance
44
import pandas as pd
5+
import warnings
56

67
"""
78
Functions to extract time spent by the mouse in each of a list of user defined ROIS
@@ -138,7 +139,7 @@ def sort_roi_points(roi):
138139
cleaned_rois.append(roi)
139140
return cleaned_rois
140141
else:
141-
print("Warning: you've set check_inroi=False, so data reflect which ROI is closest even if tracked point is not in any given ROI.")
142+
warnings.warn("Warning: you've set check_inroi=False, so data reflect which ROI is closest even if tracked point is not in any given ROI.")
142143
return roi_at_each_frame
143144

144145

0 commit comments

Comments
 (0)