Generating a (uniformly distributed) random bit list of length N
22 Sep
2013
22 Sep
'13
9:04 p.m.
Is np.random.randint(2, size=N) the fastest way to do this? Thanks! DG
23 Sep
23 Sep
1:22 a.m.
New subject: Generating a (uniformly distributed) random bit list of length N
On 22 Sep 2013 23:04, "David Goldsmith" <d.l.goldsmith@gmail.com> wrote:
Is np.random.randint(2, size=N) the fastest way to do this? Thanks!
Are you concerned about speed or memory use? The operation you show should already be quite fast. A more memory efficient approach would be to generate integers and use their binary representation. Stéfan
4113
Age (days ago)
4114
Last active (days ago)
1 comments
2 participants
participants (2)
-
David Goldsmith
-
Stéfan van der Walt