Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(46)  |  Call(36)  |  Derive(0)  |  Import(10)
xrange(stop) -> xrange object
xrange(start, stop[, step]) -> xrange object

Like range(), but instead of returning a list, returns an object that
generates the numbers in the range on demand.  For looping, this is 
slightly faster than range() and more memory efficient.

src/s/e/seaborn-0.3.1/seaborn/distributions.py   seaborn(Download)
    _has_statsmodels = False
 
from .external.six.moves import range
 
from .utils import set_hls_values, desaturate, percentiles, iqr, _kde_support
                    vals = [vals.ravel()]
                else:
                    vals = [vals[:, i] for i in range(nc)]
            else:
                error = "Input `vals` can have no more than 2 dimensions"
        # By default, just use the plot positions as names
        if names is None:
            names = list(range(1, len(vals) + 1))
        elif hasattr(names, "name"):
            if names.name is not None:
    # Draw the repeated measure bridges
    if join_rm:
        ax.plot(range(1, len(vals) + 1), vals,
                color=inner_kws["color"], alpha=2. / 3)
 

src/s/e/seaborn-HEAD/seaborn/distributions.py   seaborn(Download)
    _has_statsmodels = False
 
from .external.six.moves import range
 
from .utils import set_hls_values, desaturate, percentiles, iqr, _kde_support
                    vals = [vals.ravel()]
                else:
                    vals = [vals[:, i] for i in range(nc)]
            else:
                error = "Input `vals` can have no more than 2 dimensions"
        # By default, just use the plot positions as names
        if names is None:
            names = list(range(1, len(vals) + 1))
        elif hasattr(names, "name"):
            if names.name is not None:
    # Draw the repeated measure bridges
    if join_rm:
        ax.plot(range(1, len(vals) + 1), vals,
                color=inner_kws["color"], alpha=2. / 3)
 

src/s/e/seaborn-0.3.1/seaborn/algorithms.py   seaborn(Download)
"""Algorithms to support fitting routines in seaborn plotting functions."""
from __future__ import division
import numpy as np
from scipy import stats
from .external.six.moves import range
 
    boot_dist = []
    for i in range(int(n_boot)):
        resampler = rs.randint(0, n, n)
        sample = [a.take(resampler, axis=0) for a in args]
 
    boot_dist = []
    for i in range(int(n_boot)):
        resampler = rs.randint(0, n_units, n_units)
        sample = [np.take(a, resampler, axis=0) for a in args]
    boot_dist = []
    kde = [stats.gaussian_kde(np.transpose(a)) for a in args]
    for i in range(int(n_boot)):
        sample = [a.resample(n).T for a in kde]
        boot_dist.append(func(*sample, **func_kwargs))
    # Do the permutations to establish a null distribution
    null_dist = np.empty((n_vars, n_vars, n_iter))
    for i_i in range(n_iter):
        perm_i = np.concatenate([rs.permutation(n_obs) + (v * n_obs)
                                 for v in range(n_vars)])

src/s/e/seaborn-HEAD/seaborn/algorithms.py   seaborn(Download)
"""Algorithms to support fitting routines in seaborn plotting functions."""
from __future__ import division
import numpy as np
from scipy import stats
from .external.six.moves import range
 
    boot_dist = []
    for i in range(int(n_boot)):
        resampler = rs.randint(0, n, n)
        sample = [a.take(resampler, axis=0) for a in args]
 
    boot_dist = []
    for i in range(int(n_boot)):
        resampler = rs.randint(0, n_units, n_units)
        sample = [np.take(a, resampler, axis=0) for a in args]
    boot_dist = []
    kde = [stats.gaussian_kde(np.transpose(a)) for a in args]
    for i in range(int(n_boot)):
        sample = [a.resample(n).T for a in kde]
        boot_dist.append(func(*sample, **func_kwargs))
    # Do the permutations to establish a null distribution
    null_dist = np.empty((n_vars, n_vars, n_iter))
    for i_i in range(n_iter):
        perm_i = np.concatenate([rs.permutation(n_obs) + (v * n_obs)
                                 for v in range(n_vars)])

