Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #51 from saraedum/printing
Browse files Browse the repository at this point in the history
  • Loading branch information
saraedum authored Aug 19, 2020
2 parents 6fd967a + 9bf4117 commit 3f49c9a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
CHANGES IN VERSION 1.1.0
------------------------

o Improve printing of RealEmbeddedNumberField to distinguish it from the SageMath NumberField

CHANGES IN VERSION 1.0.1
------------------------

o Fixed version number in configure.ac

CHANGES IN VERSION 1.0.0
------------------------

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.

dnl We need at least autoconf 2.69 for this configure.ac to work.
AC_PREREQ([2.69])
AC_INIT([pyeantic], [1.0.1], [[email protected]])
AC_INIT([pyeantic], [1.1.0], [[email protected]])

AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.14.1])
Expand Down
4 changes: 2 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = '1.0.1' %}
{% set build_number = environ.get('GIT_DESCRIBE_NUMBER') %}
{% set version = '1.1.0' %}
{% set build_number = '0' %}
{% set action = action or 'release' %}
{% set py = _python | replace('*', '') | replace(' ', '') | replace('.', '') %}
{% set test_requirements = action in ["test", "coverage", "benchmark"] %}
Expand Down
6 changes: 3 additions & 3 deletions src/pyeantic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ def RealEmbeddedNumberField(*args, **kwargs):
sage: from pyeantic import RealEmbeddedNumberField
sage: K = NumberField(x**2 - 2, 'a', embedding=sqrt(AA(2)))
sage: RealEmbeddedNumberField(K)
Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
From an actual embedding::
sage: K = NumberField(x**2 - 2, 'a')
sage: RealEmbeddedNumberField(K.embeddings(AA)[0])
Number Field in a with defining polynomial x^2 - 2 with a = -1.414213562373095?
Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = -1.414213562373095?
From a ``renf_class``::
sage: from pyeantic import eantic
sage: K = eantic.renf_class.make("a^2 - 2", "a", "1.4 +/- .1")
sage: RealEmbeddedNumberField(K)
Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
"""
from .real_embedded_number_field import RealEmbeddedNumberField as RENF
Expand Down
8 changes: 4 additions & 4 deletions src/pyeantic/real_embedded_number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ def _repr_(self):
sage: from pyeantic import RealEmbeddedNumberField
sage: K = NumberField(x**2 - 2, 'a', embedding=sqrt(AA(2)))
sage: RealEmbeddedNumberField(K)
Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
"""
return repr(self.number_field)
return "Real Embedded %r"%(self.number_field,)

def characteristic(self):
r"""
Expand Down Expand Up @@ -542,7 +542,7 @@ def __pow__(self, n, _ = None):
sage: K = NumberField(x**2 - 2, 'a', embedding=sqrt(AA(2)))
sage: K = RealEmbeddedNumberField(K)
sage: K^3
Vector space of dimension 3 over Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
Vector space of dimension 3 over Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
"""
if isinstance(n, tuple):
Expand Down Expand Up @@ -613,7 +613,7 @@ def section(self):
sage: KK = RealEmbeddedNumberField(K)
sage: K.coerce_map_from(KK).section()
Generic morphism:
From: Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
From: Real Embedded Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
To: Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
"""
Expand Down
2 changes: 1 addition & 1 deletion test/sage-doctest.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
set -ex

TARGETS=`grep -l 'sage: ' @srcdir@/../src/pyeantic/*.py`
sage -t --long --force-lib $TARGETS
sage -tp --long --force-lib $TARGETS

0 comments on commit 3f49c9a

Please sign in to comment.