Home > Enterprise >  Numpy different elements between two arrays
Numpy different elements between two arrays

Time:10-24

I need help. I have this array from a table:

lycop = np.array([[14, 15, 16, 17, 18, 19, 20, 21, 22, 23], 
                 [1, 1, 8, 24, 48, 58, 35, 16, 8, 1]])
lycop

array([[14, 15, 16, 17, 18, 19, 20, 21, 22, 23],

       [ 1,  1,  8, 24, 48, 58, 35, 16,  8,  1]])

I had to calculate media, var and std.

lycop_media = (lycop[0]*lycop[1]).sum()/lycop[1].sum() 
lycop_media

18.83

lycop_std = lycop_var**1/2 
lycop_std

1.09555

so far so good... Then I need 3 different arrays:

a1 : values under the media - std

  • Related