Fastest way to simulate multiple given multiple probabilities in Python?

后端 未结 0 1693
暖寄归人
暖寄归人 2021-01-03 00:38

I have a list of probabilities p = [p1, p2, …, pn].

All I want is to simulate a list s = [0, 1, 0, 0, 1, …, 1], whose first element is

相关标签:
回答
  • 消灭零回复
提交回复
热议问题