Open primes.bin in binary mode.

This commit is contained in:
Steven Robertson 2011-10-17 19:31:09 -04:00
parent 6144601259
commit 20520d2f69

View File

@ -47,7 +47,7 @@ __device__ float mwc_next_11(mwc_st &st) {
rand = np.random
# Load raw big-endian u32 multipliers from primes.bin.
with open('primes.bin') as primefp:
with open('primes.bin', 'rb') as primefp:
dt = np.dtype(np.uint32).newbyteorder('B')
mults = np.frombuffer(primefp.read(), dtype=dt)