首页 > 解决方案 > how to reverse an array in numpy fraction wise

问题描述

I have a numpy array like : [2,3,4,5] and I want to make them inverse like: [1/2, 1/3, 1/4, 1/5]

I don't want to write it myself is there any command?

标签: arraysnumpyreverse

解决方案


Have you tried to write:

1 / my_array

推荐阅读