コード例 #1
0
def test_record_from_OrderedDict():
    r = Record(OrderedDict([('a', 'int32'), ('b', 'float64')]))
    assert r.to_numpy_dtype() == np.dtype([('a', 'i4'), ('b', 'f8')])
コード例 #2
0
def test_record_with_unicode_name_as_numpy_dtype():
    r = Record([(unicode('a'), 'int32')])
    assert r.to_numpy_dtype() == np.dtype([('a', 'i4')])
コード例 #3
0
def test_record_from_OrderedDict():
    r = Record(OrderedDict([('a', 'int32'), ('b', 'float64')]))
    assert r.to_numpy_dtype() == np.dtype([('a', 'i4'), ('b', 'f8')])
コード例 #4
0
def test_record_with_unicode_name_as_numpy_dtype():
    r = Record([(unicode('a'), 'int32')])
    assert r.to_numpy_dtype() == np.dtype([('a', 'i4')])
コード例 #5
0
def test_record_from_OrderedDict():
    r = Record(OrderedDict([("a", "int32"), ("b", "float64")]))
    assert r.to_numpy_dtype() == np.dtype([("a", "i4"), ("b", "f8")])
コード例 #6
0
def test_record_with_unicode_name_as_numpy_dtype():
    r = Record([(unicode("a"), "int32")])
    assert r.to_numpy_dtype() == np.dtype([("a", "i4")])