vasole / pymca

PyMca Toolkit git repository
Other
58 stars 54 forks source link

[5.9.2] Replace assert_array_equal by assert_allclose in tests to avoid floating point comparison failures #1066

Closed picca closed 6 months ago

picca commented 7 months ago

Hello armando.

In order to pass tests I need this patch in PyMCA.

https://sources.debian.org/src/pymca/5.8.7+dfsg-2/debian/patches/0002-Replace-assert_array_equal-by-assert_allclose-in-tes.patch/

Could you integrate it into the PyMCA sources ?

thanks

Frédéric

vasole commented 7 months ago

That patch dates from 5.8.7 Are you sure it is not corrected in current source code?

    def assert_array_equal(self, *var):
        if sys.maxsize > 2**32:
            # 64-bit interpreter
            return numpy.testing.assert_array_equal(*var)
        else:
            # 32-bit interpreter
            return numpy.testing.assert_allclose(*var)

Does it fail in a 64-bit machine?

picca commented 7 months ago

I did not try without the patch, I should remove it and see what is going on...

thanks

Fred

picca commented 7 months ago

it works on i386 :)

Thanks

Fred

https://ci.debian.net/packages/p/pymca/testing/i386/43651255/

vasole commented 6 months ago

I guess it works on 64-bit machines too. Is it the case? If so, we can close this issue.

picca commented 6 months ago

oui :))

----- Le 11 Mar 24, à 15:09, V. Armando Solé @.*** a écrit :

I guess it works on 64-bit machines too. Is it the case? If so, we can close this issue.

-- Reply to this email directly or view it on GitHub: https://github.com/vasole/pymca/issues/1066#issuecomment-1988533562 You are receiving this because you authored the thread.

Message ID: @.***>