From 54fd7253b6a2ba45047354640b7f384ec099504c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Sep 2019 15:05:46 -0400 Subject: [PATCH] More informative warning if gap frames encountered and filled with np.nan --- nd2reader/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nd2reader/parser.py b/nd2reader/parser.py index be22218..4937c14 100644 --- a/nd2reader/parser.py +++ b/nd2reader/parser.py @@ -288,7 +288,7 @@ class Parser(object): # errors with ND2-files with missing frames. Array is filled with nan to reflect that data is missing. else: empty_frame = np.full((height, width), np.nan) - warnings.warn('ND2 file contains gap frames which are represented by np.nan-filled arrays') + warnings.warn('ND2 file contains gap frames which are represented by np.nan-filled arrays; to convert to zeros use e.g. np.nan_to_num(array)') return timestamp, Frame(empty_frame, metadata=self._get_frame_metadata()) def _get_frame_metadata(self):