Also if `out` was not given, the result should not be `a` itself, but a new array which does not share data with `a`.