# 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 nmf
import nnls
import matrix_utils
import multiprocessing as mp
from ....Common import errors, display

        alpha_range: tuple, (2,)
            Regularization parameter on W
            Supply lower and upper bounds on the search space (uniform sampling)

        beta_range: tuple, (2,)
            Sparsity parameter on H
            Supply lower and upper bounds on the search space (uniform sampling)

        n_param: int
            Number of random samples to pursue

        fold_list: list of lists
            Each nested list contains the observations indices that are members
            of each fold

        str_path: str
            Text file path to store progress

    Returns
    -------
        param_list: list of dict: {param_id, alpha, beta, rank, fold_id,
                                   train_ix, test_ix, str_path}
            Each list entry contains a dictionary of a single parameter set
            for NMF optimization
    """

    # Standard param checks
    errors.check_type(alpha_range, tuple)
    errors.check_type(beta_range, tuple)

# 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/optimize_nmf.py
import numpy as np
import nmf
import nnls
import matrix_utils
import multiprocessing as mp
from ....Common import errors, display


        alpha_range: tuple, (2,)
            Regularization parameter on W
            Supply lower and upper bounds on the search space (uniform sampling)

        beta_range: tuple, (2,)
            Sparsity parameter on H
            Supply lower and upper bounds on the search space (uniform sampling)

        n_param: int
            Number of random samples to pursue

        fold_list: list of lists
            Each nested list contains the observations indices that are members
            of each fold

        str_path: str
            Text file path to store progress

    Returns
    -------
        param_list: list of dict: {param_id, alpha, beta, rank, fold_id,
                                   train_ix, test_ix, str_path}
            Each list entry contains a dictionary of a single parameter set
            for NMF optimization
    """

    # Standard param checks
    errors.check_type(alpha_range, tuple)
    errors.check_type(beta_range, tuple)

    errors.check_type(rank_range, tuple)