We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9952ed1 commit 65e630aCopy full SHA for 65e630a
array_api_strict/_array_object.py
@@ -729,7 +729,9 @@ def __getitem__(
729
np_key = key
730
devices = {self.device}
731
if isinstance(key, tuple):
732
- devices.update([subkey.device for subkey in key])
+ devices.update(
733
+ [subkey.device for subkey in key if hasattr(subkey, "device")]
734
+ )
735
if len(devices) > 1:
736
raise ValueError(
737
"Array indexing is only allowed when array to be indexed and all "
0 commit comments