Ask Your Question

stockh0lm's profile - activity

2024-02-14 02:02:26 +0100 received badge  Nice Question (source)
2023-11-13 07:55:49 +0100 received badge  Famous Question (source)
2023-08-15 09:36:19 +0100 received badge  Notable Question (source)
2023-07-24 16:41:31 +0100 received badge  Famous Question (source)
2023-07-01 17:41:18 +0100 received badge  Popular Question (source)
2023-03-05 03:06:42 +0100 received badge  Popular Question (source)
2022-11-19 21:23:11 +0100 received badge  Popular Question (source)
2022-10-25 17:52:19 +0100 received badge  Notable Question (source)
2022-09-14 20:37:16 +0100 received badge  Popular Question (source)
2022-06-14 22:15:59 +0100 received badge  Notable Question (source)
2021-12-15 01:06:28 +0100 received badge  Famous Question (source)
2021-05-14 08:08:04 +0100 received badge  Popular Question (source)
2021-01-06 21:26:13 +0100 received badge  Famous Question (source)
2020-12-21 23:08:35 +0100 received badge  Nice Question (source)
2020-12-21 17:58:11 +0100 received badge  Notable Question (source)
2020-12-21 17:58:11 +0100 received badge  Popular Question (source)
2020-10-01 11:19:04 +0100 received badge  Popular Question (source)
2020-07-16 22:48:00 +0100 received badge  Popular Question (source)
2020-06-06 04:26:05 +0100 received badge  Popular Question (source)
2020-05-05 14:26:07 +0100 received badge  Notable Question (source)
2020-05-02 13:36:00 +0100 received badge  Nice Question (source)
2020-05-02 13:32:49 +0100 received badge  Notable Question (source)
2020-03-23 19:40:53 +0100 received badge  Popular Question (source)
2020-02-10 03:38:35 +0100 received badge  Popular Question (source)
2019-12-26 05:02:11 +0100 received badge  Popular Question (source)
2019-12-16 20:21:59 +0100 commented answer import error on debian

i run debian testing on this computer. which is a screw-up on my part. I installed binary packages from debian, and now i have a version mismatch, i guess. i try to figure out which package to install from unstable to fix the issue.

2019-12-16 17:32:22 +0100 answered a question import error on debian

the brot.sage.py file that gets generated automatically from my brot.sage file looks like this:

# This file was *autogenerated* from the file brot.sage
from sage.all_cmdline import *   # import sage library

_sage_const_3 = Integer(3); _sage_const_0p8 = RealNumber('0.8'); _sage_const_0p85 = RealNumber('0.85'); _sage_const_0p4 = RealNumber('0.4'); _sage_const_0p6 = RealNumber('0.6')
R, W, R_S, H, H_S, S = var('R W R_S H H_S S')

equations = [ S                 == R_S + H_S,
              R_S               == H_S,
              (R + R_S + W)     == _sage_const_3  * R_S,
              _sage_const_0p8 *(W+R+R_S)     == H + H_S,
              W/(W+R+R_S)       == _sage_const_0p6 ,
              R + W+ S +H       == _sage_const_0p85 ]

print solve(equations,[R, W, R_S, H, H_S,S ], algorithm="sympy", solution_dict=False)

And that looks a lot like my input file. It gets re-created if i delete it, too. I see the lines leading up to the stacetrace, too.

Its great that it works for you, though.

Where can start tracking down this problem?

2019-11-16 22:56:32 +0100 asked a question import error on debian

I get this error

 sage ~/src/brot.sage
