def _scale(matrix, factors, axis=0):
    if not (len(matrix.shape) == 2):
        raise ValueError(
                "Wrong array shape: %s, should have only 2 dimensions."
                % str(matrix.shape))
    if axis not in (0, 1):
        raise ValueError('Wrong axis, should be 0 (scaling lines)\
                or 1 (scaling columns).')
    # Transform factors given as columne shaped matrices
    factors = np.squeeze(np.asarray(factors))
    if axis == 1:
        factors = factors[:, np.newaxis]
    return np.multiply(matrix, factors)
Determines the path to write the SQL dump to. Depends on whether the
dataset/ETHPy150Open omangin/multimodal/multimodal/lib/nmf.py/_scale--crossover with--dataset/ETHPy150Open duointeractive/django-fabtastic/fabtastic/management/commands/ft_dump_db.py/Command.get_dump_path