src/s/e/seaborn-0.3.1/seaborn/linearmodels.py   seaborn(Download)
 
from .external.six import string_types
from .external.six.moves import range
 
from . import utils
        ax.set_xlim(-.5, n_terms - .5)
        ax.axhline(0, ls="--", c="dimgray")
        ax.set_xticks(range(n_terms))
        ax.set_xticklabels(coefs.index)
 
            ax.set_title(term)
        ax.set_xlabel(groupby)
        ax.set_xticks(range(n_groups))
        ax.set_xticklabels(coefs.columns)
 
    if not isinstance(data, pd.DataFrame):
        if names is None:
            names = ["var_%d" % i for i in range(data.shape[1])]
        data = pd.DataFrame(data, columns=names, dtype=np.float)
 
 
    if names is None:
        names = ["var%d" % i for i in range(nvars)]
 
    if diag_names:

src/s/e/seaborn-HEAD/seaborn/linearmodels.py   seaborn(Download)
 
from .external.six import string_types
from .external.six.moves import range
 
from . import utils
        ax.set_xlim(-.5, n_terms - .5)
        ax.axhline(0, ls="--", c="dimgray")
        ax.set_xticks(range(n_terms))
        ax.set_xticklabels(coefs.index)
 
            ax.set_title(term)
        ax.set_xlabel(groupby)
        ax.set_xticks(range(n_groups))
        ax.set_xticklabels(coefs.columns)
 
    if not isinstance(data, pd.DataFrame):
        if names is None:
            names = ["var_%d" % i for i in range(data.shape[1])]
        data = pd.DataFrame(data, columns=names, dtype=np.float)
 
 
    if names is None:
        names = ["var%d" % i for i in range(nvars)]
 
    if diag_names:

src/s/e/seaborn-0.3.1/seaborn/palettes.py   seaborn(Download)
from .external import husl
from .external.six import string_types
from .external.six.moves import range
 
from .utils import desaturate
    # Always return as many colors as we asked for
    pal_cycle = cycle(palette)
    palette = [next(pal_cycle) for _ in range(n_colors)]
 
    # Always return in r, g, b tuple format

src/s/e/seaborn-HEAD/seaborn/palettes.py   seaborn(Download)
from .external import husl
from .external.six import string_types
from .external.six.moves import range
 
from .utils import desaturate
    # Always return as many colors as we asked for
    pal_cycle = cycle(palette)
    palette = [next(pal_cycle) for _ in range(n_colors)]
 
    # Always return in r, g, b tuple format

src/s/e/seaborn-0.3.1/seaborn/tests/test_algorithms.py   seaborn(Download)
import numpy as np
from scipy import stats
from ..external.six.moves import range
 
import numpy.testing as npt
def test_bootstrap_multiarg():
    """Test that bootstrap works with multiple input arrays."""
    x = np.vstack([[1, 10] for i in range(10)])
    y = np.vstack([[5, 5] for i in range(10)])
 
def test_bootstrap_units():
    """Test that results make sense when passing unit IDs to bootstrap."""
    data = rs.randn(50)
    ids = np.repeat(range(10), 5)
    bwerr = rs.normal(0, 2, 10)
def test_bootstrap_arglength():
    """Test that different length args raise ValueError."""
    algo.bootstrap(range(5), range(10))
 
 

src/s/e/seaborn-HEAD/seaborn/tests/test_algorithms.py   seaborn(Download)
import numpy as np
from scipy import stats
from ..external.six.moves import range
 
import numpy.testing as npt
def test_bootstrap_multiarg():
    """Test that bootstrap works with multiple input arrays."""
    x = np.vstack([[1, 10] for i in range(10)])
    y = np.vstack([[5, 5] for i in range(10)])
 
def test_bootstrap_units():
    """Test that results make sense when passing unit IDs to bootstrap."""
    data = rs.randn(50)
    ids = np.repeat(range(10), 5)
    bwerr = rs.normal(0, 2, 10)
def test_bootstrap_arglength():
    """Test that different length args raise ValueError."""
    algo.bootstrap(range(5), range(10))