Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70679

Convert numpy array to single number

Newsgroups comp.lang.python
Date 2014-04-28 06:04 -0700
Message-ID <088cdf75-f196-404b-ba77-567559f431d8@googlegroups.com> (permalink)
Subject Convert numpy array to single number
From mboyd02255@gmail.com

Show all headers | View raw


I have a numpy array consisting of 1s and zeros for representing binary numbers:

e.g.

     >>> binary
     array([ 1.,  0.,  1.,  0.])

I wish the array to be in the form 1010, so it can be manipulated.

I do not want to use built in binary converters as I am trying to build my own.

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Convert numpy array to single number mboyd02255@gmail.com - 2014-04-28 06:04 -0700
  Re: Convert numpy array to single number Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-04-28 14:16 +0000
  Re:Convert numpy array to single number Dave Angel <davea@davea.name> - 2014-04-28 15:19 -0400
  Re: Convert numpy array to single number Tom P <werotizy@freent.dd> - 2014-04-29 17:42 +0200
    Re: Convert numpy array to single number Papp Győző <pappgyozo@gmail.com> - 2014-05-01 15:26 +0200

csiph-web