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

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

src/n/i/nibabel-1.3.0/nibabel/tests/test_trackvis.py   nibabel(Download)
    tv.write(out_f, [], {})
    assert_equal(out_f.getvalue(), tv.empty_header().tostring())
    out_f.truncate(0); out_f.seek(0)
    # Write something not-default
    tv.write(out_f, [], {'id_string':'TRACKb'})
    assert_equal(hdr['id_string'], asbytes('TRACKb'))
    # check that we can pass none for the header
    out_f.truncate(0); out_f.seek(0)
    tv.write(out_f, [])
    out_f.truncate(0); out_f.seek(0)
    tv.write(out_f, [], None)
    # check that we check input values
    out_f.truncate(0); out_f.seek(0)
    tvf.to_file(out_f)
    assert_equal(out_f.getvalue(), tv.empty_header().tostring())
    out_f.truncate(0); out_f.seek(0)
    # Write something not-default
    tvf = tv.TrackvisFile([], {'id_string':'TRACKb'})

src/n/i/nibabel-1.3.0/nibabel/tests/test_utils.py   nibabel(Download)
    assert_array_equal(data_back, arr.astype(np.float))
    # And that offset=None respected
    str_io.truncate(22)
    str_io.seek(22)
    array_to_file(arr, str_io, np.float, None)
    assert_equal(bio.getvalue(), ZEROB*10000)
    bio.seek(0)
    bio.truncate(0)
    write_zeros(bio, 10000, 256)
    assert_equal(bio.getvalue(), ZEROB*10000)
    bio.seek(0)
    bio.truncate(0)

src/n/i/nibabel-1.3.0/nibabel/tests/test_scaling.py   nibabel(Download)
        max_miss = slope / 2.
        assert_true(np.all(np.abs(arr - arr3) <= max_miss))
        bio.truncate(0)
        bio.seek(0)
 

src/n/i/nibabel-1.3.0/nibabel/tests/test_arraywriters.py   nibabel(Download)
        max_miss = aw.slope / 2.
        assert_true(np.all(np.abs(arr - arr3) <= max_miss))
        bio.truncate(0)
        bio.seek(0)