2019-09-25 12:28:27 -0500 asked a question Saving notebooks with 3dplots Hi I tried both html and .pdf, but the 3dplots seem to have disappeared. Is there a trick to get a copy of your session, includimg the 3dplots? 2019-09-25 11:59:12 -0500 received badge ● Commentator 2019-09-25 11:59:12 -0500 commented answer weird behavior of show command Thanks! The error on 8.8 came maybe from Spectral 2019-09-25 11:51:11 -0500 answered a question weird behavior of show command I reinstalled the latest Windows version 8.8. repeating now a second time the show(g1) yields error! RuntimeError Traceback (most recent call last) in () ----> 1 show(g1) /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/pretty_print.pyc in show(*args, **kwds) 256 args[0].show() 257 return --> 258 pretty_print(*args, **kwds) /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/pretty_print.pyc in pretty_print(*args, **kwds) 227 pass 228 elif len(args) == 1: --> 229 dm.display_immediately(*args, **kwds) 230 else: 231 SequencePrettyPrinter(*args, **kwds).pretty_print() /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc in display_immediately(self, obj, **rich_repr_kwds) 833 1/2 834 """ --> 835 plain_text, rich_output = self._rich_output_formatter(obj, rich_repr_kwds) 836 self._backend.display_immediately(plain_text, rich_output) 837 /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc in _rich_output_formatter(self, obj, rich_repr_kwds) 633 if rich_output is None: 634 rich_output = self._preferred_text_formatter( --> 635 obj, plain_text=plain_text, **rich_repr_kwds) 636 # promote output container types to backend-specific containers 637 plain_text = self._promote_output(plain_text) /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.pyc in _preferred_text_formatter(self, obj, plain_text, **kwds) 535 return out 536 if want == 'latex' and OutputLatex in supported: --> 537 out = self._backend.latex_formatter(obj, **kwds) 538 if type(out) is not OutputLatex: 539 raise OutputTypeException('backend returned wrong output type, require Latex') /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/repl/rich_output/backend_base.pyc in latex_formatter(self, obj, **kwds) 482 mathjax = MathJax().eval(obj, mode='plain', combine_all=True) 483 else: --> 484 mathjax = MathJax().eval(obj, mode='plain', combine_all=False) 485 from sage.repl.rich_output.output_basic import OutputLatex 486 return OutputLatex(str(mathjax)) /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/misc/latex.pyc in eval(self, x, globals, locals, mode, combine_all) 1951 """ 1952 # Get a regular LaTeX representation of x -> 1953 x = latex(x, combine_all=combine_all) 1954 1955 # The following block, hopefully, can be removed in some future MathJax. /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/misc/latex.pyc in __call__(self, x, combine_all) 923 """ 924 if has_latex_attr(x): --> 925 return LatexExpr(x._latex_()) 926 try: 927 f = latex_table[type(x)] /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/plot/graphics.py in _latex_(self, **kwds) 3240 """ 3241 tmpfilename = tmp_filename(ext='.pgf') -> 3242 self.save(filename=tmpfilename, **kwds) 3243 with open(tmpfilename, "r") as tmpfile: 3244 latex_list = tmpfile.readlines() /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/misc/decorators.pyc in wrapper(*args, **kwds) 410 kwds[self.name + "options"] = suboptions 411 --> 412 return func(*args, **kwds) 413 414 # Add the options specified by @options to the signature of the wrapped /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/plot/graphics.py in save(self, filename, **kwds) 3165 rc_backup = (rcParams['ps.useafm'], rcParams['pdf.use14corefonts'], 3166 rcParams['text.usetex']) # save the rcParams -> 3167 figure = self.matplotlib(**options) 3168 # You can output in PNG, PS, EPS, PDF, PGF, or SVG format, depending 3169 # on the file extension. /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/plot/graphics.py in matplotlib(self, filename, xmin, xmax, ymin, ymax, figsize, figure, sub, axes, axes_labels, axes_labels_size, fontsize, frame, verify, aspect_ratio, gridlines, gridlinesstyle, vgridlinesstyle, hgridlinesstyle, show_legend, legend_options, axes_pad, ticks_integer, tick_formatter, ticks, title, title_pos, base, scale, stylesheet, typeset) 2616 pass 2617 g.set_options(opts) -> 2618 g._render_on_subplot(subplot) 2619 if hasattr(g, '_bbox_extra_artists'): 2620 self._bbox_extra_artists.extend(g._bbox_extra_artists) /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/plot/contour_plot.py in _render_on_subplot(self, subplot) 159 contours = options['contours'] 160 if 'cmap' in options: --> 161 cmap = get_cmap(options['cmap']) 162 elif fill or contours is None: 163 cmap = get_cmap('gray') /opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/plot/colors.py in get_cmap(cmap) 1418 elif isinstance(cmap, six.string_types): 1419 if not cmap in cm.datad: -> 1420 raise RuntimeError("Color map %s not known (type import matplotlib.cm; matplotlib.cm.datad.keys() for valid names)" % cmap) 1421 return cm.__dict__[cmap] 1422 RuntimeError: Color map spectral not known (type import matplotlib.cm; matplotlib.cm.datad.keys() for valid names)  2019-09-25 03:34:10 -0500 asked a question weird behavior of show command Hi The code f(x,y)=x^3-x^2 + y^2;print f g1 = contour_plot(f(x,y),(x,-2,2),(y,-2,2),contours=20,fill=False,cmap='spectral') show(g1)  produces a plot with a hyperbolic point. On my computer, repeating this show(g1)  yields a different plot The purpose was to show this together with gradient field f(x,y)=(x+2)^2/(y^2+ (x-1/2)^2) ;print f g1 = contour_plot(f(x,y),(x,-2,6),(y,-2,4),contours=[1/10,1/2,4/5,1,2,3],cmap='spectral',fill=False) df=f.gradient() show(df) g2 = plot_vector_field(df,(x,-2,2),(y,-2,2))  This doesn't work, since the first plot is incorrect show(g1+g2) 2019-06-26 10:47:45 -0500 received badge ● Popular Question (source) 2019-01-31 05:05:30 -0500 asked a question how to get hints on fixing silly syntax errors Hi, I just spent half an hour on these two commands. def mov():  P=matrix(QQ,[[1, 1],[0, 1]]); show(P)  I retyped them, I moved them in different cells, nothing, I get syntax error. "", line 1 def mov() : ^ SyntaxError: invalid syntax  It works as long as I do not try to make a function 2018-12-17 02:18:25 -0500 answered a question Can I alias a sage command? Sorry, I'm missing some syntax. I tried def LP(): alias 'LP'='MixedIntegerLinearProgram' load("LP.sage")  gets the error File "", line 2 alias 'LP'='MixedIntegerLinearProgram' ^ SyntaxError: invalid syntax  2018-05-18 09:25:23 -0500 asked a question Differences between series and taylor Hi. This morning I had two similar codes that worked: var('s') L=(1-exp(-s))/(s) Ls=L.simplify_full() show(parent(Ls)) tay=Ls.series(s,2*n+1) #or tay=taylor(Ls,s,0,2*n+1)?  and  var('s') L=(1-exp(-s))/(s) Ls=L.simplify_full() show(parent(Ls)) tay=taylor(Ls,s,0,2*n+1)  I couldn't see any difference in the parents, but with series I could continue getting Pade approx: ta=tay.power_series(QQbar) show(parent(ta)) n=2;Lp=ta.pade(n-1,n)  and with taylor I couldn't, hence my first question. Now, not even the first part, getting the series, does not work anymore, which adds a second question. It is true that the code that works was more complicated (including extra manipulations :the Pollaczek-Khinchine formula) var('s ');rho=2/3; #Compute Pollackek-Khinchine formula L_rui for the Laplace transf of ruin prob R. = PolynomialRing(QQbar) #algebraic numbers over Q, (or RR,CC) FF = R.fraction_field() L_f=(1-exp(-s))/(s);L_F=(1-L_f)/s #Compute Pollackek-Khinchine formula L_rui for the Laplace transf of ruin prob m1=limit(L_F,s=0) #the s is removable singularity fe=L_F/m1 Fe=(1-fe)/s L_rui=rho*Fe/(1-rho*fe) #in SR Ls=L_rui.simplify_full() n=2; show(taylor(Ls,s,0, 2*n+1)) tay=Ls.series(s,2*n+1) show(parent(tay)) ta=tay.power_series(QQbar) show(parent(ta)) Lp=ta.pade(n-1,n) wh,dec=Lp.partial_fraction_decomposition() dec  Clearly, when simplifying for the purpose of asking on this forum, I added some silly mistake, but I can't see which 2018-05-15 03:55:02 -0500 answered a question Is it possible to change Polynomial Ring in the middle of a computation? The working code for n=3 is A=[1/6,2/6,3/6];ex=[2,6,4];rho=5/8;var('x s u') F=sum(A[i]*exp(-x*ex[i]) for i in [0..2])#sum of exponentials R. = PolynomialRing(QQbar) FF = R.fraction_field() L_F=sum(A[i] /(s+ex[i]) for i in [0..2]);#Laplace transform of F #Compute Pollackek-Khinchine formula L_rui for the Laplace transform of ruin probability m1=L_F(s=0) fe=L_F/m1 Fe=(1-fe)/s show(Fe) #note the s is simplified when working in QQbar L_rui=rho*Fe/(1-rho*fe) R.change_ring(RR) FF = R.fraction_field() wh,LL=L_rui.partial_fraction_decomposition() show(LL[0])  with output [0.5332274783298694?s+1.087668109036214?,0.07804278965136865?s+2.967947295921641?,0.01372973201876195?s+5.575963542410567?]  I need now to "remove" somehow the ? before taking inverse_laplace(LL[0],s,u)  It would be nice if something like inverse_laplace(LL[0].change_ring(RR),s,u)  or inverse_laplace(RR(LL[0]),s,u) would work 2018-05-14 12:03:38 -0500 asked a question Is it possible to change Polynomial Ring in the middle of a computation? Hi, I'm trying to invert the "Pollaczek-Khinchine" Laplace transform when it is rational This works for me at degree 2: var('x,s') Fx = (1/6*exp(-2*x)+5/6*exp(-6*x));rho=2/3 print('Hyperexponential claims:',Fx) R. = PolynomialRing(QQbar)#when all coefficients are not integer, use CC FF = R.fraction_field() L_F=laplace(Fx,x,s)#Laplace transform of F #Compute Pollackek-Khinchine (PK) formula L_rui for the Laplace transform (LT) of ruin probability m1=L_F(s=0) fe=L_F/m1 Fe=(1-fe)/s L_rui=rho*Fe/(1-rho*fe) show(L_rui.simplify_full()) inverse_laplace(SR(L_rui),s,u)  but not at degree 3, since I do not know how to use partial_fraction_decomposition, and then to switch to RR numbers and then invert . If I start in R. = PolynomialRing(RR), for an already known LT, everything is fine. But, a certain simplification by s in PK formula will become impossible due to rounding errors, so I am forced to start with R. = PolynomialRing(QQbar) After obtaining the partial_fraction_decomposition, I must apply RR to all numbers , but I do not manage to do it. Without that conversion, inverse_laplace won't work 2018-05-14 11:07:14 -0500 commented answer inverse_laplace of a fraction whose denominator has real roots (or complex) OK I got it, I just need to replace QQbar by RR. Silly me !!!! 2018-05-14 10:59:50 -0500 commented answer inverse_laplace of a fraction whose denominator has real roots (or complex) the conversion is doable by RR(). Is there an easy way to apply RR to all parts of an expression? 2018-05-14 10:35:58 -0500 commented answer inverse_laplace of a fraction whose denominator has real roots (or complex) The Pade of the uniform program is var('s'); rho=2/3;L_f=(1-exp(-s))/(s) #LT of uniform density L_F=(1-L_f)/s #LT of uniform survival function #Compute Pollackek-Khinchine formula L_rui for the Laplace transform of ruin probability m1=limit(L_F,s=0) #the s is removable singularity fe=L_F/m1 Fe=(1-fe)/s L_rui=rho*Fe/(1-rho*fe) show(L_rui) n=2; tay=taylor(L_rui,s,0,2*n+1) ta=tay.power_series(QQ) Lp=ta.pade(1,2) Lp  with answer (5/8*s + 15/2)/(s^2 + 45/4*s + 45/4)  it only remains to parfrac this. Thanks, Florin 2018-05-14 04:10:44 -0500 answered a question inverse_laplace of a fraction whose denominator has real roots (or complex) in competitive risks models, there are more interesting things to do OK, I'm dealing with a risk expert :) which University are you based in? I am just trying now to program in Sage a pedagogic exercise: compute the ruin probability for the Cramer-Lundberg model with a) hyperexponential claims; this should be easy, except that I am novice enough to Sage to have forgotten how these 1.33456? numbers are called, and how to convert an expression involving many of these numbers to a type which will be accepted by the command inverse_laplace b) uniform claims (so the LT is not rational); after rationalizing the LT by Pade, this reduces to previous; it's a one liner in Mathematica, but takes hours in sage due to the crude help system. 2018-05-14 04:04:41 -0500 asked a question inverse_laplace of a fraction whose denominator has real roots (or complex) Hi, this is the simplest and very important method of Laplace inversion . It can be applied to any Laplace transform (LT), by starting with a Pade approximation of the LT, then partial fractions and inversion. For some reason, a program I had written last year stopped working def Ruin(Fx, rho, x, u):#assumes rational survival function Fx, i.e. a hyperexponential density var('s') L_F=laplace(Fx,x,s) m1=L_F(s=0) #some algebraic manipulations known as Pollaczek-Khinchine formula fe=L_F/m1 Fe=factor((1-fe)/s) L_rui=rho*Fe/(1-rho*fe) C=ComplexField(53); dec=Frac(C['s'])(L_rui).partial_fraction_decomposition(); n=len(dec) par=[inverse_laplace(dec[1][i],s,u) for i in [0..n]]; rui=sum(par) return rui, L_rui, fe  It's pretty easy to repair the program when roots are rational -- see question "partial_fraction_decomposition" with possibly "complex roots", again. For nonrational roots, I proposed there the following test case var('s,u') R. = PolynomialRing(QQbar) F = R.fraction_field() L=3/4*(19*s^2 + 156*s + 284)/(19*s^3 + 174*s^2 + 422*s + 228) whole,LL=L.partial_fraction_decomposition() show(LL[0]) inverse_laplace(LL[0],s,u)  Thanks in advance :) 2018-05-13 14:04:35 -0500 answered a question "partial_fraction_decomposition" with possibly "complex roots", again Samuel and Emanuel, thanks for teaching me the magic of QQbar and SR! one more question, please. How to do this inverse_laplace of a fraction whose denominator roots may be real (and maybe even complex)? For example, var('s,u') R. = PolynomialRing(QQbar) F = R.fraction_field() L=3/4*(19*s^2 + 156*s + 284)/(19*s^3 + 174*s^2 + 422*s + 228) whole,LL=L.partial_fraction_decomposition() show(LL)  Here I'm stuck with the "decimals?" numbers and inverse_laplace(L,s,u)  ends again in TypeError: unable to convert [0.6934316866155686?/(s + 0.7570751092241817?), 0.0477251478733486?/(s + 2.861392366086696?), 0.00884316551108293?/(s + 5.539427261531228?)] to a symbolic expression  on the other hand SR(L).partial_fraction()  fails to find the real roots, and inverse_laplace fails also. Thanks, F The problem is really how to do partial_fractions and then extract the answer, but I added more of the story to make it clear this is a numeric question. For a first answer, I do not need 100 digits precision :) I have added a new question "inverse_laplace of a fraction whose denominator roots are real (or complex) to relance this with more details 2018-05-06 04:46:25 -0500 answered a question "partial_fraction_decomposition" with possibly "complex roots", again Thanks, Samuel :) Starting with the declaration works better :) It's still a bit unfortunate though that the first coefficient 4/7 is not obtained as fraction. I need then an inverse_laplace and this seems to work only for second component var('s,u') R. = PolynomialRing(QQbar) F = R.fraction_field() L = 2*(s + 3)/(3*s^2 + 13*s + 10) whole,LL=L.partial_fraction_decomposition() show(LL) inverse_laplace(LL[1],s,u)  It would be nice if there was a simple way to convert all the ?numbers in my list of fractions to closest fractions (apply nearby_rational? to all parts of an expression) 2018-04-30 12:10:04 -0500 received badge ● Nice Question (source) 2018-04-30 03:58:31 -0500 asked a question "partial_fraction_decomposition" with possibly "complex roots", again Hi I come back to this question, even though it's been answered before, since I am still not able to make it work. I should mention maybe that I am just trying to teach undergraduate students to invert rational Laplace transforms (for myself I am able to afford a Mathematica licence, but it would be nice to be able to show students that such simple things may be done nowadays for free). Following a previous answer, I tried L = 2*(s + 3)/(3*s^2 + 13*s + 10) Ks=FractionField(PolynomialRing(CC,names='s')) Lr=Ks(L)  Of course, with quadratic rational roots, I could do this by hand, but the purpose here is to do it when you do not know the roots. The first two commands work, but the third has error message TypeError: ('cannot convert {!r}/{!r} to an element of {}', 2*(s + 3)/(3*s^2 + 13*s + 10), 1.00000000000000, Fraction Field of Univariate Polynomial Ring in s over Complex Field with 53 bits of precision)  I should add that a different attempt which used to work last year C=ComplexField(53); dec=Frac(C['s'])(Lrs).partial_fraction_decomposition();  gets now same error message. So, this is probably due to an "improvement" of sage 2018-04-18 13:27:33 -0500 commented answer "partial_fraction_decomposition" with "complex roots" Dan, thanks for the thorough answer !!! I only need to invert Laplace transforms with complex poles, so I tried L = 2*(s + 3)/(3*s^2 + 13*s + 9) Ks=FractionField(PolynomialRing(CC,names='s')) Lr=Ks(L)  Unfortunately, the third command gets an error ? TypeError: ('cannot convert {!r}/{!r} to an element of {}', 2*(s + 3)/(3*s^2 + 13*s + 9), 1.00000000000000, Fraction Field of Univariate Polynomial Ring in s over Complex Field with 53 bits of precision)  2018-04-18 13:13:20 -0500 commented answer "partial_fraction_decomposition" with "complex roots" Thanks for the thorough answer, Dan !!! In that spirit (I just need to invert Laplace transforms with complex roots), I tried L = 2*(s + 3)/(3*s^2 + 13*s + 9) Ks=FractionField(PolynomialRing(CC,names='s')) Lr=Ks(L)  The first two commands work, but the third has error message TypeError: ('cannot convert {!r}/{!r} to an element of {}', 2*(s + 3)/(3*s^2 + 13*s + 9), 1.00000000000000, Fraction Field of Univariate Polynomial Ring in s over Complex Field with 53 bits of precision)  2018-04-06 14:42:27 -0500 asked a question "partial_fraction_decomposition" with "complex roots" Hi six months ago I used a hint from Zimmerman's book var('s') L=2(s + 3)/(3s^2 + 13*s + 10) C=ComplexField(53) dec=Frac(C['s'])(L).partial_fraction_decomposition() but this does not work anymore (see below). How to do this? Thanks ----> 2 dec=Frac(C['s'])(Lrs).partial_fraction_decomposition(); TypeError: ('cannot convert {!r}/{!r} to an element of {}', 2(s + 3)/(3s^2 + 13*s + 10), 1.00000000000000, Fraction Field of Univariate Polynomial Ring in s over Complex Field with 53 bits of precision) /opt/sagemath-8.1/src/sage/structure/parent.pyx in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9641)() 937 if mor is not None: 938 if no_extra_args: --> 939 return mor._call_(x) 940 else: 941 return mor._call_with_args(x, args, kwds) /opt/sagemath-8.1/src/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4928)() 152 print(type(C), C) 153 print(type(C._element_constructor), C._element_constructor) --> 154 raise 155 156 cpdef Element _call_with_args(self, x, args=(), kwds={}): /opt/sagemath-8.1/src/sage/structure/coerce_maps.pyx in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4796)() 147 cdef Parent C = self._codomain 148 try: --> 149 return C._element_constructor(x) 150 except Exception: 151 if print_warnings: /opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/rings/fraction_field.py in _element_constructor_(self, x, y, coerce) 616 except AttributeError: 617 raise TypeError("cannot convert {!r}/{!r} to an element of {}", --> 618 x0, y0, self) 619 try: 620 return self._element_class(self, x, y, coerce=coerce) 2018-03-10 00:33:45 -0500 received badge ● Enthusiast 2018-03-08 06:07:23 -0500 answered a question how to find the syntax error The indentation was fine, I just didn't know how to preserve it in the question by copy paste I indented the code with syntax error by hand to show you (but this still doesn't show in preview), I recopied it into Sage, it works now. I'll go by a gun i=3 while i>0 : print i, 'looping' i=i-1 2018-03-08 05:58:58 -0500 asked a question how to find the syntax error Hi Here's a short code (copy-paste) that gets me syntax error i=3 while i>0 : print i, 'looping'    i=i-1 "", line 4 i=i-Integer(1) I retyped it a second time; now it works, but I don't see any difference. i=3 while i>0 : print i, 'looping' i=i-1 Retyping only the line 4 with the error won't help, retyping the previous lines or restarting the kernel won't help either. It's like a phantom error 2017-12-02 04:16:35 -0500 asked a question can series make mistakes? series seems to make errors . luckily, taylor works correctly. start with L_F=(exp(-s)-1+s)/(s^2/2) (laplace transform of the "equilibrium" uniform density) and switch to Pollaczek laplace transform L_F /(1- epsilon * L_F); You can check that the moments expansions t, t1 differ var('s');n=2 L_F=(exp(-s)-1+s)/(s^2/2) #satisfies L_F(s=0)=1 L_L=L_F/(1-L_F/3) t = L_L.series(s,2n+2) t1= taylor(L_L,s,0,2n+2) print t1 2017-12-02 03:58:56 -0500 received badge ● Editor 2017-12-02 03:08:41 -0500 answered a question using pade approx it works now! Thanks both of you and excuses for my silly novice questions. Both series and taylor which I had tried before work fine (I guess both must have advantages sometimes if they are kept ?) adding the QQ magic changed the donna Here's the example var('s') L_F=(exp(-s)-1+s)/(s^2) t=L_F.series(s,6) #t = taylor(L_F,s,0,6) h=QQ['s'] h.pade(2,2) 2017-12-01 04:13:14 -0500 asked a question using pade approx Hi 1) From the only example I found s = PowerSeriesRing(QQ,'s').gen() a=exp(s);a.pade(4, 0) type(a) it seems this works for type 'sage.rings.power_series_poly.PowerSeries_poly' But I have a type 'sage.symbolic.expression.Expression' b, and was unable to convert b to the type required to apply pade 2) There's an alternative rational.reconstruct , but that seems to be geared to computations modulo (n) 3) In conclusion, it seems at current stage the simplest is to write one's own Pade? Thanks, Florin 2017-11-27 01:39:32 -0500 received badge ● Scholar (source) 2017-11-26 06:44:53 -0500 answered a question using Jupiter notebooks .ipynb created on Windows (Oracle VM virtual box) on sage, linux Merci, Samuel :) 2017-11-24 14:08:25 -0500 asked a question using Jupiter notebooks .ipynb created on Windows (Oracle VM virtual box) on sage, linux Hi 1) I use Jupiter notebooks .ipynb created on Windows (Oracle VM virtual box) at home, and would like to upload and use them on our linux sage installation, in our University It seems this is impossible (upload of .ipynb is refused by linux sage) 2) As a substitute, I noticed on a notebook .sage created by someone else that it is at least pure text, and hence can be copied-pasted on a new file in the linux machine. Is it possible to convert my .ipynb notebooks to .sage notebooks? This would allow using them both as notebooks and as a source of copypaste when upload is refused. In fact, can .sage files be created on Windows (Oracle VM virtual box)? Thanks, Florin 2017-10-21 05:45:03 -0500 received badge ● Student (source) 2017-10-21 05:44:11 -0500 answered a question Converting ipynb to latex in Jupyter: is it ?nbconvert /home/sage/Documents/PKfactor.ipynb --to latex error message was SyntaxError: invalid syntax