[SciPy-dev] Numpy example for arctan2 perhaps wrong/misleading/confusing?

Jonathan Guyer guyer@nist....
Mon Jun 9 10:47:44 CDT 2008


On Jun 9, 2008, at 10:56 AM, Samuel John wrote:

> I would argue to show just the scalar version in the example and  
> leave out
> the broadcasting version, because it makes less sense here, doesn't  
> it?

No. Perhaps, though, the example should not use two-element arrays, to  
avoid any ambiguity in interpretation.


> Is there any fancy matrix-or-whatever notation, that really makes up a
> good example for broadcasting with arctan2?

We use this all the time to calculate fields of angles from fields of  
vector components. It's not a matrix thing. It's a field thing. It  
makes just as much (or as little) sense as sin(array([a1, a2,  
a3, ...])).

It works like everything else. Please leave it alone.




More information about the Scipy-dev mailing list