Re: [sage-devel] Graph([(0,'a')]).vertices() raises exception

2022-08-21 Thread 'Travis Scrimshaw' via sage-devel
I think it is a very bad idea to have default sorting based upon hashing. 
This could make a lot of output appear seemingly random (despite having a 
natural order), nor there is no way to deal consistently with hash 
collisions. This would cause far more problems than it would solve when 
working with incomparable objects.

Best,
Travis


On Friday, August 19, 2022 at 9:05:23 PM UTC+9 ggun...@gmail.com wrote:

> On Wed, Jul 13, 2022 at 5:46 PM John H Palmieri  
> wrote:
> >
> > "Fix your old code" could just mean using `vertices(sort=False)`. See 
> also https://trac.sagemath.org/ticket/22349.
> >
>
> fixing the sort() appears easy:
>
> >>> li=['a',0]
> >>> li.sort(key=hash);li
> [0, 'a']
>

-- 
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/7891a0c7-8a26-47e5-be9d-0dbb8775b060n%40googlegroups.com.


[sage-devel] Re: Useful methods for graphics objects

2022-08-21 Thread 'Travis Scrimshaw' via sage-devel
I am not sure how much I support that because there is no metric. If you 
are working with the Euclidean metric (the usual one you are used to), then 
you can do

sage: l = line3d([(1,2,3), (4,5,6)])
sage: V = RR^3
sage: (V(l.points[1]) - V(l.points[0])).norm()
5.19615242270663

There could also be other natural interpretations of length here, such as 
the number of (non-colinear) segments.

Is this more pedagogical or are you using 3d line segments in some 
meaningful way?

Best,
Travis

On Friday, August 19, 2022 at 6:26:31 PM UTC+9 Kwankyu Lee wrote:

> Hi,
>
> I wish  that this would work:
>
> sage: l = line3d([(1,2,3),(2,2,3)])
> sage: l.length()
> 1
>
> Is there already a handy way to get the same result in Sage?
>
> You can image other useful methods attached to a graphics object.
>
>
>
>

-- 
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/7ba749b5-e6d2-4024-973f-ff9832b36e12n%40googlegroups.com.


Re: [sage-devel] Re: MSC-2020 -- Class 52: Convex and Discrete Geometry -- CAS Citations from 2000 to 2021

2022-08-21 Thread Thierry
Hi,

let me take the opportunity to promote the use of the get_systems
function from sage.misc.citation which allows to see and acknowledge
which upstream packages were used by Sage for some computation, e.g.

sage: from sage.misc.citation import get_systems
sage: R. = PolynomialRing(QQ)
sage: I = R.ideal([R.random_element(), R.random_element()])
sage: get_systems('I.groebner_basis()')
['Singular']

Ciao,
Thierry


On Fri, Aug 12, 2022 at 03:13:11AM -0700, 'Travis Scrimshaw' via sage-devel 
wrote:
> Indeed, it is not only great to see that Sage is increasing in the number 
> of citations* but also the total number of papers citing mathematics 
> software.
> 
> Best,
> Travis
> 
> * In algebraic combinatorics, I sometimes notice that people give an 
> acknowledgement that they have used Sage to help with their paper without 
> actually citing Sage. This makes it harder for simple data mining tools to 
> pick up I think. I also know of some papers that have used Sage to 
> construct examples without even an acknowledgement... So there work to do 
> on making sure the broader math community does properly cite (or at least 
> acknowledge) the use of a CAS. (As I say this, I think I forgot to cite 
> Mathematica in one of my papers that one of my coauthors used somewhat 
> extensively...)
> 
> 
> On Friday, August 12, 2022 at 2:44:10 PM UTC+9 kcrisman wrote:
> 
> > I take this opportunity to thank the Sage community and the developers of 
> >> related softwares integrated for this Huge effort and to let you know of 
> >> the positive comments that I receive form the research community in 
> >> MSC-52. 
> >> THANK YOU SO MUCH!
> >>
> >> If you are interested in a deeper analysis, I produced detailed graphics 
> >> and provide the raw data in a Jupyter notebook on my webpage:
> >>
> >> https://jplab.github.io/sage_cite.html
> >
> >
> > Great post! 
> >
> 
> -- 
> 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/dc80e2fa-a1d8-4fc4-832f-82746b8193d8n%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/20220821185249.GA2876%40metelu.net.


