Questions tagged [sage]

SageMath, the Sage Mathematical Software System: free software for Computational Mathematics, based on Python. See longer description for links to other similar-sounding tags.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

Calling a Python function repeatedly in LaTex table environment

I am an English teacher and for my online classes, I prepare a PDF with LaTeX which has the new vocabulary and grammar and other notes. Now I generally write the meaning of the words myself, however, ...
VoHooman's user avatar
0 votes
0 answers
9 views

Trouble solving the system of nonlinear differential equations in sage math

I am solving a 9x9 system of ordinary differential equations. In simple terms, I need to get the equilibrium expressions for the system. I am using the solve command in sage, but I get an error whose ...
Specioza NAMBOOZE's user avatar
0 votes
0 answers
12 views

Install Sage (sagemath) from yml file

I'm trying to install Sage on Windows for some research. I tried installing with sudo apt update; sudo apt install sagemath in WSL according to the directions here: https://wiki.sagemath.org/...
Sam S's user avatar
  • 1
0 votes
1 answer
24 views

Is it possible to override the pretty-printing of an existing data type in SageMath?

In IPython, using the method in How can I configure ipython to display integers in hex format? , it's possible to customize how objects are printed: In [1]: import ast ...: formatter=get_ipython()....
user202729's user avatar
  • 3,428
0 votes
1 answer
21 views

Solving equations in Sagemath

I have to find a vector and a matrix that transform some input vectors into others. The input vectors are: (−3, 4), (0, 8) i (6, 6) and the output for each vector is (1, −4), (6, −4) i (8, 2). That's ...
Mauri Crespo's user avatar
0 votes
0 answers
11 views

Arbitrary length vectors in Sage

