[sage-devel] Re: sagemath 9.6 beta1 jupyter notebook missing output

2022-02-20 Thread Eric Gourgoulhon
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.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/d7e99a7e-0c7a-4f03-8ee0-bbe373c746b4n%40googlegroups.com.


[sage-devel] Re: sagemath 9.6 beta1 jupyter notebook missing output

2022-02-20 Thread ph h
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:
http://localhost:/kernelspecs/sagemath/doc/prep/Programming.html#lists-loops-and-set-builders

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

Regards,

phiho

On Sunday, February 20, 2022 at 8:40:31 AM UTC-5 Eric Gourgoulhon wrote:

> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/4c778ef8-6bbc-4b9d-b21d-ec63cc4ab04an%40googlegroups.com.


[sage-devel] sage magics reference

2022-02-20 Thread ph h
Hi,

From http://localhost:/kernelspecs/sagemath/doc/prep/Calculus.html:

%auto
f(x)=x^3+1
@interact
def _(c=(1/3,(-1,1))):
P=plot(f,(x,-1,1))
fprime=derivative(f,x)
L(x)=fprime(c)*(x-c)+f(c)
Q=plot(L,(x,-1,1),color="red", linestyle="--")
show(P+Q+point((c,f(c)), pointsize=40, color='red'),ymin=0,ymax=2)

There was an error:

UsageError: Line magic function `%auto` not found.

`lsmagic` gives this:

