Exemple #1
0
 def __getitem__(self, s):
     '''axis[ SlicingInfo( a,b ) ] --> a slice of the original axis
     axis[ index ] --> binboundaries[index] * unit
     '''
     if not isSlicingInfo(s): return Dataset.__getitem__(self, s)
     slicingInfo = s
     indexStart, indexEnd = self.slicingInfo2IndexSlice( slicingInfo )
     s = slice(indexStart, indexEnd + 1 ) #inclusive
     stor = self.storage()[s]
     ret = self._copy( storage = stor )
     ret.__isslice = True
     return ret