Example #1
0
def test_non_array():
    remove("foo")
    put("foo", [1, 2, 3])
    put("foo", [4, 5, 6])

    y = get("foo", int)
    assert (y == [1, 2, 3, 4, 5, 6]).all()
Example #2
0
def test_shmarray():
    remove("foo")
    x = np.arange(5)
    put("foo", x)
    put("foo", x)

    y = get("foo", x.dtype)
    assert isinstance(y, np.ndarray)
    assert (y == np.concatenate([x, x])).all()