1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| import numpy as np
a = np.linspace(0, 10.0, num=6) A = np.array([0, 2, 4, 6, 8, 10])
if a.all() == A.all() : print("a==A\n",a)
b = np.linspace(0,10,num=5,endpoint=False) B = np.array([i for i in range(0,10, int((10-0)/5) )]) if b.all()==B.all(): print("b==B\n", b)
|