import numpy as np
 
x = np.arange(5)  
print (x)
import numpy as np
 
# 设置了 dtype
x = np.arange(5, dtype =  float)  
print (x)
import numpy as np
x = np.arange(10,20,2)  
print (x)

import numpy as np
a = np.linspace(1,10,10)
print(a)
import numpy as np
a = np.linspace(1,1,10)
print(a)
import numpy as np
 
a = np.linspace(10, 20,  5, endpoint =  False)  
print(a)
import numpy as np
a =np.linspace(1,10,10,retstep= True)
 
print(a)
# 拓展例子
b =np.linspace(1,10,10).reshape([10,1])
print(b)

import numpy as np
# 默认底数是 10
a = np.logspace(1.0,  2.0, num =  10)  
print (a)
import numpy as np
a = np.logspace(0,9,10,base=2)
print (a)