Ask Your Question

dsejas's profile - activity

2024-04-10 06:02:46 +0200 answered a question Grid on a Matrixplot

Hello, @Cyrille! I am not 100% if the following is what you want, but I am posting it as an answer because the permalink

2024-03-05 21:34:23 +0200 received badge  Popular Question (source)
2024-02-20 19:16:27 +0200 received badge  Popular Question (source)
2024-02-05 16:51:41 +0200 received badge  Notable Question (source)
2024-01-31 01:16:27 +0200 received badge  Taxonomist
2024-01-15 12:03:19 +0200 received badge  Popular Question (source)
2024-01-12 13:05:33 +0200 asked a question What happened to the `automatic_names()` function?

What happenend to the `automatic_names()` function? Hello, Sage Community. I seem to remember there was a command calle

2023-11-27 05:59:30 +0200 answered a question Indexes in Linear programming

Hello, @Cyrille! At first, I also found this feature from Sage quite annoying. However, I should point out that there is

2023-11-27 04:34:58 +0200 commented answer Limit generating an error

Hello, @Cyrille! I am glad I could help. I took a look at your website and I really enjoyed it, although some parts I h

2023-10-06 08:35:55 +0200 received badge  Nice Answer (source)
2023-09-03 19:02:11 +0200 received badge  Necromancer (source)
2023-09-02 08:55:10 +0200 answered a question graph plot: size of arrow heads

Hello, @pg261! This is not very elegant solution, but I couldn't find any alternative at the moment. However, I believe

2023-08-01 22:07:01 +0200 received badge  Popular Question (source)
2023-08-01 22:07:00 +0200 received badge  Famous Question (source)
2023-08-01 22:06:57 +0200 received badge  Notable Question (source)
2023-08-01 22:06:57 +0200 received badge  Popular Question (source)
2023-07-15 16:51:59 +0200 commented question arrow size in 3d curve plots

Hello, @JC! Please, let me know if this suits your purposes, so I can make it into an answer.

2023-07-15 16:20:08 +0200 answered a question How to compute nPr in sagemath

Hello! I am assuming nPr means "n permutation r". Unfortunately, SageMath doesn't have a command for that purpose. Howev

2023-05-11 19:08:54 +0200 answered a question Limit generating an error

Hey, @Cyrille! I found it useful to pass the taylor=True option to the limit (or lim) function: U_5(x,a,b,γ) = ((1-γ)/

2023-05-11 15:08:19 +0200 received badge  Notable Question (source)
2023-05-06 09:27:59 +0200 received badge  Famous Question (source)
2023-05-06 06:57:54 +0200 answered a question converting string to latex file

Hello, @moon! I am not 100% sure of what you want, but perhaps the following works for you? import operator as op # Py

2023-02-04 04:40:22 +0200 received badge  Famous Question (source)
2022-12-05 15:51:23 +0200 received badge  Popular Question (source)
2022-10-25 17:25:22 +0200 received badge  Famous Question (source)
2022-10-25 17:25:22 +0200 received badge  Notable Question (source)
2022-07-12 22:57:21 +0200 received badge  Notable Question (source)
2022-07-12 22:57:21 +0200 received badge  Popular Question (source)
2022-05-20 14:06:37 +0200 received badge  Good Answer (source)
2022-03-19 18:12:07 +0200 received badge  Nice Answer (source)
2022-03-19 18:09:33 +0200 received badge  Good Question (source)
2022-03-19 18:09:30 +0200 marked best answer Sage doesn't support completely modern string formatting

Hello, Sage community!

Modern Python 3 defines various way to printing formatted strings. Here are some examples:

myconst = N(3/8)
print('Hello, world of %.2f'%(myconst))
print('Hello, world of {:.2f}'.format(myconst))
print(f'Hello, world of {myconst:.2f}')

The first example should be the most known and common. The second example uses the format method, and the third uses f-strings. Unfortunately, these two last forms of formatted strings aren't supported by Sage. For example,

print('Hello, world of {:.2f}'.format(myconst))

prints the following traceback

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-6336f0c43d90> in <module>()
----> 1 print('Hello, world of {:.2f}'.format(myconst))

TypeError: unsupported format string passed to sage.rings.real_mpfr.RealNumber.__format__

Exactly the same error and traceback are issued with the third example.

Now, on the other hand, if no string conversion specification is used, these work fine:

print('Hello, world of {}'.format(myconst))
print(f'Hello, world of {myconst}')

Also, try using pi instead of myconst. Works fine withN(pi), but not with N(myconst); this seems an inconsistent behavior.

Is there some workaround for this problem? Should it be reported as a bug/enhancement?

2022-03-19 16:04:53 +0200 edited answer Is there a way to center a sagecell result

Hello, @Cyrille! As pointed by slelievre, I could have used a minimal working example; however, from what I understand,

2022-03-19 16:03:11 +0200 answered a question Is there a way to center a sagecell result

Hello, @Cyrille! As pointed by slelievre, I could have used a minimal working example; however, from what I understand,

2022-03-19 15:41:26 +0200 answered a question Why do I have to define a function using python code def for the formatted output to work?

Hello, @chazzs! By commenting the first line and uncommenting the third as you suggested, gives the following error mess

2022-03-19 15:28:59 +0200 answered a question Vandermonde Matrix

Hello! Based on the statement of the question, this seems to be homework. It is important that you do it yourself withou

2022-03-19 15:06:57 +0200 edited answer Area under two curves

Hello, @Sagematherireland! You are in the right track (you almost got it done!) The fill argument for the plot command c

2022-03-19 15:06:39 +0200 answered a question Area under two curves

Hello, @Sagematherireland! You are in the right track (you almost got it done!) The fill argument for the plot command c

2022-03-07 14:24:54 +0200 received badge  Notable Question (source)
2022-03-05 22:34:02 +0200 received badge  Good Answer (source)
2022-02-28 19:53:20 +0200 received badge  Nice Answer (source)
2022-02-28 17:22:39 +0200 answered a question Assume a function is real-valued

Hello, @ripple_carry! The easiest way I know of achieving that effect is to explicitly declare the imaginary part of the

2022-02-19 15:28:32 +0200 commented question Changing one letter in integrand causes sagemath/giac crash

Hello! Just read a little bit a bout this issue. Unfortunately, I cannot reproduce Emmanuel's output. For {u:u._giac_()

2022-02-08 00:06:05 +0200 received badge  Popular Question (source)
2022-02-08 00:06:05 +0200 received badge  Notable Question (source)
2022-01-09 20:08:35 +0200 received badge  Famous Question (source)
2022-01-04 06:19:30 +0200 received badge  Notable Question (source)
2021-10-25 15:36:14 +0200 received badge  Nice Answer (source)
2021-09-27 18:13:53 +0200 edited question Difference between solve's `r` and `c` solution parameters

Difference between `solve`'s `r` and `c` solution parameters Hello, everybody! The author of this related question point

2021-09-27 18:13:35 +0200 edited question Difference between solve's `r` and `c` solution parameters

Difference between `r` and `c` solution parameters Hello, everybody! The author of this related question pointed out an