Skip to content

Commit b008191

Browse files
committed
Fix for > Python 3.10
1 parent eea13c2 commit b008191

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ros2_numpy/registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import functools
2-
import collections
2+
from collections.abc import Sequence
33

44
_to_numpy = {}
55
_from_numpy = {}
@@ -21,7 +21,7 @@ def numpify(msg, *args, **kwargs):
2121
return
2222

2323
conv = _to_numpy.get((msg.__class__, False))
24-
if not conv and isinstance(msg, collections.Sequence):
24+
if not conv and isinstance(msg, Sequence):
2525
if not msg:
2626
raise ValueError("Cannot determine the type of an empty Collection")
2727
conv = _to_numpy.get((msg[0].__class__, True))

0 commit comments

Comments
 (0)