Skip to content

Commit

Permalink
fix: use np.unique instead of set
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Oct 23, 2024
1 parent 8784862 commit 76974d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyuvdata/uvdata/initializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,9 @@ def new_uvdata(
obj.vis_units = vis_units
if blts_are_rectangular:
if time_axis_faster_than_bls:
obj.Nants_data = len(set(antpairs[::ntimes]))
obj.Nants_data = len(np.unique(antpairs[::ntimes]))
else:
obj.Nants_data = len(set(antpairs[:nbls]))
obj.Nants_data = len(np.unique(antpairs[:nbls].flatten()))
else:
obj.Nants_data = len(set(np.concatenate([ant_1_array, ant_2_array])))
obj.Nbls = nbls
Expand Down

0 comments on commit 76974d9

Please sign in to comment.