Ask Your Question

Will Orrick's profile - activity

2023-07-04 23:42:37 +0200 received badge  Popular Question (source)
2023-07-03 22:44:38 +0200 received badge  Famous Question (source)
2023-05-11 21:03:40 +0200 edited question Animate: issue with color artifacts

Animate: issue with color artifacts I have an animation consisting of relatively simple moving shapes - mostly solid bla

2023-05-07 18:40:05 +0200 asked a question Animate: issue with color artifacts

Animate: issue with color artifacts I have an animation consisting of relatively simple moving shapes - mostly solid bla

2022-03-12 00:25:42 +0200 received badge  Famous Question (source)
2022-03-12 00:25:42 +0200 received badge  Notable Question (source)
2022-01-14 07:19:39 +0200 received badge  Notable Question (source)
2021-11-25 02:39:27 +0200 received badge  Popular Question (source)
2021-11-25 02:37:49 +0200 received badge  Popular Question (source)
2021-10-31 15:14:00 +0200 received badge  Enthusiast
2021-09-21 05:10:36 +0200 edited answer Unable to link Jupyter notebook to correct kernel

The fix I found was to remove the folder sagemath from the following folder: /Users/williamorrick2/Library/Jupyter/kern

2021-09-21 05:06:25 +0200 marked best answer Unable to link Jupyter notebook to correct kernel

A while ago I installed sage version 9.1 on my MacBook Pro running MacOS Mojave 10.14.6. That installation was from binary and was made in the MacOS Applications folder. Today I tried to install sage version 9.4, compiling from source. The install was in a subfolder of my user folder. The install seems fine, and I am able to run sage 9.4 from the command line.

Now I am trying to run 9.4 in a Jupyter notebook. After typing

./sage -n jupyter

or

./sage -n jupyterlab

in the root directory of my new installation things start well—the following banner comes up in the terminal,

┌────────────────────────────────────────────────┐
│ SageMath version 9.4, Release Date: 2021-08-22 │
│ Using Python 3.9.5. Type "help()" for help.    │
└────────────────────────────────────────────────┘
Please wait while the Jupyterlab server starts...
[I 18:26:42.688 LabApp] JupyterLab extension loaded from /Users/williamorrick2/sage- 9.4/local/lib/python3.9/site-packages/jupyterlab
[I 18:26:42.688 LabApp] JupyterLab application directory is /Users/williamorrick2/sage-9.4/local/share/jupyter/lab
[I 18:26:42.694 LabApp] Serving notebooks from local directory: /Users/williamorrick2/sage-9.4
[I 18:26:42.694 LabApp] Jupyter Notebook 6.1.1 is running at:
[I 18:26:42.694 LabApp] http://localhost:8888/?token=ba7dda9e8563ac920c9dd6ae2ab402980df04273ce90c616
[I 18:26:42.694 LabApp]  or http://127.0.0.1:8888/?token=ba7dda9e8563ac920c9dd6ae2ab402980df04273ce90c616
[I 18:26:42.694 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 18:26:42.704 LabApp] 

    To access the notebook, open this file in a browser:
        file:///Users/williamorrick2/Library/Jupyter/runtime/nbserver-2218-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=ba7dda9e8563ac920c9dd6ae2ab402980df04273ce90c616
     or http://127.0.0.1:8888/?token=ba7dda9e8563ac920c9dd6ae2ab402980df04273ce90c616
[I 18:26:45.498 LabApp] Build is up to date
[I 18:26:45.750 LabApp] Kernel started: 8500f3e9-4730-4c6d-8363-5686721acc8e, name: sagemath

—but when the notebook opens (either in Jupyter notebook or in Jupyterlab) the kernel is sage 9.1 rather than 9.4. Furthermore I am unable to execute any code. In the terminal, immediately following the lines quoted above, I get a bunch of messages like

> /Applications/SageMath-9.1.app/Contents/Resources/sage/local/bin/sage: line 619: /Users/williamorrick2/sage-9.4/local/bin/python2: No such file or directory

