8000 better support for inspect.signature on Array subclasses methods · larray-project/larray@39ced81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39ced81

Browse files
committed
better support for inspect.signature on Array subclasses methods
(for example for LazyObjectArray)
1 parent a9b5427 commit 39ced81

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

larray/core/array.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5648,7 +5648,11 @@ def opmethod(self, other):
56485648
# TODO: ndarray should probably be converted to larrays because that would harmonize broadcasting rules, but
56495649
# it makes some tests fail for some reason.
56505650
if not isinstance(other, (Array, np.ndarray)) and not np.isscalar(other):
5651-
other = asarray(other)
5651+
if isinstance(other, list):
5652+
other = asarray(other)
5653+
else:
5654+
# support for inspect.signature
5655+
return False
56525656

56535657
if isinstance(other, Array):
56545658
# TODO: first test if it is not already broadcastable

0 commit comments

Comments
 (0)
0