[SciPy-dev] Numpy example for arctan2 perhaps wrong/misleading/confusing?
Stéfan van der Walt
Mon Jun 9 08:38:42 CDT 2008
2008/6/9 Samuel John <email@example.com>:
> Hi all,
> the page
> describes the numpy.arctan2 function and gives an example:
>> arctan2(array([0, 1]), array([1, 0]))
> However in the example there are used two arrays as arguments to
> arctan2, where it should probably be the x and y component of a single
> 2D vector. What arctan2(x,y) returns is the angle between the 2D
> vector (x,y) and the x axis. The example made me assume that it can
> compute the angle between two vectors, which it does obviously not.
> Wikipedia has a nice article on atan2. I think arctan2 works the same, or?
> What could be the reason of using arrays in arctan2? Could someone
> update the documentation?
> Also help(numpy.arctan2) is not very helpful, to be honest.
You're right, it is not. Would you like to improve it?
Please register an account for yourself on our documentation wiki:
I'll then give you permission to edit docstrings.
More information about the Scipy-dev