Re: [Numpy-discussion] python is cool

2015-05-12 Thread Roland Schulz
Hi, I think the best way to solve this issue to not use a state at all. It is fast, reproducible even in parallel (if wanted), and doesn't suffer from the shared issue. Would be nice if numpy provided such a stateless RNG as implemented in Random123: www.deshawresearch.com/resources_random123.html

[Numpy-discussion] frombuffer alignment for ctypes.Structure array

2009-04-10 Thread Roland Schulz
Hi, I would like to create a ndarray view on an array of ctypes.Structure. (reason: see below). The problem is that the structure size is not falling on an alignment boundary and thus the size is bigger than its parts. A sample showing the problem: import numpy as N from ctypes import * class C

[Numpy-discussion] frombuffer alignment for ctypes.Structure array

2009-04-10 Thread Roland Schulz
Hi, I would like to create a ndarray view on an array of ctypes.Structure. (reason: see below). The problem is that the structure size is not falling on an alignment boundary and thus the size is bigger than its parts. A sample showing the problem: import numpy as N from ctypes import * class C