Did I find the right examples for you? yes no

All Samples(52)  |  Call(52)  |  Derive(0)  |  Import(0)

src/n/i/nitime-0.4/nitime/tests/test_timeseries.py   nitime(Download)
def test_UniformTime_index_at():
    time1 = ts.UniformTime(t0=1000, length=10, sampling_rate=1000, time_unit='ms')
    mask = [False] * 10
    for i in xrange(10):
        idx = time1.index_at(ts.TimeArray(1000 + i, time_unit='ms'))
                             [2 * 10 ** 9, 2 * 10 ** 6, 100, 20]):
 
        t1 = ts.UniformTime(duration=duration, sampling_rate=1,
                            time_unit=unit)
        t2 = ts.UniformTime(duration=duration, sampling_rate=20,
        #                       ts.TimeArray(duration,time_unit=unit))
 
        a = ts.UniformTime(duration=10, sampling_rate=1)
        b = ts.UniformTime(a, time_unit=unit)
        npt.assert_equal(a.sampling_interval, b.sampling_interval)

src/n/i/nitime-HEAD/nitime/tests/test_timeseries.py   nitime(Download)
def test_UniformTime_index_at():
    time1 = ts.UniformTime(t0=1000, length=10, sampling_rate=1000, time_unit='ms')
    mask = [False] * 10
    for i in range(10):
        idx = time1.index_at(ts.TimeArray(1000 + i, time_unit='ms'))
                             [2 * 10 ** 9, 2 * 10 ** 6, 100, 20]):
 
        t1 = ts.UniformTime(duration=duration, sampling_rate=1,
                            time_unit=unit)
        t2 = ts.UniformTime(duration=duration, sampling_rate=20,
        #                       ts.TimeArray(duration,time_unit=unit))
 
        a = ts.UniformTime(duration=10, sampling_rate=1)
        b = ts.UniformTime(a, time_unit=unit)
        npt.assert_equal(a.sampling_interval, b.sampling_interval)