コード例 #1
0
ファイル: test_glyphs.py プロジェクト: xyicheng/datashader
def test_point_bounds_check():
    df = pd.DataFrame({'x': [1, 2, 3], 'y': [5, 6, 7]})
    p = Point('x', 'y')
    assert p._compute_x_bounds(df['x'].values) == (1, 3)
    assert p._compute_y_bounds(df['y'].values) == (5, 7)
コード例 #2
0
ファイル: test_glyphs.py プロジェクト: jsignell/datashader
def test_point_validate():
    p = Point('x', 'y')
    p.validate(dshape("{x: int32, y: float32}"))
    with pytest.raises(ValueError):
        p.validate(dshape("{x: string, y: float32}"))
コード例 #3
0
ファイル: test_glyphs.py プロジェクト: xyicheng/datashader
def test_point_validate():
    p = Point('x', 'y')
    p.validate(dshape("{x: int32, y: float32}"))
    with pytest.raises(ValueError):
        p.validate(dshape("{x: string, y: float32}"))
コード例 #4
0
ファイル: test_glyphs.py プロジェクト: jsignell/datashader
def test_point_bounds_check():
    df = pd.DataFrame({'x': [1, 2, 3], 'y': [5, 6, 7]})
    p = Point('x', 'y')
    assert p._compute_x_bounds(df['x'].values) == (1, 3)
    assert p._compute_y_bounds(df['y'].values) == (5, 7)