Traceback (most recent call last):
  File "/home/andreas/src/brot.sage.py", line 3, in <module>
    from sage.all_cmdline import *   # import sage library
  File "/usr/lib/python2.7/dist-packages/sage/all_cmdline.py", line 26, in <module>
    from sage.all import *
  File "/usr/lib/python2.7/dist-packages/sage/all.py", line 102, in <module>
    from sage.modular.all    import *
  File "/usr/lib/python2.7/dist-packages/sage/modular/all.py", line 4, in <module>
    from .quatalg.all import *
  File "/usr/lib/python2.7/dist-packages/sage/modular/quatalg/__init__.py", line 4, in <module>
    from . import all
  File "/usr/lib/python2.7/dist-packages/sage/modular/quatalg/all.py", line 3, in <module>
    from .brandt import BrandtModule
  File "/usr/lib/python2.7/dist-packages/sage/modular/quatalg/brandt.py", line 206, in <module>
    from sage.modular.hecke.all import (AmbientHeckeModule, HeckeSubmodule, HeckeModuleElement)
  File "/usr/lib/python2.7/dist-packages/sage/modular/hecke/all.py", line 20, in <module>
    from .ambient_module import AmbientHeckeModule, is_AmbientHeckeModule
  File "/usr/lib/python2.7/dist-packages/sage/modular/hecke/ambient_module.py", line 38, in <module>
    from sage.modular.arithgroup.all import Gamma0 # for Sturm bound
  File "/usr/lib/python2.7/dist-packages/sage/modular/arithgroup/__init__.py", line 4, in <module>
    from . import all
  File "/usr/lib/python2.7/dist-packages/sage/modular/arithgroup/all.py", line 6, in <module>
    from .congroup_generic import is_CongruenceSubgroup, CongruenceSubgroup_constructor as CongruenceSubgroup
  File "/usr/lib/python2.7/dist-packages/sage/modular/arithgroup/congroup_generic.py", line 28, in <module>
    from sage.groups.matrix_gps.all import MatrixGroup
  File "/usr/lib/python2.7/dist-packages/sage/groups/matrix_gps/all.py", line 13, in <module>
    import sage.groups.matrix_gps.pickling_overrides
  File "/usr/lib/python2.7/dist-packages/sage/groups/matrix_gps/pickling_overrides.py", line 7, in <module>
    from sage.groups.matrix_gps.finitely_generated import FinitelyGeneratedMatrixGroup_gap
  File "/usr/lib/python2.7/dist-packages/sage/groups/matrix_gps/finitely_generated.py", line 81, in <module>
    from sage.groups.matrix_gps.matrix_group import (
  File "/usr/lib/python2.7/dist-packages/sage/groups/matrix_gps/matrix_group.py", line 61, in <module>
    from sage.groups.libgap_wrapper import ParentLibGAP
  File "sage/libs/gap/element.pxd", line 32, in init sage.groups.libgap_wrapper (build/cythonized/sage/groups/libgap_wrapper.c:9846)
ImportError: /usr/lib/python2.7/dist-packages/sage/libs/gap/element.x86_64-linux-gnu.so: undefined symbol: _GAP_SetEnterStackCount

with this file: cat brot.sage

R, W, R_S, H, H_S, S = var('R W R_S H H_S S')

equations = [ S                 == R_S + H_S,
              R_S               == H_S,
              (R + R_S + W)     == 3 * R_S,
              0.8*(W+R+R_S)     == H + H_S,
              W/(W+R+R_S)       == 0.6,
              R + W+ S +H       == 0.85]

print solve(equations,[R, W, R_S, H, H_S,S ], algorithm="sympy", solution_dict=False)


sage --version
SageMath version 8.6, Release Date: 2019-01-15

I would like to calculate my bread receipt... what is the issue here? This used to work before.

2019-05-01 20:46:03 +0100 marked best answer how to append to a symbolic expression in a loop?

This must be super basic, but i don't get how to do the classic

for i in list:
    expression = expression + i

symbolically. I want to add new terms to the expression, and the "==" notation does not mash well with that.

An .append() method would make sense, but i was not able to find one.

2019-04-29 20:25:14 +0100 commented answer What could be reasons for latex() output to stop working?

You are right, it was cocalc.org where the latex output worked. I think i didn't use it on my local linux yet.

2019-04-29 19:39:45 +0100 asked a question flipping a graph to plot upside down

Because in my special application positive values on my y-axis increase downwards instead of upwards.

So while normally you would do this:

x,y = var('x,y')
f(x,y) = x^2 + y^2
contour_plot(f, (x,0,1), (y,0,1)).show()

(where y plots from smaller numbers to bigger ones) I instead want to do this:

x,y = var('x,y')
f(x,y) = x^2 + y^2
contour_plot(f, (x,0,1), (y,1,0)).show()

where I expect the same picture, just flipped upside down. Except, this bombs! How can i get my desired result? the axis should be properly labeled, too.

2019-04-29 13:49:14 +0100 asked a question What could be reasons for latex() output to stop working?

In the past i used the latex() output to generate latex source to use in my paper. This stopped working at some point, on three independent linux systems. Even sage scripts that produced such latex source code in the past don't do so anymore.

for example

epsilon_0 = var('epsilon_0', latex_name=r'\varepsilon_0')
latex(epsilon_0)

produces no output, not on the command line nor in my emacs Sage output buffer.

I assume i must have broken something. Where can I look? i use debian, and the debian sage packages to install and use sage.

Edit: correction: on two of the three system the latex() command does nothing, on the third it works. I can use that third system to generate the latex source for now. But it would be swell to fix on the other systems, too. The third system where it works is an Ubuntu, where i installed sage from source.

2019-04-28 23:25:23 +0100 commented answer How can I plot error bars for functions?

i downloaded and integrated your source and resulting plot. thank you very much. you can remove the file now.

2019-04-28 17:00:09 +0100 marked best answer How can I plot error bars for functions?

So far i plotted an upper and lower bound to my functions (as separate overlayed functions) and I liked that solution a lot. Now a colleague said that error bars were nicer. Can sage plot those? I searched and didnt find any.

The code I use currently is from this helpful comment from rburing: https://ask.sagemath.org/question/454...

2019-04-28 17:00:09 +0100 commented answer How can I plot error bars for functions?

https://drive.google.com/drive/folder...

here is my code. i changed it like you suggested (i think) but now it plots just one error bar per pic and the last plot is funny.