|
107 | 107 | raise Exception("input array lengths are different") |
108 | 108 | return length |
109 | 109 |
|
110 | | -cdef np.npy_int check_begidx1(np.npy_intp length, double* a1) except -1: |
| 110 | +cdef np.npy_int check_begidx1(np.npy_intp length, double* a1): |
111 | 111 | cdef: |
112 | 112 | double val |
113 | 113 | for i from 0 <= i < length: |
|
116 | 116 | continue |
117 | 117 | return i |
118 | 118 | else: |
119 | | - raise Exception("inputs are all NaN") |
| 119 | + return length - 1 |
120 | 120 |
|
121 | | -cdef np.npy_int check_begidx2(np.npy_intp length, double* a1, double* a2) except -1: |
| 121 | +cdef np.npy_int check_begidx2(np.npy_intp length, double* a1, double* a2): |
122 | 122 | cdef: |
123 | 123 | double val |
124 | 124 | for i from 0 <= i < length: |
|
130 | 130 | continue |
131 | 131 | return i |
132 | 132 | else: |
133 | | - raise Exception("inputs are all NaN") |
| 133 | + return length - 1 |
134 | 134 |
|
135 | | -cdef np.npy_int check_begidx3(np.npy_intp length, double* a1, double* a2, double* a3) except -1: |
| 135 | +cdef np.npy_int check_begidx3(np.npy_intp length, double* a1, double* a2, double* a3): |
136 | 136 | cdef: |
137 | 137 | double val |
138 | 138 | for i from 0 <= i < length: |
|
147 | 147 | continue |
148 | 148 | return i |
149 | 149 | else: |
150 | | - raise Exception("inputs are all NaN") |
| 150 | + return length - 1 |
151 | 151 |
|
152 | | -cdef np.npy_int check_begidx4(np.npy_intp length, double* a1, double* a2, double* a3, double* a4) except -1: |
| 152 | +cdef np.npy_int check_begidx4(np.npy_intp length, double* a1, double* a2, double* a3, double* a4): |
153 | 153 | cdef: |
154 | 154 | double val |
155 | 155 | for i from 0 <= i < length: |
|
167 | 167 | continue |
168 | 168 | return i |
169 | 169 | else: |
170 | | - raise Exception("inputs are all NaN") |
| 170 | + return length - 1 |
171 | 171 |
|
172 | 172 | cdef np.ndarray make_double_array(np.npy_intp length, int lookback): |
173 | 173 | cdef: |
|
0 commit comments