Find the maximum value in the numpy list while ignoring infinite values

后端 未结 0 634
感动是毒
感动是毒 2020-11-22 04:19

I have the following code:

import numpy as np
from numpy import ma

e = np.array([1, 0.2, 0, 0.3, 0, 0.4, 0])
e = ma.log10(e)
result = np.nanargmax(np.where(e         


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