docstr: This is a generalized version of Python's :func:`~mpmath.range` function
  that accepts fractional endpoints and step sizes and
  returns a list of ``mpf`` instances. Like :func:`~mpmath.range`,
  :func:`~mpmath.arange` can be called with 1, 2 or 3 arguments:
  
  ``arange(b)``
      `[0, 1, 2, \ldots, x]`
  ``arange(a, b)``
      `[a, a+1, a+2, \ldots, x]`
  ``arange(a, b, h)``
      `[a, a+h, a+h, \ldots, x]`
  
  where `b-1 \le x < b` (in the third case, `b-h \le x < b`).
  
  Like Python's :func:`~mpmath.range`, the endpoint is not included. To
  produce ranges where the endpoint is included, :func:`~mpmath.linspace`
  is more convenient.
  
  **Examples**
  
      >>> from mpmath import *
      >>> mp.dps = 15; mp.pretty = False
      >>> arange(4)
      [mpf('0.0'), mpf('1.0'), mpf('2.0'), mpf('3.0')]
      >>> arange(1, 2, 0.25)
      [mpf('1.0'), mpf('1.25'), mpf('1.5'), mpf('1.75')]
      >>> arange(1, -1, -0.75)
      [mpf('1.0'), mpf('0.25'), mpf('-0.5')]
code: def arange(ctx, *args):
      r"""
      This is a generalized version of Python's :func:`~mpmath.range` function
      that accepts fractional endpoints and step sizes and
      returns a list of ``mpf`` instances. Like :func:`~mpmath.range`,
      :func:`~mpmath.arange` can be called with 1, 2 or 3 arguments:
  
      ``arange(b)``
          `[0, 1, 2, \ldots, x]`
      ``arange(a, b)``
          `[a, a+1, a+2, \ldots, x]`
      ``arange(a, b, h)``
          `[a, a+h, a+h, \ldots, x]`
  
      where `b-1 \le x < b` (in the third case, `b-h \le x < b`).
  
      Like Python's :func:`~mpmath.range`, the endpoint is not included. To
      produce ranges where the endpoint is included, :func:`~mpmath.linspace`
      is more convenient.
  
      **Examples**
  
          >>> from mpmath import *
          >>> mp.dps = 15; mp.pretty = False
          >>> arange(4)
          [mpf('0.0'), mpf('1.0'), mpf('2.0'), mpf('3.0')]
          >>> arange(1, 2, 0.25)
          [mpf('1.0'), mpf('1.25'), mpf('1.5'), mpf('1.75')]
          >>> arange(1, -1, -0.75)
          [mpf('1.0'), mpf('0.25'), mpf('-0.5')]
  
      """
      if not len(args) <= 3:
          raise TypeError(
              "arange expected at most 3 arguments, got %i" % len(args)
          )
      if not len(args) >= 1:
          raise TypeError(
              "arange expected at least 1 argument, got %i" % len(args)
          )
      # set default
      a = 0
      dt = 1
      # interpret arguments
      if len(args) == 1:
          b = args[0]
      elif len(args) >= 2:
          a = args[0]
          b = args[1]
      if len(args) == 3:
          dt = args[2]
      a, b, dt = ctx.mpf(a), ctx.mpf(b), ctx.mpf(dt)
      assert (
          a + dt != a
      ), "dt is too small and would cause an infinite loop"
      # adapt code for sign of dt
      if a > b:
          if dt > 0:
              return []
          op = gt
      else:
          if dt < 0:
              return []
          op = lt
      # create list
      result = []
      i = 0
      t = a
      while 1:
          t = a + dt * i
          i += 1
          if op(t, b):
              result.append(t)
          else:
              break
      return result
  
imports: from operator import gt, lt
  from .libmp.backend import xrange
  from .functions.functions import SpecialFunctions
  from .functions.rszeta import RSCache
  from .calculus.quadrature import QuadratureMethods
  from .calculus.inverselaplace import LaplaceTransformInversionMethods
  from .calculus.calculus import CalculusMethods
  from .calculus.optimization import OptimizationMethods
  from .calculus.odes import ODEMethods
  from .matrices.matrices import MatrixMethods
  from .matrices.calculus import MatrixCalculusMethods
  from .matrices.linalg import LinearAlgebraMethods
  from .matrices.eigen import Eigen
  from .identification import IdentificationMethods
  from .visualization import VisualizationMethods
  from .None import libmp
label_desc: Use image node_id 19 for calling the StandardBaseContext obj's underlying member method code with example usage: obj.arange(ctx) and returns: result, list, list