Write to_array(nums) returning a NumPy array of the numbers multiplied by 2 (use vectorised maths, no loops).
to_array(nums)
to_array([1, 2, 3]) → [2, 4, 6]
to_array([]) → []
Submit runs 3 tests, including hidden edge cases.
Run your code to see the output here.