𝙰𝚟𝚊𝚒𝚕𝚊𝚋𝚕𝚎 𝚕𝚒𝚗𝚎 𝚖𝚊𝚐𝚒𝚌𝚜:
%𝚊𝚕𝚒𝚊𝚜  %𝚊𝚕𝚒𝚊𝚜⎯𝚖𝚊𝚐𝚒𝚌  %𝚊𝚝𝚝𝚊𝚌𝚑  %𝚊𝚞𝚝𝚘𝚊𝚠𝚊𝚒𝚝 
 %𝚊𝚞𝚝𝚘𝚌𝚊𝚕𝚕  %𝚊𝚞𝚝𝚘𝚖𝚊𝚐𝚒𝚌  %𝚊𝚞𝚝𝚘𝚜𝚊𝚟𝚎  %𝚊𝚡𝚒𝚘𝚖 
 %𝚋𝚘𝚘𝚔𝚖𝚊𝚛𝚔  %𝚌𝚊𝚝  %𝚌𝚍  %𝚌𝚕𝚎𝚊𝚛  %𝚌𝚘𝚕𝚘𝚛𝚜  %𝚌𝚘𝚗𝚍𝚊 
 %𝚌𝚘𝚗𝚏𝚒𝚐  %𝚌𝚘𝚗𝚗𝚎𝚌𝚝⎯𝚒𝚗𝚏𝚘  %𝚌𝚙  %𝚌𝚛𝚞𝚗  %𝚍𝚎𝚋𝚞𝚐 
 %𝚍𝚑𝚒𝚜𝚝  %𝚍𝚒𝚛𝚜  %𝚍𝚒𝚜𝚙𝚕𝚊𝚢  %𝚍𝚘𝚌𝚝𝚎𝚜𝚝⎯𝚖𝚘𝚍𝚎  %𝚎𝚍 
 %𝚎𝚍𝚒𝚝  %𝚎𝚗𝚟  %𝚏𝚛𝚒𝚌𝚊𝚜  %𝚐𝚊𝚙  %𝚐𝚊𝚙𝟹  %𝚐𝚒𝚊𝚌  %𝚐𝚙 
 %𝚐𝚞𝚒  %𝚑𝚒𝚜𝚝  %𝚑𝚒𝚜𝚝𝚘𝚛𝚢  %𝚒𝚕𝚘𝚊𝚍  %𝚔𝚊𝚜𝚑 
 %𝚔𝚒𝚕𝚕𝚋𝚐𝚜𝚌𝚛𝚒𝚙𝚝𝚜  %𝚕𝚍𝚒𝚛  %𝚕𝚎𝚜𝚜  %𝚕𝚏  %𝚕𝚒𝚎 
 %𝚕𝚒𝚜𝚙  %𝚕𝚔  %𝚕𝚕  %𝚕𝚘𝚊𝚍  %𝚕𝚘𝚊𝚍⎯𝚎𝚡𝚝  %𝚕𝚘𝚊𝚍𝚙𝚢 
 %𝚕𝚘𝚐𝚘𝚏𝚏  %𝚕𝚘𝚐𝚘𝚗  %𝚕𝚘𝚐𝚜𝚝𝚊𝚛𝚝  %𝚕𝚘𝚐𝚜𝚝𝚊𝚝𝚎 
 %𝚕𝚘𝚐𝚜𝚝𝚘𝚙  %𝚕𝚜  %𝚕𝚜𝚖𝚊𝚐𝚒𝚌  %𝚕𝚡  %𝚖𝚊𝚌𝚊𝚞𝚕𝚊𝚢𝟸 
 %𝚖𝚊𝚌𝚛𝚘  %𝚖𝚊𝚐𝚒𝚌  %𝚖𝚊𝚐𝚖𝚊  %𝚖𝚊𝚗  %𝚖𝚊𝚙𝚕𝚎 
 %𝚖𝚊𝚝𝚑𝚎𝚖𝚊𝚝𝚒𝚌𝚊  %𝚖𝚊𝚝𝚑𝚒𝚌𝚜  %𝚖𝚊𝚝𝚕𝚊𝚋 
 %𝚖𝚊𝚝𝚙𝚕𝚘𝚝𝚕𝚒𝚋  %𝚖𝚊𝚡𝚒𝚖𝚊  %𝚖𝚔𝚍𝚒𝚛  %𝚖𝚘𝚛𝚎  %𝚖𝚞𝚙𝚊𝚍 
 %𝚖𝚟  %𝚖𝚠𝚛𝚊𝚗𝚔  %𝚗𝚘𝚝𝚎𝚋𝚘𝚘𝚔  %𝚘𝚌𝚝𝚊𝚟𝚎  %𝚙𝚊𝚐𝚎 
 %𝚙𝚊𝚜𝚝𝚎𝚋𝚒𝚗  %𝚙𝚍𝚋  %𝚙𝚍𝚎𝚏  %𝚙𝚍𝚘𝚌  %𝚙𝚏𝚒𝚕𝚎  %𝚙𝚒𝚗𝚏𝚘 
 %𝚙𝚒𝚗𝚏𝚘𝟸  %𝚙𝚒𝚙  %𝚙𝚘𝚕𝚢𝚖𝚊𝚔𝚎  %𝚙𝚘𝚙𝚍  %𝚙𝚙𝚛𝚒𝚗𝚝 
 %𝚙𝚛𝚎𝚌𝚒𝚜𝚒𝚘𝚗  %𝚙𝚛𝚞𝚗  %𝚙𝚜𝚎𝚊𝚛𝚌𝚑  %𝚙𝚜𝚘𝚞𝚛𝚌𝚎 
 %𝚙𝚞𝚜𝚑𝚍  %𝚙𝚠𝚍  %𝚙𝚢𝚌𝚊𝚝  %𝚙𝚢𝚕𝚊𝚋  %𝚚𝚝𝚌𝚘𝚗𝚜𝚘𝚕𝚎 
 %𝚚𝚞𝚒𝚌𝚔𝚛𝚎𝚏  %𝚛  %𝚛𝚎𝚌𝚊𝚕𝚕  %𝚛𝚎𝚑𝚊𝚜𝚑𝚡 
 %𝚛𝚎𝚕𝚘𝚊𝚍⎯𝚎𝚡𝚝  %𝚛𝚎𝚙  %𝚛𝚎𝚛𝚞𝚗  %𝚛𝚎𝚜𝚎𝚝 
 %𝚛𝚎𝚜𝚎𝚝⎯𝚜𝚎𝚕𝚎𝚌𝚝𝚒𝚟𝚎  %𝚛𝚖  %𝚛𝚖𝚍𝚒𝚛  %𝚛𝚞𝚗 
 %𝚛𝚞𝚗𝚏𝚒𝚕𝚎  %𝚜𝚊𝚐𝚎𝟶  %𝚜𝚊𝚟𝚎  %𝚜𝚌  %𝚜𝚌𝚒𝚕𝚊𝚋 
 %𝚜𝚎𝚝⎯𝚎𝚗𝚟  %𝚜𝚒𝚗𝚐𝚞𝚕𝚊𝚛  %𝚜𝚝𝚘𝚛𝚎  %𝚜𝚡  %𝚜𝚢𝚜𝚝𝚎𝚖 
 %𝚝𝚋  %𝚝𝚒𝚖𝚎  %𝚝𝚒𝚖𝚎𝚒𝚝  %𝚞𝚗𝚊𝚕𝚒𝚊𝚜  %𝚞𝚗𝚕𝚘𝚊𝚍⎯𝚎𝚡𝚝 
 %𝚠𝚑𝚘  %𝚠𝚑𝚘⎯𝚕𝚜  %𝚠𝚑𝚘𝚜  %𝚡𝚍𝚎𝚕  %𝚡𝚖𝚘𝚍𝚎

