コード例 #1
0
def test_rotated_ellipse_fails_if_minor_is_bigger_than_major():
    minor = 1
    major = 0.5
    with pytest.raises(ValueError):
        geometry.rotated_ellipse(width_major=major,
                                 width_minor=minor,
                                 x=None,
                                 y=None)
コード例 #2
0
def test_rotated_ellipse(maj, min, majang):
    x, y = coordinates.make_xy_grid(32, diameter=2)
    assert type(
        geometry.rotated_ellipse(x=x,
                                 y=y,
                                 width_major=maj,
                                 width_minor=min,
                                 major_axis_angle=majang)) is np.ndarray
コード例 #3
0
def test_rotated_ellipse(maj, min, majang):
    assert type(
        geometry.rotated_ellipse(width_major=maj,
                                 width_minor=min,
                                 major_axis_angle=majang)) is np.ndarray