Ask Your Question

Szabolcs's profile - activity

2019-03-01 07:09:23 -0500 commented answer Importing Python packages into Sage or Vice Versa

This does not work for the same reason edenharder said. I am using Sage on macOS, and Sage is supposed to be fully self-contained. It should contain all libraries needed. The problem is not that the OS is missing them.

2019-02-28 08:55:04 -0500 received badge  Good Question (source)
2019-02-25 07:09:24 -0500 commented question Sage takes very long to start—why?

@Juanjo There is no entry in the log that looks relevant. The entries start appearing only after it has started up. Also: I think you misunderstood me: it does not get stuck on the "currently starting" page. That page does not even appear until a couple of minutes after the app was started. Once that page appears at all, everything is fast.

2019-02-25 06:52:24 -0500 received badge  Supporter (source)
2019-02-20 19:53:06 -0500 received badge  Nice Question (source)
2019-02-19 08:16:22 -0500 asked a question Sage takes very long to start—why?

I am using the app version of Sage on macOS 10.14.3. Both version 8.5 and 8.6 take very long to start up. As I remember, previous versions were fine.

Does anyone else experience this problem (on the same OS with the same versions) and is there a simple solution? How can I debug what is happening?

By "slow to start" I mean that after starting the app, nothing at all happens for 1-2 minutes (!). Only _after_ that do I see a browser window with "The SageNB server or Jupyter is currently starting".

The command line executable SageMath.app/sage within the app bundle starts very quickly (but this one does not launch the notebook interface). If I start SageMath.app/Contents/MacOS/Sage, startup is also very fast (and this time I do get the notebook). The problem appears only when I launch the app by double-clicking it.

2018-01-18 10:42:29 -0500 received badge  Famous Question (source)
2016-09-27 05:25:49 -0500 received badge  Notable Question (source)
2016-04-06 19:26:03 -0500 received badge  Nice Question (source)
2016-02-06 15:21:03 -0500 received badge  Famous Question (source)
2016-01-18 13:55:44 -0500 received badge  Popular Question (source)
2015-04-29 10:42:25 -0500 received badge  Notable Question (source)
2015-02-26 15:22:17 -0500 received badge  Popular Question (source)
2014-11-14 14:00:32 -0500 asked a question How to simplify with Sage?

Does Sage have a function to simplify symbolic expressions in a similar way to how the other major CAS do it? I.e. use heuristics to try to come up with a form which is likely to seem simpler to humans, which is certainly subjective and cannot be done perfectly, but it's also certainly very useful.

simplify doesn't do this, and the documentation is a bit confusing: it says that f = I + x - x; simplify(f) gives I, but so does just printing f. So what's the point of simplify?

I'm sure there must be a function that does this, as I beieve Sage includes several good CAS, I just can't find it.

Some examples to try:

(sqrt(2) - 1)*(sqrt(2)+1)

1/(3*(1 + x)) - (2*x - 1)/(6*(x^2 - x + 1)) + 2/(3*(1 + ((2*x - 1)^2)/3))

(Second one taken from Mathematica documentation.)

I know I can play with expand and factor but is there a less manual way?

2014-08-21 14:41:39 -0500 received badge  Scholar (source)
2014-08-21 12:08:53 -0500 commented answer How to plot histogram from list?

Sorry about the basic question, but when using Matplotlib, does the figure actually get saved to disk by `plt.savefig`? If yes, where, and do I need to clean it up afterwards? I do not want to keep these figures except as part of the notebook.

2014-08-21 08:45:31 -0500 commented answer How to plot histogram from list?

Thanks! Could you please look at the clarifications I put in the question? Is it difficult to do these things with Sage? Do you also recommend I just use the R interface, like Thomas did?

2014-08-21 08:44:35 -0500 commented question How to plot histogram from list?

@Thomas Thanks, that's probably what I will do.

2014-08-21 04:19:18 -0500 received badge  Student (source)
2014-08-20 22:02:30 -0500 received badge  Editor (source)
2014-08-20 22:00:27 -0500 asked a question How to plot histogram from list?

Given a list of numbers, such as [5,3,6,1,...], how can I create a histogram from them and show it directly in the notebook interface?

Clarification: 5, 3, 6, 1, ... should not be used for the heights of bars. Instead, the data should be binned first to create a histogram.


Given a list of pairs, such as [[2,3], [4,5], ...], how can I create a 2D histogram form them and show it as a plot similar to this? (I.e. clearly distinguish zero counts from small non-zero counts, and show it as a matrix plot, not as a 3D bar chart.)

Clarification: How can I use a colour scheme in matrix_plot that will clearly differentiate between zero and non-zero values? E.g. use white for zero and some colour gradient for non-zero. 0 and 0.0001 should show clearly differently. How do I achieve this with the cmap parameter?