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
112
votes
22 answers

Launch Pycharm from command line (terminal)

I want to try out PyCharm for sage mathematics development. Normally I run eclipse to do sage development, but now I want to try it with PyCharm. To launch eclipse with sage environment variables, in command line I normally do the following: sage…
torrho
  • 1,823
  • 4
  • 16
  • 21
64
votes
6 answers

SciPy Create 2D Polygon Mask

I need to create a numpy 2D array which represents a binary mask of a polygon, using standard Python packages. input: polygon vertices, image dimensions output: binary mask of polygon (numpy 2D array) (Larger context: I want to get the distance…
Isaac Sutherland
  • 3,082
  • 4
  • 28
  • 37
53
votes
1 answer

What is the difference between SymPy and Sage?

What is the difference between SymPy and Sage a.k.a. SageMath?
Faouzi FJTech
  • 981
  • 3
  • 13
  • 27
28
votes
4 answers

How to install sagemath kernel in Jupyter

I could use Python Kernel with Jupyter. I am looking for a way to use sagemath inside Jupyter.I couldnt see a way for installing it. How to do that?
user567879
  • 5,139
  • 20
  • 71
  • 105
20
votes
2 answers

iPython: Manipulate-like command

In Wolfram Mathematica, I can interactively modify the value of a parameter by using the Manipulate[] command. For example, Manipulate[n, {n, 1, 20}] shows a slider through which is possible to vary the value of n. Is there any simple way (i.e.…
18
votes
4 answers

Does Haskell have an equivalent to Sage?

Is there something like Sage for Haskell programmers?
Ashley
  • 829
  • 1
  • 5
  • 16
16
votes
1 answer

RDSA implementation on sage

First of all I must say my knowledge with using Sage math is really very limited, but I really want to improve an to be able to solve these problems I am having. I have been asked to implement the following: 1 - Read in FIPS 186-4…
sharp_c-tudent
  • 463
  • 5
  • 17
12
votes
5 answers

Python/sage: can lists start at index 1?

I've downloaded from a supposedly serious source a sage script. It doesn't work on my computer, and a quick debugging showed that a problem came from the fact that at some point, the authors were doing as if a n-element list was numbered from 1 to n…
user919119
12
votes
3 answers

Using SageMath as a python library

Is it possible to import the SageMath functions inside a python session? What I wish to do, from a user perspective is something like this: >>> import sage >>> sage.kronecker_symbol(3,5) # ...or any other sage root functions instead of accessing…
SeF
  • 3,864
  • 2
  • 28
  • 41
11
votes
2 answers

How to do PHP Matrix Operations in an easy/efficient way

I'm looking for a way to do Matrix operations in PHP in an easy/efficient way. I want to be able to do the basic Matrix operations like Invert, Multiply, Determinant, add, subtract, Solving Linear Equations Ax=B, transpose, etc. I'm looking at…
Jimmy
  • 1,115
  • 1
  • 9
  • 21
10
votes
2 answers

Adding multiple constraints to scipy minimize, autogenerate constraint dictionary list?

Is there a way to autogenerate a dictionary list of multiple constraints in scipy.minimize? When I use the following code (where the list constraint is a list of sage multivariate polynomials over the same ring) cons = [{'type': 'eq', 'fun': lambda…
9
votes
4 answers

Why is creating a range from 0 to log(len(list), 2) so slow?

I don't have a clue why is this happening. I was messing with some lists, and I needed a for loop going from 0 to log(n, 2) where n was the length of a list. But the code was amazingly slow, so after a bit a research I found that the problem is in…
gjulianm
  • 834
  • 7
  • 22
9
votes
1 answer

Calculate the y coordinate of a point of a elliptic curve with SAGE?

I defined with SAGE: p=(10^34+1000).next_prime() E=EllipticCurve(GF(p),[0,57]) My problem is: I know the x coordinate of a P of the Elliptic Curve 1407284663933896236729058440000 How can I calculate the y coordinate with SAGE?. Any…
vem
  • 93
  • 1
  • 7
8
votes
1 answer

Cython error: Undeclared name not built in:array

I am compiling this Cython code in Sage Cell Server and I get the following error. undeclared name not builtin: array It displays the same error in Sage Notebook. I think it is not recognizing numpy array but it is strange cause I have imported…
jmishra
  • 2,086
  • 2
  • 24
  • 38
7
votes
3 answers

Quadruple Precision Eigenvalues, Eigenvectors and Matrix Logarithms

I am attempting to diagonalize matrices in quadruple precision, and to take their logarithms. Is there a language in which I can accomplish this using built-in functions? Note, the languages/packages in the tags are insufficient, suffering from the…
Ben Criger
  • 150
  • 1
  • 7
1
2 3
62 63