Q. Write a program to create a NumPy 1D array with all elements as Boolean true.
Answer :-
import numpy as np array1 = np.array([i == i if i == i else True for i in range(10)]) print(array1)
Answer :-
import numpy as np array1 = np.array([i == i if i == i else True for i in range(10)]) print(array1)
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )