Importing hidden function from Python module
<p>I'd like to import <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/k_means_.py#L626" rel="nofollow"><code>_init_centroids</code></a> function from <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/k_means_.py" rel="nofollow">scikit-learn/sklearn/cluster/k_means_.py</a>. However, it's not listed in <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/__init__.py#L17" rel="nofollow">scikit-learn/blob/master/sklearn/cluster/__init__.py</a>. Is there any "nice" way to do that?</p>

<p>"Hidden" functions are a recommendation in Python, you can import them.</p>

<p>Try</p>

<pre><code>from scikit-learn.sklearn.cluster.k_means_ import _init_centroids
</code></pre>

python scikit-learn python-module