We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e501dc7 commit 69d06bdCopy full SHA for 69d06bd
examples/rambo.py
@@ -2,6 +2,7 @@
2
import numpy as np
3
4
def sp_rambo(sp_C1, sp_F1, sp_Q1, sp_output, C1, F1, Q1, output):
5
+
6
sp_C = 2.0 * sp_C1 - 1.0
7
sp_S = sp.sqrt(1 - sp.square(sp_C))
8
sp_F = 2.0 * sp.pi * sp_F1
@@ -22,11 +23,7 @@ def sp_rambo(sp_C1, sp_F1, sp_Q1, sp_output, C1, F1, Q1, output):
22
23
output[:, :, 2] = Q * S * np.cos(F)
24
output[:, :, 3] = Q * C
25
- # assert np.allclose(sp.to_numpy(sp_C), C)
26
- # assert np.allclose(sp.to_numpy(sp_S), S)
27
- # assert np.allclose(sp.to_numpy(sp_F), F)
28
- # assert np.allclose(sp.to_numpy(sp_Q), Q)
29
- # print(sp_C, sp_S, sp_F, sp_Q)
+ sp.sync()
30
31
32
def sp_initialize(nevts, nout, seed, types_dict):
@@ -37,6 +34,8 @@ def sp_initialize(nevts, nout, seed, types_dict):
37
34
F1 = sp.random.rand(nevts, nout)
38
35
Q1 = sp.random.rand(nevts, nout) * sp.random.rand(nevts, nout)
39
36
40
return (C1, F1, Q1, sp.zeros((nevts, nout, 4), dtype))
41
42
def np_rambo(nevts, nout, C1, F1, Q1, output):
0 commit comments