Skip to content

Resolve "Add a curve_fit operation and a (safe) lambda generator"

This MR adds the generate_lambda function, that invokes eval on highly specialised and sanitised strings:

  • accepts only valid lambda definitions
  • ... without a nested lambda
  • highly restricts access to __builtins__
  • prohibits some strings like __ and ;

This should be reasonably safe.

That operation is added to the operations database alongside curve_fit, which invokes scipy.optimize.curve_fit and requires a callable as first argument.

Can this MR be accepted?

  • Implementation ready
  • Tests added or adjusted
  • Documentation extended or updated
  • Code quality
  • Ready for merging

Related issues

Closes #156 (closed)

Edited by Utopia Developers

Merge request reports