get_optimizer#

mrinufft.extras.get_optimizer(method_name, *args, **kwargs)[source]#

Get the optimizer function from its name.

Available methods are:

Parameters:
  • method_name (str) – The name of the method to retrieve.

  • *args – Arguments to pass to the method if it is callable.

  • **kwargs – Arguments to pass to the method if it is callable.

Returns:

  • The method corresponding to the given name, or the result of calling it with the

  • provided arguments.

Raises:

ValueError – If the method name is not found in the registry.