(self, x)
| 41 | return jacobians |
| 42 | |
| 43 | def eval_hessian(self, x): |
| 44 | x = self._transform_input(x) |
| 45 | |
| 46 | num_points = len(x) // self._num_variables |
| 47 | hes = splinter._call(splinter._get_handle().splinter_bspline_eval_hessian_row_major, self._handle, (c_double * len(x))(*x), len(x)) |
| 48 | |
| 49 | # Convert from ctypes array to Python list of list of lists |
| 50 | # hessians is a list of the hessians in all points |
| 51 | hessians = [] |
| 52 | for i in range(num_points): |
| 53 | hessians.append([]) |
| 54 | for j in range(self._num_variables): |
| 55 | hessians[i].append([]) |
| 56 | for k in range(self._num_variables): |
| 57 | hessians[i][j].append(hes[i * self._num_variables * self._num_variables + j * self._num_variables + k]) |
| 58 | return hessians |
| 59 | |
| 60 | def get_num_variables(self): |
| 61 | return splinter._call(splinter._get_handle().splinter_bspline_get_num_variables, self._handle) |
nothing calls this directly
no test coverage detected