sagemath 9.6 beta1 jupyter notebook missing output

60 views
Skip to first unread message

ph h

unread,
Feb 18, 2022, 9:28:03 PM2/18/22
to sage-devel
Greetings,

Please find attached a screen shot of sagemath 9.6 beta1 jupyter notebook (on Windows Server 2019 WSL Ubuntu, from Sage Introductory Programming Tutorial - Lists, Loops and Set Builders)
  1. In [3] only gives A^4 in Out [3] (missing A^0, A^1, A^2 and A^3)
  2.  In [4] gives no output (but In [8] does)
  3. In [6] gives no output (but In [7] does)
$ uname -a
Linux HPC1 4.4.0-17763-Microsoft #2268-Microsoft Thu Oct 07 16:36:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux

Thank you for your advice.

Regards,

phiho

SageMath9.6B1-Jupyter.jpg

Eric Gourgoulhon

unread,
Feb 20, 2022, 8:40:31 AM2/20/22
to sage-devel
Hi,

Le samedi 19 février 2022 à 03:28:03 UTC+1, hohoa...@gmail.com a écrit :

  1. In [3] only gives A^4 in Out [3] (missing A^0, A^1, A^2 and A^3)
  2.  In [4] gives no output (but In [8] does)
  3. In [6] gives no output (but In [7] does)
There is no bug in all this. To display some item at each step of a loop use show() or print(), e.g.

for i in [0, 1, 2, 3, 4]:
     show(A^i)

Eric.

ph h

unread,
Feb 20, 2022, 9:08:18 PM2/20/22
to sage-devel
Hi,

Sage behavior seems to be different on the console:

~/sage-9.6/b01$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.6.beta1, Release Date: 2022-02-13               │
│ Using Python 3.8.10. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: A = matrix([[1,2],[3,4]])
sage: A^0; A^1; A^2; A^3; A^4
[1 0]
[0 1]
[1 2]
[3 4]
[ 7 10]
[15 22]
[ 37  54]
[ 81 118]
[199 290]
[435 634]

sage: for i in [0,1,2,3,4]:
....:         A^i
....:
[1 0]
[0 1]
[1 2]
[3 4]
[ 7 10]
[15 22]
[ 37  54]
[ 81 118]
[199 290]
[435 634]
sage: for i in [0..4]:
....:         det(A^i)
....:
1
-2
4
-8
16
sage:


A clarification is much appreciated if the 'sage help' is applicable to sage console only:

Do we have different documentation for the sage console and Jupyter notebook?

Regards,

phiho
Reply all
Reply to author
Forward
0 new messages