Replace deprecated numpy.fromstring usage

This commit is contained in:
Jim Paris 2020-08-07 02:55:20 -04:00
parent bcd21b3498
commit 71dc01c9a7

View File

@ -59,7 +59,7 @@ class NumpyClient(nilmdb.client.client.Client):
dtype = self._get_dtype(path, layout)
def to_numpy(data):
a = numpy.fromstring(data, dtype)
a = numpy.frombuffer(data, dtype)
if structured:
return a
return numpy.c_[a['timestamp'], a['data']]