(self, index, dimensions)
return bigindex
Return the flat index for a given dimensioned index.
Return the flat index for a given dimensioned index.
Return the flat index for a given dimensioned index .
def index(self, index, dimensions):
        """Return the flat index for a given dimensioned index."""
        bigindex = 0
        area = 1
        for i in range(len(index)):
            # dimensions is the *maximum index number*, regardless of self._base
            bigindex += area * (index[i] - self._base)
            area *= dimensions[i] + 1 - self._base
        return bigindex
def index ( self , index , dimensions ) : bigindex = 0 area = 1 for i in range ( len ( index ) ) : # dimensions is the *maximum index number*, regardless of self._base bigindex += area * ( index [ i ] - self . _base ) area *= dimensions [ i ] + 1 - self . _base return bigindex