Ask Your Question

Jeroen Demeyer's profile - activity

2018-06-27 00:32:51 -0600 answered a question Pari error when factoring polynomial

This is a known (but fixed) bug in PARI/GP: https://pari.math.u-bordeaux.fr/cgi-b...

If you know how to patch Sage, applying https://trac.sagemath.org/ticket/25567 will fix it.

2018-06-19 02:57:16 -0600 answered a question PARI/GP error in wrapping custom-defined PARI functions in Sage using the command gp.set()

Instead of saying "it shows a PARI/GP error", show the actual error that you see. That makes it easier for people to answer your question, increasing the changes of getting a reply. See also https://www.chiark.greenend.org.uk/~s...

2018-03-01 10:13:57 -0600 answered a question SageMath and interact / ipywidgets with jupyter

And I forgot the obvious: clear your browser cache! You might be using a cached newer version of the widgets JavaScript.

2018-03-01 03:02:56 -0600 commented question SageMath and interact / ipywidgets with jupyter

Just something to try: does the working directory make a difference? Could you try running the Sage-Jupyter-in-anaconda from the Sage root directory?

2017-11-13 07:04:01 -0600 answered a question using sage library in C or C++?

I obviously don't know your exact use case. First of all, this has nothing to do with Sage, it is really a Python question.

Embedding Python in C is explained here: https://docs.python.org/2/extending/e...

Alternatively: instead of using Sage in your C/C++ program, you could reverse this and use your C/C++ program inside Sage. That is relatively easy using Cython.

2017-10-22 15:56:44 -0600 answered a question UnicodeDecodeError when doing nothing with strings

This is a known IPython problem: https://github.com/ipython/ipython/pu...

2017-09-30 12:36:35 -0600 received badge  Enlightened (source)
2017-09-30 12:36:35 -0600 received badge  Good Answer (source)
2017-09-29 06:03:17 -0600 commented question Leaving the slider value editable

Note that the @interact implementations from the legacy Sage notebook (SageNB), SageCell and Jupyter are all different and independent. So, it is very well possible that things work with one implementation, but not the other. I just tried your examples in Jupyter, and they both work for me.

2017-09-29 05:45:44 -0600 answered a question sage LD_LIBRARY_PATH

I think the easiest solution is to install your library and bindings inside the Sage environment instead of in /opt/mylib. Run

sage --sh

which will drop you in a "Sage shell". Now, install your stuff in $SAGE_LOCAL. For an autotools project, this would be

./configure --prefix="$SAGE_LOCAL" && make && make install

For a Python project, plain pip will work:

pip install PKGNAME
2017-09-28 15:37:55 -0600 received badge  Nice Answer (source)
2017-09-28 10:37:36 -0600 answered a question Displaying images with matplotlib

Easy: use plt.show() to actually show the plot instead of saving it to a file:

from scipy import stats
import numpy as np
import matplotlib.pyplot as plt

@interact
def plot_norm(loc=(0,(0,10)), scale=(1,(1,10))):
    rv = stats.norm(loc, scale)
    x = np.linspace(-10,10,1000)
    plt.plot(x,rv.pdf(x))
    plt.grid(True)
    plt.show()
2015-11-05 11:09:27 -0600 received badge  Necromancer (source)
2015-11-05 10:41:53 -0600 answered a question Unhandled SIGSEGV in Sage 6.8

Could it be that you're running out of memory and Sage doesn't handle this properly?

2014-02-15 21:53:48 -0600 answered a question Save and retrieving my data
2014-02-15 21:48:03 -0600 commented question Flint compile error sage libgmp (.so.11) clash with installed one '.so.10'

Please format such reports as code, to make them more readable.

2014-02-15 21:47:44 -0600 answered a question Flint compile error sage libgmp (.so.11) clash with installed one '.so.10'

It seems like something in Sage broke your C compiler. What was the last package to install successfully before FLINT failed (see logs/install.log for that)?

From the Sage root directory, what is the output of

$ ./sage --sh
(sage-sh) ldd /opt/gnu/packages/gcc-4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/cc1
2014-02-15 21:38:03 -0600 answered a question resultant and gcd over real ?

If you define your polynomial ring as follows, it does work:

sage: P.<y> = PolynomialRing(RR)
sage: R.<x> = PolynomialRing(P)
sage: a = x^2 + y
sage: b = x - y^2
sage: a.resultant(b)
2014-02-15 21:33:12 -0600 answered a question question about hilbert_class_polynomial

What matters is not the polynomial, but the field extension defined by the polynomial. So probably both answers are correct, in the sense that they both define the same field.

2014-02-08 23:10:31 -0600 commented question build sage without documentation

`make -j8` doesn't work for the documentation, since the documentation doesn't actually use `make`. `MAKE="make -j8" make` does work in all cases (because we can read the environment variable `MAKE` from Python).

2014-02-04 21:49:13 -0600 received badge  Editor (source)
2014-02-04 21:48:42 -0600 answered a question Accessing resources from another project

It works for me.

Adding a directory to ~/.local/lib/python2.7/site-packages/local.pth and starting up Sage shows that the directory in local.pth is indeed added to sys.path. Are you sure your paths are correct?

2014-01-29 17:36:48 -0600 received badge  Teacher (source)
2014-01-29 07:10:01 -0600 answered a question AttributeError: 'NumberFieldFractionalIdeal' object has no attribute 'ray_class_number'

Version 5.12 of Sage is too old. This functionality was only added to Sage 5.13.

2014-01-29 02:33:49 -0600 commented question sage.libs.pari.gen.PariError: (5)

You should enter the *complete* command which failed (what are K and G?)