[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen
Floris van Manen added the comment: I know it has nothing todo with linspace. But there seems to be a link to using numpy generated variables and not using them. >From a naive point of view i’d expect the same results. But it does not. There is two functions, and two variables. And from the fou

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Well, the thing is that i pass two (apparent) identical values into the same > function, Even if they have the same *numeric* value, they aren't the same kind of value, and they aren't the same function. One is and the other is . When you call ** (expo

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen
Floris van Manen added the comment: Well, the thing is that i pass two (apparent) identical values into the same function, and get two different results. Apparent as in one value generated via np.linspace() and one directly retrieved from a list. If i pass the np variable into to function, it

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen
Floris van Manen added the comment: Well, the thing is that i pass two (apparent) identical values into the same function, and get two different results. Apparent as in one value generated via np.linspace() and one directly retrieved from a list. > On 12 Sep 2018, at 18:12, Steven D'Aprano

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: Oops, sorry, I mistyped. I said: So there's a problem. You're trying to raise a negative number to a positive value I meant to say a *fractional* value. Sorry for the confusion. -- ___ Python tracker

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: Your code gives runtime warnings of invalid values. You should fix that. If your values are invalid, there's probably a bug in your code. RuntimeWarning: invalid value encountered in double_scalars Your code is also very complex. You ought to simplify the e

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue34645] math and numpy yield different results (nan)

2018-09-12 Thread Floris van Manen
New submission from Floris van Manen : when using numpy defined values i get nan results. when using math defined values, no nan errors occur. check2 bb [5.0, 2.285379077161093, nan, nan, 2.285379077161092] check2 cc [5.0, 2.285379077161093, 4.341186402706317, 4.341186402706317, 2.28537907716