Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.14"

sphinx:
configuration: docs/src/conf.py

python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Usage
The 3x3 augmented affine transformation matrix for transformations in two
dimensions is illustrated below.

::
.. code-block:: none

| x' | | a b c | | x |
| y' | = | d e f | | y |
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
attrs
sphinx==6.2.1
sphinx==9.1.0
18 changes: 5 additions & 13 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "rasterio/affine"
copyright = "2025, Sean Gillies"
project_copyright = "%Y, Sean Gillies"
author = "Sean Gillies"
release = "development"

Expand All @@ -21,28 +21,20 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.coverage",
"sphinx.ext.githubpages",
"sphinx.ext.ifconfig",
"sphinx.ext.napoleon", # NumPy doc style.
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
]

templates_path = ["_templates"]
exclude_patterns = ["Thumbs.db", ".DS_Store"]

# The suffix of source filenames.
source_suffix = ".rst"

# The root toctree document.
root_doc = "index"

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
exclude_patterns = ["build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "nature"

html_static_path = ["_static"]

# If this is not None, a 'Last updated on:' timestamp is inserted at every page bottom.
Expand Down
15 changes: 10 additions & 5 deletions src/affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,27 @@ class Affine:

Parameters
----------
a, b, c, d, e, f, [g, h, i] : float
Coefficients of the 3 x 3 augmented affine transformation
matrix.
a, b, c, d, e, f : float
Coefficients of the 3 x 3 augmented affine transformation matrix.

g, h, i : float, optional
Coefficients of the 3 x 3 augmented affine transformation matrix.

Attributes
----------
a, b, c, d, e, f, g, h, i : float
Coefficients of the 3 x 3 augmented affine transformation
matrix::
Coefficients of the 3 x 3 augmented affine transformation matrix.

.. code-block:: none

| x' | | a b c | | x |
| y' | = | d e f | | y |
| 1 | | g h i | | 1 |

`g`, `h`, and `i` are always 0, 0, and 1.

Notes
-----
The Affine package is derived from Casey Duncan's Planar package.
See the copyright statement below. Parallel lines are preserved by
these transforms. Affine transforms can perform any combination of
Expand Down