| 244 | |
| 245 | template <typename df_type> |
| 246 | typename df_type::scalar_type get_bias( |
| 247 | const df_type& df |
| 248 | ) |
| 249 | { |
| 250 | if (df.basis_vectors.size() == 0) |
| 251 | { |
| 252 | PyErr_SetString( PyExc_ValueError, "Decision function is empty." ); |
| 253 | throw py::error_already_set(); |
| 254 | } |
| 255 | return df.b; |
| 256 | } |
| 257 | |
| 258 | template <typename df_type> |
| 259 | void set_bias( |