[sage-devel] Re: Errors with dummy packages

2022-07-07 Thread Matthias Koeppe
That's a good idea, please open a ticket

On Thursday, July 7, 2022 at 4:03:57 PM UTC-7 John H Palmieri wrote:

> While testing out a ticket, I accidentally asked Sage to build some of its 
> fake packages, like pandoc or perl_cpan_polymake_prereq. (Well, I asked it 
> to build packages for which these were dependencies.) These fail with 
> messages like
>
> Error: pandoc is a dummy script package that the Sage distribution uses
> to provide information about equivalent system packages.
> It cannot be installed using the Sage distribution.
> Please install it manually, for example using the system packages
> recommended at the end of a run of './configure'
> See below for package-specific information.
> ...
>
> Unfortunately, this message is buried in `logs/install.log` and appears in 
> no file in `logs/pkgs`, so when the build fails, Sage can't identify the 
> problematic package, and you have to comb through `install.log` to find it. 
> Could dummy packages write proper logs with error messages so that the 
> build process can identify what's going wrong?
>
>

-- 
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/43ce7419-00b9-4c50-a13c-a272688096a3n%40googlegroups.com.


[sage-devel] Errors with dummy packages

2022-07-07 Thread John H Palmieri
While testing out a ticket, I accidentally asked Sage to build some of its 
fake packages, like pandoc or perl_cpan_polymake_prereq. (Well, I asked it 
to build packages for which these were dependencies.) These fail with 
messages like

Error: pandoc is a dummy script package that the Sage distribution uses
to provide information about equivalent system packages.
It cannot be installed using the Sage distribution.
Please install it manually, for example using the system packages
recommended at the end of a run of './configure'
See below for package-specific information.
...

Unfortunately, this message is buried in `logs/install.log` and appears in 
no file in `logs/pkgs`, so when the build fails, Sage can't identify the 
problematic package, and you have to comb through `install.log` to find it. 
Could dummy packages write proper logs with error messages so that the 
build process can identify what's going wrong?

-- 
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/79c6b004-aaa8-44e8-a153-f7eb292788e4n%40googlegroups.com.


[sage-devel] Re: latex function and operations with fraction subscripts

2022-07-07 Thread Samuel Lelievre
Note: also asked on Ask Sage:

- Ask Sage question 63145
  How do you define a symbol with a quotient in the subscript?
  https://ask.sagemath.org/question/63145

-- 
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/bcc8cf86-c97a-4f61-8df6-39a4db96e5e8n%40googlegroups.com.


[sage-combinat-devel] Displaying and typesetting partitions

2022-07-07 Thread Samuel Lelièvre
Dear sage-combinat-devel,

This unanswered question on Ask Sage:

  Displaying and typesetting partitions
  https://ask.sagemath.org/question/62961

would benefit from your sage advice!   --Samuel

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-combinat-devel/CAEcArF3dMe6jC%2BN%3DTB7k267iQ3pn6XvurOxLw2R3FQiFWLrHeQ%40mail.gmail.com.


[sage-devel] Re: latex function and operations with fraction subscripts

2022-07-07 Thread Emmanuel Charpentier


The /character cannot be part of a symbol’s name (not acepted by the Python 
interpreter). Try :

sage: logr = SR.symbol("logr", latex_name='L_{x/x_0}')
sage: x*logr
logr*x
sage: latex(x*logr)
L_{x/x_0} x

BTW (question of taste…), I’d rather use logr = SR.symbol("logr", 
latex_name=r'L_{\frac{x}{x_0}}')…

HTH,
​
Le lundi 4 juillet 2022 à 23:22:53 UTC+2, Markk a écrit :

> sage: x = SR.symbol('x')
> : x_0 = SR.symbol('x_0')
> : logr = SR.symbol('L_x/x_0')
> : logr_ex = logr == log(x/x_0)
> : latex(logr_ex)
> : latex(logr_ex.solve(x)[0])
> L_{\mathit{x/x}_{0}} = \log\left(\frac{x}{x_{0}}\right)
> x = x_{0} e^{\frac{L_{x}}{x_{0}}}
>
> The above attempt at using a symbol with a fraction in the subscript works 
> (see first latex() result) until after an operation like solve(), which 
> scrambles the symbol (second latex() result).
>
> Variations of logr = SR.symbol('L_{x/x}_0') with braces also work until an 
> operation such as logr_ex.solve(x) with the code above, which crash Maxima 
> with the traceback excerpts:
> ---
> RuntimeError  Traceback (most recent call last)
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 731 try:
> --> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> ...
> RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.
>
> During handling of the above exception, another exception 
> occurred:---
> RuntimeError  Traceback (most recent call last)
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 731 try:
> --> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> ...
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> --> 734 raise TypeError(x)
> 735 
> 736 def _latex_(self):
>
> TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.
>
> Looks like a bug, but maybe I've overlooked the correct way to define such 
> symbols.
>
>

-- 
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/70a0326e-5471-4d8a-b2e3-153325f90bcfn%40googlegroups.com.


