Task
In this challenge, you'll write a series of small functions to perform various tasks on NumPy ndarray s.
The workspace file containing function stubs you'll fill out is ./array_manipulator.py and the file containing tests is ./tests/test_array_manipulator.py . You can modify the testing suite as much as you wish.
Use the test cases and docstring examples to determine what sort of operation is required to be performed for each function that you write.
In addition to correctness, you'll be evaluated on using NumPy in a reasonably succinct, idiomatic and performant way. No function should require much more than a couple lines of code (and the succinctness is not at the expense of readability). Be sure to use vectorized NumPy operations rather than converting to and from Python lists for full credit.
Feel free to consult the Numpy and Python docs.
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions

Consult our trusted tutors.