[Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-23 Thread David Goldsmith
2 > Date: Mon, 23 Sep 2013 03:22:06 +0200 > From: St?fan van der Walt > Subject: Re: [Numpy-discussion] Generating a (uniformly distributed) > random bit list of length N > To: Discussion of Numerical Python > Message-ID: > < > cabdkgqkq829a_nj7xxcs5xauz-pt

Re: [Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-22 Thread Stéfan van der Walt
On 22 Sep 2013 23:04, "David Goldsmith" 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 bi

[Numpy-discussion] Generating a (uniformly distributed) random bit list of length N

2013-09-22 Thread David Goldsmith
Is np.random.randint(2, size=N) the fastest way to do this? Thanks! DG ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion