def index_to_position(index, strides):
    """
    Converts a multidimensional tensor `index` into a single-dimensional position in
    storage based on strides.

    Args:
       index (array-like): index tuple of ints
       strides (array-like): tensor strides

    Return:
        int : position in storage
    """
    position = 0
    for i, s in zip(index, strides):
        position += i*s
    return position