I want to generate a vector of arbitrary values with length dependent on a variable. What I have that works: var('x') n = 5 A = [var('a{}'.format(i)) for i in range(n)] for i in range(n): assume(...
Carbocarde's user avatar
-1 votes
0 answers
21 views

SageMath finally opening Jupyter notebooks with old files but doesn't recognize sage commands

I went to get my mac (2023 M2 laptop) fixed for an audio problem. They ran a diagnostic test and all was good. Afterwords, Sage couldn't connect to localhost on any browser. I checked proxy settings ...
Freddie's user avatar
  • 99
-1 votes
1 answer
38 views

is there a way to use sagemath in chaquopy

i want to make a mobile app, preferably in Android Studio with Kotlin, where i will use a lot of linear algebra, like finite fields and matrix multiplication. Since i havent found any suitable ...
tarlo's user avatar
  • 11
1 vote
1 answer
42 views

Why won't sage math evaluate this expression?

var('u_5 u beta') y = u - u_5 + beta*(exp(u)-u-4) beta = 1.0 u_5 = -4.0 p = y.subs(u==u_5) p results in: 0.0183156388887342*beta - u_5 - 4.00000000000000 How can I get a numerical value? I did try ...
Log On's user avatar
  • 95
0 votes
0 answers
17 views

Graded commutative algebra with complex coefficients in Sage

Is it possible to create graded commutative algebras with complex coefficients in Sage? When I try so, A.<a,ia,abarra,iabarra,b,ib,bbarra,ibbarra>=GradedCommutativeAlgebra(CC,degrees=(1,1,1,1,1,...
groupoid's user avatar
  • 101
0 votes
0 answers
11 views

Functions for module invariants in Sage

I am new to programming in general but in my project, I am required to work with a finite set $S = {A_1,...,A_n}$ of $m \times n$ matrices over a finite ring $R$, and the submodule $M$ they generate. ...
JBuck's user avatar
  • 101
0 votes
0 answers
37 views

Evaluation of infinite series the converges to the catalan constant in sagemath

My input: f(x)=(-1)^x/(2*x+1)^2 sum(f(x),x,0,infinity) The output: -1/8*pi^2 + 1/8*psi(1, 1/4) Why is the output like this if the catalan constant in sagemath is: "catalan"?
Pinteco's user avatar
  • 317
1 vote
0 answers
23 views

Sage error while calculating square root in finite field

Error message: TypeError: not in prime subfield During handling of the above exception, another exception occurred: TypeError: unable to convert z^3 + z + 1 to a rational During handling of the above ...
fepaul's user avatar
  • 11
1 vote
1 answer
12 views

How to return the vector of coefficients of an element in an order in terms of a particular basis in Sagemath

I would like to find the particular representation of an element in a quaternion order in terms of a specific basis in Sagemath. I can check whether the element is contained in the order, but I don't ...
stillconfused's user avatar
0 votes
2 answers
42 views

PHP SOAP call empty response (Authorization header)

I want to call a soap API, to save data to Sage X3 version 12. I'm using this code: $options = array( 'login' => $username, 'password' => $password, ); $api = parent::...
nechmi bader's user avatar
0 votes
0 answers
22 views

Can I use Sage without OAuth?

I want to write an integration with SageOne. It is meant to run behind a PHP application and create invoices when a customer pays for something (they pay 50% upfront and 50% later - I want a Sage ...
Chris's user avatar
  • 558
1 vote
1 answer
46 views

How to reload an import after updating it? Sage doesn't seem to reload it till end of session

I have a file called MyClass.py which contains a class MyClass. I have a MyPrg.sage which imports this as from MyClass import MyClass and then instantiates MyClass & calls a method on it. I run ...
user93353's user avatar
  • 13.8k
0 votes
0 answers
72 views

Porting BSGS (ECDSA) on rust

Hi guys I'm porting Baby step Giant Step algorithm from examples displayed here to Rust programming language. https://github.com/ashutosh1206/Crypton the normal version is ported successfully without ...
PrinceZee's user avatar
  • 1,598
0 votes
0 answers
14 views

SAGE - ODBC via IIS - minimum required folder permissions for ACCDATA folder

I have a website which I want to connect to SAGE ACCDATA folder (which resides on a different server but same network to the intranet server) using their proprietary ODBC driver. For security purposes ...
BLoB's user avatar
  • 9,576
0 votes
0 answers
23 views

How to plot the real line in SageMath

I am preparing a SageMath Jupyter notebook for expository purposes. I would like to be able to display the real line, with chosen points on it, and some arrows between certain pairs of points. While ...
H A Helfgott's user avatar
1 vote
1 answer
44 views

Reference a Named Range Cell (Validation List) in the same Workbook to change the Account Number Filter in a Excel Sage Sequel Database Power Query

I am trying to dynamically change the Filter in an Excel Sage Power Query from a Named Range single cell D3 in below Image. D3 is a selection List from a Chart of Accounts in same Workbook. ...
Gary's user avatar
  • 47
1 vote
1 answer
58 views

Unexpected error with sign() function in SageMath

I have the following rather strange issue with SageMath (mathematics software system partly based on Python). Perhaps it should be mentioned that the problem seem to be related with some specific ...
richrow's user avatar
  • 117
0 votes
0 answers
19 views

Defining a representation on $SL_2(\mathbb{Z})$

I want to define a representation on $\text{SL}_2(\mathbb{Z})$, or generally, over any free group with two generators on GAP. I am using repsn package for this. I have written the code LoadPackage(&...
dragoboy's user avatar
  • 101
0 votes
0 answers
82 views

Jupyter can't run from Sagemath 9.0

I'm using Ubunto 20.04.06 as operative system. And use Sagemath 9.0 with Python 3.8.10 I try to install Spyder but don't work. So when I try to star Jupyter from Sagemath with the following command: ...
jorge garcia's user avatar
0 votes
1 answer
109 views

API-created vendor invoice in Sage Intacct shows 'Pending' state in API response but 'Submitted' in UI

I have created a vendor invoice in Sage Intacct using their API, but I'm experiencing a discrepancy between the state of the invoice in the API response and what is displayed in the Sage Intacct UI. ...
MUHAMMED SHAFEERALI P's user avatar
0 votes
0 answers
22 views

Characters of SL_2(\mathbb{Z}/4\mathbb{Z})

I need to have description of all the characters of group $\mathrm{SL}_2(\mathbb{Z}/8\mathbb{Z})$. I am implementing the following code on Sage online (changing the language to GAP). \gap> g := SL(...
dragoboy's user avatar
  • 101
0 votes
1 answer
83 views

Generate all non-isomorphic non-bipartite connected graphs of order n

I know that nauty can generate n-vertex bipartite graphs (!geng n -c -b), but I haven't seen a corresponding command for its opposite (non-bipartite graphs). (I might have missed it.) SageMath ...
licheng's user avatar
  • 127
0 votes
0 answers
16 views

Making card configurations in Sagemath

I'm following SageMath's tutorial on Combinatorics and one of the exercizes is to calculate the set of Four of a Kind hands (in card games a hand containing four cards of the same value is called a ...
Luiz's user avatar
  • 99
0 votes
1 answer
67 views

Install SageMath module from github in Linux yields Cython error

I have sagemath 9.8, python 3.11.3 and Cython 0.29.35 all installed in a machine with manjaro linux. I followed the instructions provided in the module's Github repository but I have run into errors. ...
IWTBAM's user avatar
  • 3
0 votes
0 answers
31 views

How to obtain explicit formula of coefficients for generating functions

Is there any function in python or sage to obtain explicit formula of coefficients for generating functions. For example, Catalan generating function is given as $${\displaystyle c(x)={\frac {1-{\sqrt ...
Rjda's user avatar
  • 1
1 vote
1 answer
72 views

How to find intersection of two number fields in SageMath

I would like to find the intersection of two number fields in Sagemath, but I'm not sure exactly how to set this up. In some cases, I am able to find the intersection using the subfields() method: for ...
stillconfused's user avatar
1 vote
2 answers
37 views

Sparse vector space of degree 3 and dimension 1

I'm trying to do some computations involving Lie algebras on SAGE, but I'm not understanding much of the terminology. When I ask it to describe a certain module over the Lie algebra, it tells me it's ...
A.D.'s user avatar
  • 13
3 votes
1 answer
45 views

What does a solution like r5 or c15415 mean when i use solve() from SageMath (Python)?

i implemented a system of complex valued functions and i solved it with sagemath's "solve" method. In my solutions array i find entries like: x1 == r5 or for different cases x1 == c15403. (...
Bla Bla's user avatar
  • 33
0 votes
0 answers
60 views

Determinant of large symbolic matrix in Sage

I have a 12-by-12 matrix whose entries are elements of a polynomial ring in 24 variables over the real numbers. Short version: It seems Sage is computing the determinant incorrectly (or I am ...
Nick's user avatar
  • 499
0 votes
0 answers
43 views

How to set variable order (not term order) in polynomial ring in sagemath?

I need to create a PolynomialRing in sage, with an unknown number of variables x0,...,xn. For this I use the following code: R = PolynomialRing(QQ, 'x', 3, order='degrevlex') R.inject_variables(...
r98inver's user avatar
0 votes
1 answer
89 views

How to create an Ubuntu Docker image with sagemath installed on it? [duplicate]

I'm trying to create an Ubuntu Docker image with sagemath installed on it. Currently, the content of my Dockerfile is: FROM ubuntu RUN echo "APT::Get::Assume-Yes "true";" > /etc/...
meniadin's user avatar
0 votes
0 answers
39 views

Pretty-print result of Jupyter code cell together with text?

Is there a way to output text together with the result of a code evaluation in a Jupyter notebook running SAGE as a kernel? A = matrix([[3, 2], [3, 1]]) B = matrix([[5, 4], [4, 7]]) show(LatexExpr('C =...
NicolasBourbaki's user avatar
1 vote
1 answer
31 views

How to construct an isogeny in SageMath from rational functions

I am trying to construct the isogeny described in Example 2.5 of this paper in SageMath, but as far as I can tell (say from this post), there is no way to directly construct an isogeny from its ...
stillconfused's user avatar
0 votes
0 answers
29 views

sage plot3d fails - browser opens, but then hangs. Sometimes, I get an error that a file cannot be read

When I run the example of how to do a 3D plot, the browser opens, but sometimes it hangs and sometimes it gives an error message that a file in file////home/jeffs/.sage/temp/jeffs-desktop/780876 ...
Jeff Silverman's user avatar
0 votes
1 answer
43 views

Unexpected behavior of numerical_approx

The documentation of numerical_approx/n says "Return a numerical approximation of "self" with "prec" bits (or decimal "digits") of precision." so I expected it ...
Ilan's user avatar
  • 1
1 vote
1 answer
93 views

Generating a random prime with a modulus condition in sagemath

I'm wondering if there is a clean way to generate a random prime with a specific modulus condition in sagemath? By modulus condition, I mean, for example, that I might want to generate a random prime ...
stillconfused's user avatar
3 votes
1 answer
607 views

Add SageMath to pylance

I am using VSCode to write some SageMath code in a Jupyter notebook. Everything works fine and I can run my code but Pylance underlines all Sage imports and reports them as missing I have tried adding ...
Giorgos Giapitzakis's user avatar
1 vote
1 answer
309 views

How to get all the solution points over a finite field of an elliptical curve?

I'm trying to follow a youtube explanation of elliptic curves, and at this point the presenter defines the following elliptic curve: E = EllipticCurve([2,5]) and proceeds to find the number of ...
JAP's user avatar
  • 407
0 votes
0 answers
55 views

Plotting disconnects the Sage kernel on Windows 10 (unrelated to anaconda)

I just installed sagemath on a Windows 10 computer, and it consistently crashes when trying to plot. I can link the origin of the code if this is relevant. I installed Python independently and not as ...
JAP's user avatar
  • 407
1 vote
2 answers
136 views

Defining a list of lists in SageMath

In SageMath, I want to define a list whose elements are lists with two elements. I tried to do it by appending elements to the inner lists, accessed by their index in the outer list: K=GF(3) ...
Kenan123's user avatar
0 votes
0 answers
344 views

How to get native points on a elliptic curve from an existing addition of points

I'm working on elliptic curves with SageMath. I know : The equation of the curve E defined by y^2 = x^3 + ... : E = EllipticCurve( GF(K), [m, n] ) the addition of points A and B (A+B) : (x3;y3) the ...
Julien's user avatar
  • 699
1 vote
1 answer
89 views

Which version of SageMath was I using? In 2018 that allowed this code to run?

At some point the code bellow was working but now I need to replace the map line with something else. I'm wondering what version of SageMath I was using that my code was working. It may have been ...
Michael Hearn's user avatar
0 votes
1 answer
31 views

How can I do a covering design parameter search using SageMath?

I am trying to find all non-isomorphic covering designs of C(12,6,3)=15 where v=12, k=6 and t=3. Is SageMath capable of doing parameter searches? So far I have generated this code using chatgpt, ...
justinpees's user avatar
0 votes
0 answers
88 views

Object reference not set to an instance of an object. Sage API

When sending a post request through the Sage API to do a GLTransaction, using the GLTransactionPost query I receive the issue: "Object reference not set to an instance of an object." Is it ...
Wragnam's user avatar
  • 33
0 votes
1 answer
45 views

Function of matrices in Maxima

I have two matrices Ac and Ep and a parameter k. I need to implement this matrix, which is a function of my prior matrices and k : ProbEnt(k)[i,j] := if (k < wmax) then binomial(Ac[i,j], k)*Ep[i,j]^...
Qubix's user avatar
  • 4,271

1
2 3 4 5
19