moved frontend function check_not_nan to tools
This commit is contained in:
13
src/submissions/tools/__init__.py
Normal file
13
src/submissions/tools/__init__.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import numpy as np
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(f"submissions.{__name__}")
|
||||
|
||||
def check_not_nan(cell_contents) -> bool:
|
||||
try:
|
||||
return not np.isnan(cell_contents)
|
||||
except TypeError:
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.debug(f"Check encounteded unknown error: {type(e).__name__} - {e}")
|
||||
return False
|
||||
Reference in New Issue
Block a user