which suggest that Jupyter is running the old kernel in the Applications folder, and that it is looking for python2 under my new installation, which only contains python3.

How do I go about correcting this?

2021-09-20 01:28:11 +0200 received badge  Nice Answer (source)
2021-09-19 04:03:15 +0200 commented question Unable to link Jupyter notebook to correct kernel

Thinking about this some more, perhaps it makes sense. I started up sage 9.4 in my local user directory, which then star

2021-09-19 00:29:38 +0200 commented question Jupyter notebook slow to load and unresponsive

Update: I upgraded from jupyter-notebook 5.7.6 to jupyter-notebook 6.1.1 and still just as slow. Will try to find time t

2021-09-19 00:23:16 +0200 edited answer Unable to link Jupyter notebook to correct kernel

The fix I found was to remove the folder sagemath from the following folder: /Users/williamorrick2/Library/Jupyter/kern

2021-09-19 00:22:27 +0200 commented question Unable to link Jupyter notebook to correct kernel

My problem has been solved--see my answer and the better answer of Masacroso--but one mystery remains, namely why my sag

2021-09-18 16:40:23 +0200 commented answer Unable to link Jupyter notebook to correct kernel

Thanks. The install part wouldn't have been necessary in my case because the sage installation takes care of that. But "

2021-09-18 09:12:38 +0200 received badge  Self-Learner (source)
2021-09-18 09:12:38 +0200 received badge  Teacher (source)
2021-09-18 04:52:22 +0200 edited question Unable to link Jupyter notebook to correct kernel

Unable to link Jupyter notebook to correct kernel A while ago I installed sage version 9.1 on my MacBook Pro running Mac

2021-09-18 00:57:01 +0200 answered a question Unable to link Jupyter notebook to correct kernel

The fix I found was to remove the folder sagemath from the following folder: /Users/williamorrick2/Library/Jupyter/kern

2021-09-17 12:55:03 +0200 edited question Unable to link Jupyter notebook to correct kernel

Unable to link Jupyter notebook to correct kernel A while ago I installed sage version 9.1 on my MacBook Pro running Mac

2021-09-17 12:51:54 +0200 received badge  Commentator
2021-09-17 12:51:54 +0200 commented answer Unable to link Jupyter notebook to correct kernel

Thanks for your message. In my old installation I never ran sage from the command line--I had a sage icon in my dock and

2021-09-17 12:40:22 +0200 edited question Unable to link Jupyter notebook to correct kernel

Unable to link Jupyter notebook to correct kernel A while ago I installed sage version 9.1 on my MacBook Pro running Mac

2021-09-17 01:47:10 +0200 commented question Jupyter notebook slow to load and unresponsive

@rburing Thanks for trying to reproduce the issue and for your suggestions. I'm trying a new version of sage (which cont

2021-09-17 01:44:30 +0200 commented question Jupyter notebook slow to load and unresponsive

@EmmanuelCharpentier I think I now have a more precise description of my problem, but no real diagnosis that might be he

2021-09-17 01:35:47 +0200 asked a question Unable to link Jupyter notebook to correct kernel

Unable to link Jupyter notebook to correct kernel A while ago I installed sage version 9.1 on my MacBook Pro running Mac

2021-09-16 13:48:22 +0200 received badge  Nice Question (source)
2021-09-16 04:51:18 +0200 edited question Jupyter notebook slow to load and unresponsive

Jupyter notebook slow to load and unresponsive At some point one of my SageMath Jupyter notebooks became very slow to re

2021-09-16 03:55:31 +0200 commented question Jupyter notebook slow to load and unresponsive

I'm not doing any LaTeX rendering - just plain text. It's funny because notebooks of ten times the file size with lots o

2021-09-15 04:51:54 +0200 commented question Jupyter notebook slow to load and unresponsive

Thanks for this suggestion. I have started to do this, and so far any differences are minor. I'm beginning to suspec, ho

2021-09-14 15:44:57 +0200 edited question Jupyter notebook slow to load and unresponsive

