Loading...
Apply mathematical functions to NumPy arrays.
NumPy provides universal functions (ufuncs):
Write a function math_functions(arr) that returns a dictionary with:
Return a dictionary with exactly these three keys. All values as lists.
[1, 4, 9, 16]
{'sqrt': [1.0, 2.0, 3.0, 4.0], 'square': [1, 16, 81, 256], 'abs': [1, 4, 9, 16]}sqrt: [1, 2, 3, 4], square: [1, 16, 81, 256]