Skip to content

Commit

Permalink
fix: Add a guard for NoneType args in handle_array_like_without_promo…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
hmahmood24 committed Aug 29, 2024
1 parent d41efe4 commit c528a41
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ivy/func_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ def _handle_array_like_without_promotion(*args, **kwargs):
# Fix for ellipsis, slices for numpy's __getitem__
# No need to try and convert them into arrays
# since asarray throws unpredictable bugs
if _check_in_nested_sequence(arg, value=Ellipsis, _type=slice):
if arg is None or _check_in_nested_sequence(
arg, value=Ellipsis, _type=slice
):
continue
if not ivy.is_array(arg):
args[i] = ivy.array(arg, device=device)
Expand Down

0 comments on commit c528a41

Please sign in to comment.