Skip to content

Commit

Permalink
mypy: fix some new numpy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Dec 15, 2024
1 parent 219a4c4 commit 0957223
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pytential/linalg/skeletonization.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,8 @@ def skeletonize_by_proxy(
skels: np.ndarray = np.empty((wrangler.nrows, wrangler.ncols), dtype=object)
for ibrow in range(wrangler.nrows):
for ibcol in range(wrangler.ncols):
skels[ibrow, ibcol] = _skeletonize_block_by_proxy_with_mats(
# NOTE: type annotations for object arrays are not there yet
skels[ibrow, ibcol] = _skeletonize_block_by_proxy_with_mats( # type: ignore[call-overload]
actx, ibrow, ibcol, places, proxy, wrangler, tgt_src_index,
id_eps=id_eps, id_rank=id_rank,
max_particles_in_box=max_particles_in_box)
Expand Down
4 changes: 2 additions & 2 deletions pytential/qbx/target_assoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

class target_status_enum(Enum): # noqa
c_name = "TargetStatus"
dtype = np.int32
dtype = np.dtype(np.int32)
c_value_prefix = ""

UNMARKED = 0
Expand All @@ -142,7 +142,7 @@ class target_status_enum(Enum): # noqa

class target_flag_enum(Enum): # noqa
c_name = "TargetFlag"
dtype = np.int32
dtype = np.dtype(np.int32)
c_value_prefix = ""

INTERIOR_OR_EXTERIOR_VOLUME_TARGET = 0
Expand Down

0 comments on commit 0957223

Please sign in to comment.