Skip to content
Open
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
12 changes: 11 additions & 1 deletion src/affine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,20 @@
from collections.abc import MutableSequence, Sequence
from functools import cached_property
import math
from typing import TYPE_CHECKING, overload
import warnings

from attrs import astuple, define, field

if TYPE_CHECKING:
from typing import TypeVar, overload

import numpy as np
from numpy.typing import NDArray

_ScalarType = TypeVar("_ScalarType", bound=np.generic)


__all__ = ["Affine"]
__author__ = "Sean Gillies"
__version__ = "3.0rc2"
Expand Down Expand Up @@ -280,7 +290,7 @@ def permutation(cls, *scaling: float) -> Affine:
"""
return cls(0.0, 1.0, 0.0, 1.0, 0.0, 0.0)

def __array__(self, dtype=None, copy: bool | None = None):
def __array__(self, dtype=None, copy: bool | None = None) -> NDArray[np.float64]:
"""Get affine matrix as a 3x3 NumPy array.

Parameters
Expand Down