Tesla interview question

To code a simple numpy function