# Path: Echobase/Common/errors.py
# def check_dims(arr, nd):
# def check_type(obj, typ):
# def check_function(obj):
# def check_path(path):
# def make_path(path):
# def check_path_overwrite(path):
# def check_has_key(dictionary, key_ref):
# 
# Path: Echobase/Common/display.py
# def my_display(txt, verbose, str_path=None):
# def par_watch_stdout(ar, dt=1.0, truncate=1000):


import numpy as np
import nnls
import matrix_utils as matr_util
import time
from ....Common import errors, display

        sparse_dim: str
            Choice of 'win' to apply sparsity to sub-network expression coefficients
            Choice of 'conn' to apply sparsity to sub-network edge coefficients

        max_iter: int
            Maximum number of optimization iterations to perform
            Typically around 100

        verbose: bool
            Print progress information to the screen

    Returns
    -------
        fac_subnet_init: numpy.ndarray
            Final sub-network basis matrix
            shape: [n_fac x n_conn]

        fac_coef_init: numpy.ndarray
            Final coefficients matrix
            shape: [n_fac x n_win]

        rel_err: numpy.ndarray
            Froebenius norm of the error matrix over iterations
            shape: [n_iter,]
    """

    # Standard param checks
    errors.check_type(cfg_matr, np.ndarray)
    errors.check_type(alpha, float)

# Path: Echobase/Common/errors.py
# def check_dims(arr, nd):
# def check_type(obj, typ):
# def check_function(obj):
# def check_path(path):
# def make_path(path):
# def check_path_overwrite(path):
# def check_has_key(dictionary, key_ref):
# 
# Path: Echobase/Common/display.py
# def my_display(txt, verbose, str_path=None):
# def par_watch_stdout(ar, dt=1.0, truncate=1000):


# Path: Echobase/Network/Partitioning/Subgraph/nmf.py
import numpy as np
import nnls
import matrix_utils as matr_util
import time
from ....Common import errors, display


        sparse_dim: str
            Choice of 'win' to apply sparsity to sub-network expression coefficients
            Choice of 'conn' to apply sparsity to sub-network edge coefficients

        max_iter: int
            Maximum number of optimization iterations to perform
            Typically around 100

        verbose: bool
            Print progress information to the screen

    Returns
    -------
        fac_subnet_init: numpy.ndarray
            Final sub-network basis matrix
            shape: [n_fac x n_conn]

        fac_coef_init: numpy.ndarray
            Final coefficients matrix
            shape: [n_fac x n_win]

        rel_err: numpy.ndarray
            Froebenius norm of the error matrix over iterations
            shape: [n_iter,]
    """

    # Standard param checks
    errors.check_type(cfg_matr, np.ndarray)
    errors.check_type(alpha, float)

    errors.check_type(beta, float)