From 7d92cb130846362751c6d69e02998642f0a3e960 Mon Sep 17 00:00:00 2001 From: MaxvandenBoom Date: Wed, 8 Jan 2025 18:48:04 +0100 Subject: [PATCH] Shorter notation --- ieegprep/bids/rereferencing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ieegprep/bids/rereferencing.py b/ieegprep/bids/rereferencing.py index 8518f00..3be9072 100644 --- a/ieegprep/bids/rereferencing.py +++ b/ieegprep/bids/rereferencing.py @@ -71,7 +71,8 @@ def generate_car_per_headbox(cls, channel_names, channel_headboxes): unique_headboxes = sorted(list(set(channel_headboxes))) group_counter = 0 for headbox in unique_headboxes: - if is_number(headbox) and not headbox.lower() == 'nan' and not headbox.lower() == 'n/a': + + if is_number(headbox) and not str(headbox).lower() in ('nan', 'n/a'): # find the channel names that belong to this headbox headbox_channels = [channel_names[ind] for ind, x in enumerate(channel_headboxes) if x == headbox]