Ask Your Question

danny's profile - activity

2020-09-14 06:40:30 -0600 received badge  Notable Question (source)
2020-04-29 08:56:47 -0600 received badge  Self-Learner (source)
2020-04-21 00:07:30 -0600 received badge  Notable Question (source)
2020-04-03 04:58:51 -0600 received badge  Popular Question (source)
2020-03-23 08:56:15 -0600 received badge  Famous Question (source)
2020-03-23 08:56:15 -0600 received badge  Notable Question (source)
2020-03-23 08:56:15 -0600 received badge  Popular Question (source)
2019-05-26 15:04:19 -0600 received badge  Famous Question (source)
2019-04-15 10:27:39 -0600 received badge  Popular Question (source)
2018-11-24 02:18:40 -0600 received badge  Notable Question (source)
2018-09-05 07:37:00 -0600 received badge  Popular Question (source)
2018-07-26 07:23:37 -0600 commented question How to show the output of print() in to jupyter notebook?

Since I use jupyter notebook in sagemath, probably from version 7.4, the outputs of print from jupter notebook are alway shown in terninal, not in jupyter notebook.

2018-07-22 00:46:50 -0600 commented question How to show the output of print() in to jupyter notebook?

run the following command in terminal. sage -n jupyter

2018-07-19 11:13:20 -0600 received badge  Commentator
2018-07-19 11:13:20 -0600 commented question How to show the output of print() in to jupyter notebook?

My operating system is MacOS 10.13.5 and My SageMage is installed by using sage-8.2-OSX_10.11.6-x86_64.app.dmg. I find that print command in jupyter notebook always output to terminal from sagemath 7.

2018-07-19 07:50:09 -0600 asked a question How to show the output of print() in to jupyter notebook?

In Sagemath's Jupyter Notebook, The output of print () always is showed into terminal. So for this reason, I can not get output of the functions such as graph_classes.Tree.description(). But in the anacanda's jupyter notebook for python, we can show the output of print() in jupyter notebook. How to solve the problem? Thanks.

2018-02-20 13:19:59 -0600 received badge  Notable Question (source)
2018-01-19 08:57:13 -0600 received badge  Popular Question (source)
2017-07-10 10:04:53 -0600 received badge  Popular Question (source)
2017-04-24 08:35:45 -0600 asked a question Why the value returned by read_data,open... are unavailable in Jupyter notebook

I run the following commands in code cell of jupyternotebook.

indata = tmp_filename()
 f = open(indata, "w")
 f.write("17\n42\n")
 f.close()
 l = read_data(indata, ZZ); l

And I get the following error message:

TypeError: 'NoneType' object is not iterable

But the result is output in terminal.

[I 21:15:07.797 NotebookApp] Saving file at /Untitled.ipynb
[17, 42]

How to solve this problem?

By the way: some functions such as "print", "tmp_filename" also can not output in Jupter notebook. These functions work well in old sage math notebook.

2017-04-22 05:03:52 -0600 received badge  Notable Question (source)
2017-03-24 19:45:53 -0600 answered a question Create a band matrix with repeating and alternating values

image description

2017-03-24 19:28:12 -0600 answered a question Create a band matrix with repeating and alternating values

image description

2017-03-24 09:10:53 -0600 answered a question Turning system of linear equations into a matrix

I give an answer for question 2. See the following : image description

The definition of GenerateMatrix is:

def GenerateMatrix(equsys, vars):
A=matrix([[equ.lhs().coefficient(v) for v in vars] for equ in equsys])
b=matrix([[equ.rhs()] for equ in equsys])
return (A,b)
2017-03-22 22:01:17 -0600 commented question sagemath notebook have no open ports

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/misc/misc.py", line 149, in find_next_available_port

raise RuntimeError, "no available port."

RuntimeError: no available port.

Starting Notebook in Terminal

2017-03-22 21:59:47 -0600 commented question sagemath notebook have no open ports

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/src/bin/sage-notebook", line 234, in <module> launcher(unknown)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/src/bin/sage-notebook", line 74, in __init__ notebook(self.args, *self.kwds)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/notebook/notebook_object.py", line 239, in __call__ return self.notebook(args, *kwds)

File "/Applications/SageMath-7.5.1.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sagenb/notebook/run_notebook.py", line 606, in notebook_run port = find_next_available_port(interface, port, port_tries)

2017-03-22 21:58:46 -0600 commented question sagemath notebook have no open ports

The following is system log:

Checking install location Checking existence of SageNB directory Starting Notebook ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 7.5.1, Release Date: 2017-01-15 │ │ Type "notebook()" for the browser-based notebook interface. │ │ Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ Please wait while the old SageNB Notebook server starts... The notebook files are stored in: sage_notebook.sagenb Traceback (most recent call last):

2017-03-20 21:06:40 -0600 commented question sagemath notebook have no open ports

My OS is macOS Sierra 10.12.3

Sagemath installed from pre-built binarie: sage-7.5.1-OSX_10.11.6-x86_64.app.dmg

The web browse can not be open whether click sws files or run " /Applications/SageMath-7.5.1.app"

But the jupyter notebook work well.

2017-03-20 02:32:14 -0600 asked a question sagemath notebook have no open ports

When I open a sws file in sagemath 7.5.1, I get the following error:

RuntimeError: no available port.

How to repair it.

By the way, is there some easily method to convert sws files to ipynb files.

Thanks.

2017-01-26 09:25:16 -0600 received badge  Enthusiast
2017-01-23 11:31:15 -0600 asked a question graph_editor doesn't work in jupyter notebook of sagemath

I want to use graph_editor to modify graphs. But when I run the code:

graph_editor(G)

there is no output.

2017-01-23 11:16:10 -0600 asked a question Is it possible to use greuler in sagemath?

greuler is graph theory visualization tool powered by d3 and on top of WebCola . Is it possible to use greuler in jupter notebook of sagemath? It looks very cool.

2017-01-20 10:01:12 -0600 answered a question How to install nbextensions for Jupyter notebook in Sagemath

I follow this post. which says :

sage -i openssl
sage -i pyopenssl

Then pip works again.

The reasons lead to such problems in the pose are figured out.

2017-01-19 06:57:21 -0600 commented question How to install nbextensions for Jupyter notebook in Sagemath

My OS is MacOS Sierra 10.12.2. I have installed Sage 7.3 from sage-7.3-OSX_10.11.6-x86_64.app.dmg. Those nbextension of Jupyter notebook can be installed normally and work well. After the Sagemath 7.4, 7.5.1 release, I try to update my sagemath to new version by installing from sage-7.?-OSX_10.11???app.dmg, Sagemath work normal. But I always fail while installing some packages such as those jupyter nbextensions. I have tried compile Sage from source, fail again and again.

Out of the sage shell environment. In the terminal, the pip install command run normally, no error about SSL is reported. But the nbextension still can not be installed for issue of permission.

What I can do next? Thanks.

2017-01-18 23:05:40 -0600 asked a question How to install nbextensions for Jupyter notebook in Sagemath

I like working with jupyter notebook for sagemath programming. But from Sagemath 7.4, I can not install nbextensions for Jupyter notebook. In Sagemath 7.3, I install nbextensions in the following way: In sage shell, pip install https://github.com/ipython-contrib/ju.... It works well in Sagemath 7.3. In Sagemath 7.4, 7.5, the following error reported: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available

I want to know how to install nbextensions in Sagemath 7.5 correctly. Thanks!

2016-11-24 00:49:24 -0600 edited question why won't simplify square roots?

sage: assume(x>2)

sage: sqrt(x^2 - 2*x + 1).simplify_full()

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