sao_arange

sherpa.utils.sao_arange(start, stop, step=None)[source] [edit on github]

Create a range of values between start and stop.

See also numpy.arange and numpy.linspace.

Parameters
  • start (float) – The start and stop points.

  • stop (float) – The start and stop points.

  • step (float or None, optional) – If not given the step size defaults to 1.0.

Returns

vals – The values start, start + step, … The last point is the first position where start + n * step >= stop, which means that it can include a point > stop.

Return type

NumPy array

Examples

>>> sao_arange(1, 3)
array([ 1.,  2.,  3.])
>>> sao_arange(1, 3, 0.6)
array([ 1. ,  1.6,  2.2,  2.8,  3.4])