Open hcye2022 opened 2 months ago
1> from python import Python
-2 6.283185307179586 6.283185307179586
mojo REPL 24.4.0 / Ubuntu 22.04 / Numpy 2.0.0
I get that the int float vs float int is causing an issue/bug. What really makes me scratch my head is why np.pi gets converted to negative 1???
Bug description
This really surprises me --- the example below shows using "2 np.pi" and "np.pi 2" yield different results. Changing the multiplier from 2 to 2.0 and the problem goes away.
Steps to reproduce
[ 0. -0.22222222 -0.44444444 -0.66666667 -0.88888889 -1.11111111 -1.33333333 -1.55555556 -1.77777778 -2. ] [0. 0.6981317 1.3962634 2.0943951 2.7925268 3.4906585 4.1887902 4.88692191 5.58505361 6.28318531]
System information