-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC_arraytest output
63 lines (48 loc) · 1.76 KB
/
C_arraytest output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
--- Test vecfcn1 ------------------------------
Multiply the input by 2 x dfac and put in output
Input string: I'm in a C extension.
x= [ 0. 1. 2. 3.]
y= [ 0. 4. 8. 12.]
--- Test vecsq ------------------------------
Each 2nd vector component should = square of 1st vector component x xfac
x= [ 0. 1. 2. 3. 4. 5. 6.]
y= [ -0. -2.5 -10. -22.5 -40. -62.5 -90. ]
--- Test rowx2 ------------------------------
(PyArrayObject construction directly from PyArg_ParseTuple)
2nd row of matrix y should be 2 x 2nd row of matrix x
x= [[ 0. 1. 2. 3.]
[ 0. 1. 2. 3.]]
y= [[ 0. 1. 2. 3.]
[ 0. 2. 4. 6.]]
--- Test rowx2_v2 ------------------------------
(PyArrayObject construction different from rowx2)
2nd row of matrix y should be 2 x 2nd row of matrix x
x= [[ 0. 1. 2. 3.]
[ 0. 1. 2. 3.]]
w= [[ 0. 1. 2. 3.]
[ 0. 2. 4. 6.]]
--- Test matsq ------------------------------
Each 2nd matrix component should = square of 1st matrix component x ifac x dfac
x= [[ 0. 1. 2. 3.]
[ 0. 3. 6. 9.]]
y= [[ 0. 3. 12. 27.]
[ 0. 27. 108. 243.]]
--- Test contigmat ------------------------------
Each 2nd matrix component should = square of 1st matrix component x ifac x dfac
In contigmat, cout (as contiguous memory) =
-1.500000e+00 -5.000000e-01 5.000000e-01 1.500000e+00 -1.500000e+00 1.500000e+00 4.500000e+00 7.500000e+00
x= [[ 0. 1. 2. 3.]
[ 0. 3. 6. 9.]]
y= [[-1.5 -0.5 0.5 1.5]
[-1.5 1.5 4.5 7.5]]
--- Test intarrtest1 ------------------------------
Each 2nd matrix component should = 1 if intin >= 0 or 0 otherwise
In intfcn1, the input Python float = -2.278000e+01, a C double
In intfcn1, the output array is,
0 0 0 1 1
0 1 1 1 1
x= [[-3 -2 -1 0 1]
[-3 0 3 6 9]]
y= [[0 0 0 1 1]
[0 1 1 1 1]]
logout