We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84d7d9c commit a55183fCopy full SHA for a55183f
1 file changed
tests/create_sequence_data.py
@@ -49,10 +49,10 @@ def _generate_sequence_data(
49
data.size, size=int(0.1 * data.size), replace=False
50
)
51
data.flat[nan_indices] = np.nan
52
-
53
- # ensure each row has at least one non-NaN
54
- row_all_nan = np.isnan(data).all(axis=1)
55
- data[row_all_nan, 0] = 0.0
+ # ensure each row has at least one non-NaN
+ if n_signals > 0:
+ row_all_nan = np.isnan(data).all(axis=1)
+ data[row_all_nan, 0] = 0.0
56
57
if not use_mem_mapped:
58
np.save(sequence_root / "data.npy", data)
0 commit comments