[python-affine] 01/10: Imported Upstream version 1.3.0

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Fri Apr 8 21:10:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-affine.

commit c06a8c302214f16c919b9c7bc40b2345edfc3f30
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Apr 8 22:39:54 2016 +0200

    Imported Upstream version 1.3.0
---
 CHANGES.txt                    |  4 ++++
 affine/__init__.py             |  4 ++--
 affine/tests/test_transform.py |  1 -
 tox.ini                        | 12 ++++++++++++
 4 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index ec950e4..f65dafd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,10 @@
 CHANGES
 =======
 
+1.3.0 (2016-04-08)
+------------------
+- is_degenerate predicate is precise, not approximate (#22).
+
 1.2.0 (2015-06-01)
 ------------------
 - Enable pickling of Affine objects (#14).
diff --git a/affine/__init__.py b/affine/__init__.py
index dc2dac9..2911ad9 100644
--- a/affine/__init__.py
+++ b/affine/__init__.py
@@ -47,7 +47,7 @@ import math
 
 __all__ = ['Affine']
 __author__ = "Sean Gillies"
-__version__ = "1.2.0"
+__version__ = "1.3.0"
 
 EPSILON = 1e-5
 EPSILON2 = EPSILON ** 2
@@ -328,7 +328,7 @@ class Affine(
         collapse a shape to an effective area of zero. Degenerate transforms
         cannot be inverted.
         """
-        return abs(self.determinant) < EPSILON
+        return self.determinant == 0.0
 
     @property
     def column_vectors(self):
diff --git a/affine/tests/test_transform.py b/affine/tests/test_transform.py
index d5c5806..7afcccb 100644
--- a/affine/tests/test_transform.py
+++ b/affine/tests/test_transform.py
@@ -299,7 +299,6 @@ class PyAffineTestCase(unittest.TestCase):
         assert Affine.scale(0, 300).is_degenerate
         assert Affine.scale(0).is_degenerate
         assert Affine.scale(0).is_degenerate
-        assert Affine.scale(EPSILON).is_degenerate
 
     def test_column_vectors(self):
         a, b, c = Affine(2, 3, 4, 5, 6, 7).column_vectors
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..df8aec2
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+[tox]
+envlist = 
+    py27,py34,py35
+
+[testenv]
+usedevelop = true
+deps =
+    nose
+    pytest-cov
+    responses
+commands = 
+    python -m pytest --cov affine --cov-report term-missing

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-affine.git



More information about the Pkg-grass-devel mailing list