[Numpy-discussion] Assigning complex value to real array
Thu Oct 7 22:12:52 CDT 2010
On Fri, Oct 8, 2010 at 11:47 AM, Andrew P. Mullhaupt
> On 10/7/2010 8:21 PM, Robert Kern wrote:
>> On Thu, Oct 7, 2010 at 18:46, Andrew P. Mullhaupt<firstname.lastname@example.org> wrote:
>> It appears that your answer is YES, we COULD have that, BUT it would be
>> a lot of work.
>> You misread him. The answer is "no." We will not change the memory
>> model so incompatibly. There is not only too much code in numpy to
>> rewrite, but a ton of other code that we do not maintain that relies
>> on our current memory model.
> Why would the class need to use the memory model of numpy? It wouldn't
> be getting it's memory from numpy if you used memory mapped files.
It does not need to strictly speaking, but it is certainly required
for any kind of acceptable performances. Are you ready to give up the
ufunc machinery, for example ?
More precisely, a big issue with having real/imaginary not
contiguously in memory is that it is incompatible with the C99/C++
complex model (which *requires* that a complex double has the same
binary representation as double). As far as I know, it is
impossible to fake this using different mmap areas for real and
More information about the NumPy-Discussion