Loading...
Create NumPy arrays using different methods.
NumPy provides many ways to create arrays:
Write a function create_arrays(n) that returns a dictionary with different arrays.
Return a dictionary with:
n = 3
{'zeros': [[0.0, 0.0, 0.0], ...], 'ones': [[1.0, ...], ...], ...}np.zeros((3,3)), np.ones((3,3)), np.arange(3), np.eye(3)