pihnn.utils.get_complex_function#

pihnn.utils.get_complex_function(func)#
Convert the input function to the unified format (i.e., callable: complex torch.tensor -> complex torch.tensor).
The library allows to define some functions in multiple and flexible ways (callables, constants, lists, tensors). Then, this method includes all the possible definitions and unify the type of the generic function.
Parameters:

func (int/float/complex/list/tuple/torch.tensor/callable) – Generic input function.

Returns:

  • new_func (callable) - Copy of the input function in the unified format.