From c528a41c0ab6cfd0e3dff379ee9ed43f6bf23cf9 Mon Sep 17 00:00:00 2001 From: Haris Mahmood Date: Thu, 29 Aug 2024 23:47:41 +0500 Subject: [PATCH] fix: Add a guard for NoneType args in handle_array_like_without_promotion --- ivy/func_wrapper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ivy/func_wrapper.py b/ivy/func_wrapper.py index 821594c4fd573..f11d62078e81a 100644 --- a/ivy/func_wrapper.py +++ b/ivy/func_wrapper.py @@ -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)