Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output
with the same...