Map nparray to tuple in Python

前端 未结 0 1740
执念已碎
执念已碎 2021-02-12 11:45

Given a np.array A and a function f, I would like to create a tuple containing f(A). I simply did:

x = tuple(map(f,A))


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