def _update(self, symbol, quotes):
        """Archive daily ohlcs, override if datasets exists.

        Arguments:
          symbol: Stock instrument.
          quotes: numpy quotes data.
        """
        i = 0
        pre_ts = 0
        indexes = []
        for q in quotes:
            # 2 hours interval should be safe for seperate daily quotes
            if pre_ts and (q['time'] - pre_ts) > 7200:
                indexes.append(i)
            pre_ts = q['time']
            i += 1
        indexes.append(i)

        pre_index = 0
        for i in indexes:
            sliced_qs = quotes[pre_index:i]
            date = datetime.datetime.fromtimestamp(sliced_qs[0]['time']).date()
            try:
                ds = self._require_dataset(symbol, date, sliced_qs.shape)
            except __HOLE__, e:
                if e.message.startswith('Shapes do not match'):
                    self._drop_dataset(symbol, date)
                    ds = self._require_dataset(symbol, date, sliced_qs.shape)
                else:
                    raise e
            ds[:] = sliced_qs
            pre_index = i
dataset/ETHPy150Open yinhm/datafeed/datafeed/datastore.py/OHLC._update