root mean square in numpy and complications of matrix and arrays of numpy

后端 未结 6 753
猫巷女王i
猫巷女王i 2021-02-07 05:38

Can anyone direct me to the section of numpy manual where i can get functions to accomplish root mean square calculations ... (i know this can be accomplished using np.mean and

6条回答
  •  别那么骄傲
    2021-02-07 06:09

    For the RMS, I think this is the clearest:

    from numpy import mean, sqrt, square, arange
    a = arange(10) # For example
    rms = sqrt(mean(square(a)))
    

    The code reads like you say it: "root-mean-square".

提交回复
热议问题