Surface

This actually isn’t a concrete implementation of BaseSurface. Instead it’s a class that dispatches to an implementation of BaseSurface to do its core evaluations (plus it does shape checking)

 

__init__(self, data, dimension=None, base=None, **metadata): 
  • data: Any
  • dimension: Any
  • base: None | Type[BaseSurface]
  • metadata: Any

 

@property
data(self): 

 

minimize(self, initial_guess=None, function_options=None, **opts): 

Provides a uniform interface for minimization, basically just dispatching to the BaseSurface implementation if provided

  • initial_guess: np.ndarray | None

    initial starting point for the minimization

  • function_options: None | dict
  • opts: Any
  • :returns: _

 

detect_base(data, opts): 

Infers what type of base surface works for the data that’s passed in. It’s super roughly done so…yeah generally better to pass the base class you want explicitly. But in the absence of that we can do this ?_?

Basic strategy:

  1. look for options that go with specific methods
  2. look at data structures to guess i. gradient as the first data arg + all data args are ndarrays -> Taylor Series ii. callables as second arg -> Linear expansion or Linear fit iii. just like…one big array -> Interpolatin
    • data: tuple
    • opts: dict
    • :returns: _

 

__call__(self, gridpoints, **kwargs): 

Feedback

Examples

Templates

Documentation