[SciPy-dev] array dtypechar wrong or not
pearu at scipy.org
Tue Oct 25 13:45:33 CDT 2005
On Tue, 25 Oct 2005, Travis Oliphant wrote:
>>> b will point to a. If we change b to have typecode 'L', then a will
>>> also change. This would be surprising, I think.
>> I agree with you up to a point that by default array should make a copy.
>> Changing `b` should not change `a`, so why should `a` change on changing
>> `b` typecode anyway? As it is now, array does not perform a complete
>> copy, that is, it ignores dtype argument.
> Ah, wait a minute here. You were using array which makes a copy by
> default. I think if a copy is made, then the typecode should change
> as you expected. I'll look into this.
Ah, great! I was just having a trouble with creating an array with
specified dtypechar and fortran flag and having OWNDATA true from another
array but the code is getting worse and worse. But if this is a bug then
the code simplifies immediately.
More information about the Scipy-dev