guess_bounds

sherpa.utils.guess.guess_bounds(x: ndarray, xhi: Literal[True]) tuple[ValueAndRange, ValueAndRange][source] [edit on github]
sherpa.utils.guess.guess_bounds(x: ndarray, xhi: Literal[False]) ValueAndRange

Guess the bounds of a parameter from the independent axis.

Parameters:
  • x (array_like) – The axis values.

  • xhi (bool, optional) – When True, the return value is two dictionaries, with values set to 1/3 and 2/3 along the axis, otherwise a single dictionary, with a value set to the mid-point is returned.

Returns:

ans – When xhi is True then two dictionaries are returned, otherwise one. The keys are ‘val’, ‘min’, and ‘max’.

Return type:

dict or (dict, dict)

See also

get_midpoint