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.

SageMath

SageMath, formerly SAGE, then Sage, is computational mathematics free software. It includes

SageMath uses the Python language, with a tiny bit of syntactic sugar to ease definition of mathematical objects such as symbolic functions, number fields, polynomial rings. Some parts are written in or C/C++ for speed, but a typical user would only use Python syntax. Python wrappers help call other software included in SageMath pythonically.

It is possible to use SageMath using .

External links

Similar-sounding but unrelated tags

Many other things are called Sage. Please use the appropriate tags.

Only use the tag for questions about SageMath, the Sage mathematics software system.

The TeX.SE website has a [sagetex] tag for SageTeX questions.

MathOverflow also has a [sage] tag for Sage questions.

Note also that Ask Sage, SageMath's questions-and-answers site, and sage-support, the user support mailing list, are very active and that questions asked there typically get answered faster than on the StackExchange network.

934 questions
0
votes
1 answer

counter modified during recursion in python

To extract all (possibly non contiguous) sublists of length r from a list li, I wrote the function def sublist(li, r): output = list() if r == 1: return [ [element] for element in li ] for firstelement in [1,len(li)-r+1]: …
0
votes
1 answer

the graph in sage

I want define new graph in sage. Let G be finite group. The graph's vertices are subgroup and two vertices are adjacent if and only if sum of two subgroup is G. I have trouble with define this graph in sage. Any suggestion? I have idea in gap but I…
Babgen
  • 113
  • 3
0
votes
1 answer

ZZ function in sage programming

So I have decided to learn Sage programming since it can handle very large numbers which is useful for RSA encrypting/decrypting. (1) I was following an example but I am not quite sure how they got 100 inside the ZZ() function. (2) Also another…
jaymeister
  • 53
  • 7
0
votes
1 answer

Installing the Enthought Python Distribution with existing python distro

I am currently trying to install the Enthought Python Distribution (EPD), and have existing python distros. I currently have ipython, numpy and a lot of other tools, plus Sage (an open-source Python science/math distro) installed. When I tried…
Scott
  • 79
  • 3
  • 7
0
votes
2 answers

Getting rid of spikes in sample data

How could I get rid of sparky data in a descrete data set, but in a "smoother out" manner? Take for instance There are two sparks, at 20000, but the next one at 600 is also considered a spark. I've managed to get the very high ones to zero, by a =…
Flavius
  • 13,566
  • 13
  • 80
  • 126
0
votes
1 answer

Adding up values in a specific column in a CSV file (in Sage Notebook)

I have a csv file that contains a large number of values in 4 different columns. Using python, is there a way to add up the values in one particular column (say the values in column 1). I want to find the average of all the values in the one…
NuNu
  • 667
  • 2
  • 12
  • 21
0
votes
1 answer

Python/Creating a graph in Sage Notebook

import csv a = csv.reader(open(DATA+'DataA.csv')) for row in a: time = row[1] conversion = row[3] x_series = time y_series = conversion scatter_plot(zip(x_series,y_series)) I am attempting to create a scatter plot in Sage Notebook.…
NuNu
  • 667
  • 2
  • 12
  • 21
0
votes
1 answer

sagemath: Convert Fractions in Dictionaries in a list to Decimals for matplotlib

eng3 = [solve(eng==(k-1)*md*Vm^2/(2*Patm*Vc*(Pc-Pc^(1/k))),Vc,solution_dict=1) for Pc in xrange(2,10)] I'm trying to automate the process of some efficiency graphs in sage mathematics, and I've got this formula. Matplotlib.pyplot wants a list of…
cii
  • 155
  • 2
  • 12
0
votes
1 answer

python modules missing in sage

I have Sage 4.7.1 installed and have run into an odd problem. Many of my older scripts that use functions like deepcopy() and uniq() no longer recognize them as global names. I have been able to fix this by importing the python modules one by one,…
mjenista
  • 23
  • 6
0
votes
2 answers

Aligning list elements Sagemath

I have a huge list with hundreds of thousands of numbers. The list is badly formatted when produced by sagemath, but i must have it in the kind of formatting shown below to "feed" it to another function. Here is sample of the well formatted list: …
CosmoSurreal
  • 259
  • 6
  • 16
0
votes
1 answer

Syntax error when installing the spkg package of wxPython on Sage

When I want to install the package wxPython-2.8.7.1.spkg from here in the terminal of Sage it gives me a syntax error. What i write in Sage terminal and the result are as follow: sage: sage -i…
user1483636
0
votes
1 answer

Verification SIgnature ECDSA using SAGE

In the ECDSA algorithm (verification signature) you have to calculate a new point using the next formula: (x0,y0) = u1*P+U2*P_a How can I calculate the coordenates of this new point?, i try that sentence in SAGE but it doesn't work. X =…
vem
  • 93
  • 1
  • 7
0
votes
1 answer

What is the default __hash__ method in Sage?

I have a Sage class that inherits from SageObject. According to the Python documentation, User-defined classes have __cmp__()and __hash__() methods by default; with them, all objects compare unequal (except with themselves) and x.__hash__()…
Scott M
  • 115
  • 6
0
votes
1 answer

SAGE returning wrong minimal polynomial?

sage: A [ t 1 1 0 t + 1 1] [ t t 0 t + 1 t 1] [ 0 1 t + 1 0 t 0] [ t t 0 0 0 0] [ 0 1 0 1 1 1] [ t 1 t t t 1] sage:…
Gadi A
  • 3,449
  • 8
  • 36
  • 54
-1
votes
1 answer

How do I plot vector functions in sagemath?

I can not seem to figure out how to plot my vector function. I define the function like this alpha = vector([sin(x), cos(x)]) and I can plot a single vector plot(alpha(x=1)) but can not plot the whole function plot(alpha(x=x)) #unable to simplify…