(self, a, b, degree, prec, verbose=False)
return nodes
Return nodes for given interval, degree and precision. The
        nodes are retrieved from a cache if already computed;
        otherwise they are computed by calling :func:`~mpmath.calc_nodes`
        and are then cached.

        Subclasses should probably not implement this method,
        but just implement :func:`~mpmath.calc_nodes` for the actual
        node computation.
Return nodes for given interval, degree and precision. The
        nodes are retrieved from a cache if already computed;
        otherwise they are computed by calling :func:`~mpmath.calc_nodes`
        and are then cached.
Return nodes for given interval degree and precision . The nodes are retrieved from a cache if already computed ; otherwise they are computed by calling : func : ~mpmath . calc_nodes and are then cached .
def get_nodes(self, a, b, degree, prec, verbose=False):
        """
        Return nodes for given interval, degree and precision. The
        nodes are retrieved from a cache if already computed;
        otherwise they are computed by calling :func:`~mpmath.calc_nodes`
        and are then cached.

        Subclasses should probably not implement this method,
        but just implement :func:`~mpmath.calc_nodes` for the actual
        node computation.
        """
        key = (a, b, degree, prec)
        if key in self.transformed_cache:
            return self.transformed_cache[key]
        orig = self.ctx.prec
        try:
            self.ctx.prec = prec+20
            # Get nodes on standard interval
            if (degree, prec) in self.standard_cache:
                nodes = self.standard_cache[degree, prec]
            else:
                nodes = self.calc_nodes(degree, prec, verbose)
                self.standard_cache[degree, prec] = nodes
            # Transform to general interval
            nodes = self.transform_nodes(nodes, a, b, verbose)
            if key in self.interval_count:
                self.transformed_cache[key] = nodes
            else:
                self.interval_count[key] = True
        finally:
            self.ctx.prec = orig
        return nodes
def get_nodes ( self , a , b , degree , prec , verbose = False ) : key = ( a , b , degree , prec ) if key in self . transformed_cache : return self . transformed_cache [ key ] orig = self . ctx . prec try : self . ctx . prec = prec + 20 # Get nodes on standard interval if ( degree , prec ) in self . standard_cache : nodes = self . standard_cache [ degree , prec ] else : nodes = self . calc_nodes ( degree , prec , verbose ) self . standard_cache [ degree , prec ] = nodes # Transform to general interval nodes = self . transform_nodes ( nodes , a , b , verbose ) if key in self . interval_count : self . transformed_cache [ key ] = nodes else : self . interval_count [ key ] = True finally : self . ctx . prec = orig return nodes