Scale array according to pre-specified sum

前端 未结 0 922
迷失自我
迷失自我 2021-02-19 05:09

I want to take an existing array and scale it accordingly so that the final array sum is a specific (user input) number. For example:

import numpy as np

array =          


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