[Matrix-SIG] New Behavior for NumPy scalars?

Travis Oliphant Oliphant.Travis@mayo.edu
Tue, 7 Sep 1999 09:53:24 -0500 (CDT)


> > 
> > Hmm.  Unless you are trying to actually use the single precision
> > datatypes.  Then, you have to be extremely careful not to lose precision
> > because your NumPy arrays are always getting converted to Python scalars.
> 
> Right. And I wouldn't mind disabling the conversion to scalars for
> single-precision rank-0 arrays. After all, there are no single-precision
> scalars, so there's a good reason for not doing that conversion.
> And beginners are unlikely to fall into this trap.
> 
> Does this sound like a useful compromise?

Yes, I think that would be quite a useful compromise.  Good idea.

> 
> And not only that: the correct version of the test in the example above
> looks awful. And a test that would work for any sequence object a would
> become somewhere between incredibly messy and impossible.

True.  Thanks Konrad.  It's always good to get advice from the voice of
reason before implementing any impulsive born-of-frustration design
decision... 


Travis