|
|
@@ -25,7 +25,11 @@ def layout_to_dtype(layout): |
|
|
|
atype = '<f' + str(int(ltype[5:]) // 8) |
|
|
|
else: |
|
|
|
raise ValueError("bad layout") |
|
|
|
return numpy.dtype([('timestamp', '<i8'), ('data', atype, lcount)]) |
|
|
|
if lcount == 1: |
|
|
|
dtype = [('timestamp', '<i8'), ('data', atype)] |
|
|
|
else: |
|
|
|
dtype = [('timestamp', '<i8'), ('data', atype, lcount)] |
|
|
|
return numpy.dtype(dtype) |
|
|
|
|
|
|
|
class NumpyClient(nilmdb.client.client.Client): |
|
|
|
"""Subclass of nilmdb.client.Client that adds additional methods for |
|
|
|