Re: [Numpy-discussion] Arcos returns nan

2008-03-28 Thread Charles R Harris
On Fri, Mar 28, 2008 at 3:20 AM, João Quinta da Fonseca < [EMAIL PROTECTED]> wrote: > I have a function that returns the dot product of two unit vectors. > When I try to use arcos on the values returned I sometimes get the > warning: > "Warning: invalid value encountered in arccos", and the angle

Re: [Numpy-discussion] Arcos returns nan

2008-03-28 Thread David Cournapeau
David Cournapeau wrote: > João Quinta da Fonseca wrote: > >> I have a function that returns the dot product of two unit vectors. >> When I try to use arcos on the values returned I sometimes get the >> warning: >> "Warning: invalid value encountered in arccos", and the angle >> returned is

Re: [Numpy-discussion] Arcos returns nan

2008-03-28 Thread David Cournapeau
João Quinta da Fonseca wrote: > I have a function that returns the dot product of two unit vectors. > When I try to use arcos on the values returned I sometimes get the > warning: > "Warning: invalid value encountered in arccos", and the angle > returned is nan. I found out that this happens

[Numpy-discussion] Arcos returns nan

2008-03-28 Thread João Quinta da Fonseca
I have a function that returns the dot product of two unit vectors. When I try to use arcos on the values returned I sometimes get the warning: "Warning: invalid value encountered in arccos", and the angle returned is nan. I found out that this happens for essentially co- linear vectors, for