Tesla Interview Question

To code a simple numpy function