bolt/spark/array.py
def _reshapebasic(self, shape):
        """
        Check if the requested reshape can be broken into independant reshapes
        on the keys and values. If it can, returns the index in the new shape
        separating keys from values, otherwise returns -1
        """
        new = tupleize(shape)
        old_key_size = prod(self.keys.shape)
        old_value_size = prod(self.values.shape)

        for i in range(len(new)):
            new_key_size = prod(new[:i])
            new_value_size = prod(new[i:])
            if new_key_size == old_key_size and new_value_size == old_value_size:
                return i

        return -1
def _reshapebasic(self, shape):
        new = tupleize(shape)
        old_key_size = prod(self.keys.shape)
        old_value_size = prod(self.values.shape)

        for i in range(len(new)):
            new_key_size = prod(new[:i])
            new_value_size = prod(new[i:])
            if new_key_size == old_key_size and new_value_size == old_value_size:
                return i

        return -1
def _reshapebasic ( self , shape ) : new = tupleize ( shape ) old_key_size = prod ( self . keys . shape ) old_value_size = prod ( self . values . shape ) for i in range ( len ( new ) ) : new_key_size = prod ( new [ : i ] ) new_value_size = prod ( new [ i : ] ) if new_key_size == old_key_size and new_value_size == old_value_size : return i return - 1
Check if the requested reshape can be broken into independant reshapes
        on the keys and values. If it can, returns the index in the new shape
        separating keys from values, otherwise returns -1
Check if the requested reshape can be broken into independant reshapes on the keys and values . If it can returns the index in the new shape separating keys from values otherwise returns - 1