Decorator base on probability using only numpy in Python

后端 未结 0 1392
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 01:43

I want to implenent a decorator accepting a probability as an argument with the following syntax:

@trigger_randomly(0.5)
def func():

using only n

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