Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/s/c/scikit-learn-0.14.1/sklearn/covariance/tests/test_graph_lasso.py   scikit-learn(Download)
 
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_array_less
 
from sklearn.covariance import (graph_lasso, GraphLasso, GraphLassoCV,
            costs, dual_gap = np.array(costs).T
            # Check that the costs always decrease
            assert_array_less(np.diff(costs), 0)
        # Check that the 2 approaches give similar results
        assert_array_almost_equal(covs['cd'], covs['lars'])

src/s/c/scikit-learn-0.14.1/sklearn/mixture/tests/test_dpgmm.py   scikit-learn(Download)
from sklearn.mixture.dpgmm import log_normalize
from sklearn.datasets import make_blobs
from sklearn.utils.testing import assert_array_less
from .test_gmm import GMMTester
 
        active[indices] = True
        # used components are important
        assert_array_less(.1, dpgmm.weights_[active])
        # others are not
        assert_array_less(dpgmm.weights_[~active], .05)