(string: str, dimension_dict: Optional[Dict[str, int]] = None)
return views
Builds random numpy arrays for testing.

    Parameters
    ----------
    string : str
        List of tensor strings to build
    dimension_dict : dictionary
        Dictionary of index _sizes

    Returns
    -------
    ret : list of np.ndarry's
        The resulting views.

    Examples
    --------
    >>> view = build_views('abbc', {'a': 2, 'b':3, 'c':5})
    >>> view[0].shape
    (2, 3, 3, 5)
Builds random numpy arrays for testing.
Builds random numpy arrays for testing .
def build_views(string: str, dimension_dict: Optional[Dict[str, int]] = None) -> List[np.ndarray]:
    """
    Builds random numpy arrays for testing.

    Parameters
    ----------
    string : str
        List of tensor strings to build
    dimension_dict : dictionary
        Dictionary of index _sizes

    Returns
    -------
    ret : list of np.ndarry's
        The resulting views.

    Examples
    --------
    >>> view = build_views('abbc', {'a': 2, 'b':3, 'c':5})
    >>> view[0].shape
    (2, 3, 3, 5)

    """

    if dimension_dict is None:
        dimension_dict = _default_dim_dict

    views = []
    terms = string.split("->")[0].split(",")
    for term in terms:
        dims = [dimension_dict[x] for x in term]
        views.append(np.random.rand(*dims))
    return views
def build_views ( string : str , dimension_dict : Optional [ Dict [ str , int ] ] = None ) -> List [ np . ndarray ] : if dimension_dict is None : dimension_dict = _default_dim_dict views = [ ] terms = string . split ( "->" ) [ 0 ] . split ( "," ) for term in terms : dims = [ dimension_dict [ x ] for x in term ] views . append ( np . random . rand ( * dims ) ) return views