Skip to content

Commit

Permalink
Merge branch 'develop' into add_hadamard_matrices_up_to_1000
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCati authored Mar 3, 2023
2 parents 379bed5 + 46a6105 commit 56cfec2
Show file tree
Hide file tree
Showing 85 changed files with 821 additions and 252 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/config.status
/configure
/conftest*
/confdefs.h

/m4/sage_spkg_configures.m4

Expand Down
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 10.0.beta2",
"version": "10.0.beta2",
"title": "sagemath/sage: 10.0.beta3",
"version": "10.0.beta3",
"upload_type": "software",
"publication_date": "2023-02-23",
"publication_date": "2023-03-02",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/10.0.beta2",
"identifier": "https://github.com/sagemath/sage/tree/10.0.beta3",
"relation": "isSupplementTo"
},
{
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.0.beta2, Release Date: 2023-02-23
SageMath version 10.0.beta3, Release Date: 2023-03-02
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=a9dd38e83511f7f7911c94366c1c7b9e213cea3e
md5=e341828a3c4d17b37887cd93c298286f
cksum=2811082803
sha1=b9a6c30f4f1c828ca611527d104643d8c0b89ed9
md5=37a7a99a528efa8a4eea1beff33985db
cksum=1112286999
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bbd91d34c346cbb308e6bfac72ac414b365f190c
a822a2132aa0e85069ec8b6efa48ad6db08cc044
1 change: 0 additions & 1 deletion build/pkgs/giac/checksums.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ tarball=giac-VERSION.tar.bz2
sha1=78c15badd19b49b7d111ac204b611a4378ce3d15
md5=8fbd43a5c60848b6813b7fc8698a0199
cksum=1923149665
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/31563/giac-VERSION.tar.bz2
1 change: 0 additions & 1 deletion build/pkgs/iml/checksums.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ tarball=iml-VERSION.tar.bz2
sha1=8aba468a62e6fb0584be9b014350b734663c0670
md5=a8083e70c0c4378f69eb772c1eeed6f0
cksum=2793221462
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/33195/iml-1.0.4p2.tar.bz2
1 change: 0 additions & 1 deletion build/pkgs/mathjax/checksums.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ tarball=mathjax-VERSION.tar.gz
sha1=3f7abecf8cacd7f5d7f9ae6c3baca7739101c17d
md5=ba1a65ab58aaad6c84f39735c619bc34
cksum=1142131398
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/25833/mathjax-3.2.0.tar.gz
1 change: 0 additions & 1 deletion build/pkgs/msolve/checksums.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ tarball=msolve-VERSION.tar.gz
sha1=5b227de8b222bfe8d143e1d7ea77ad71cd209dc8
md5=2f34bd9ccb089688ae169201281108dc
cksum=941373315
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/31664/msolve-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-conf ~= 10.0b2
sage-conf ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-docbuild ~= 10.0b2
sage-docbuild ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-setup ~= 10.0b2
sage-setup ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-sws2rst ~= 10.0b2
sage-sws2rst ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagelib ~= 10.0b2
sagelib ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-categories ~= 10.0b2
sagemath-categories ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-environment ~= 10.0b2
sagemath-environment ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-objects ~= 10.0b2
sagemath-objects ~= 10.0b3
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-repl ~= 10.0b2
sagemath-repl ~= 10.0b3
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sage-conf_pypi/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.0.beta2
10.0.beta3
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# which stops "setup.py develop" from rewriting it as a Python file.
:
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='10.0.beta2'
SAGE_RELEASE_DATE='2023-02-23'
SAGE_VERSION_BANNER='SageMath version 10.0.beta2, Release Date: 2023-02-23'
SAGE_VERSION='10.0.beta3'
SAGE_RELEASE_DATE='2023-03-02'
SAGE_VERSION_BANNER='SageMath version 10.0.beta3, Release Date: 2023-03-02'
9 changes: 9 additions & 0 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,10 @@ REFERENCES:
Stein. strassen_window_multiply_c. strassen.pyx, Sage
3.0, 2008. http://www.sagemath.org
.. [BrHu2019] Petter Brändén, June Huh. *Lorentzian polynomials*.
Ann. Math. (2) 192, No. 3, 821-891 (2020).
:arxiv:`1902.03719`, :doi:`10.4007/annals.2020.192.3.4`.
.. [BHNR2004] \S. Brlek, S. Hamel, M. Nivat, C. Reutenauer, On the
Palindromic Complexity of Infinite Words,
in J. Berstel, J. Karhumaki, D. Perrin, Eds,
Expand Down Expand Up @@ -3257,6 +3261,11 @@ REFERENCES:
Designs, Codes and Cryptography 8 (1996) 145-157.
:doi:`10.1023/A:1018037025910`.
.. [HMMS2019] June Huh, Jacob P. Matherne, Karola Mészáros, Avery St. Dizier.
*Logarithmic concavity of Schur and related polynomials*.
Trans. Am. Math. Soc. 375, No. 6, 4411-4427 (2022).
:arxiv:`1906.09633`, :doi:`10.1090/tran/8606`.
.. [Hutz2007] \B. Hutz. Arithmetic Dynamics on Varieties of dimension greater
than one. PhD Thesis, Brown University 2007
Expand Down
26 changes: 26 additions & 0 deletions src/sage/interfaces/tachyon.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,14 @@
#*****************************************************************************

import os
import re

from sage.cpython.string import bytes_to_str
from sage.misc.pager import pager
from sage.misc.superseded import deprecation
from sage.misc.temporary_file import tmp_filename
from sage.structure.sage_object import SageObject
from sage.misc.cachefunc import cached_method


class TachyonRT(SageObject):
Expand Down Expand Up @@ -799,6 +801,11 @@ def __call__(self, model, outfile='sage.png', verbose=1, extra_opts=''):
Parser failed due to an input file syntax error.
Aborting render.
"""
if self.version() >= '0.99.2':
# this keyword was changed in 0.99.2
model = model.replace(
" focallength ",
" focaldist ")
modelfile = tmp_filename(ext='.dat')
with open(modelfile, 'w') as file:
file.write(model)
Expand Down Expand Up @@ -851,6 +858,25 @@ def usage(self, use_pager=True):
else:
print(r)

@cached_method
def version(self):
"""
Returns the version of the Tachyon raytracer being used.
TESTS::
sage: tachyon_rt.version() # random
0.98.9
sage: tachyon_rt.version() >= '0.98.9'
True
"""
with os.popen('tachyon') as f:
r = f.readline()
res = re.search(r"Version ([\d.]*)", r)
# debian patches tachyon so it won't report the version
# we hardcode '0.99' since that's indeed the version they ship
return res[1] if res else '0.99'

def help(self, use_pager=True):
"""
Deprecated: type 'sage.interfaces.tachyon?' for help
Expand Down
51 changes: 50 additions & 1 deletion src/sage/modular/quasimodform/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from sage.structure.element import ModuleElement
from sage.structure.richcmp import richcmp, op_NE, op_EQ

from sage.rings.integer import Integer
from sage.rings.polynomial.polynomial_element import Polynomial
from sage.rings.integer_ring import ZZ

Expand Down Expand Up @@ -506,7 +507,8 @@ def weight(self):
r"""
Return the weight of the given quasimodular form.
Note that the given form must be homogeneous.
Note that the given form must be homogeneous. An alias of this method is
``degree``.
EXAMPLES::
Expand All @@ -517,6 +519,8 @@ def weight(self):
6
sage: QM(1/2).weight()
0
sage: (QM.0).degree()
2
sage: (QM.0 + QM.1).weight()
Traceback (most recent call last):
...
Expand All @@ -529,6 +533,8 @@ def weight(self):
raise ValueError("the given graded quasiform is not an homogeneous \
element")

degree = weight # alias

def homogeneous_components(self):
r"""
Return a dictionary where the values are the homogeneous components of
Expand Down Expand Up @@ -574,6 +580,49 @@ def homogeneous_components(self):
components[ZZ(k + 2*i)] = QM(forms[k]*(E2**i))
return components

def __getitem__(self, weight):
r"""
Return the homogeneous component of the given quasimodular form ring
element.
An alias of this method is ``homogeneous_component``.
EXAMPLES::
sage: QM = QuasiModularForms(1)
sage: E2, E4, E6 = QM.gens()
sage: F = E2 + E4*E6 + E2^3*E6
sage: F[2]
1 - 24*q - 72*q^2 - 96*q^3 - 168*q^4 - 144*q^5 + O(q^6)
sage: F[10]
1 - 264*q - 135432*q^2 - 5196576*q^3 - 69341448*q^4 - 515625264*q^5 + O(q^6)
sage: F[12]
1 - 576*q + 21168*q^2 + 308736*q^3 - 15034608*q^4 - 39208320*q^5 + O(q^6)
sage: F[4]
0
sage: F.homogeneous_component(2)
1 - 24*q - 72*q^2 - 96*q^3 - 168*q^4 - 144*q^5 + O(q^6)
TESTS::
sage: F[x]
Traceback (most recent call last):
...
KeyError: 'the weight must be an integer'
sage: F[-1]
Traceback (most recent call last):
...
ValueError: the weight must be nonnegative
"""
if not isinstance(weight, (int, Integer)):
raise KeyError("the weight must be an integer")
if weight < 0:
raise ValueError("the weight must be nonnegative")
return self.homogeneous_components().get(weight, self.parent().zero())

homogeneous_component = __getitem__ # alias


def serre_derivative(self):
r"""
Return the Serre derivative of the given quasimodular form.
Expand Down
Loading

0 comments on commit 56cfec2

Please sign in to comment.