def test_booleanindex(self): boolIdx = np.repeat(True, len(self.strIndex)).astype(bool) boolIdx[5:30:2] = False subIndex = self.strIndex[boolIdx] common.assert_dict_equal(tseries.map_indices(subIndex), subIndex.indexMap)
def __setstate__(self, state): """Necessary for making this object picklable""" np.ndarray.__setstate__(self, state) self._cache_indexMap = _tseries.map_indices(self) self._cache_allDates = _tseries.isAllDates(self)
def indexMap(self): if not hasattr(self, '_cache_indexMap'): self._cache_indexMap = _tseries.map_indices(self) return self._cache_indexMap
def __setstate__(self,state): """Necessary for making this object picklable""" np.ndarray.__setstate__(self, state) self._cache_indexMap = map_indices(self) self._cache_allDates = isAllDates(self)
def indexMap(self): if not hasattr(self, '_cache_indexMap'): self._cache_indexMap = map_indices(self) return self._cache_indexMap
def indexMap(self): if not hasattr(self, "_cache_indexMap"): self._cache_indexMap = _tseries.map_indices(self) return self._cache_indexMap