Skip to content

Commit

Permalink
Mypy fixes in proxy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Aug 26, 2024
1 parent 23276e7 commit 4eb2788
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytential/linalg/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def partition_by_nodes(
nclusters = max(discr.ndofs // max_particles_in_box, 2)
indices = np.arange(0, discr.ndofs, dtype=np.int64)
starts = np.linspace(0, discr.ndofs, nclusters + 1, dtype=np.int64)

# FIXME: I'm not sure why mypy can't figure this out.
assert starts is not None

assert starts[-1] == discr.ndofs

from pytential.linalg import make_index_list
Expand Down Expand Up @@ -678,7 +682,7 @@ def prg() -> lp.ExecutorBase:
""", [
lp.GlobalArg("ary", None,
shape=(discr.ambient_dim, "ndofs"), dim_tags="sep,C"),
lp.ValueArg("ndofs", np.int64),
lp.ValueArg("ndofs", np.dtype(np.int64)),
...],
name="picker_knl",
assumptions="ndim>=1 and npoints>=1",
Expand Down

0 comments on commit 4eb2788

Please sign in to comment.