Skip to content

Commit

Permalink
ignoring mypy errors from numpy 2.1.3 -> 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iancze committed Jan 25, 2025
1 parent 129f23b commit e9af555
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ version-file = "src/mpol/mpol_version.py"
line-length = 88

[tool.mypy]
warn_return_any = true
warn_unused_configs = true

[[tool.mypy.overrides]]
Expand Down
2 changes: 1 addition & 1 deletion src/mpol/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def ground_q_centers_2D(self) -> npt.NDArray[np.floating[Any]]:
@cached_property
def sky_phi_centers_2D(self) -> npt.NDArray[np.floating[Any]]:
# https://en.wikipedia.org/wiki/Atan2
return np.arctan2(
return np.arctan2( # type: ignore
self.ground_v_centers_2D, self.ground_u_centers_2D
) # (pi, pi]

Expand Down
2 changes: 1 addition & 1 deletion src/mpol/crossval.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def __init__(
self.cell_list = self.dartboard.get_nonzero_cell_indices(qs, phis)

# indices of cells in the smallest q bin that also have data
small_q_idx = [i for i, l in enumerate(self.cell_list) if l[0] == 0]
small_q_idx = [i for i, l in enumerate(self.cell_list) if l[0] == 0] #type: ignore
# cells in the smallest q bin
self.small_q = self.cell_list[: len(small_q_idx)]

Expand Down
4 changes: 2 additions & 2 deletions src/mpol/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ def get_polar_histogram(

histogram: NDArray
# make a polar histogram
histogram, *_ = np.histogram2d(
qs, phis, bins=[self.q_edges.tolist(), self.phi_edges.tolist()]
histogram, *_ = np.histogram2d( # type:ignore
qs, phis, bins=[self.q_edges.tolist(), self.phi_edges.tolist()] # type:ignore
)

return histogram
Expand Down

0 comments on commit e9af555

Please sign in to comment.