| 3861 | } |
| 3862 | |
| 3863 | array power(const array& a, const array& b, StreamOrDevice s /* = {} */) { |
| 3864 | auto dtype = promote_types(a.dtype(), b.dtype()); |
| 3865 | std::vector<array> inputs = {astype(a, dtype, s), astype(b, dtype, s)}; |
| 3866 | if (a.shape() != b.shape()) { |
| 3867 | inputs = broadcast_arrays(inputs, s); |
| 3868 | } |
| 3869 | return array( |
| 3870 | inputs[0].shape(), dtype, std::make_shared<Power>(to_stream(s)), inputs); |
| 3871 | } |
| 3872 | |
| 3873 | array cumsum( |
| 3874 | const array& a, |
no test coverage detected