From 3040f9fb44870c9bbeab7b6ab590e13dd9f3fb1b Mon Sep 17 00:00:00 2001 From: bgotthold-usgs <42218449+bgotthold-usgs@users.noreply.github.com> Date: Tue, 14 Dec 2021 09:31:01 -0700 Subject: [PATCH] Update cpu_detection.py Not sure if this change has any other implications but it does fix https://github.com/macaodha/batdetect/issues/13 --- bat_eval/cpu_detection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bat_eval/cpu_detection.py b/bat_eval/cpu_detection.py index e6839dd..1cc7f90 100755 --- a/bat_eval/cpu_detection.py +++ b/bat_eval/cpu_detection.py @@ -100,7 +100,7 @@ def create_spec(self, audio, sampling_rate): max_freq=self.max_freq, min_freq=self.min_freq) hspec = self.sp.process_spectrogram(hspec, denoise_spec=self.denoise, smooth_spec=self.smooth_spec) - nsize = (np.ceil(hspec.shape[0]/2.0).astype(int), np.ceil(hspec.shape[1]/2.0).astype(int)) + nsize = (np.floor(hspec.shape[0]/2.0).astype(int), np.floor(hspec.shape[1]/2.0).astype(int)) spec = ch.aligned_malloc(nsize, np.float32) zoom(hspec, 0.5, output=spec, order=1)