def update(self, symbol, data):
        """append daily history data to daily archive.

        Arguments
        =========
        - `symbol`: symbol.
        - `npydata`: data of npy file.
        """
        prev_year = None
        ds = None
        newdata = None

        for row in data:
            day = datetime.datetime.fromtimestamp(row['time'])
            isoyear = day.isocalendar()[0]

            if prev_year != isoyear:
                if prev_year:
                    # ds will be changed, save prev ds first
                    ds[:] = newdata
                ds = self._require_dataset(symbol, isoyear)
                newdata = ds[:]
            index = self._index_of_day(day)
            try:
                newdata[index] = row
            except __HOLE__, e:
                logging.error("IndexError on: %s, %s, %s" % (symbol, isoyear, day))
            prev_year = isoyear

        if ds != None and newdata != None:
            ds[:] = newdata

        self.flush()
        return True
dataset/ETHPy150Open yinhm/datafeed/datafeed/datastore.py/Day.update