diff --git a/ctapipe/tools/train_disp_reconstructor.py b/ctapipe/tools/train_disp_reconstructor.py index ec69a3d13b8..6b3ad6d0314 100644 --- a/ctapipe/tools/train_disp_reconstructor.py +++ b/ctapipe/tools/train_disp_reconstructor.py @@ -168,7 +168,7 @@ def _read_table(self, telescope_type): valid = check_valid_rows(table_chunk) if not np.all(valid): - n_non_predictable += np.sum(valid) + n_non_predictable += np.sum(~valid) table_chunk = table_chunk[valid] table.append(table_chunk) diff --git a/ctapipe/tools/train_energy_regressor.py b/ctapipe/tools/train_energy_regressor.py index 3032e9237b3..7fe7986b380 100644 --- a/ctapipe/tools/train_energy_regressor.py +++ b/ctapipe/tools/train_energy_regressor.py @@ -151,7 +151,7 @@ def _read_table(self, telescope_type): valid = check_valid_rows(table_chunk) if not np.all(valid): - n_non_predictable += np.sum(valid) + n_non_predictable += np.sum(~valid) table_chunk = table_chunk[valid] table.append(table_chunk) diff --git a/ctapipe/tools/train_particle_classifier.py b/ctapipe/tools/train_particle_classifier.py index d3d1d8074db..76865cd5366 100644 --- a/ctapipe/tools/train_particle_classifier.py +++ b/ctapipe/tools/train_particle_classifier.py @@ -202,7 +202,7 @@ def _read_table(self, telescope_type, loader, n_events=None): valid = check_valid_rows(table_chunk) if not np.all(valid): - n_non_predictable += np.sum(valid) + n_non_predictable += np.sum(~valid) table_chunk = table_chunk[valid] table.append(table_chunk)