Skip to content

Commit 3de984c

Browse files
committed
checks type for using np.isnan
1 parent de40e1a commit 3de984c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/foraging_gui/Foraging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ def _GetProtocol(self, mouse_id):
16231623
return
16241624
logging.info("Getting protocol")
16251625
protocol = self._GetInfoFromSchedule(mouse_id, "Protocol")
1626-
if (protocol is None) or (protocol == "") or (np.isnan(protocol)):
1626+
if (protocol is None) or (protocol == "") or (isinstance(protocol, (int, float, np.generic)) and np.isnan(protocol)):
16271627
if not self.Settings["add_default_project_name"]:
16281628
logging.info(
16291629
"Protocol not on schedule, not using default because add_default_project_name=False"

0 commit comments

Comments
 (0)