Skip to content
Merged
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
7 changes: 4 additions & 3 deletions geometer/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def from_planes(cls, e: PlaneTensor, f: PlaneTensor) -> QuadricTensor:

"""
m = outer(e.array, f.array)
m += m.T # type: ignore[misc]
m += m.T # type: ignore[arg-type]
return cls(m, normalize_matrix=True)

def tangent(self, at: PointTensor) -> PlaneTensor:
Expand Down Expand Up @@ -167,6 +167,7 @@ def components(self) -> list[Point | PointCollection] | list[Line | LineCollecti
n = self.shape[-1]
indices = tuple(np.indices(self.shape[:-2]))

p: npt.NDArray[np.number]
if n == 3:
b = adjugate(self.array)
i = np.argmax(np.abs(np.diagonal(b, axis1=-2, axis2=-1)), axis=-1)
Expand Down Expand Up @@ -317,7 +318,7 @@ def from_lines(cls, g: Line, h: Line) -> Conic:

"""
m = outer(g.array, h.array)
m += m.T # type: ignore[misc]
m += m.T # type: ignore[arg-type]
return Conic(m, normalize_matrix=True)

@classmethod
Expand Down Expand Up @@ -406,7 +407,7 @@ def from_crossratio(cls, cr: float, a: Point, b: Point, c: Point, d: Point) -> C
bc = adjugate([np.ones(3), b.array, c.array])[:, 0]

matrix = outer(ac, bd) - cr * outer(ad, bc)
matrix += matrix.T # type: ignore[misc]
matrix += matrix.T # type: ignore[arg-type]

return cls(matrix, normalize_matrix=True)

Expand Down
2 changes: 1 addition & 1 deletion geometer/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _join_meet_duality(
i = tuple(np.reshape(x, array.shape[: coplanar.ndim]) for x in i) # type: ignore[misc]
indices = tuple(np.indices(array.shape[: coplanar.ndim]))
if not intersect_lines:
result_array = array[(*indices, i[0], Ellipsis)]
result_array = array[(*indices, i[0], Ellipsis)] # type: ignore[arg-type]
result_rank = result_array.ndim - coplanar.ndim
result = Tensor(result_array, covariant=False, tensor_rank=result_rank, copy=None)
else:
Expand Down
2 changes: 1 addition & 1 deletion geometer/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def scaling(*factors: npt.ArrayLike) -> Transformation:
The scaling transformation.

"""
return affine_transform(np.diag(factors)) # type: ignore[arg-type]
return affine_transform(np.diag(factors))


def reflection(axis: Subspace) -> Transformation:
Expand Down
Loading