-4

Basically, I want to generate a boolean array with given length but the content is randomly given.

feedMe
  • 3,023
  • 1
  • 32
  • 60
Loading Zone
  • 127
  • 11
  • Possible duplicate of [Create large random boolean matrix with numpy](https://stackoverflow.com/questions/43528637/create-large-random-boolean-matrix-with-numpy) – Kristianmitk Sep 18 '19 at 17:09

1 Answers1

2

You may found an answer here. Try

np.random.choice(a=[False, True], size=(N,))
Froilan
  • 58
  • 6