File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ def data_checker(
162162) -> bool :
163163 """
164164 Function that performs the variety of checks on input data, in some cases also correct the data and prints warnings.
165- Currently it checks for: the presence of infs and nans in data; the number of zero elements.
165+ Currently it checks for: the presence of infs and nans in data.
166166
167167 Parameters
168168 ----------
@@ -181,11 +181,12 @@ def data_checker(
181181
182182 data = _naninfs_check (data , verbosity = verbosity , method_name = method_name )
183183
184- _zeros_check (
185- data ,
186- verbosity = verbosity ,
187- percentage_threshold = 50 ,
188- method_name = method_name ,
189- )
184+ # ! The number of zero elements check is currently switched off as it requires sorting or AtomicAdd, which makes it inefficient on GPUs. !
185+ # _zeros_check(
186+ # data,
187+ # verbosity=verbosity,
188+ # percentage_threshold=50,
189+ # method_name=method_name,
190+ # )
190191
191192 return data
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def test_zeros_check3_numpy():
157157 assert warning_zeros == False
158158
159159
160- def test_data_checker_numpy ():
160+ def test_data_checker_infsnans_numpy ():
161161 _data_input = np .ones (shape = (10 , 10 , 10 )).astype (np .float32 )
162162 _data_input [1 , 1 , 1 ] = - np .inf
163163 _data_input [1 , 1 , 2 ] = np .inf
@@ -181,7 +181,7 @@ def test_data_checker_numpy():
181181 assert _data_output .shape == (10 , 10 , 10 )
182182
183183
184- def test_data_checker ():
184+ def test_data_infsnans_checker ():
185185 _data_input = cp .ones (shape = (10 , 10 , 10 )).astype (cp .float32 ) * 100.0
186186 _data_input [1 , 1 , 1 ] = - cp .inf
187187 _data_input [1 , 1 , 2 ] = cp .inf
You can’t perform that action at this time.
0 commit comments