[Numpy-discussion] dtype related deprecations

Travis Oliphant travis@continuum...
Sun Feb 5 10:00:47 CST 2012


Fortunately that's not the case.  All that Mark is advocating  is not allowing changing the *itself* in place.  You are still free to change the dtype of the array in order to change the field names without making a data copy.

Travis



--
Travis Oliphant
(on a mobile)
512-826-7480


On Feb 5, 2012, at 9:57 AM, Erin Sheldon <erin.sheldon@gmail.com> wrote:

> Excerpts from Mark Wiebe's message of Sat Feb 04 18:24:58 -0500 2012:
>> The names issue is a bit trickier. There has been some back and forth in
>> some tickets, and I recall some discussion on the mailing list, but that
>> may be long ago and without clear resolution. That this should be changed
>> is however very clear to me, because NumPy is violating a definition in the
>> Python documentation of what rules hashable objects should obey. The
>> trouble is that there isn't a convenience API written yet to replace the
>> usage of that mutability. Perhaps the thing to do is comment out the
>> deprecation warning in the source code, and reintroduce it in 1.8 along
>> with a replacement API appropriate for immutable dtypes?
> 
> I think we need *some* way to rename fields without making a copy of the
> data.  I often must read from standardized file formats where I can only
> change the names after the fact.  If we deprecate this I would have to
> make a copy of the data in memory to alter names, which would be
> prohibitive for large arrays that use >= half the memory.
> 
> -e
> -- 
> Erin Scott Sheldon
> Brookhaven National Laboratory
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list