[SciPy-Dev] why this not report an error for a.dtype=float when a is mixed struc array

Vincent Davis vincent@vincentdavis....
Sat Jun 5 22:22:09 CDT 2010


2010/6/5 Stéfan van der Walt <stefan@sun.ac.za>:
> On 5 June 2010 08:49, Vincent Davis <vincent@vincentdavis.net> wrote:
>>> You might find this thread helpful.  Especially, Chris's reply.
>>>
>>> http://thread.gmane.org/gmane.comp.python.numeric.general/32664/
>>
>> Ok now I understand why, that is why the numbers are a mess but not
>> why it is a feature :) I guess I am try to think of why I would use
>> this. I might be completely wrong but if most users would expect a
>> different behavior and don't notice what is actually happening then
>> maybe there should be a warning and a different way to get the current
>> results.
>
> There are many uses for 'view', such as examining underlying bytes or
> changing the subclass of an array without copying.
>
> I'm not sure I follow your argument, though.  'view' and 'astype' do
> distinctly different things (well defined), and are both necessary for
> advanced array computation.  An array is simply a wrapper around
> memory, and it should not be too magical.

i.e. I lack knowledge and experience, no thats not what you said but
it is probably the correct assessment.

Thanks
Vincent

> Regards
> Stéfan
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>


More information about the SciPy-Dev mailing list