[sage-devel] Re: latex function and operations with fraction subscripts

2022-07-07 Thread Emmanuel Charpentier
the `/`character cannot be part of a symbol's name (not acepted by the 
Python interpreter). Try :

```
sage: logr = SR.symbol("logr", latex_name='L_{x/x_0}')
sage: x*logr
logr*x
sage: latex(x*logr)
L_{x/x_0} x
```

BTW (question of taste...), I'd rather use `logr = SR.symbol("logr", 
latex_name=r'L_{\frac{x}{x_0}}')`...

HTH,
Le lundi 4 juillet 2022 à 23:22:53 UTC+2, Markk a écrit :

> sage: x = SR.symbol('x')
> : x_0 = SR.symbol('x_0')
> : logr = SR.symbol('L_x/x_0')
> : logr_ex = logr == log(x/x_0)
> : latex(logr_ex)
> : latex(logr_ex.solve(x)[0])
> L_{\mathit{x/x}_{0}} = \log\left(\frac{x}{x_{0}}\right)
> x = x_{0} e^{\frac{L_{x}}{x_{0}}}
>
> The above attempt at using a symbol with a fraction in the subscript works 
> (see first latex() result) until after an operation like solve(), which 
> scrambles the symbol (second latex() result).
>
> Variations of logr = SR.symbol('L_{x/x}_0') with braces also work until an 
> operation such as logr_ex.solve(x) with the code above, which crash Maxima 
> with the traceback excerpts:
> ---
> RuntimeError  Traceback (most recent call last)
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 731 try:
> --> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> ...
> RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.
>
> During handling of the above exception, another exception 
> occurred:---
> RuntimeError  Traceback (most recent call last)
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 731 try:
> --> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> ...
> /usr/lib/python3/dist-packages/sage/interfaces/interface.py in 
> __init__(self, parent, value, is_name, name)
> 732 self._name = parent._create(value, name=name)
> 733 except (TypeError, RuntimeError, ValueError) as x:
> --> 734 raise TypeError(x)
> 735 
> 736 def _latex_(self):
>
> TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.
>
> Looks like a bug, but maybe I've overlooked the correct way to define such 
> symbols.
>
>

-- 
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/ce3b555e-fcd2-419d-9fd7-b39421fa7ea8n%40googlegroups.com.


Re: [sage-devel] parametric plot

2022-07-07 Thread Niranjana K M
Apart from just looking at this particular plot and trying to manage it,
look at the actual problem in depth. Please look at how plotting points are
evaluated. Even though Sage is capable of evaluating these points, it (or
matplotlib?) is evaluating y coordinates after 88 as inf or nan.

Please see my post above with one evaluation with
for T in srange(1,100,1.0):
and another with
for T in srange(1,100,1):
The difference is that the increment is a float. And also range(1,100,1)
produces the same result as srange(1,100,1).

Also,
> parametric_plot(C, (t,89.0,95.0))
clearly says that here the y values above 88 are evaluated as inf or nan
even though they are not and Sage is capable of evaluating them correctly.

What if these things creep into plotting ranges which we are really
interested in, where we expect y value to be a finite value but the program
calculates as inf or nan.

Here one thing to observe is that the vertical line is appearing
because after 88 the y value is wrongly calculated as inf or nan and the
plotter is turning them into 0 to handle it and hence the plot suddenly
falls to y=0 (x is not affected though).


*Regards*
*Niranjana*


On Thu, Jul 7, 2022 at 12:44 AM Samuel Lelievre 
wrote:

> In case the hope in extending the range of t further and further
> was to capture the missing portion of the curve, it turns out
> the problem is at the other end, near zero.
>
> The curve is missing its initial segment, because
>
> - parametric_plot(C, (t, a, b)) uses equispaced evaluation points
>   along the interval [a, b], skipping points where evaluation fails
> - C cannot be evaluated at zero
> - C travels quite some distance when t runs through (0, 0.01)
>
> To better view the curve, plot an initial arc separately,
> say for t in the interval (10^-9, 10^-2); then the rest of
> the curve, say up to t = 7.
> ```
> pa = parametric_plot(C, (t, 1e-9, 1e-2), color='steelblue')
> pb = parametric_plot(C, (t, 1e-2, 7), color='steelblue')
> p = pa + pb
> p.show()
> ```
>
> There is not much point plotting further than t = 7.
> Check how short the arc for t running along [7, 88] is:
> ```
> pc = parametric_plot(C, (t, 7, 88), color='firebrick')
> pc.show(xmin=-1.001, xmax=-0.999, ymin=0.495, ymax=0.505,
> aspect_ratio=1/10)
> ```
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sage-devel" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sage-devel/5GkgeGQjr7A/unsubscribe.
> To unsubscribe from this group and all its topics, 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/dd9fa495-fd3e-44d4-83ba-1f77ed235144n%40googlegroups.com
> 
> .
>

-- 
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/CAMcUJ1t%3Dym%3D5YqKaGA6JF2dY2Kgs_PTD8mggLDyCsz%3D_UwAsHQ%40mail.gmail.com.