[Numpy-discussion] binary to ascii

Peter numpy-discussion@maubp.freeserve.co...
Tue Nov 29 14:33:04 CST 2011


On Tue, Nov 29, 2011 at 8:13 PM, Alex Ter-Sarkissov <ater1980@gmail.com> wrote:
> hi eveyone,
>
> is there a simple command in numpy similar to matlab char(bin2dec('//some
> binary value//')) to convert binary to characters and back?
>
> thanks

Would the Python struct library do? You'd get a tuple
back from struct.unpack(...) which you can turn into
a numpy array if you need to.

Peter


More information about the NumPy-Discussion mailing list