| 6400 | } |
| 6401 | |
| 6402 | array real(const array& a, StreamOrDevice s /* = {} */) { |
| 6403 | if (!issubdtype(a.dtype(), complexfloating)) { |
| 6404 | return a; |
| 6405 | } |
| 6406 | return array(a.shape(), float32, std::make_shared<Real>(to_stream(s)), {a}); |
| 6407 | } |
| 6408 | |
| 6409 | array imag(const array& a, StreamOrDevice s /* = {} */) { |
| 6410 | if (!issubdtype(a.dtype(), complexfloating)) { |
no test coverage detected