Skip to content

Commit

Permalink
Merge pull request #115 from chorus-ai/bg_zarr_int_conversion
Browse files Browse the repository at this point in the history
Zarr conversion to `int` warning
  • Loading branch information
briangow authored Nov 18, 2024
2 parents fedbb40 + 8ea9672 commit 5d765ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion waveform_benchmark/formats/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def write_waveforms(self, path, waveforms):
start = chunk['start_sample']
end = chunk['end_sample']
# Replace NaN values in the chunk with sentinel value
cursamples = np.where(np.isnan(chunk['samples']), nanval, np.round(chunk['samples'] * chunk['gain']).astype(np.int16))
cursamples = np.where(np.isnan(chunk['samples']), nanval, np.round(chunk['samples'] * chunk['gain'])).astype(np.int16)
samples[start:end] = cursamples

if self.fmt == 'Compressed':
Expand Down

0 comments on commit 5d765ca

Please sign in to comment.