Skip to content

Commit 67518d4

Browse files
committed
nortek software averaged files might not have ensemble numbers saved
1 parent 660e33b commit 67518d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mhkit/dolfyn/io/nortek2_lib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ def _boolarray_firstensemble_ping(index):
291291
each ensemble.
292292
"""
293293
dens = np.ones(index["ens"].shape, dtype="bool")
294-
dens[1:] = np.diff(index["ens"]) != 0
294+
if any(index["ens"]):
295+
dens[1:] = np.diff(index["ens"]) != 0
295296
return dens
296297

297298

0 commit comments

Comments
 (0)