Exemplo n.º 1
0
    def __init__(self, data, step_size=1.0):
        """A continuous scalar data source from a discrete time series.

        Time series data points are linearly interpolated in order to generate
        values for points not present in the time series. The time series is
        wrapped in order to generate an infinite sequence.

        :param data: iterable of scalar values
        :param step_size: number of LB iterations corresponding to one unit in
            the time series (i.e. time distance between two neighboring points).
        """

        Symbol.__init__("unused")
        if type(data) is list or type(data) is tuple:
            data = np.float64(data)

        # Copy here is necessary so that the caller doesn't accidentally change
        # the underlying array later. Also, we need the array to be C-contiguous
        # (for __hash__ below), which might not be the case if it's a view.
        self._data = data.copy()
        self._step_size = step_size

        # To be set later by the geometry encoder class. This is necessary due
        # to how the printing system in Sympy works (see _ccode below).
        self._offset = None
Exemplo n.º 2
0
 def __init__(self, name, comment=None):
     Symbol.__init__(name)
     self.comment = comment
Exemplo n.º 3
0
 def __init__(self, name, dim = 4, up = True):
     Symbol.__init__(self, name)
     #self._args.extend([dim,up])
     self._name = name
     self._dim = dim
     self._up = up
Exemplo n.º 4
0
 def __init__(self, name, comment=None):
     Symbol.__init__(name)
     self.comment = comment
Exemplo n.º 5
0
 def __init__(self, label, dim=None, **kw_args):
     Symbol.__init__(label, **kw_args)
     self.dim = dim