Did I find the right examples for you? yes no

All Samples(32)  |  Call(30)  |  Derive(2)  |  Import(0)

src/n/i/nitime-0.4/nitime/tests/test_timeseries.py   nitime(Download)
 
    # one millisecond epoch
    e1ms = ts.Epochs(0, 1, time_unit='ms')
    e09ms = ts.Epochs(0.1, 1, time_unit='ms')
    msg = "Seems like a problem with copy=False in TimeArray constructor."
    npt.assert_equal(e1ms.duration, ts.TimeArray(1, time_unit='ms'), msg)
 
    # one day
    e1d = ts.Epochs(0, 1, time_unit='D')
    npt.assert_equal(e1d.duration, ts.TimeArray(1, time_unit='D'), msg)
 
    e1ms_ar = ts.Epochs([0, 0], [1, 1], time_unit='ms')
 
    for t in [tms, tmin, tsec, utms, utmin, utsec]:
 
        # same thing but now there's an array of epochs
        e2 = ts.Epochs([0, 10], [10, 20], time_unit=t.time_unit)
 
        # make sure, slicing doesn't change the class for array of epochs

src/n/i/nitime-HEAD/nitime/tests/test_timeseries.py   nitime(Download)
 
    # one millisecond epoch
    e1ms = ts.Epochs(0, 1, time_unit='ms')
    e09ms = ts.Epochs(0.1, 1, time_unit='ms')
    msg = "Seems like a problem with copy=False in TimeArray constructor."
    npt.assert_equal(e1ms.duration, ts.TimeArray(1, time_unit='ms'), msg)
 
    # one day
    e1d = ts.Epochs(0, 1, time_unit='D')
    npt.assert_equal(e1d.duration, ts.TimeArray(1, time_unit='D'), msg)
 
    e1ms_ar = ts.Epochs([0, 0], [1, 1], time_unit='ms')
 
    for t in [tms, tmin, tsec, utms, utmin, utsec]:
 
        # same thing but now there's an array of epochs
        e2 = ts.Epochs([0, 10], [10, 20], time_unit=t.time_unit)
 
        # make sure, slicing doesn't change the class for array of epochs