Skip to content

Commit

Permalink
Just call use_future_array_shapes -- if it's already set it's a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
bhazelton committed Feb 29, 2024
1 parent ceba263 commit 2fe795b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyuvsim/uvsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ def uvdata_to_task_iter(task_ids, input_uv, catalog, beam_list, beam_dict, Nsky_
raise TypeError("catalog must be a SkyModelData object.")

# use future array shapes
if not input_uv.future_array_shapes:
input_uv.use_future_array_shapes()
input_uv.use_future_array_shapes()

# Splitting the catalog for memory's sake.
Nsrcs_total = catalog.Ncomponents
Expand Down Expand Up @@ -722,8 +721,7 @@ def run_uvdata_uvsim(
if not ((input_uv.Npols == 4) and (input_uv.polarization_array.tolist() == [-5, -6, -7, -8])):
raise ValueError("input_uv must have XX,YY,XY,YX polarization")

if not input_uv.future_array_shapes:
input_uv.use_future_array_shapes()
input_uv.use_future_array_shapes()

Check warning on line 724 in pyuvsim/uvsim.py

View check run for this annotation

Codecov / codecov/patch

pyuvsim/uvsim.py#L724

Added line #L724 was not covered by tests

input_order = input_uv.blt_order
if input_order != ("time", "baseline"):
Expand Down

0 comments on commit 2fe795b

Please sign in to comment.