Skip to content

Commit

Permalink
type not iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Aug 5, 2024
1 parent 6095269 commit 3f8b96e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/imagery/i.pytorch/pytorchlib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ def predict_torch(data_cube, config_dict=None, device=None, dl_model=None):

def not_in_types(data_type, allowed_types):
"""Check if data_type is not an element of allowed_types"""

allowed_types = (
tuple(allowed_types) if isinstance(allowed_types, type) else allowed_types
(allowed_types,) if isinstance(allowed_types, type) else allowed_types
)
if data_type is None:
data_type_str = "'None'"
Expand Down

0 comments on commit 3f8b96e

Please sign in to comment.