diff options
author | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-05-28 17:04:09 +0000 |
---|---|---|
committer | jcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5> | 2007-05-28 17:04:09 +0000 |
commit | 9880e7bb383054aa43681b52ebd33c8fd4cb8fcb (patch) | |
tree | c9cd097baefda9ec392da2944fb799cbffabaa40 /gnuradio-core/src/python/gnuradio/packet_utils.py | |
parent | f29776e2c39c06c958e7b4dfeae8883b47305969 (diff) |
Merged r5547:5542 from jcorgan/num into trunk. Converts from using Python Numeric to numpy. Trunk passes distcheck. gr-radio-astronomy still needs conversion.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5553 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/packet_utils.py')
-rw-r--r-- | gnuradio-core/src/python/gnuradio/packet_utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnuradio-core/src/python/gnuradio/packet_utils.py b/gnuradio-core/src/python/gnuradio/packet_utils.py index f3552582e4..e4de621337 100644 --- a/gnuradio-core/src/python/gnuradio/packet_utils.py +++ b/gnuradio-core/src/python/gnuradio/packet_utils.py @@ -1,5 +1,5 @@ # -# Copyright 2005,2006 Free Software Foundation, Inc. +# Copyright 2005,2006,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,7 +20,7 @@ # import struct -import Numeric +import numpy from gnuradio import gru @@ -87,7 +87,7 @@ def string_to_hex_list(s): def whiten(s, o): - sa = Numeric.fromstring(s, Numeric.UnsignedInt8) + sa = numpy.fromstring(s, numpy.uint8) z = sa ^ random_mask_vec8[o:len(sa)+o] return z.tostring() @@ -451,5 +451,5 @@ random_mask_tuple = ( 199, 113, 146, 164, 109, 187, 109, 179, 109, 181, 237, 183, 13, 182, 133, 182, 227, 54, 201, 214, 214, 222, 222, 216, 88, 90, 186, 187, 51, 51, 255, 63 ) -random_mask_vec8 = Numeric.array(random_mask_tuple, Numeric.UnsignedInt8) +random_mask_vec8 = numpy.array(random_mask_tuple, numpy.uint8) |