Skip to content

Commit

Permalink
add type check
Browse files Browse the repository at this point in the history
  • Loading branch information
ykyohei committed Jan 3, 2025
1 parent 9fd7b8c commit 871d918
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sotodlib/coords/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,10 @@ def _apply_inverse_weights_map(inverse_weights, target, out=None):
"""
if out is None:
out = enmap.ndmap(np.empty(inverse_weights.shape[1:],
dtype=target.dtype), target.wcs)
out = np.empty(inverse_weights.shape[1:],
dtype=target.dtype)
if isinstance(target, enmap.ndmap):
out = enmap.ndmap(out, target.wcs)
# Recall matmul(a, b) operates on the last two axes of (a, b). So
# move axes, and create a second one in target; re-order at end.
iw = np.moveaxis(inverse_weights, (0,1), (-2,-1))
Expand Down

0 comments on commit 871d918

Please sign in to comment.