Change the sign of every element of the float array Z in place (write the
negated values back into the same underlying buffer rather than allocating a new
array). Return the result.
Input
[-1. -0.75 -0.5 -0.25 0. 0.25 0.5 0.75 1. ]
Output
[ 1. 0.75 0.5 0.25 -0. -0.25 -0.5 -0.75 -1. ]