(self, x)
Insert an observation of data. First store in a array buffer. If the buffer is full,
        do a batch insert. If the size of sampled list reach compress_thres, compress this list.
        Parameters
        ----------
        x : float
            The observation that prepare to insert
Insert an observation of data. First store in a array buffer. If the buffer is full,
        do a batch insert. If the size of sampled list reach compress_thres, compress this list.
        Parameters
        ----------
        x : float
            The observation that prepare to insert
Insert an observation of data . First store in a array buffer . If the buffer is full do a batch insert . If the size of sampled list reach compress_thres compress this list . Parameters ---------- x : float The observation that prepare to insert
def insert(self, x):
        """
        Insert an observation of data. First store in a array buffer. If the buffer is full,
        do a batch insert. If the size of sampled list reach compress_thres, compress this list.
        Parameters
        ----------
        x : float
            The observation that prepare to insert

        """
        if x in self.abnormal_list or (isinstance(x, float) and np.isnan(x)):
            self.missing_count += 1
            return

        try:
            x = float(x)
        except ValueError:
            return

        self.head_sampled.append(x)
        if len(self.head_sampled) >= self.head_size:
            self._insert_head_buffer()
            if len(self.sampled) >= self.compress_thres:
                self.compress()
def insert ( self , x ) : if x in self . abnormal_list or ( isinstance ( x , float ) and np . isnan ( x ) ) : self . missing_count += 1 return try : x = float ( x ) except ValueError : return self . head_sampled . append ( x ) if len ( self . head_sampled ) >= self . head_size : self . _insert_head_buffer ( ) if len ( self . sampled ) >= self . compress_thres : self . compress ( )