arrays - 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?
解决方案
Have you tried to write:
1 / my_array
推荐阅读
- java - 为什么Java中的RSA加密产生的密文长度与C#不同
- php - mysql无法连接:无效设置和其他错误
- python - Pandas SQL 或 Spark 中的部分旋转
- graphql - 对象数组的输入类型作为突变输入与乐观响应混淆
- vba - 如何在列中搜索位于不同位置的单词
- python - 有条件地删除缩写中的句点,但不是以 python 正则表达式结尾的句子
- python - 我要删除的代码运行警告
- html - 如何在我的页面导航旁边对齐 CSS 中的对象
- java - 将数据发送到另一个活动的 Listview
- amazon-web-services - 使用 AWS Lambda (NodeJS) 训练和部署 SageMaker ML 模型