コード例 #1
0
def test_simple_dtype():
    obj = {'a' : 1, 'dtype' : np.dtype('float64')}
    strval = serialize(obj)
    newobj = deserialize(strval)
    print newobj
    assert obj == newobj
コード例 #2
0
def test_complex_dtype():
    obj = {'a' : 1, 'dtype' : np.dtype([('date', 'datetime64[ns]'), ('val', 'f8')])}
    strval = serialize(obj)
    newobj = deserialize(strval)
    print newobj
    assert obj == newobj