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

All Samples(22)  |  Call(16)  |  Derive(0)  |  Import(6)

src/a/s/astroML-0.2/astroML/plotting/hist_tools.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.density_estimation import\
    scotts_bin_width, freedman_bin_width,\
    knuth_bin_width, bayesian_blocks
 
    if bins in ['blocks']:
        bins = bayesian_blocks(x)
    elif bins in ['knuth', 'knuths']:
        dx, bins = knuth_bin_width(x, True)

src/a/s/astroML-HEAD/astroML/plotting/hist_tools.py   astroML(Download)
from matplotlib import pyplot as plt
 
from astroML.density_estimation import\
    scotts_bin_width, freedman_bin_width,\
    knuth_bin_width, bayesian_blocks
 
    if bins in ['blocks']:
        bins = bayesian_blocks(x)
    elif bins in ['knuth', 'knuths']:
        dx, bins = knuth_bin_width(x, True)

src/a/s/astroML-0.2/astroML/density_estimation/histtools.py   astroML(Download)
"""
Tools for working with distributions
"""
import numpy as np
from astroML.density_estimation import bayesian_blocks
 
    if bins == 'blocks':
        bins = bayesian_blocks(a)
    elif bins == 'knuth':
        da, bins = knuth_bin_width(a, True)

src/a/s/astroML-HEAD/astroML/density_estimation/histtools.py   astroML(Download)
"""
Tools for working with distributions
"""
import numpy as np
from astroML.density_estimation import bayesian_blocks
 
    if bins == 'blocks':
        bins = bayesian_blocks(a)
    elif bins == 'knuth':
        da, bins = knuth_bin_width(a, True)

src/a/s/astroML-0.2/astroML/density_estimation/tests/test_bayesian_blocks.py   astroML(Download)
import numpy as np
from  numpy.testing import assert_allclose, assert_
from astroML.density_estimation import bayesian_blocks
 
 
                        1 + np.random.random(200)])
 
    bins = bayesian_blocks(x)
 
    assert_(len(bins) == 3)
    x[:20] += 1
 
    bins1 = bayesian_blocks(t)
    bins2 = bayesian_blocks(t[:80], x[:80])
 
    x = np.random.normal(x, sigma)
 
    bins = bayesian_blocks(t, x, sigma, fitness='measures')
 
    assert_allclose(bins, [0, 0.45, 0.55, 1])

src/a/s/astroML-HEAD/astroML/density_estimation/tests/test_bayesian_blocks.py   astroML(Download)
import numpy as np
from  numpy.testing import assert_allclose, assert_
from astroML.density_estimation import bayesian_blocks
 
 
                        1 + np.random.random(200)])
 
    bins = bayesian_blocks(x)
 
    assert_(len(bins) == 3)
    x[:20] += 1
 
    bins1 = bayesian_blocks(t)
    bins2 = bayesian_blocks(t[:80], x[:80])
 
    x = np.random.normal(x, sigma)
 
    bins = bayesian_blocks(t, x, sigma, fitness='measures')
 
    assert_allclose(bins, [0, 0.45, 0.55, 1])