Re: [sage-devel] Fourier series expansion function: fourier_expand()

2022-08-21 Thread Furkan Semih Dündar
Yes. The function (fourier_series_partial_sum) is what I have in mind. Glad
to see that it is implemented.

Best.

21 Ağu 2022 Paz, saat 14:24 tarihinde David Joyner 
şunu yazdı:

> On Sun, Aug 21, 2022 at 7:11 AM Furkan Semih Dündar
>  wrote:
> >
> > Dear All,
> >
> > I want to implement an easy function (afaik is lacking in Sage Math)
> that may be called as "fourier_expand" which will return Fourier series of
> a function (for which integrals can be calculated analytically) up to some
> order N. If integrals cannot be calculated analytically, numerical
> integration might be used, perhaps.
> >
>
> Some of this functionality is in the piecewise module,
>
> https://doc.sagemath.org/html/en/reference/functions/sage/functions/piecewise.html
> Does that have the functionality you want?
>
>
> > I am looking for a suitable place to put this function in /src/sage
> directory.
> >
> > Any suggestions?
> >
> > --
> > Best regards,
> > https://fsemih.org
> > F. Semih Dündar
> >
> > --
> > 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/CAODtkKrcyrjfp8yJU%2BogWFqc2K1QckQeRVQr7z3LTm7DR8Hwow%40mail.gmail.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/CAEQuuAXpgHXOVGkYcRRm9Jo1ZKxH9PwgmMbOXhvcJJZVw33AyA%40mail.gmail.com
> .
>
-- 
Esenliklerle,
https://fsemih.org
F. Semih Dündar

-- 
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/CAODtkKqbns4KgrobPVJbJnd1kSXQkE708M3WsBQMjJWtdbMHOw%40mail.gmail.com.


Re: [sage-devel] Fourier series expansion function: fourier_expand()

2022-08-21 Thread David Joyner
On Sun, Aug 21, 2022 at 7:11 AM Furkan Semih Dündar
 wrote:
>
> Dear All,
>
> I want to implement an easy function (afaik is lacking in Sage Math) that may 
> be called as "fourier_expand" which will return Fourier series of a function 
> (for which integrals can be calculated analytically) up to some order N. If 
> integrals cannot be calculated analytically, numerical integration might be 
> used, perhaps.
>

Some of this functionality is in the piecewise module,
https://doc.sagemath.org/html/en/reference/functions/sage/functions/piecewise.html
Does that have the functionality you want?


> I am looking for a suitable place to put this function in /src/sage directory.
>
> Any suggestions?
>
> --
> Best regards,
> https://fsemih.org
> F. Semih Dündar
>
> --
> 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/CAODtkKrcyrjfp8yJU%2BogWFqc2K1QckQeRVQr7z3LTm7DR8Hwow%40mail.gmail.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/CAEQuuAXpgHXOVGkYcRRm9Jo1ZKxH9PwgmMbOXhvcJJZVw33AyA%40mail.gmail.com.


[sage-devel] Fourier series expansion function: fourier_expand()

2022-08-21 Thread Furkan Semih Dündar
Dear All,

I want to implement an easy function (afaik is lacking in Sage Math) that
may be called as "fourier_expand" which will return Fourier series of a
function (for which integrals can be calculated analytically) up to some
order N. If integrals cannot be calculated analytically, numerical
integration might be used, perhaps.

I am looking for a suitable place to put this function in /src/sage
directory.

Any suggestions?

-- 
Best regards,
https://fsemih.org
F. Semih Dündar

-- 
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/CAODtkKrcyrjfp8yJU%2BogWFqc2K1QckQeRVQr7z3LTm7DR8Hwow%40mail.gmail.com.