mmengine.utils.is_seq_of¶
- mmengine.utils.is_seq_of(seq, expected_type, seq_type=None)[source]¶
Check whether it is a sequence of some type.
- Parameters:
- Returns:
Return True if
seq
is valid else False.- Return type:
Examples
>>> from mmengine.utils import is_seq_of >>> seq = ['a', 'b', 'c'] >>> is_seq_of(seq, str) True >>> is_seq_of(seq, int) False