Ask Your Question

Jeroen Demeyer's profile - activity

2018-06-27 07:32:51 +0200 answered a question Pari error when factoring polynomial

This is a known (but fixed) bug in PARI/GP:

If you know how to patch Sage, applying will fix it.

2018-06-19 09:57:16 +0200 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

2018-03-01 17:13:57 +0200 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 10:02:56 +0200 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 14:04:01 +0200 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:

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 22:56:44 +0200 answered a question UnicodeDecodeError when doing nothing with strings

This is a known IPython problem:

2017-09-30 19:36:35 +0200 received badge  Good Answer (source)
2017-09-30 19:36:35 +0200 received badge  Enlightened (source)
2017-09-29 13:03:17 +0200 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 12:45:44 +0200 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 22:37:55 +0200 received badge  Nice Answer (source)
2017-09-28 17:37:36 +0200 answered a question Displaying images with matplotlib

Easy: use 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

def plot_norm(loc=(0,(0,10)), scale=(1,(1,10))):
    rv = stats.norm(loc, scale)
    x = np.linspace(-10,10,1000)
2015-11-05 18:09:27 +0200 received badge  Necromancer (source)
2015-11-05 17:41:53 +0200 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-16 04:53:48 +0200 answered a question Save and retrieving my data
2014-02-16 04:48:03 +0200 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-16 04:47:44 +0200 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-16 04:38:03 +0200 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-16 04:33:12 +0200 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-09 06:10:31 +0200 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-05 04:49:13 +0200 received badge  Editor (source)
2014-02-05 04:48:42 +0200 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-30 00:36:48 +0200 received badge  Teacher (source)
2014-01-29 14:10:01 +0200 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 09:33:49 +0200 commented question sage.libs.pari.gen.PariError: (5)

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