Learn practical skills, build real-world projects, and advance your career
Created 4 years ago
#loading the module
import numpy as np
# create an nd array from a python list.
mylist=[1,2,3,4,5,6]
nd_arr = np.array(mylist)
print( type(mylist))
print(type(nd_arr))
<class 'list'>
<class 'numpy.ndarray'>
print(mylist)
print(nd_arr)
[1, 2, 3, 4, 5, 6]
[1 2 3 4 5 6]
# Dr. Doom Lab Experiments on Numpy
#Let us Confirm How efficient numpy nd array is in
# memory consumption