def _solve_k_from_mu(data, k_array, nll, *args):
<EOL>nll_array = np.zeros(len(k_array))<EOL>for i in range(len(k_array)):<EOL><INDENT>nll_array[i] = nll(data, k_array[i], *args)<EOL><DEDENT>min_nll_idx = np.argmin(nll_array)<EOL>return k_array[min_nll_idx]<EOL>
For given args, return k_agg from searching some k_range.

Parameters
----------
data : array
k_range : array
nll : function

args :

Returns
--------
:float
    Minimum k_agg