(self, sensor_name, sensor_data, t=None)
Set trajectory data for a particular sensor.
Set trajectory data for a particular sensor.
Set trajectory data for a particular sensor .
def set(self, sensor_name, sensor_data, t=None):
        """ Set trajectory data for a particular sensor. """
        if t is None:
            self._data[sensor_name] = sensor_data
            self._X.fill(np.nan)  # Invalidate existing X.
            self._obs.fill(np.nan)  # Invalidate existing obs.
            self._meta.fill(np.nan)  # Invalidate existing meta data.
        else:
            if sensor_name not in self._data:
                self._data[sensor_name] = \
                        np.empty((self.T,) + sensor_data.shape)
                self._data[sensor_name].fill(np.nan)
            self._data[sensor_name][t, :] = sensor_data
            self._X[t, :].fill(np.nan)
            self._obs[t, :].fill(np.nan)
def set ( self , sensor_name , sensor_data , t = None ) : if t is None : self . _data [ sensor_name ] = sensor_data self . _X . fill ( np . nan ) # Invalidate existing X. self . _obs . fill ( np . nan ) # Invalidate existing obs. self . _meta . fill ( np . nan ) # Invalidate existing meta data. else : if sensor_name not in self . _data : self . _data [ sensor_name ] = np . empty ( ( self . T , ) + sensor_data . shape ) self . _data [ sensor_name ] . fill ( np . nan ) self . _data [ sensor_name ] [ t , : ] = sensor_data self . _X [ t , : ] . fill ( np . nan ) self . _obs [ t , : ] . fill ( np . nan )