def _get_dates_loc(self, dates, date):
        if hasattr(dates, 'indexMap'): # 0.7.x
            date = dates.indexMap[date]
        else:
            date = dates.get_loc(date)
            try: # pandas 0.8.0 returns a boolean array
                len(date)
                from numpy import where
                date = where(date)[0].item()
            except __HOLE__: # this is expected behavior
                pass
        return date
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/tsa/base/tsa_model.py/TimeSeriesModel._get_dates_loc