Did I find the right examples for you? yes no

All Samples(17)  |  Call(13)  |  Derive(0)  |  Import(4)

src/s/c/scikit-learn-0.14.1/sklearn/datasets/tests/test_mldata.py   scikit-learn(Download)
from sklearn.datasets import mldata_filename, fetch_mldata
 
from sklearn.utils.testing import assert_in
from sklearn.utils.testing import assert_not_in
from sklearn.utils.testing import mock_mldata_urlopen
        mock = fetch_mldata('mock', data_home=tmpdir)
        for n in ["COL_NAMES", "DESCR", "target", "data"]:
            assert_in(n, mock)
 
        assert_equal(mock.target.shape, (150,))
        dset = fetch_mldata(dataname, data_home=tmpdir)
        for n in ["COL_NAMES", "DESCR", "data"]:
            assert_in(n, dset)
        assert_not_in("target", dset)
 
        dset = fetch_mldata(dataname, data_home=tmpdir)
        for n in ["COL_NAMES", "DESCR", "target", "data", "z"]:
            assert_in(n, dset)
        assert_not_in("x", dset)
        assert_not_in("y", dset)
        dset = fetch_mldata(dataname, data_home=tmpdir)
        for n in ["COL_NAMES", "DESCR", "target", "data", "z"]:
            assert_in(n, dset)
        assert_not_in("x", dset)
        assert_not_in("y", dset)

src/s/c/scikit-learn-0.14.1/sklearn/tests/test_random_projection.py   scikit-learn(Download)
    GaussianRandomProjection)
 
from sklearn.utils.testing import (
    assert_less,
    assert_raises,
        # Check possible values
        values = np.unique(A)
        assert_in(np.sqrt(s) / np.sqrt(n_components), values)
        assert_in(- np.sqrt(s) / np.sqrt(n_components), values)
 
        if density == 1.0:
            assert_equal(np.size(values), 2)
        else:
            assert_in(0., values)

src/s/c/scikit-learn-0.14.1/sklearn/datasets/tests/test_svmlight_format.py   scikit-learn(Download)
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import raises
from sklearn.utils.testing import assert_in
 
from sklearn.externals.six import b
                    pass
 
                assert_in("scikit-learn %s" % sklearn.__version__, comment)
 
                comment = f.readline()
                    pass
 
                assert_in(["one", "zero"][zero_based] + "-based", comment)
 
                X2, y2 = load_svmlight_file(f, dtype=dtype,

src/s/c/scikit-learn-0.14.1/sklearn/feature_extraction/tests/test_text.py   scikit-learn(Download)
from numpy.testing import assert_array_equal
from numpy.testing import assert_raises
from sklearn.utils.testing import assert_in, assert_less, assert_greater
 
from collections import defaultdict, Mapping
        assert False, "we shouldn't get here"
    except ValueError as e:
        assert_in("empty vocabulary", str(e).lower())
 
    try:
        assert False, "we shouldn't get here"
    except ValueError as e:
        assert_in("empty vocabulary", str(e).lower())