Vectorized call to `func` over positional `args`.
(self, func, args)
| 2598 | return ufunc, otypes |
| 2599 | |
| 2600 | def _vectorize_call(self, func, args): |
| 2601 | """Vectorized call to `func` over positional `args`.""" |
| 2602 | if self.signature is not None: |
| 2603 | res = self._vectorize_call_with_signature(func, args) |
| 2604 | elif not args: |
| 2605 | res = func() |
| 2606 | else: |
| 2607 | ufunc, otypes = self._get_ufunc_and_otypes(func=func, args=args) |
| 2608 | # gh-29196: `dtype=object` should eventually be removed |
| 2609 | args = [asanyarray(a, dtype=object) for a in args] |
| 2610 | outputs = ufunc(*args, out=...) |
| 2611 | |
| 2612 | if ufunc.nout == 1: |
| 2613 | res = asanyarray(outputs, dtype=otypes[0]) |
| 2614 | else: |
| 2615 | res = tuple(asanyarray(x, dtype=t) |
| 2616 | for x, t in zip(outputs, otypes)) |
| 2617 | return res |
| 2618 | |
| 2619 | def _vectorize_call_with_signature(self, func, args): |
| 2620 | """Vectorized call over positional arguments with a signature.""" |
no test coverage detected