def __init__(self, order=(1,1,1), tileinfo=None, constval=None,
            category='ilm', shape=None, float_precision=np.float64):
        """
        A polynomial 3D class for updating large fields of polys.

        Parameters
        ----------
        shape : `peri.util.Tile`
            shape of the field (z,y,x)

        order : tuple
            number of terms in each direction

        tileinfo : tuple of 2 `peri.util.Tile`
            These objects help in the transfer of fields from different
            sections of the same image to new fields. `tileinfo` is a tuple
            containing the Tile representing the entire image as well as the
            Tile representing this particular section of field. (typically
            given by `peri.rawimage.tile`)

        constval : float
            The initial value of the entire field, if a constant.

        float_precision : numpy float datatype
            One of numpy.float16, numpy.float32, numpy.float64; precision
            for precomputed arrays. Default is np.float64; make it 16 or 32
            to save memory.
        """
        self.shape = shape
        self.order = order
        self.tileinfo = tileinfo
        self.category = category
        c = category
        if float_precision not in (np.float64, np.float32, np.float16):
            raise ValueError('float_precision must be one of np.float64, ' +
                    'np.float32, np.float16')
        self.float_precision = float_precision

        # set up the parameter mappings and values
        params, values = [], []
        self.param_term = {}
        for order in product(*(range(o) for o in self.order)):
            p = c+'-%i-%i-%i' % order
            self.param_term[p] = order

            params.append(p)
            values.append(0.0)

        if constval:
            values[0] = constval

        super(Polynomial3D, self).__init__(
            params=params, values=values, category=category
        )

        if self.shape:
            self.initialize()
def __init__ ( self , order = ( 1 , 1 , 1 ) , tileinfo = None , constval = None , category = 'ilm' , shape = None , float_precision = np . float64 ) : self . shape = shape self . order = order self . tileinfo = tileinfo self . category = category c = category if float_precision not in ( np . float64 , np . float32 , np . float16 ) : raise ValueError ( 'float_precision must be one of np.float64, ' + 'np.float32, np.float16' ) self . float_precision = float_precision params , values = [ ] , [ ] self . param_term = { } for order in product ( * ( range ( o ) for o in self . order ) ) : p = c + '-%i-%i-%i' % order self . param_term [ p ] = order params . append ( p ) values . append ( 0.0 ) if constval : values [ 0 ] = constval super ( Polynomial3D , self ) . __init__ ( params = params , values = values , category = category ) if self . shape : self . initialize ( )
A polynomial 3D class for updating large fields of polys.

        Parameters
        ----------
        shape : `peri.util.Tile`
            shape of the field (z,y,x)

        order : tuple
            number of terms in each direction

        tileinfo : tuple of 2 `peri.util.Tile`
            These objects help in the transfer of fields from different
            sections of the same image to new fields. `tileinfo` is a tuple
            containing the Tile representing the entire image as well as the
            Tile representing this particular section of field. (typically
            given by `peri.rawimage.tile`)

        constval : float
            The initial value of the entire field, if a constant.

        float_precision : numpy float datatype
            One of numpy.float16, numpy.float32, numpy.float64; precision
            for precomputed arrays. Default is np.float64; make it 16 or 32
            to save memory.