Thanks to everyone who helped here somewhere along the way! rocky.b...@gmail.com schrieb am Freitag, 26. März 2021 um 23:52:54 UTC+1:
> I asked about this in the mpmath group and the solution there I think is > good and only requires a change (or rather simplification) to the Mathics > code. > > So as far as I am concerned no changes are needed to sage or mpmath. See > https://groups.google.com/g/mpmath/c/qzA5gs57Qm8/m/_eg4GHisAAAJ > > On Friday, March 26, 2021 at 6:47:32 PM UTC-4 dim...@gmail.com wrote: > >> On Thursday, March 25, 2021 at 2:24:43 PM UTC seb....@gmail.com wrote: >> >>> Hi, >>> >>> Did anyone try this before? At the moment this stucks at the following >>> issue: >>> >>> sage: import mpmath >>> sage: mpmath.ctx_mp_python.mpf >>> >>> --------------------------------------------------------------------------- >>> AttributeError Traceback (most recent call >>> last) >>> <ipython-input-2-8e8eed115623> in <module> >>> ----> 1 mpmath.ctx_mp_python.mpf >>> >>> AttributeError: module 'mpmath.ctx_mp_python' has no attribute 'mpf' >>> >> >> this is apparently easy to fix, as this is due to >> >> https://github.com/fredrik-johansson/mpmath/blob/bd6715df41f2034f4438a77acc9bb05d03564942/mpmath/ctx_mp.py#L54 >> which makes the import of mpf conditional on BACKEND not being 'sage' >> >> Making it unconditional does not seem to break anything in Sage. >> >> >> >>> >>> >>> whereas >>> >>> ~/devel/sage$ ./local/bin/python3 >>> Python 3.9.2 (default, Mar 19 2021, 22:23:28) >>> [GCC 7.4.0] on linux >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import mpmath >>> >>> mpmath.ctx_mp_python.mpf >>> <class 'mpmath.ctx_mp_python.mpf'> >>> >>> >>> Any ideas what is the reason for this? >>> >>> For the background of this question see Mathics issue 1169 >>> <https://github.com/mathics/Mathics/issues/1169> especially this >>> comment >>> <https://github.com/mathics/Mathics/issues/1169#issuecomment-806587816>. >>> >>> -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/7ec21d2a-801a-4bc9-8c92-8be4e2bd112an%40googlegroups.com.