[sage-devel] Help --> Sage Tutorial, Reference etc doesn't load in JupyterLab

2022-05-24 Thread Niranjana K M
Dear all,
First I thank you all for Sage-9.6 release.
I tried JupyterLab in Sage 9.6 on Gentoo x86_64. Looks cool. But I 
noticed that in Help section, if I click on Sage Tutorial or Reference etc, 
the page is not loading. It shows up a blank tab and continuously tries to 
load but shows nothing. On the other hand I tried the same in the default 
Jupyter notebook. It shows all the Help pages nicely as before, no issues.

With thanks and regards
Niranjana

-- 
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/3ed2f613-b1f8-445b-8c12-d763d2d8686en%40googlegroups.com.


[sage-devel] Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
Dear all,
I tried to plot constant vector fields.
plot_vector_field3d((1,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
and
plot_vector_field3d((2,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
Length of the arrows of first one are equal to the second one. I expect 
that the length of arrows in second to be double that of the first. Also 
their lengths are not equal to their magnitudes.
Is it a bug? If it is the normal behavior, then any work around to have 
length of the arrows to be equal to that of the magnitudes of the vectors 
in the field.

PS : The following shows vectors in the filed have their lengths equal to 
their magnitudes. As expected.
plot_vector_field3d((x,0,0), (x,-2,2), (y,-2,2), (z,-2,2))

With regards
Niranjana

-- 
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/a52b3228-6ef1-4bc2-a885-d931da73afb6n%40googlegroups.com.


[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
Dear all,
I figured it out. It  has to do with
scaled_vectors = [v/max_len for v in vectors]
line 141 of  
$SAGE_ROOT/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/plot/plot3d/plot_field3d.py
Can we have scaling optional in sage? I just propose it, with a new keyword 
argument default with `scaled=True`.
if scaled:
scaled_vectors = [v/max_len for v in vectors]
else:
scaled_vectors = vectors
I can sense the consequences, when `scaled=False` and when the vector field 
is such that the vector lengths are too large to over print on the vectors 
ahead of them. At user's  risk, if he really wants them not to be scaled 
and can play with range and plot_points to avoid overprinting.

PS 1: I was trying to demonstrate and calculate electric flux through a 
hemisphere with constant field. While plotting the constant field i felt 
them not to be scaled.
PS 2: I thank and appreciate sage community for bringing out such a 
wonderful software. I have been following it since last 10+ years, since 
version 3.  I am really excited while exploring the section *Differential 
Geometry of Parametrized Surfaces* and sections on *Manifolds*, to see how 
Sage grew from missing functions to manifolds. I just loved it.

with regards,
Niranjana
On Sunday, June 19, 2022 at 3:56:55 PM UTC+5:30 Niranjana K M wrote:

> Dear all,
> I tried to plot constant vector fields.
> plot_vector_field3d((1,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
> and
> plot_vector_field3d((2,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
> Length of the arrows of first one are equal to the second one. I 
> expect that the length of arrows in second to be double that of the first. 
> Also their lengths are not equal to their magnitudes.
> Is it a bug? If it is the normal behavior, then any work around to 
> have length of the arrows to be equal to that of the magnitudes of the 
> vectors in the field.
>
> PS : The following shows vectors in the filed have their lengths equal to 
> their magnitudes. As expected.
> plot_vector_field3d((x,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
>
> With regards
> Niranjana
>
>

-- 
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/facb394b-bd32-40fc-9c59-60eff0deaa02n%40googlegroups.com.


Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
@Vincent 

On Sunday, June 19, 2022 at 5:52:28 PM UTC+5:30 vdelecroix wrote:

> Nice catch indeed. I am not sure that "scaled=True/False" is the most 
> flexible design. You might just want to apply *some* scale, not 
> necessarily the one making the max length being one. I imagine that it 
> would be nice to allow "scaled" to be a positive floating point 
> number. In other words 
>
> if scaled is True: # boolean 
> scaled_vectors = [v/max_len for v in vectors] 
> elif scaled is False: # boolean 
> scaled_vectors = vectors 
> else: # assume that scaled is a ratio 
> scaled = float(scaled) 
> assert scaled > 0 
> scaled_vectors = [v / scaled for v in vectors] 
>
> What do you think? 
>

That will be nice. The same effect can be obtained by multiplying the 
vector components by scaling factor and plot them with scaled=False.
 

>
> Do you know how to open a ticket on https://trac.sagemath.org? Details 
> are in the developer guide 
> (https://doc.sagemath.org/html/en/developer/index.html). 
>

I don't know how to open a ticket. I will see the guide.
 

-- 
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/366deb01-bee7-4c4f-a81b-43e15c372296n%40googlegroups.com.


[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
@Eric

That's very nice. Thanks for pointing towards sage manifold. I am also on 
9.6.

It seems  E.vector_field().plot()  method is much slower than 
plot_vector_field3d(). Check once with time().
Internally plot_vector_field3d() uses a  plot() function, may be different 
from this from sage manifolds.

sage:time(E.vector_field(4, 0, 0).plot(number_values=4))
CPU times: user 4.07 s, sys: 83.6 ms, total: 4.15 s Wall time: 3.84 s 

sage:   time(plot_vector_field3d((4,0,0), (x,-8,8), (y,-8,8), (z,-8,8), 
scaled=False, plot_points=4, colors='blue'))
CPU times: user 54.1 ms, sys: 42 µs, total: 54.2 ms Wall time: 51.2 ms 

With plot_vector_field3d() the vector lines go on becoming thin as length 
increases and thick for small size.
E.vector_field().plot() uses lines of constant thickness irrespective of 
size.
While exploring on setting line thickness I found both are using different 
plot methods.

For plot_vector_field3d() Reference says:
 -- any other keywords are passed on to the plot command for each arrow.
Eg: thickness=4 like that of 2d plot() command.

For plot() in sage manifold Reference says:
**extra_options – extra options for the arrow plot, like linestyle, width 
or arrowsize (see arrow2d() 

 
and arrow3d() 

 
for details)
Eg: width=6

Does this make speed difference or is it due to E.vector_field() ?

On Sunday, June 19, 2022 at 7:42:08 PM UTC+5:30 Eric Gourgoulhon wrote:

> Hi, 
>
> There is no such length issue if you use vector fields on the Euclidean 
> 3-space, instead of plot_vector_field3d with a tuple of components. For 
> instance:
>
> sage: E. = EuclideanSpace()
> sage: v1 = E.vector_field(1, 0, 0)
> sage: v2 = E.vector_field(2, 0, 0)
> sage: v1.plot()
> sage: v2.plot()
>
> yields 3d plots with arrows for v2 twice longer than those for v1, as you 
> can check by running
>
> sage: v1.plot() + v2.plot(color='red')
>
> Note that the plot() method of vector fields has the optional argument 
> "scale" to control the length of the arrows:
>
> sage: v1.plot(scale=2)
>
> yields the same plot as v2.plot()
>
> Note also that the default coordinate range for the plot is (-8, 8). To 
> use (-2, 2) as in your example, run
>
> sage: v1.plot(max_range=2, scale=0.5) 
>
> which is a shortcut for 
>
> sage: v1.plot(ranges={x: (-2, 2), y: (-2, 2), z: (-2, 2)}, scale=0.5)
>
> More details on 
> https://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/vectorfield.html#sage.manifolds.differentiable.vectorfield.VectorField.plot
>
> Side remark: plots of vector fields are much faster with Sage 9.6 than 
> with previous versions. 
>
> Best wishes,
>
> Eric.
>
> Le dimanche 19 juin 2022 à 12:26:55 UTC+2, niran...@gmail.com a écrit :
>
>> Dear all,
>> I tried to plot constant vector fields.
>> plot_vector_field3d((1,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
>> and
>> plot_vector_field3d((2,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
>> Length of the arrows of first one are equal to the second one. I 
>> expect that the length of arrows in second to be double that of the first. 
>> Also their lengths are not equal to their magnitudes.
>> Is it a bug? If it is the normal behavior, then any work around to 
>> have length of the arrows to be equal to that of the magnitudes of the 
>> vectors in the field.
>>
>> PS : The following shows vectors in the filed have their lengths equal to 
>> their magnitudes. As expected.
>> plot_vector_field3d((x,0,0), (x,-2,2), (y,-2,2), (z,-2,2))
>>
>> With regards
>> Niranjana
>>
>>

-- 
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/4d242ffe-6db0-495c-90b2-6801020f391an%40googlegroups.com.


Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-20 Thread Niranjana K M
@Vincent

On Sun, Jun 19, 2022 at 5:52 PM Vincent Delecroix <20100.delecr...@gmail.com>
wrote:

> Nice catch indeed. I am not sure that "scaled=True/False" is the most
> flexible design. You might just want to apply *some* scale, not
> necessarily the one making the max length being one. I imagine that it
> would be nice to allow "scaled" to be a positive floating point
> number. In other words
>
> if scaled is True: # boolean
> scaled_vectors = [v/max_len for v in vectors]
> elif scaled is False: # boolean
> scaled_vectors = vectors
> else: # assume that scaled is a ratio
> scaled = float(scaled)
> assert scaled > 0
> scaled_vectors = [v / scaled for v in vectors]
>
> What do you think?
>

Nice. It will implement scaling as available in vector_field().plot(). Let
the scaling be a factor multiplication (it will avoid dividing by 0 if
scaled=0) and let it be positive or negative (for which the arrows reverse
in direction).
Is it necessary to convert scaled into a float? Any real number is fine to
multiply.
A slight modified version:

if scaled is True: # boolean
scaled_vectors = [v/max_len for v in vectors]
elif scaled is False: # boolean
scaled_vectors = vectors
else: # assume that scaled is a real number
#scaled = float(scaled)
assert scaled in RR
scaled_vectors = [v*scaled for v in vectors]

Do you know how to open a ticket on https://trac.sagemath.org? Details
> are in the developer guide
> (https://doc.sagemath.org/html/en/developer/index.html).
>
>
I read the guide. Shall I open a ticket?

-- 
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/CAMcUJ1szyMPX-OGf_dVb%2BveMFjN%3Dm%3DzNnJgwGQGZFWpw_oUP0w%40mail.gmail.com.


Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-20 Thread Niranjana K M
@Vincent


> I think it is desirable to use the same argument conventions as the
> method VectorField.plot(). In particular use `scale` and not `scaled`.
> I don't know whether VectorField.plot() supports a default rescaling
> as you proposed.
>

Ok let us change into `scale`. Also I have a new version of it.
scale='auto' (a string, not a real number) be the default keyword and the
code be:

if scale in RR:
scaled_vectors = [v*scale for v in vectors]
else: # For `scale` is anything other than real
max_len = max(v.norm() for v in vectors)
scaled_vectors = [v/max_len for v in vectors]

Sure. You can go on. Don't forget to mention the ticket number you
> open in this e-mail discussion.
>

I have opened a ticket for this. Check it out once.
https://trac.sagemath.org/ticket/34038


Regards
Niranjana

-- 
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/CAMcUJ1vEL-g5PzNZf_%2Bv%3DyQ%2BEMeCmpatacfQprxPqC4PP2YZeQ%40mail.gmail.com.


Re: [sage-devel] Introduction to differentiable manifolds in SageMath

2022-06-23 Thread Niranjana K M
Very nice. Good work..

Best regards
Niranjana

On Thu, 23 Jun 2022, 8:08 pm Eric Gourgoulhon, 
wrote:

> Hi,
>
> Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland) has
> prepared a series of notebooks introducing differentiable manifolds at the
> textbook level with many examples from Sage and nice figures:
> https://sagemanifolds.obspm.fr/intro_to_manifolds.html
>
> Best wishes,
>
> Eric.
>
> --
> 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/cd97217c-6d59-4f30-ae2e-ace681a46ed5n%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/CAMcUJ1uWEWORdJzrBgrFAQofn08iiLh-NbMrqnvw-B9y%3DV-jcw%40mail.gmail.com.


Re: [sage-devel] parametric plot

2022-07-04 Thread Niranjana K M
Some thing happened after t=89. Is it because of the following two cases:


for T in srange(1,100,1.0):
print(T, float(C(T)[0]), float(C(T)[1]))
.
87.0 -0.   0.5001
88.0 -0.   0.5
89.0 -1.0  0.5
90.0 -1.0  0.5
91.0 -1.0  0.5
92.0 -0.   0.5
93.0 -1.0  0.5
94.0 -1.0  0.5
95.0 -1.0  0.49994
96.0 -1.0  0.5001
97.0 -1.0  0.5
98.0 -0.   0.49994
99.0 -1.0  0.49994



for T in srange(1,100,1):
print(T, float(C(T)[0]), float(C(T)[1]))
.
87   -0.   0.5
88   -0.   0.49994
89   -1.0  inf
90   -1.0  inf
91   -1.0  inf
92   -0.   inf
93   -1.0  inf
94   -1.0  nan
95   -1.0  nan
96   -1.0  nan
97   -1.0  nan
98   -0.   nan
99   -1.0  nan

On Monday, July 4, 2022 at 7:51:58 PM UTC+5:30 GMS wrote:

>
> Sorry, my message was incomplete.
>
> So yes, there is a problem.
>
> On Mon, 4 Jul 2022 at 16:14, G. M.-S.  wrote:
>
>>
>> Hi Gema.
>>
>> Doing
>>
>> sage: xt,yt=C[*0*],C[*1*]
>>
>> sage: xt.taylor(t,oo,*3*)
>>
>> -6*t^4*e^(-3*t)*log(t)^2 - 3*t*e^(-2*t)*log(t)^2 - 1
>>
>> sage: yt.taylor(t,oo,*3*)
>>
>> 1/2*t*e^(-2*t)*log(t)^2 + 1/2*(2*t^4*log(t)^2 + t*log(t)^3)*e^(-3*t) + 1/2
>>
>> sage: 
>>
>> you see that it converges towards (-1, 1/2) exponentially quickly.
>>
>> HTH,
>>
>> Guillermo
>>
>> On Mon, 4 Jul 2022 at 13:56, Gema María Diaz  wrote:
>>
>>> Hello,
>>>
>>> I've the following curve,
>>>
>>> t=var('t')
>>> C=[(-exp(2*t) + (-t^2 - 2*t)*ln(t)^2 - t^6 + 2*exp(t)*t^3)/(exp(2*t) + 
>>> (t^2 - t)*ln(t)^2 + t^6 - 2*exp(t)*t^3), ((28*t^18 + 60*ln(t)^2*t^14 + 
>>> 36*ln(t)^4*t^10 - 10*ln(t)^3*t^10 + 4*t^6*ln(t)^6 - 6*ln(t)^5*t^6)*exp(2*t) 
>>> + (-56*t^15 - 80*ln(t)^2*t^11 - 24*ln(t)^4*t^7 + 10*ln(t)^3*t^7 + 
>>> 2*ln(t)^5*t^3)*exp(3*t) + (70*t^12 + 60*ln(t)^2*t^8 + 6*ln(t)^4*t^4 - 
>>> 5*ln(t)^3*t^4)*exp(4*t) + (-56*t^9 - 24*ln(t)^2*t^5 + ln(t)^3*t)*exp(5*t) + 
>>> (28*t^6 + 4*t^2*ln(t)^2)*exp(6*t) - 8*exp(7*t)*t^3 + exp(8*t) + (t^8 + 
>>> t^4)*ln(t)^8 + ((t^5 + 2*t^3)*exp(t) - t^8 - 2*t^6)*ln(t)^7 + (4*t^12 - 
>>> 8*t^9*exp(t))*ln(t)^6 + (-2*t^12 + 6*t^9*exp(t))*ln(t)^5 + (6*t^16 - 
>>> 24*t^13*exp(t))*ln(t)^4 + (-t^16 + 5*t^13*exp(t))*ln(t)^3 + (4*t^20 - 
>>> 24*t^17*exp(t))*ln(t)^2 + t^24 - 8*exp(t)*t^21)/(2*(((3*t^4 - 
>>> 2*t^3)*ln(t)^4 + (18*t^8 - 6*t^7)*ln(t)^2 + 15*t^12)*exp(2*t) + ((-12*t^5 + 
>>> 4*t^4)*ln(t)^2 - 20*t^9)*exp(3*t) + ((3*t^2 - t)*ln(t)^2 + 15*t^6)*exp(4*t) 
>>> - 6*exp(5*t)*t^3 + exp(6*t) + (t^6 - t^5)*ln(t)^6 + (t^5/2 - 
>>> exp(t)*t^2/2)*ln(t)^5 + ((-6*t^7 + 4*t^6)*exp(t) + 3*t^10 - 2*t^9)*ln(t)^4 
>>> + ((-12*t^11 + 4*t^10)*exp(t) + 3*t^14 - t^13)*ln(t)^2 + t^18 - 
>>> 6*exp(t)*t^15)*(exp(2*t) + t^2*ln(t)^2 + t^3*(t^3 - 2*exp(t]
>>>
>>> and I'd like to see how it is like. Just with:
>>>
>>> parametric_plot(C, (t,0,80), plot_points=5500)
>>>
>>> one sees what's going on. However, with 
>>>
>>> parametric_plot(C, (t,0,90), plot_points=5500)
>>>
>>> suddenly a vertical lines  appears. I think it is a bug, am I right ?
>>>
>>> thanks
>>> Gema M.
>>>
>>  
>>
>

-- 
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/a3105c73-f2d3-4e49-a1bf-1a2044c00132n%40googlegroups.com.


Re: [sage-devel] parametric plot

2022-07-04 Thread Niranjana K M
Also the following:

> parametric_plot(C, (t,89.0,95.0))
.
verbose 0 (2200: graphics.py, get_minmax_data) ymin was NaN (setting to 0)
verbose 0 (2200: graphics.py, get_minmax_data) ymax was NaN (setting to 0)

> parametric_plot(C, (t,89,95))
.
verbose 0 (2200: graphics.py, get_minmax_data) ymin was NaN (setting to 0)
verbose 0 (2200: graphics.py, get_minmax_data) ymax was NaN (setting to 0) 


Regards
Niranjana

On Monday, July 4, 2022 at 8:42:58 PM UTC+5:30 Niranjana K M wrote:

> Some thing happened after t=89. Is it because of the following two cases:
>
>
> for T in srange(1,100,1.0):
> print(T, float(C(T)[0]), float(C(T)[1]))
> .
> 87.0 -0.   0.5001
> 88.0 -0.   0.5
> 89.0 -1.0  0.5
> 90.0 -1.0  0.5
> 91.0 -1.0  0.5
> 92.0 -0.   0.5
> 93.0 -1.0  0.5
> 94.0 -1.0  0.5
> 95.0 -1.0  0.49994
> 96.0 -1.0  0.5001
> 97.0 -1.0  0.5
> 98.0 -0.   0.49994
> 99.0 -1.0  0.49994
>
>
>
> for T in srange(1,100,1):
> print(T, float(C(T)[0]), float(C(T)[1]))
> .
> 87   -0.   0.5
> 88   -0.   0.49994
> 89   -1.0  inf
> 90   -1.0  inf
> 91   -1.0  inf
> 92   -0.   inf
> 93   -1.0  inf
> 94   -1.0  nan
> 95   -1.0  nan
> 96   -1.0  nan
> 97   -1.0  nan
> 98   -0.   nan
> 99   -1.0  nan
>
> On Monday, July 4, 2022 at 7:51:58 PM UTC+5:30 GMS wrote:
>
>>
>> Sorry, my message was incomplete.
>>
>> So yes, there is a problem.
>>
>> On Mon, 4 Jul 2022 at 16:14, G. M.-S.  wrote:
>>
>>>
>>> Hi Gema.
>>>
>>> Doing
>>>
>>> sage: xt,yt=C[*0*],C[*1*]
>>>
>>> sage: xt.taylor(t,oo,*3*)
>>>
>>> -6*t^4*e^(-3*t)*log(t)^2 - 3*t*e^(-2*t)*log(t)^2 - 1
>>>
>>> sage: yt.taylor(t,oo,*3*)
>>>
>>> 1/2*t*e^(-2*t)*log(t)^2 + 1/2*(2*t^4*log(t)^2 + t*log(t)^3)*e^(-3*t) + 
>>> 1/2
>>>
>>> sage: 
>>>
>>> you see that it converges towards (-1, 1/2) exponentially quickly.
>>>
>>> HTH,
>>>
>>> Guillermo
>>>
>>> On Mon, 4 Jul 2022 at 13:56, Gema María Diaz  
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I've the following curve,
>>>>
>>>> t=var('t')
>>>> C=[(-exp(2*t) + (-t^2 - 2*t)*ln(t)^2 - t^6 + 2*exp(t)*t^3)/(exp(2*t) + 
>>>> (t^2 - t)*ln(t)^2 + t^6 - 2*exp(t)*t^3), ((28*t^18 + 60*ln(t)^2*t^14 + 
>>>> 36*ln(t)^4*t^10 - 10*ln(t)^3*t^10 + 4*t^6*ln(t)^6 - 
>>>> 6*ln(t)^5*t^6)*exp(2*t) 
>>>> + (-56*t^15 - 80*ln(t)^2*t^11 - 24*ln(t)^4*t^7 + 10*ln(t)^3*t^7 + 
>>>> 2*ln(t)^5*t^3)*exp(3*t) + (70*t^12 + 60*ln(t)^2*t^8 + 6*ln(t)^4*t^4 - 
>>>> 5*ln(t)^3*t^4)*exp(4*t) + (-56*t^9 - 24*ln(t)^2*t^5 + ln(t)^3*t)*exp(5*t) 
>>>> + 
>>>> (28*t^6 + 4*t^2*ln(t)^2)*exp(6*t) - 8*exp(7*t)*t^3 + exp(8*t) + (t^8 + 
>>>> t^4)*ln(t)^8 + ((t^5 + 2*t^3)*exp(t) - t^8 - 2*t^6)*ln(t)^7 + (4*t^12 - 
>>>> 8*t^9*exp(t))*ln(t)^6 + (-2*t^12 + 6*t^9*exp(t))*ln(t)^5 + (6*t^16 - 
>>>> 24*t^13*exp(t))*ln(t)^4 + (-t^16 + 5*t^13*exp(t))*ln(t)^3 + (4*t^20 - 
>>>> 24*t^17*exp(t))*ln(t)^2 + t^24 - 8*exp(t)*t^21)/(2*(((3*t^4 - 
>>>> 2*t^3)*ln(t)^4 + (18*t^8 - 6*t^7)*ln(t)^2 + 15*t^12)*exp(2*t) + ((-12*t^5 
>>>> + 
>>>> 4*t^4)*ln(t)^2 - 20*t^9)*exp(3*t) + ((3*t^2 - t)*ln(t)^2 + 
>>>> 15*t^6)*exp(4*t) 
>>>> - 6*exp(5*t)*t^3 + exp(6*t) + (t^6 - t^5)*ln(t)^6 + (t^5/2 - 
>>>> exp(t)*t^2/2)*ln(t)^5 + ((-6*t^7 + 4*t^6)*exp(t) + 3*t^10 - 2*t^9)*ln(t)^4 
>>>> + ((-12*t^11 + 4*t^10)*exp(t) + 3*t^14 - t^13)*ln(t)^2 + t^18 - 
>>>> 6*exp(t)*t^15)*(exp(2*t) + t^2*ln(t)^2 + t^3*(t^3 - 2*exp(t]
>>>>
>>>> and I'd like to see how it is like. Just with:
>>>>
>>>> parametric_plot(C, (t,0,80), plot_points=5500)
>>>>
>>>> one sees what's going on. However, with 
>>>>
>>>> parametric_plot(C, (t,0,90), plot_points=5500)
>>>>
>>>> suddenly a vertical lines  appears. I think it is a bug, am I right ?
>>>>
>>>> thanks
>>>> Gema M.
>>>>
>>>  
>>>
>>

-- 
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/34c7b05a-f2e9-43ba-a768-9349d7507143n%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.


[sage-devel] What to do after sytem python update?

2022-07-08 Thread Niranjana K M
Hello,
My system Python which Sage was using until now got updated to next 
version on recent system upgrade. Now I get,

$ sage
Traceback (most recent call last):
  File "/mnt/vol_05/for-gentoo/sage/sage-9.6/src/bin/sage-ipython", line 9, 
in 
from sage.misc.banner import banner
ModuleNotFoundError: No module named 'sage'

What steps to be taken now?

Is it not better to let Sage build its own python by default instead of 
defaulting to system python? Amount of time now needed to rebuild Sage 
components depending on python will be far more than building its own 
python. Any advantage on using system python?

Regards
Niranjana

-- 
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/910cb380-b87f-4f88-9a0b-737ea6860e9fn%40googlegroups.com.


[sage-devel] Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-26 Thread Niranjana K M
Dear all,
"2D plotting" doc says,
"Another thing to be aware of with axis labeling is that when the labels 
have quite different orders of magnitude or are very large, scientific 
notation (the e  notation for powers of ten) is used."

But display of this multiplier power for the scaled y-axis is missing if 
the plot starts with x=0 or at most will be missing till the x-axis 
detaches from the origin. Following examples illustrates it,

*sage:*  plot(x^2,(x,0,5000))  # missing display of 1e7 above y-axis
*sage:*  plot(x^2,(x,50,5000))  # missing display of 1e7 above y-axis
*sage:*  plot(x^2,(x,100,5000))  # display of 1e7 above y-axis is visible

On the other side matplotlib natively always displays the scale multiplier 
(if any) whenever numbers are large. For example:

*sage:*  import matplotlib.pyplot as plt
*sage:*  import numpy as np
*sage:*  z = np.linspace(0, 5000, 100)
*sage:*  plt.plot(z, z**2)
*sage:*  plt.show()

My other plots involved electric field calculations which had magnitudes 
around 1/epsilon_0 which is 1/(8.85E-12) =~ 10^11. For those plots starting 
with x=0 the display of multiplier used for y-axis were missing.

With regards
Niranjana

-- 
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/81e1349d-73f1-493b-9109-54ccf669fb9an%40googlegroups.com.


[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-27 Thread Niranjana K M
Dear Kcrisman,
I will look into it *if* you promise me to *review* and *close* my 
another ticket   https://trac.sagemath.org/ticket/34038
based on the thread   
https://groups.google.com/g/sage-devel/c/tMH1RZNyC9s/m/DRwexGpzAwAJ
😀 

With regards
Niranjana

On Wednesday, July 27, 2022 at 7:05:51 PM UTC+5:30 kcrisman wrote:

> This is a good question, and one that has been around for a while in some 
> form, unfortunately; see https://trac.sagemath.org/ticket/7964 for a 
> related ticket.   See https://trac.sagemath.org/ticket/30983 for a ticket 
> that complains instead about something else but which is closely related.
>
> We would be grateful for any additional insight you might provide.  Here 
> are some pieces of info about where we use matplotlib that you might find 
> useful in that regard.
>
> We use some specific matplotlib ticker and formatter options which don't 
> always play well here.  See 
> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2326 
> for _matplotlib_tick_formatter in sage/plot/graphics.py
>
> In particular, note that, under ordinary circumstances,
>
> y_locator = MaxNLocator(**locator_options)
> y_formatter = ScalarFormatter()
>
> That is very close to the defaults for matplotlib, but maybe we are using 
> things in an antiquated way.  See e.g. 
> https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.ScalarFormatter
>  
>
> On the other hand, if (as I suspect) that isn't the root issue, it 
> probably is in the save method (
> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L3198).
>  
>  My first thought was that somehow fig_tight played a role, but 
>
> sage: plot(x^2,(x,0,5000),fig_tight=False)
>
> doesn't seem to be any different than the one you pointed out.  Another 
> possibility is tight_layout (
> https://matplotlib.org/stable/api/tight_layout_api.html) which we do use, 
> but which a little experimentation doesn't seem to indicate is the problem 
> either.
> On Tuesday, July 26, 2022 at 5:15:11 AM UTC-4 niran...@gmail.com wrote:
>
>> Dear all,
>> "2D plotting" doc says,
>> "Another thing to be aware of with axis labeling is that when the labels 
>> have quite different orders of magnitude or are very large, scientific 
>> notation (the e  notation for powers of ten) is used."
>>
>> But display of this multiplier power for the scaled y-axis is missing if 
>> the plot starts with x=0 or at most will be missing till the x-axis 
>> detaches from the origin. Following examples illustrates it,
>>
>> *sage:*  plot(x^2,(x,0,5000))  # missing display of 1e7 above y-axis
>> *sage:*  plot(x^2,(x,50,5000))  # missing display of 1e7 above y-axis
>> *sage:*  plot(x^2,(x,100,5000))  # display of 1e7 above y-axis is visible
>>
>> On the other side matplotlib natively always displays the scale 
>> multiplier (if any) whenever numbers are large. For example:
>>
>> *sage:*  import matplotlib.pyplot as plt
>> *sage:*  import numpy as np
>> *sage:*  z = np.linspace(0, 5000, 100)
>> *sage:*  plt.plot(z, z**2)
>> *sage:*  plt.show()
>>
>> My other plots involved electric field calculations which had magnitudes 
>> around 1/epsilon_0 which is 1/(8.85E-12) =~ 10^11. For those plots starting 
>> with x=0 the display of multiplier used for y-axis were missing.
>>
>> With regards
>> Niranjana
>>
>

-- 
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/33ada506-b846-4929-8901-712821a85f1an%40googlegroups.com.


[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-27 Thread Niranjana K M
Very sorry. I am new to git and that was my first trac ticket ever. If 
somebody can take it up patching i would be happy.
On Thursday, July 28, 2022 at 1:45:18 AM UTC+5:30 emanuel.c...@gmail.com 
wrote:

> Le mercredi 27 juillet 2022 à 16:53:39 UTC+2, niran…@gmail.com a écrit :
>
> Dear Kcrisman,
>> I will look into it *if* you promise me to *review* and *close* my 
>> another ticket   https://trac.sagemath.org/ticket/34038
>> based on the thread   
>> https://groups.google.com/g/sage-devel/c/tMH1RZNyC9s/m/DRwexGpzAwAJ
>>
> This ticket contains suggestion, is marked needs_review, but proposes no 
> branch to review. Could you propose a patch implementing your suggestions ? 
> The Developer’s guide 
>  will guide you on 
> the road to proposing such a patch as a branch of the Sage source git 
> tree…
>
> 😀 
>>
>> With regards
>> Niranjana
>>
>> On Wednesday, July 27, 2022 at 7:05:51 PM UTC+5:30 kcrisman wrote:
>>
>>> This is a good question, and one that has been around for a while in 
>>> some form, unfortunately; see https://trac.sagemath.org/ticket/7964 for 
>>> a related ticket.   See https://trac.sagemath.org/ticket/30983 for a 
>>> ticket that complains instead about something else but which is closely 
>>> related.
>>>
>>> We would be grateful for any additional insight you might provide.  Here 
>>> are some pieces of info about where we use matplotlib that you might find 
>>> useful in that regard.
>>>
>>> We use some specific matplotlib ticker and formatter options which don't 
>>> always play well here.  See 
>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2326
>>>  
>>> for _matplotlib_tick_formatter in sage/plot/graphics.py
>>>
>>> In particular, note that, under ordinary circumstances,
>>>
>>> y_locator = MaxNLocator(**locator_options)
>>> y_formatter = ScalarFormatter()
>>>
>>> That is very close to the defaults for matplotlib, but maybe we are 
>>> using things in an antiquated way.  See e.g. 
>>> https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.ScalarFormatter
>>>  
>>>
>>> On the other hand, if (as I suspect) that isn't the root issue, it 
>>> probably is in the save method (
>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L3198).
>>>  
>>>  My first thought was that somehow fig_tight played a role, but 
>>>
>>> sage: plot(x^2,(x,0,5000),fig_tight=False)
>>>
>>> doesn't seem to be any different than the one you pointed out.  Another 
>>> possibility is tight_layout (
>>> https://matplotlib.org/stable/api/tight_layout_api.html) which we do 
>>> use, but which a little experimentation doesn't seem to indicate is the 
>>> problem either.
>>> On Tuesday, July 26, 2022 at 5:15:11 AM UTC-4 niran...@gmail.com wrote:
>>>
 Dear all,
 "2D plotting" doc says,
 "Another thing to be aware of with axis labeling is that when the 
 labels have quite different orders of magnitude or are very large, 
 scientific notation (the e  notation for powers of ten) is used."

 But display of this multiplier power for the scaled y-axis is missing 
 if the plot starts with x=0 or at most will be missing till the x-axis 
 detaches from the origin. Following examples illustrates it,

 *sage:*  plot(x^2,(x,0,5000))  # missing display of 1e7 above y-axis
 *sage:*  plot(x^2,(x,50,5000))  # missing display of 1e7 above y-axis
 *sage:*  plot(x^2,(x,100,5000))  # display of 1e7 above y-axis is 
 visible

 On the other side matplotlib natively always displays the scale 
 multiplier (if any) whenever numbers are large. For example:

 *sage:*  import matplotlib.pyplot as plt
 *sage:*  import numpy as np
 *sage:*  z = np.linspace(0, 5000, 100)
 *sage:*  plt.plot(z, z**2)
 *sage:*  plt.show()

 My other plots involved electric field calculations which had 
 magnitudes around 1/epsilon_0 which is 1/(8.85E-12) =~ 10^11. For those 
 plots starting with x=0 the display of multiplier used for y-axis were 
 missing.

 With regards
 Niranjana

>>> ​
>

-- 
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/aaf229fa-b702-4a91-9208-66e9a4ca9d91n%40googlegroups.com.


[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-27 Thread Niranjana K M
Regarding axes Formatter, inserting
rcParams['axes.formatter.use_mathtext'] = True
just after
from matplotlib import rcParams 
in  graphics.py  makes the scientific notation to be typeset as  x 10^7 
(for example). This looks nicer than 1e7. See the figure. Though it does 
not solve the current problem, aesthetically it looks nice whenever the 
scaling is displayed.

[image: index.png]

On Thursday, July 28, 2022 at 1:45:18 AM UTC+5:30 emanuel.c...@gmail.com 
wrote:

> Le mercredi 27 juillet 2022 à 16:53:39 UTC+2, niran…@gmail.com a écrit :
>
> Dear Kcrisman,
>> I will look into it *if* you promise me to *review* and *close* my 
>> another ticket   https://trac.sagemath.org/ticket/34038
>> based on the thread   
>> https://groups.google.com/g/sage-devel/c/tMH1RZNyC9s/m/DRwexGpzAwAJ
>>
> This ticket contains suggestion, is marked needs_review, but proposes no 
> branch to review. Could you propose a patch implementing your suggestions ? 
> The Developer’s guide 
>  will guide you on 
> the road to proposing such a patch as a branch of the Sage source git 
> tree…
>
> 😀 
>>
>> With regards
>> Niranjana
>>
>> On Wednesday, July 27, 2022 at 7:05:51 PM UTC+5:30 kcrisman wrote:
>>
>>> This is a good question, and one that has been around for a while in 
>>> some form, unfortunately; see https://trac.sagemath.org/ticket/7964 for 
>>> a related ticket.   See https://trac.sagemath.org/ticket/30983 for a 
>>> ticket that complains instead about something else but which is closely 
>>> related.
>>>
>>> We would be grateful for any additional insight you might provide.  Here 
>>> are some pieces of info about where we use matplotlib that you might find 
>>> useful in that regard.
>>>
>>> We use some specific matplotlib ticker and formatter options which don't 
>>> always play well here.  See 
>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2326
>>>  
>>> for _matplotlib_tick_formatter in sage/plot/graphics.py
>>>
>>> In particular, note that, under ordinary circumstances,
>>>
>>> y_locator = MaxNLocator(**locator_options)
>>> y_formatter = ScalarFormatter()
>>>
>>> That is very close to the defaults for matplotlib, but maybe we are 
>>> using things in an antiquated way.  See e.g. 
>>> https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.ScalarFormatter
>>>  
>>>
>>> On the other hand, if (as I suspect) that isn't the root issue, it 
>>> probably is in the save method (
>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L3198).
>>>  
>>>  My first thought was that somehow fig_tight played a role, but 
>>>
>>> sage: plot(x^2,(x,0,5000),fig_tight=False)
>>>
>>> doesn't seem to be any different than the one you pointed out.  Another 
>>> possibility is tight_layout (
>>> https://matplotlib.org/stable/api/tight_layout_api.html) which we do 
>>> use, but which a little experimentation doesn't seem to indicate is the 
>>> problem either.
>>> On Tuesday, July 26, 2022 at 5:15:11 AM UTC-4 niran...@gmail.com wrote:
>>>
 Dear all,
 "2D plotting" doc says,
 "Another thing to be aware of with axis labeling is that when the 
 labels have quite different orders of magnitude or are very large, 
 scientific notation (the e  notation for powers of ten) is used."

 But display of this multiplier power for the scaled y-axis is missing 
 if the plot starts with x=0 or at most will be missing till the x-axis 
 detaches from the origin. Following examples illustrates it,

 *sage:*  plot(x^2,(x,0,5000))  # missing display of 1e7 above y-axis
 *sage:*  plot(x^2,(x,50,5000))  # missing display of 1e7 above y-axis
 *sage:*  plot(x^2,(x,100,5000))  # display of 1e7 above y-axis is 
 visible

 On the other side matplotlib natively always displays the scale 
 multiplier (if any) whenever numbers are large. For example:

 *sage:*  import matplotlib.pyplot as plt
 *sage:*  import numpy as np
 *sage:*  z = np.linspace(0, 5000, 100)
 *sage:*  plt.plot(z, z**2)
 *sage:*  plt.show()

 My other plots involved electric field calculations which had 
 magnitudes around 1/epsilon_0 which is 1/(8.85E-12) =~ 10^11. For those 
 plots starting with x=0 the display of multiplier used for y-axis were 
 missing.

 With regards
 Niranjana

>>> ​
>

-- 
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/a83484f1-796b-4872-986a-8ac2541db4b3n%40googlegroups.com.


[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-28 Thread Niranjana K M
I found it ! The problem is  in use of  SelectiveFormatter to get rid of 0 
tick label if the axes cross. Commenting out lines

https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2983
to
https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2986
from sage.plot.plot import SelectiveFormatter
subplot.yaxis.set_major_formatter(SelectiveFormatter(
subplot.yaxis.get_major_formatter(), skip_values=[0]))
subplot.xaxis.set_major_formatter(SelectiveFormatter(
subplot.xaxis.get_major_formatter(), skip_values=[0]))

will bring back the scaling factor in scientific notation. But on the 
downside it will print the origin 0.

SelectiveFormatter use itself has this issue. A modified version of usage 
example of SelectiveFormatter in Sage reference >> 2D Plotting

from sage.plot.plot import SelectiveFormatter
import matplotlib.pyplot as plt
import numpy

fig=plt.figure()
ax=fig.add_subplot(111)
t = numpy.arange(1000, 1010, 100)
s = t
p = ax.plot(t, s)
formatter=SelectiveFormatter(ax.xaxis.get_major_formatter(),skip_values=[0,1])
formatter=SelectiveFormatter(ax.yaxis.get_major_formatter(),skip_values=[0,1])
ax.xaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter(formatter)

show(p)

Any idea to fix it?

On Thursday, July 28, 2022 at 3:25:41 AM UTC+5:30 Niranjana K M wrote:

> Regarding axes Formatter, inserting
> rcParams['axes.formatter.use_mathtext'] = True
> just after
> from matplotlib import rcParams 
> in  graphics.py  makes the scientific notation to be typeset as  x 10^7 
> (for example). This looks nicer than 1e7. See the figure. Though it does 
> not solve the current problem, aesthetically it looks nice whenever the 
> scaling is displayed.
>
> [image: index.png]
>
> On Thursday, July 28, 2022 at 1:45:18 AM UTC+5:30 emanuel.c...@gmail.com 
> wrote:
>
>> Le mercredi 27 juillet 2022 à 16:53:39 UTC+2, niran…@gmail.com a écrit :
>>
>> Dear Kcrisman,
>>> I will look into it *if* you promise me to *review* and *close* my 
>>> another ticket   https://trac.sagemath.org/ticket/34038
>>> based on the thread   
>>> https://groups.google.com/g/sage-devel/c/tMH1RZNyC9s/m/DRwexGpzAwAJ
>>>
>> This ticket contains suggestion, is marked needs_review, but proposes no 
>> branch to review. Could you propose a patch implementing your suggestions ? 
>> The Developer’s guide 
>> <https://doc.sagemath.org/html/en/developer/index.html> will guide you 
>> on the road to proposing such a patch as a branch of the Sage source git 
>> tree…
>>
>> 😀 
>>>
>>> With regards
>>> Niranjana
>>>
>>> On Wednesday, July 27, 2022 at 7:05:51 PM UTC+5:30 kcrisman wrote:
>>>
>>>> This is a good question, and one that has been around for a while in 
>>>> some form, unfortunately; see https://trac.sagemath.org/ticket/7964 
>>>> for a related ticket.   See https://trac.sagemath.org/ticket/30983 for 
>>>> a ticket that complains instead about something else but which is closely 
>>>> related.
>>>>
>>>> We would be grateful for any additional insight you might provide. 
>>>>  Here are some pieces of info about where we use matplotlib that you might 
>>>> find useful in that regard.
>>>>
>>>> We use some specific matplotlib ticker and formatter options which 
>>>> don't always play well here.  See 
>>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L2326
>>>>  
>>>> for _matplotlib_tick_formatter in sage/plot/graphics.py
>>>>
>>>> In particular, note that, under ordinary circumstances,
>>>>
>>>> y_locator = MaxNLocator(**locator_options)
>>>> y_formatter = ScalarFormatter()
>>>>
>>>> That is very close to the defaults for matplotlib, but maybe we are 
>>>> using things in an antiquated way.  See e.g. 
>>>> https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.ScalarFormatter
>>>>  
>>>>
>>>> On the other hand, if (as I suspect) that isn't the root issue, it 
>>>> probably is in the save method (
>>>> https://github.com/sagemath/sage/blob/develop/src/sage/plot/graphics.py#L3198).
>>>>  
>>>>  My first thought was that somehow fig_tight played a role, but 
>>>>
>>>> sage: plot(x^2,(x,0,5000),fig_tight=False)
>>>>
>>>> doesn't seem to be any different than the one you pointed out.  Another 
>>>> p

[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-28 Thread Niranjana K M
@kcrisman

Thanks for the continued conversation.  I hope it was clear that "we would 
> be grateful" implied that there was no compulsion on your part, as well as 
> on the part of any other contributor.


There is no such compulsion, indeed I like working with SAGE. My reply 
about my other ticket was just with light heart to make you to look into my 
first ticket.
 

> However, I couldn't replicate the example you gave - among other thing, 
> show(p) gave me something that wasn't plottable (I had to use savefig etc. 
> on the figure itself).
>

savefig was the one given in doc and the right one. I just tried in 
shortcut and somehow the plot appeared in my notebook with a error string 
[𝙻𝚒𝚗𝚎𝟸𝙳(⎯𝚌𝚑𝚒𝚕𝚍𝟶)]
 

>  Also, what is your modified version trying to show - the missing part, or 
> a potential solution?  Thanks!
>

First we have to try natively matplotlib formatter to have similar 
selective formatting and confirm whether it is a matplotlib issue which is 
to be reported to upstream.
Then try to do something similar to
ax.xaxis.get_major_formatter().set_scientific(True)
ax.yaxis.get_major_formatter().set_scientific(True)
to re-enable scientific notation for axis.

I have to first study matplotlib formatter.

Also I noticed that,
*sage:* plot(x^2,(x,100,5000), tick_formatter="latex")
altogether dropped formatting in scientific notation and instead started 
printing like 2500.0. But typeset="latex"
*sage:* plot(x^2,(x,100,5000), typeset="latex")
does retain scientific notation

It may be clear from these that any tweaking with ticks is disturbing setting 
up of scientific notation. We have to explore whether there is any way to 
reintroduce scientific notation formatting as well.

Time being solution would be to drop use of  SelectiveFormatter to get rid 
of 0 tick label if the axes cross. Let the origin be visible for some time.

With regards
Niranjana

> ​

>>>

-- 
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/4a71aae7-fccb-4660-8b3d-4b9cd005ec19n%40googlegroups.com.


[sage-devel] Re: Display of scale multiplier in scientific notation (the e notation for powers of ten) is missing for plots starting with 0

2022-07-29 Thread Niranjana K M
Wait, i just solved it!
 It is not the issue with matplotlib but with the construction of 
SelectiveFormatter. 
This formatter construction is incomplete. I have created two new 
customized ScalarFormatters (default formatters used by matplotlib), the 
second one would be a good new addition to sage along with the first one. 
We can have both. I have worked out same situation but in native python 
with matplotlib. Only thing is to adapt it to sage. It won't be hard to do 
that, just need slight adjustments. Please look into the attached two 
example python files.

Inspired from:
https://stackoverflow.com/questions/11244514/modify-tick-label-text<-- 
Discusses similar issue (see second answer from last)
https://stackoverflow.com/questions/63475934/skipping-certain-values-in-python-with-matplotlib
https://github.com/matplotlib/matplotlib/blob/4f5cacfde9024076d9ab0cb6ad1c9a7cf352d5f9/lib/matplotlib/ticker.py


On Saturday, July 30, 2022 at 12:05:24 AM UTC+5:30 kcrisman wrote:

> Time being solution would be to drop use of  SelectiveFormatter to get 
>> rid of 0 tick label if the axes cross. Let the origin be visible for some 
>> time.
>>
>
> My guess is that this would not be seen as a great fix, but let's put 
> images and other followup on the ticket.
>

-- 
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/3ccaa889-7548-4756-8024-2baa99dce5b6n%40googlegroups.com.
#!/usr/bin/python

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

from matplotlib import rcParams
rcParams['axes.formatter.use_mathtext'] = True

class CustomScalarFormatter(matplotlib.ticker.ScalarFormatter):
def __init__(self, useOffset=None, useMathText=None, useLocale=None, skip_values=[]):
super().__init__(useOffset=None, useMathText=None, useLocale=None)
self.skip_values = skip_values

def __call__(self, x, pos=None):
"""
Return the format for tick value *x* at position *pos*.
"""
if len(self.locs) == 0:
return ''
#elif x == 0:
#return ''
elif x in self.skip_values:
return ''
else:
xp = (x - self.offset) / (10. ** self.orderOfMagnitude)
if abs(xp) < 1e-8:
xp = 0
return self._format_maybe_minus_and_locale(self.format, xp)

z = np.linspace(-5000, 5000, 100)

fig, ax = plt.subplots()
ax.plot(z,z**2)


xmajorformatter = CustomScalarFormatter(skip_values=[2000,0])
ymajorformatter = CustomScalarFormatter(skip_values=[1E7,0])
ax.xaxis.set_major_formatter(xmajorformatter)
ax.yaxis.set_major_formatter(ymajorformatter)

plt.show()#!/usr/bin/python

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

from matplotlib import rcParams
rcParams['axes.formatter.use_mathtext'] = True

class CustomScalarFormatter(matplotlib.ticker.ScalarFormatter):
def __init__(self, useOffset=None, useMathText=None, useLocale=None, replace_values=[]):
super().__init__(useOffset=None, useMathText=None, useLocale=None)
self.replace_values = replace_values

def __call__(self, x, pos=None):
"""
Return the format for tick value *x* at position *pos*.
"""
if len(self.locs) == 0:
return ''
#elif x == 0:
#return ''
elif x in self.replace_values[0]:
idx = self.replace_values[0].index(x)
return str(self.replace_values[1][idx])
else:
xp = (x - self.offset) / (10. ** self.orderOfMagnitude)
if abs(xp) < 1e-8:
xp = 0
return self._format_maybe_minus_and_locale(self.format, xp)



z = np.linspace(0, 5000, 100)
fig, ax = plt.subplots()
ax.plot(z,z**2)


xmajorformatter = CustomScalarFormatter(replace_values=([2000,0],['$x_0$','']))
ymajorformatter = CustomScalarFormatter(replace_values=([1E7,0],['$y_0$','']))
ax.xaxis.set_major_formatter(xmajorformatter)
ax.yaxis.set_major_formatter(ymajorformatter)

plt.show()

[sage-devel] Update of system python

2021-08-30 Thread Niranjana K M
Hi,
If sage is built with system python (default behavior) any future
update of system python makes sage non-functioning. This is natural. Then
how to fix it withoul rebuilding whole sage? Atleast we should rebuild all
python dependent stuffs in sage. Which command should i run? I found by
trial and error,
$ ./sage -i
helpful. -i without any argument. Is it correct.

It seems,
$ make
will rebuild whole thing again.

Please add few lines on "What to do after system python upgrade?" in sage
README or in sage installation documentation. It should address in general
any upgrade of system packages on which sage depends.

PS: I use Gentoo. Though it doesn't matter.

With regards
Niranjan

-- 
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/CAMcUJ1tVYBuUbZq%2B5Kb%3DikHYFyu4%3DfATj7-hfVp4CVCjpaCejg%40mail.gmail.com.


Re: [sage-devel] Update of system python

2021-08-31 Thread Niranjana K M
Thank you all for clarifying.

I request the development team to add a few lines to README and Sage 
installation documentation on what any one should do when a dependency gets 
updated. For example: As Michael Orlitzky wrote,

19. When system python gets updated: When all of sage's dependencies
are picked up by ./configure, you'll  only have to rebuild the sage library
whenever something changes. Still annoying, but it's the best we can do.
You'll still have to re-run `./configure` and `make build` to kick off the 
process. 
Follow the same procedure when any other dependency gets updated.

On Tuesday, August 31, 2021 at 5:38:03 PM UTC+5:30 Michael Orlitzky wrote:

> On Tue, 2021-08-31 at 10:42 +0530, Niranjana K M wrote:
> > Hi,
> > If sage is built with system python (default behavior) any future
> > update of system python makes sage non-functioning. This is natural.
> > 
> > ...
> > 
> > PS: I use Gentoo. Though it doesn't matter.
> > 
> > 
>
> This is true of any software you build/install outside of portage, but
> it's made worse by the fact that Sage has so many dependencies and that
> python itself changes so quickly (both in general, and in Gentoo).
>
> We are slowly making progress towards using system packages for all of
> Sage's dependencies in
>
> https://trac.sagemath.org/ticket/27330
>
> When all of sage's dependencies are picked up by ./configure, you'll
> only have to rebuild the sage library whenever something changes. Still
> annoying, but it's the best we can do. You'll still have to re-run
> ./configure and "make build" to kick off the process.
>
> Eventually (we're still a few years away), we'll get sage into the main
> Gentoo package repository, and we can use subslot rebuilds to automate
> the process for you. Until then, you might want to try the sage-on-
> gentoo overlay from
>
> https://github.com/cschwan/sage-on-gentoo
>
> Using the overlay ebuild will also trigger subslot rebuilds when
> important pieces of sage change. Unfortunately, that doesn't help if
> you're trying to do sage _development_, but again -- it's the best we
> can do.
>
>
>

-- 
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/a53d0d02-8715-404e-9ceb-a32edb85516fn%40googlegroups.com.


Re: [sage-devel] Error compiling sagelib-10.2 with --enable-system-site-packages

2024-01-12 Thread Niranjana K M
It is attached in the previous mail.

On Fri, 12 Jan 2024, 5:09 pm Michael Orlitzky,  wrote:

> On Thu, 2024-01-11 at 20:56 -0800, Niranjana K M wrote:
> >
> > I am running on Gentoo Linux and sagemath is from git master branch.
> > I am having system cython-3.0.6 built on python-3.11.7.
> >
> > Please help me to resolve it.
> >
>
> Can you post your config.log?
>
> --
> 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/c5cf266528f33850d3f1f4eac10e3c2e76c211b1.camel%40orlitzky.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/CAMcUJ1uNziO18_A7-87doMD9Sg9o-aaurwXAVsZ5OcQEeqJs%2BQ%40mail.gmail.com.


Re: [sage-devel] Error compiling sagelib-10.2 with --enable-system-site-packages

2024-01-12 Thread Niranjana K M
Should I have had started by cleaning the previous builds? It may be still 
using old Cython spkg, built when it was sage 10.0 release. Because in venv 
site-packages, it still says  
sage/venv/lib64/python3.11/site-packages/Cython-0.29.32.dist-info.

What are the right sequence of commands to update an existing sagemath git 
installation? I just did:
$ git fetch --all
$ git pull --all
$ git checkout master
$ ./bootstrap
$ ./configure --enable-system-site-packages --enable-fricas
$ make -j2
On Friday, January 12, 2024 at 10:18:48 PM UTC+5:30 Michael Orlitzky wrote:

> On Fri, 2024-01-12 at 08:33 -0500, Michael Orlitzky wrote:
> > 
> > One thing I noticed is that you said "master" branch. Please try the
> > "develop" branch instead -- that's where the actual development takes
> > place. Both Sage and Gentoo are fast-moving and you'll have better luck
> > with the latest code.
>
> I tried with "master" and did not hit this issue. Our systems are
> otherwise very similar so that is discouraging, but doesn't necessarily
> mean that "develop" won't work for you. I'll continue to poke at it.
>
>
>

-- 
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/ecd62c54-fa20-47bf-b53f-090b732cc444n%40googlegroups.com.


Re: [sage-devel] Error compiling sagelib-10.2 with --enable-system-site-packages

2024-01-13 Thread Niranjana K M
Thank you Michael Orlitzky, it worked after cleaning the previous builds. I
did,
$ make maintainer-clean

Which is equivalent to, according to the Makefile,
$ make distclean bootstrap-clean

I thought the installation would replace the previous builds when new
system packages are available. It is preferring old local spkg installs, if
already present, than new versions in system. But if it is spkg only it is
going for update.

Is it needed to be fixed or is it usual?

On Sat, 13 Jan 2024, 1:26 am Michael Orlitzky,  wrote:

> On Fri, 2024-01-12 at 09:25 -0800, Niranjana K M wrote:
> > Should I have had started by cleaning the previous builds? It may be
> still
> > using old Cython spkg, built when it was sage 10.0 release. Because in
> venv
> > site-packages, it still says
> > sage/venv/lib64/python3.11/site-packages/Cython-0.29.32.dist-info.
>
> Very possibly.
>
>
> > What are the right sequence of commands to update an existing sagemath
> git
> > installation? I just did:
>
> Personally I run `git clean -x -f -d` before ./bootstrap to remove
> absolutely everything that isn't part of the repository.
>
> --
> 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/799606af358fb48cff6eeeca999a877c3e323ff3.camel%40orlitzky.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/CAMcUJ1vFg%2BoSndKNsKEW76ANiGYmxhb6sZwv1BAADh88QK_fqA%40mail.gmail.com.


Re: [sage-devel] Error compiling sagelib-10.2 with --enable-system-site-packages

2024-01-16 Thread Niranjana K M
>
>
> FWIW we're about to get GAP in Gentoo:
>
>   https://github.com/gentoo/gentoo/pull/34472
>
> And then the only system packages that are missing are PALP and a few
> databases. Everything else can be detected and used by Sage, and that
> should speed up a clean build by a lot. I would still recommend the
> "develop" branch to keep up with the latest changes until Sage itself
> finds its way into Gentoo.
>

Very nice and good work.

I guess, what Sage is doing with --enable-system-site-packages is that it
opens up system's python site-packages. But priority will be the
site-packages of Sage installed site-packages directory. Similar to the
site-package of $HOME/.local/lib/python3.11/site-packages is prioritized
over the one in /usr/lib/python3.11/site-packages. When we are
reconfiguring and building Sage, if it detects system python packages, it
is just skipping the installation of the respective package as the system
site-packages is having that package. But it would have also uninstalled
the existing spkg instead of just leaving it.

-- 
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/CAMcUJ1v-imSUzDNA9HOTXWM%2B7exGg%2BdD-jV3aACaFeKuuYYA-g%40mail.gmail.com.


Re: [sage-devel] Sage-10.4 fails to build

2024-08-02 Thread Niranjana K M
At first I had flint-3.1.0 from Gentoo portage. Got same errors and build 
failed. The I uninstalled flint and its dependents from Gentoo and let the 
Sage choose its flint spkg. Again it also failed with same errors.

On Friday, August 2, 2024 at 5:53:19 PM UTC+5:30 Michael Orlitzky wrote:

> On 2024-08-02 15:19:03, Niranjana K M wrote:
> > Dear Sage developers,
> > Sage-10.4 fails to build on my computer running with Gentoo Linux.
> > It uses gcc-13.3.1 and python-3.12.3.
> > Sagemath is the master branch from git.
> > It fails to build sagelib-10.4. If i search for errors in log i could 
> find
> > lines related to flint.
>
> Install sci-mathematics/flint-3.1.3_p1, re-run ./configure, and try again?
>

-- 
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/fea89543-9fb9-4113-aa45-88916c994a76n%40googlegroups.com.


Re: [sage-devel] Sage-10.4 fails to build

2024-08-02 Thread Niranjana K M
On Sat, Aug 3, 2024 at 1:29 AM François Bissey  wrote:

>
>
> On 3/08/24 07:17, Michael Orlitzky wrote:
> > On Fri, 2024-08-02 at 07:09 -0700, Niranjana K M wrote:
> >> At first I had flint-3.1.0 from Gentoo portage. Got same errors and
> build
> >> failed. The I uninstalled flint and its dependents from Gentoo and let
> the
> >> Sage choose its flint spkg. Again it also failed with same errors.
> >>
> >
> > These errors,
> >
> >> local/include/flint/nmod_mpoly_factor.h:366:49: error: expected ')'
> before '__extension__'
> >
> > arise from flint's use of the variable name "I" in a few places. C99
> > technically forbids that IIRC. Our flint-3.1.3_p1 package (but no
> > earlier versions) contain a patch from Dima to fix the issue.
> >
> > We were expecting people to hit this with gcc-14 which is still
> > unstable, but I guess some of the patches that have been backported to
> > your 13.3.1_p20240614 trigger it. I've filed a stabilization request
> > for flint-3.1.3_p1 to get ahead of the problem.
> >
> >
>
> Yes, that weirded me out in
> https://github.com/cschwan/sage-on-gentoo/issues/789
> But not everyone with a gcc-13.3.x compiler is affected, so there maybe
> something more subtle at play. Maybe a compiler use flag?
>
> May be the Gentoo Hardened gcc?
  $ gcc --version
  gcc (Gentoo Hardened 13.3.1_p20240614 p17) 13.3.1 20240614

-- 
> 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/809bfefd-05a3-4264-8fc3-a5f58c240739%40gmail.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/CAMcUJ1uV3a5_PUYHTtG_qfHKFEBQW9xrfDM2b2bAeFFLx3iVkA%40mail.gmail.com.


Re: [sage-devel] Sage-10.4 fails to build

2024-08-03 Thread Niranjana K M
I could build till sagelib with the patched flint.
Now I get an error in building doc.

[spkg-install] [reference] WARNING: unsupported theme option
'source_view_link' given
[spkg-install] [reference] The HTML pages are in
../../local/share/doc/sage/html/en/reference/references.
[spkg-install] Error building the documentation.
[spkg-install] Traceback (most recent call last):
[spkg-install]   File "", line 198, in _run_module_as_main
[spkg-install]   File "", line 88, in _run_code
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 530,
in 
[spkg-install] sys.exit(main())
[spkg-install]  ^^
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 526,
in main
[spkg-install] builder()
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 827,
in _wrapper
[spkg-install] getattr(DocBuilder, build_type)(self, *args, **kwds)
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 163,
in f
[spkg-install] runsphinx()
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line
319, in runsphinx
[spkg-install] sys.stderr.raise_errors()
[spkg-install]   File
"/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line
255, in raise_errors
[spkg-install] raise OSError(self._error)
[spkg-install] OSError: WARNING: unsupported theme option
'source_view_link' given

I am in `develop` branch 10.5.beta1 in Gentoo linux. The log files are
attached herewith.

Search leads me to this link
https://github.com/pradyunsg/furo/discussions/802
According to it, it is now fixed in furo-2024.07.18 which is also the spkg
version in develop branch.
But I had furo-2024.5.6 installed through Gentoo and the build picked it up
and used the system installed furo.
May be it needs furo version restriction in build scripts to avoid picking
old furo.


On Sat, Aug 3, 2024 at 1:41 AM François Bissey  wrote:

>
>
> On 3/08/24 08:06, Niranjana K M wrote:
> >
> >
> > On Sat, Aug 3, 2024 at 1:29 AM François Bissey  > <mailto:frp.bis...@gmail.com>> wrote:
> >
> >
> >
> > On 3/08/24 07:17, Michael Orlitzky wrote:
> >  > On Fri, 2024-08-02 at 07:09 -0700, Niranjana K M wrote:
> >  >> At first I had flint-3.1.0 from Gentoo portage. Got same errors
> > and build
> >  >> failed. The I uninstalled flint and its dependents from Gentoo
> > and let the
> >  >> Sage choose its flint spkg. Again it also failed with same
> errors.
> >  >>
> >  >
> >  > These errors,
> >  >
> >  >> local/include/flint/nmod_mpoly_factor.h:366:49: error: expected
> > ')' before '__extension__'
> >  >
> >  > arise from flint's use of the variable name "I" in a few places.
> C99
> >  > technically forbids that IIRC. Our flint-3.1.3_p1 package (but no
> >  > earlier versions) contain a patch from Dima to fix the issue.
> >  >
> >  > We were expecting people to hit this with gcc-14 which is still
> >  > unstable, but I guess some of the patches that have been
> > backported to
> >  > your 13.3.1_p20240614 trigger it. I've filed a stabilization
> request
> >  > for flint-3.1.3_p1 to get ahead of the problem.
> >  >
> >  >
> >
> > Yes, that weirded me out in
> > https://github.com/cschwan/sage-on-gentoo/issues/789
> > <https://github.com/cschwan/sage-on-gentoo/issues/789>
> > But not everyone with a gcc-13.3.x compiler is affected, so there
> maybe
> > something more subtle at play. Maybe a compiler use flag?
> >
> > May be the Gentoo Hardened gcc?
> > $ gcc --version
> >gcc (Gentoo Hardened 13.3.1_p20240614 p17) 13.3.1 20240614
> >
>
> Yes, that kind of thing is important to mention.
>
> --
> 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/26b301e4-d1f8-410d-b2b8-a70d3f6b7272%40gmail.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...@googlegroup

Re: [sage-devel] Sage-10.4 fails to build

2024-08-04 Thread Niranjana K M
Thank you all for your guidance and support. I could successfully build
sagemath-10.5.beta1.

PS: Happy to see Gentoos in the group.

On Sun, 4 Aug 2024, 12:11 pm Niranjana K M,  wrote:

> I could build till sagelib with the patched flint.
> Now I get an error in building doc.
>
> [spkg-install] [reference] WARNING: unsupported theme option
> 'source_view_link' given
> [spkg-install] [reference] The HTML pages are in
> ../../local/share/doc/sage/html/en/reference/references.
> [spkg-install] Error building the documentation.
> [spkg-install] Traceback (most recent call last):
> [spkg-install]   File "", line 198, in _run_module_as_main
> [spkg-install]   File "", line 88, in _run_code
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 530,
> in 
> [spkg-install] sys.exit(main())
> [spkg-install]  ^^
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/__main__.py", line 526,
> in main
> [spkg-install] builder()
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 827,
> in _wrapper
> [spkg-install] getattr(DocBuilder, build_type)(self, *args, **kwds)
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/builders.py", line 163,
> in f
> [spkg-install] runsphinx()
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line
> 319, in runsphinx
> [spkg-install] sys.stderr.raise_errors()
> [spkg-install]   File
> "/mnt/vol_05/for-gentoo/sage/sage/src/sage_docbuild/sphinxbuild.py", line
> 255, in raise_errors
> [spkg-install] raise OSError(self._error)
> [spkg-install] OSError: WARNING: unsupported theme option
> 'source_view_link' given
>
> I am in `develop` branch 10.5.beta1 in Gentoo linux. The log files are
> attached herewith.
>
> Search leads me to this link
> https://github.com/pradyunsg/furo/discussions/802
> According to it, it is now fixed in furo-2024.07.18 which is also the spkg
> version in develop branch.
> But I had furo-2024.5.6 installed through Gentoo and the build picked it
> up and used the system installed furo.
> May be it needs furo version restriction in build scripts to avoid picking
> old furo.
>
>
> On Sat, Aug 3, 2024 at 1:41 AM François Bissey 
> wrote:
>
>>
>>
>> On 3/08/24 08:06, Niranjana K M wrote:
>> >
>> >
>> > On Sat, Aug 3, 2024 at 1:29 AM François Bissey > > <mailto:frp.bis...@gmail.com>> wrote:
>> >
>> >
>> >
>> > On 3/08/24 07:17, Michael Orlitzky wrote:
>> >  > On Fri, 2024-08-02 at 07:09 -0700, Niranjana K M wrote:
>> >  >> At first I had flint-3.1.0 from Gentoo portage. Got same errors
>> > and build
>> >  >> failed. The I uninstalled flint and its dependents from Gentoo
>> > and let the
>> >  >> Sage choose its flint spkg. Again it also failed with same
>> errors.
>> >  >>
>> >  >
>> >  > These errors,
>> >  >
>> >  >> local/include/flint/nmod_mpoly_factor.h:366:49: error: expected
>> > ')' before '__extension__'
>> >  >
>> >  > arise from flint's use of the variable name "I" in a few places.
>> C99
>> >  > technically forbids that IIRC. Our flint-3.1.3_p1 package (but no
>> >  > earlier versions) contain a patch from Dima to fix the issue.
>> >  >
>> >  > We were expecting people to hit this with gcc-14 which is still
>> >  > unstable, but I guess some of the patches that have been
>> > backported to
>> >  > your 13.3.1_p20240614 trigger it. I've filed a stabilization
>> request
>> >  > for flint-3.1.3_p1 to get ahead of the problem.
>> >  >
>> >  >
>> >
>> > Yes, that weirded me out in
>> > https://github.com/cschwan/sage-on-gentoo/issues/789
>> > <https://github.com/cschwan/sage-on-gentoo/issues/789>
>> > But not everyone with a gcc-13.3.x compiler is affected, so there
>> maybe
>> > something more subtle at play. Maybe a compiler use flag?
>> >
>> > May be the Gentoo Hardened gcc?
>> > $ gcc --version
>> >gcc (Gentoo Hardened 13.3.1_p20240614 p17) 13.3.1 20240614
>> >
>>
>> Yes, that kind of thing is important to mention.
>>
>> --
>> 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/26b301e4-d1f8-410d-b2b8-a70d3f6b7272%40gmail.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/CAMcUJ1tNax7-_7tdp-VQ-G0RhddM5YTDKR14gCDDs9QjOtTKXg%40mail.gmail.com.


Re: [sage-devel] Sage-10.4 fails to build

2024-08-04 Thread Niranjana K M
>
>
>
> for me, the build with Gentoo system furo-2024.5.6 works.
> (your error  could be due to other sphinx-related packages - I have
> all the sphinx* - Sage packages coming from the system
> as well)
>

After updating furo alone the build completed successfully.

Now in Gentoo portage they removed all other furo leaving only the recent
one. Also they removed all other flint leaving the patched one (also they
marked it stable). Thank you for the patch.

-- 
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/CAMcUJ1subRENJByw-0D6n3FChXAhQOHx3u-CV2VfCepCeaTRDg%40mail.gmail.com.


Re: [sage-devel] Re: A new logo?

2024-10-20 Thread Niranjana K M
Sigmoidal + circles + exponential + Euler spiral

[image: logo2.png]



*Regards*
*Niranjana*


On Sun, Oct 20, 2024 at 2:55 PM Kwankyu Lee  wrote:

> The background is actually transparent.
>
> --
> 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/16fbda06-1da8-487b-bcaf-5fe9c30e7e31n%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/CAMcUJ1to%2BbWsSEs31r611guiaE6sHGLE1VUA_AziPmYridwQGQ%40mail.gmail.com.