+1 vote
in NumPy by
create an array of 20 linearly spaced point between 0 to 1

1 Answer

0 votes
by
create an array of 20 linearly spaced point between 0 to 1

num_line = np.linspace(0,1,20)

print(num_line)

#output

#[0. 0.05263158 0.10526316 0.15789474 0.21052632 0.26315789

# 0.31578947 0.36842105 0.42105263 0.47368421 0.52631579 0.57894737

# 0.63157895 0.68421053 0.73684211 0.78947368 0.84210526 0.89473684

# 0.94736842 1. ]
...