𝙰𝚟𝚊𝚒𝚕𝚊𝚋𝚕𝚎 𝚌𝚎𝚕𝚕 𝚖𝚊𝚐𝚒𝚌𝚜:
%%!  %%𝙷𝚃𝙼𝙻  %%𝚂𝚅𝙶  %%𝚊𝚡𝚒𝚘𝚖  %%𝚋𝚊𝚜𝚑  %%𝚌𝚊𝚙𝚝𝚞𝚛𝚎 
 %%𝚌𝚢𝚝𝚑𝚘𝚗  %%𝚍𝚎𝚋𝚞𝚐  %%𝚏𝚒𝚕𝚎  %%𝚏𝚘𝚛𝚝𝚛𝚊𝚗  %%𝚏𝚛𝚒𝚌𝚊𝚜 
 %%𝚐𝚊𝚙  %%𝚐𝚊𝚙𝟹  %%𝚐𝚒𝚊𝚌  %%𝚐𝚙  %%𝚑𝚝𝚖𝚕 
 %%𝚓𝚊𝚟𝚊𝚜𝚌𝚛𝚒𝚙𝚝  %%𝚓𝚜  %%𝚔𝚊𝚜𝚑  %%𝚕𝚊𝚝𝚎𝚡  %%𝚕𝚒𝚎 
 %%𝚕𝚒𝚜𝚙  %%𝚖𝚊𝚌𝚊𝚞𝚕𝚊𝚢𝟸  %%𝚖𝚊𝚐𝚖𝚊  %%𝚖𝚊𝚙𝚕𝚎 
 %%𝚖𝚊𝚛𝚔𝚍𝚘𝚠𝚗  %%𝚖𝚊𝚝𝚑𝚎𝚖𝚊𝚝𝚒𝚌𝚊  %%𝚖𝚊𝚝𝚑𝚒𝚌𝚜 
 %%𝚖𝚊𝚝𝚕𝚊𝚋  %%𝚖𝚊𝚡𝚒𝚖𝚊  %%𝚖𝚞𝚙𝚊𝚍  %%𝚖𝚠𝚛𝚊𝚗𝚔 
 %%𝚘𝚌𝚝𝚊𝚟𝚎  %%𝚙𝚎𝚛𝚕  %%𝚙𝚘𝚕𝚢𝚖𝚊𝚔𝚎  %%𝚙𝚛𝚞𝚗  %%𝚙𝚢𝚙𝚢 
 %%𝚙𝚢𝚝𝚑𝚘𝚗  %%𝚙𝚢𝚝𝚑𝚘𝚗𝟸  %%𝚙𝚢𝚝𝚑𝚘𝚗𝟹  %%𝚛  %%𝚛𝚞𝚋𝚢 
 %%𝚜𝚊𝚐𝚎𝟶  %%𝚜𝚌𝚒𝚕𝚊𝚋  %%𝚜𝚌𝚛𝚒𝚙𝚝  %%𝚜𝚑  %%𝚜𝚒𝚗𝚐𝚞𝚕𝚊𝚛 
 %%𝚜𝚟𝚐  %%𝚜𝚡  %%𝚜𝚢𝚜𝚝𝚎𝚖  %%𝚝𝚒𝚖𝚎  %%𝚝𝚒𝚖𝚎𝚒𝚝 
 %%𝚠𝚛𝚒𝚝𝚎𝚏𝚒𝚕𝚎

𝙰𝚞𝚝𝚘𝚖𝚊𝚐𝚒𝚌 𝚒𝚜 𝙾𝙽, % 𝚙𝚛𝚎𝚏𝚒𝚡 𝙸𝚂 𝙽𝙾𝚃 𝚗𝚎𝚎𝚍𝚎𝚍 
𝚏𝚘𝚛 𝚕𝚒𝚗𝚎 𝚖𝚊𝚐𝚒𝚌𝚜.

Please help me to understand the function of '%auto' (is there a reference 
for sage 'magics' ?). Is '%auto' a line magic or cell magic or something 
else?

Thank you for your help.

Regards,

phiho


-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/4d427325-d0b1-43f7-a06e-0d83d36911d3n%40googlegroups.com.