Skip to content

Commit 1ae9ca8

Browse files
committed
feat: do not use is_array_container
1 parent f710103 commit 1ae9ca8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎arraycontext/container/traversal.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,9 @@ def _flat_size(subary: ArrayOrContainerOrScalar) -> Array | int | np.integer:
10951095
try:
10961096
iterable = serialize_container(subary)
10971097
except NotAnArrayContainerError:
1098-
assert not is_array_container(subary)
1099-
assert not is_scalar_like(subary)
1098+
if TYPE_CHECKING:
1099+
assert not is_array_container(subary)
1100+
assert not is_scalar_like(subary)
11001101

11011102
if common_dtype is None:
11021103
common_dtype = subary.dtype

0 commit comments

Comments
 (0)