Jupyter notebook slow to load and unresponsive At some point one of my SageMath Jupyter notebooks became very slow to re

2021-09-14 15:44:19 +0200 asked a question Jupyter notebook slow to load and unresponsive

Jupyter notebook slow to load and unresponsive At some point one of my SageMath Jupyter notebooks became very slow to re

2021-08-31 00:57:55 +0200 edited question support() and coefficients() in combinatorial free modules

support() and coefficients() in combinatorial free modules I was surprised that in the code below I could not count on t

2021-08-29 23:06:13 +0200 commented question support() and coefficients() in combinatorial free modules

I should have tried expr.coefficients()? first, to see what help was available. This provides me with "'sort' -- (defaul

2021-08-29 23:01:38 +0200 commented answer support() and coefficients() in combinatorial free modules

Interesting that the behavior may be version or platform dependent. The dictionary method does seem to be the better way

2021-08-29 23:01:17 +0200 commented answer support() and coefficients() in combinatorial free modules

Interesting that the behavior may be version or platform dependent. The dictionary method does seem to be the better way

2021-08-29 22:57:32 +0200 commented question support() and coefficients() in combinatorial free modules

I should have tried expr.coefficients()? first, to see what help was available. This provides me with "'sort' -- (defaul

2021-08-29 22:57:16 +0200 commented question support() and coefficients() in combinatorial free modules

I should have tried expressions.coefficients()? first, to see what help was available. This provides me with "'sort' --

2021-08-29 22:20:58 +0200 commented question support() and coefficients() in combinatorial free modules

expr.monomial_coefficients() looks like the right approach; I've managed to use it to set up a sparse matrix and solve m

2021-08-29 05:02:37 +0200 asked a question support() and coefficients() in combinatorial free modules

support() and coefficients() in combinatorial free modules I was surprised that in the code below I could not count on t

2021-01-20 20:52:29 +0200 commented question Tensor product of elements of non-free algebras

Thanks. I've been trying (with difficulty) to follow the discussion there, and there seems to be some question about whether tensor() is even supposed to be defined on elements. I did find examples in the documentation here and here. But maybe it's not defined for every type of algebra? If not, is this something that is feasible for a user to define themselves?

2021-01-20 09:09:02 +0200 received badge  Nice Question (source)
2021-01-19 21:05:47 +0200 edited question Tensor product of elements of non-free algebras

In SageMath 9.1 I am unable to execute the code

a = SteenrodAlgebra(2).an_element()
M = CombinatorialFreeModule(GF(2), 's,t,u')
s = M.basis()['s']
T = tensor([a,s])

which is copied verbatim from this answer posted back in 2012. Instead, I get AttributeError on the tensor command. Is there some ingredient I'm missing?

More to the point, I am unable to run

N = 2
k.<w> = CyclotomicField(N)

A.<X,Z> = FreeAlgebra(k, 2)
F = A.monoid()
X, Z = F.gens()

monomials = [X^i*Z^j for j in range(0,N) for i in range(0,N)]

MS = MatrixSpace(k, len(monomials))
matrices = [
    # matrix showing the action of the first generator, X, on the monomials
    MS([0, 1, 0, 0,    # 1*X = X
          1, 0, 0, 0,    # X*X = 1
          0, 0, 0, -1,   # Z*X = -XZ
          0, 0, -1, 0    # XZ*X = -Z
         ]),
    # matrix showing the action of the second generator, Z, on the monomials
    MS([0, 0, 1, 0,     # 1*Z = Z
          0, 0, 0, 1,    # X*Z = XZ
          1, 0, 0, 0,    # Z*Z = 1
          0, 1, 0, 0     # XZ*Z = X
         ]),
]
B.<X,Z> = A.quotient(monomials, matrices)

tensor( (X*Z,X) )

which is the code I'm actually interested in. In this instance I get AssertionError on the tensor command. Is there some restriction on using tensor on non-free algebras? The code below executes fine:

N = 3
k.<w> = CyclotomicField(N)

A.<X,Z> = FreeAlgebra(k, 2)

tensor( (X*Z,X) )