mirror of
https://github.com/macaodha/batdetect2.git
synced 2025-06-29 06:32:03 +02:00
Remove unnecessary imports
This commit is contained in:
parent
c97a87b2a4
commit
039c002796
@ -1,7 +1,5 @@
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""Types used in the code base."""
|
||||
|
||||
from typing import List, NamedTuple, Optional, Union
|
||||
|
||||
import numpy as np
|
||||
@ -17,7 +18,7 @@ except ImportError:
|
||||
|
||||
|
||||
try:
|
||||
from typing import NotRequired
|
||||
from typing import NotRequired # type: ignore
|
||||
except ImportError:
|
||||
from typing_extensions import NotRequired
|
||||
|
||||
|
@ -11,7 +11,7 @@ import torch.nn.functional as F
|
||||
try:
|
||||
from numpy.exceptions import AxisError
|
||||
except ImportError:
|
||||
from numpy import AxisError
|
||||
from numpy import AxisError # type: ignore
|
||||
|
||||
import batdetect2.detector.compute_features as feats
|
||||
import batdetect2.detector.post_process as pp
|
||||
@ -759,7 +759,7 @@ def process_file(
|
||||
|
||||
# Get original sampling rate
|
||||
file_samp_rate = librosa.get_samplerate(audio_file)
|
||||
orig_samp_rate = file_samp_rate * config.get("time_expansion", 1) or 1
|
||||
orig_samp_rate = file_samp_rate * (config.get("time_expansion") or 1)
|
||||
|
||||
# load audio file
|
||||
sampling_rate, audio_full = au.load_audio(
|
||||
|
Loading…
Reference in New Issue
Block a user