[sage-support] Re: sage 9.0: mismatch in sr-to-maxima translation

2020-01-18 Thread kcrisman
Since it looks like you had a Sage cell instance do this, you should be 
able to link to the code even, using the "Share" button on Sage cell 
server.  Thanks, that will help our team!

On Saturday, January 18, 2020 at 11:55:29 AM UTC-5, Nils Bruin wrote:
>
> On Saturday, January 18, 2020 at 7:19:03 AM UTC-8, mendes wrote:
>>
>>
>> RuntimeError: Encountered operator mismatch in sr-to-maxima translation
>>
>>
> The error indicates that the sage-to-maxima dictionary used in sr_to_max 
> is in an inconsistent state. Its state is a mix of preinitialization and 
> caching translations as it goes along, so inconsistent state indicates 
> there's a fragile initialization somewhere. the py2/py3 switch has all 
> kinds of small effects, so it could change the enumeration order of a set 
> somewhere, so that the initialization happened to go right in py2 but now 
> ends up going wrong in py3.
>
> Concerning your hint of a bug:
>
> integrate(unit_step(x),x,-1,1)
>
> works just fine for me (it leaves the integral unevaluated). Without a 
> piece of code that reliably reproduces the error you encounter it's 
> virtually impossible to find what's wrong.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/3fe8d66f-c3bf-4d1e-9e02-41584d1916a8%40googlegroups.com.


[sage-support] Re: sage 9.0: mismatch in sr-to-maxima translation

2020-01-18 Thread Nils Bruin
On Saturday, January 18, 2020 at 7:19:03 AM UTC-8, mendes wrote:
>
>
> RuntimeError: Encountered operator mismatch in sr-to-maxima translation
>
>
The error indicates that the sage-to-maxima dictionary used in sr_to_max is 
in an inconsistent state. Its state is a mix of preinitialization and 
caching translations as it goes along, so inconsistent state indicates 
there's a fragile initialization somewhere. the py2/py3 switch has all 
kinds of small effects, so it could change the enumeration order of a set 
somewhere, so that the initialization happened to go right in py2 but now 
ends up going wrong in py3.

Concerning your hint of a bug:

integrate(unit_step(x),x,-1,1)

works just fine for me (it leaves the integral unevaluated). Without a 
piece of code that reliably reproduces the error you encounter it's 
virtually impossible to find what's wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/902de18c-fcc1-4347-b1e0-41fdc6325633%40googlegroups.com.


[sage-support] sage 9.0: mismatch in sr-to-maxima translation

2020-01-18 Thread mendes
 

Dear all,

In previous versions of Sagemath, I  was able to do perfectly  the (symbolic) 
integration of  functions like  unit_step( ), for example when doing  symbolic 
convolutions.But in the latest versions of Sagemath (like 8.9 and the updated  
9.0) the following message appears:*RuntimeError: Encountered operator mismatch 
in sr-to-maxima translation*

I wonder if the problem is related with the change in python (now in python3).

I would be very grateful if anyone could  hep me on the subject.

The complete error message is:

File "/home/sc_serv/sagecell/interact_sagecell.py", line 122, in

update_interact_msg

update_interact(interact_id, name, content["values"][name], not 
content["update_last"])

  File "/home/sc_serv/sagecell/interact_sagecell.py", line 112, in 
update_interact
interact_info["function"](control_vals=kwargs)

  File "/home/sc_serv/sagecell/interact_sagecell.py", line 422, in adapted_f
returned = f(*args, **control_vals)

  File "", line 22, in _
fg = integrate(f(t=x)*g(t=t-x),x,Integer(0),t).simplify_full().expand()

  File "sage/symbolic/expression.pyx", line 4738, in 
sage.symbolic.expression.Expression.expand 
(build/cythonized/sage/symbolic/expression.cpp:28851)
x = self._gobj.expand(0)

  File "sage/symbolic/function.pyx", line 1226, in 
sage.symbolic.function.BuiltinFunction._evalf_or_eval_ 
(build/cythonized/sage/symbolic/function.cpp:13413)
return self._eval0_(*args)

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/symbolic/integration/integral.py",
 line 205, in _eval_
A = integrator(*args)

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/symbolic/integration/external.py",
 line 46, in maxima_integrator
result = maxima.sr_integral(expression, v, a, b)

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 790, in sr_integral
return max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in 
args])))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 790, in 
return max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in 
args])))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 1621, in sr_to_max
[sr_to_max(o) for o in expr.operands()]))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 1621, in 
[sr_to_max(o) for o in expr.operands()]))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 1621, in sr_to_max
[sr_to_max(o) for o in expr.operands()]))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 1621, in 
[sr_to_max(o) for o in expr.operands()]))

  File 
"/home/sc_serv/sage/local/lib/python3.7/site-packages/sage/interfaces/maxima_lib.py",
 line 1617, in sr_to_max
raise RuntimeError("Encountered operator mismatch in sr-to-maxima 
translation")

RuntimeError: Encountered operator mismatch in sr-to-maxima translation

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/c813399b-7392-4e71-a094-b987f5e1f4ff%40googlegroups.com.


Re: [sage-support] sagemath 9 + Graph

2020-01-18 Thread dimpase
On Sat, Jan 18, 2020 at 02:00:06AM -0800, Jean-François Ingenbleek wrote:
> G = Graph({'A':['B','C']})
> G.show()
> 
> give this strange message
> 
> /opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281:
>  UserWarning: Matplotlib is building the font cache using fc-list. This may 
> take a moment.
>   'Matplotlib is building the font cache using fc-list. '
> 
well, this seems to be like a normal thing, and should just happen once over 
the lifetime of your installation.
If it keeps happening every time you import matplotlib then it's another story, 
probably
https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported

HTH
Dima

> 
> 
> help is welcome
> 
> Big thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/cd57e97c-025c-4f84-abb3-02898711569b%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/20200118101128.GA22887%40penguin.pasechnik.info.


signature.asc
Description: PGP signature


[sage-support] Re: sagemath 9 + Graph

2020-01-18 Thread Dima Pasechnik


On Saturday, January 18, 2020 at 10:00:06 AM UTC, Jean-François Ingenbleek 
wrote:
>
> G = Graph({'A':['B','C']})
> G.show()
>
> give this strange message
>
> /opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281:
>  UserWarning: Matplotlib is building the font cache using fc-list. This may 
> take a moment.
>   'Matplotlib is building the font cache using fc-list. '
>
>
this should happen just once over the lifetime of your installation.
If this happens every time matplotlib is imported then it's probably

https://stackoverflow.com/questions/34771191/matplotlib-taking-time-when-being-imported

HTH
Dima


 

>
>
> help is welcome
>
> Big thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/07fe157d-2360-4a84-9402-c67eab30eb1c%40googlegroups.com.


[sage-support] sagemath 9 + Graph

2020-01-18 Thread Jean-François Ingenbleek
G = Graph({'A':['B','C']})
G.show()

give this strange message

/opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281:
 UserWarning: Matplotlib is building the font cache using fc-list. This may 
take a moment.
  'Matplotlib is building the font cache using fc-list. '



help is welcome

Big thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/cd57e97c-025c-4f84-abb3-02898711569b%40googlegroups.com.