Skip to content

Commit

Permalink
export frame rate in "w" mode, not "a"
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Lostanlen committed Jan 15, 2019
1 parent af36505 commit 479d89a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions birdvoxdetect/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def process_file(
total_length = sum(map(len, chunk_confidences))
with h5py.File(confidence_path, "w") as f:
f.create_dataset('confidence', (total_length,), dtype="float32")
f["frame_rate"] = frame_rate
chunk_pointer = 0

# Loop over chunks.
Expand All @@ -368,9 +369,6 @@ def process_file(
chunk_confidence
chunk_pointer = next_chunk_pointer

f["frame_rate"] = frame_rate


# Print final messages.
logging.info("Done with file: {}.".format(filepath))
if threshold is not None:
Expand Down

0 comments on commit 479d89a

Please sign in to comment.