コード例 #1
0
ファイル: test_shapes_utils.py プロジェクト: zzalscv2/napari
def test_many_shapes():
    """Test many shapes."""
    assert number_of_shapes(np.random.random((8, 4, 2))) == 8
コード例 #2
0
ファイル: test_shapes_utils.py プロジェクト: zzalscv2/napari
def test_no_shapes():
    """Test no shapes."""
    assert number_of_shapes([]) == 0
    assert number_of_shapes(np.empty((0, 4, 2))) == 0
コード例 #3
0
ファイル: test_shapes_utils.py プロジェクト: zzalscv2/napari
def test_one_shape():
    """Test one shape."""
    assert number_of_shapes(np.random.random((4, 2))) == 1