Loading...
Create a NumPy array from a Python list and return its basic properties.
NumPy arrays are the foundation of numerical computing in Python. Unlike Python lists, NumPy arrays are:
Write a function create_array(python_list) that:
Return a dictionary with exactly these four keys.
[1, 2, 3, 4, 5]
{'array': [1, 2, 3, 4, 5], 'shape': [5], 'dtype': 'int64', 'ndim': 1}np.array converts list to ndarray with inferred dtype