Skip to content
Snippets Groups Projects
Commit fbade9fb authored by Patrick Godwin's avatar Patrick Godwin
Browse files

feature_extractor.py: remove unused imports, utils.py: switch feature dtype...

feature_extractor.py: remove unused imports, utils.py: switch feature dtype from double to single precision float
parent 43d8ddf0
No related branches found
No related tags found
No related merge requests found
Pipeline #67286 passed with warnings
......@@ -35,9 +35,6 @@ import StringIO
import threading
import shutil
import h5py
import numpy
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
......
......@@ -273,7 +273,7 @@ class HDF5TimeseriesFeatureData(FeatureData):
self.sample_rate = kwargs['sample_rate']
self.waveform = kwargs['waveform']
self.metadata = dict(**kwargs)
self.dtype = [(column, '<f8') for column in self.columns]
self.dtype = [(column, numpy.float32) for column in self.columns]
self.feature_data = {key: numpy.empty((self.cadence * self.sample_rate,), dtype = self.dtype) for key in keys}
self.last_save_time = 0
self.clear()
......@@ -322,7 +322,7 @@ class HDF5ETGFeatureData(FeatureData):
self.cadence = kwargs['cadence']
self.waveform = kwargs['waveform']
self.metadata = dict(**kwargs)
self.dtype = [(column, '<f8') for column in self.columns]
self.dtype = [(column, numpy.float32) for column in self.columns]
self.feature_data = {key: [] for key in keys}
self.clear()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment