frange package

frange.frange module

frange.frange.drange(start, stop, step)[source]

A generator that yields successive samples from start (inclusive) to stop (exclusive) in step intervals.

Parameters:

start : float

starting point

stop : float

stopping point

step : float

stepping interval

Yields:

x : float

next sample

class frange.frange.frange(start, stop, step)[source]

Return an object can be used to generate a generator or an array of floats from start (inclusive) to stop (exclusive) by step. This object stores the start, stop, step and length of the data. Uses less memory than storing a large array.

Methods

get_array() Returns an numpy array containing the values from start (inclusive) to stop (exclusive) in step steps.
get_generator() Returns a generator for the frange object instance.
get_array()[source]

Returns an numpy array containing the values from start (inclusive) to stop (exclusive) in step steps.

Returns:

array : ndarray

Array of values from start (inclusive) to stop (exclusive) in step steps.

get_generator()[source]

Returns a generator for the frange object instance.

Returns:

gen : generator

A generator that yields successive samples from start (inclusive) to stop (exclusive) in step steps.