(val, j, a_delta)
| 169 | |
| 170 | # a helper to modify j-th element of val by a_delta |
| 171 | def modify(val, j, a_delta): |
| 172 | val = val.copy() |
| 173 | val.reshape(-1)[j] = val.reshape(-1)[j] + a_delta |
| 174 | return val |
| 175 | |
| 176 | # numerically compute a partial derivative with respect to j-th element of the var `name` |
| 177 | def derivative(x_name, j, a_delta): |
no test coverage detected
searching dependent graphs…