Skip to content

Commit e4b3752

Browse files
fix: typing error
1 parent dad38e3 commit e4b3752

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cc3d/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import typing
4-
from typing import Literal, Union, overload, TYPE_CHECKING
4+
from typing import Literal, Union, overload, TYPE_CHECKING, cast
55

66
from . import fastcc3d
77
from .fastcc3d import (
@@ -411,7 +411,10 @@ def connected_components_stack(
411411
binary_image=bool(binary_image),
412412
)
413413
# np.add(cc_labels, offset, out=cc_labels, where=(cc_labels != 0))
414-
fastcc3d.offset_foreground(cc_labels, offset)
414+
fastcc3d.offset_foreground(
415+
cast(NDArray[np.uint64], cc_labels),
416+
offset
417+
)
415418
offset += N
416419
binary = crackle.compress(cc_labels)
417420

0 commit comments

Comments
 (0)