mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 22:03:45 +08:00
Wrap long lines.
This commit is contained in:
@@ -198,13 +198,17 @@ def test_orientation():
|
||||
orientation2 = regionprops(SAMPLE.T, ['Orientation'])[0]['Orientation']
|
||||
assert_almost_equal(orientation2, math.pi / 2 - orientation)
|
||||
# test diagonal regions
|
||||
orientation_diag = regionprops(np.eye(10, dtype=int), ['Orientation'])[0]['Orientation']
|
||||
diag = np.eye(10, dtype=int)
|
||||
orientation_diag = regionprops(diag, ['Orientation'])[0]['Orientation']
|
||||
assert_almost_equal(orientation_diag, -math.pi / 4)
|
||||
orientation_diag = regionprops(np.flipud(np.eye(10, dtype=int)), ['Orientation'])[0]['Orientation']
|
||||
orientation_diag = regionprops(np.flipud(diag), ['Orientation']
|
||||
)[0]['Orientation']
|
||||
assert_almost_equal(orientation_diag, math.pi / 4)
|
||||
orientation_diag = regionprops(np.fliplr(np.eye(10, dtype=int)), ['Orientation'])[0]['Orientation']
|
||||
orientation_diag = regionprops(np.fliplr(diag), ['Orientation']
|
||||
)[0]['Orientation']
|
||||
assert_almost_equal(orientation_diag, math.pi / 4)
|
||||
orientation_diag = regionprops(np.fliplr(np.flipud(np.eye(10, dtype=int))), ['Orientation'])[0]['Orientation']
|
||||
orientation_diag = regionprops(np.fliplr(np.flipud(diag)), ['Orientation']
|
||||
)[0]['Orientation']
|
||||
assert_almost_equal(orientation_diag, -math.pi / 4)
|
||||
|
||||
def test_perimeter():
|
||||
|
||||
Reference in New Issue
Block a user