0

I do not understand why the numpy functions inner and dot do not return the same results on these inputs :

Z1 = [ 0.20802286  0.23876957  0.21183842  0.23651123  0.22368603  0.24748229
  0.21947122  0.19641609  0.23148395  0.20815766  0.20839586  0.23032438
  0.22005879  0.22142259  0.21964123  0.2236328   0.24725002  0.22615054
  0.22185984  0.2242185 ]

Z2 = [ 0.10577075  0.33866838 -0.12644889 -0.16111459  0.02895356  0.05370375
  0.18242676 -0.06122486 -0.21797925 -0.06018776 -0.36965305  0.31710415
  0.18896685  0.08465404  0.47444968 -0.07607215 -0.21495446  0.0677735
 -0.36636134 -0.21047364]

sum(Z1[:]*Z2[:]) = 9.7144514654701197e-17

dot(Z1[:]*Z2[:]) = 9.7144514654701197e-17

inner(Z1[:]*Z2[:]) = 6.9388939039072284e-17
augustin-barillec
  • 531
  • 2
  • 5
  • 16

0 Answers0