How can I vectorize a masked weighted average with condition using numpy?

前端 未结 0 1146
慢半拍i
慢半拍i 2021-01-25 07:47

The unvectorized code reads:

import numpy as np
import numpy.ma as ma

np.random.seed(42)
H = np.random.uniform(0.1, 1.0, s         


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