python / psf-infra-meta

Meta-repository for PSF backed or managed systems. Created mainly for the issue tracker :)
10 stars 9 forks source link

numpy operation #100

Closed vick2075 closed 3 years ago

vick2075 commented 3 years ago

I stumbled onto something very peculiar and am wondering if it is a Python bug or it's something I did not properly understand with regard to Numpy arrays.

I'm computing the Kernel trick:

(c + np.matmul(x1, x2.T)) ** n n = nth power; c = free parameter

Let x1 be (3,6) and x2 = (10, 10)

Computing the matmul should result in 90. However when I use c=2 and n=5; the result is incorrect! It gives -1999119360 instead of 6590815232!

Am I doing something wrong with the code? Or is it a bug? Because when you decrease n, the results are correct!

matrixise commented 3 years ago

@pablogsal I don't have the access to this tracker, but this issue is unrelated to the PSF infra. Do you think you could close this one? Thanks

pablogsal commented 3 years ago

I don't have access either unfortunately

pradyunsg commented 3 years ago

@ewdurbin should be able to close this.