Skip to content

Commit

Permalink
tests/generate: add serialization support for numpy.uint8 vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Jul 29, 2016
1 parent 834a17e commit b9c6492
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/generate/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ def random_bit(n):
numpy.float32: lambda x: "%.*f" % (PRECISION, x),
numpy.int32: lambda x: "%d" % x,
numpy.bool_: lambda x: "%d" % x,
numpy.uint8: lambda x: "0x%02x" % x,
}

NUMPY_VECTOR_TYPE = {
numpy.complex64: "radio.types.ComplexFloat32.vector_from_array({%s})",
numpy.float32: "radio.types.Float32.vector_from_array({%s})",
numpy.bool_: "radio.types.Bit.vector_from_array({%s})",
numpy.uint8: "radio.types.Byte.vector_from_array({%s})",
}


Expand Down

0 comments on commit b9c6492

Please sign in to comment.