Skip to content

Commit

Permalink
Merge pull request #57 from klarman-cell-observatory/boli
Browse files Browse the repository at this point in the history
Fixed a critical bug prevent indexing using position arrays
  • Loading branch information
bli25 committed Feb 7, 2021
2 parents b93339c + 8f7a149 commit c404980
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pegasusio/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def _parse_one_index(base_idx: pd.Index, index_1d: Union[INDEX1D, None], index_n
raise ValueError(f"Detect values exceeding the largest valid position {base_idx.size - 1} in {index_name} index!")
if np.unique(index_1d).size < index_1d.size:
raise ValueError(f"{index_name} index values are not unique!")
indexer = index_1d
else:
if not isinstance(index_1d, pd.Index):
assert isinstance(index_1d, np.ndarray) and index_1d.ndim == 1
Expand Down

0 comments on commit c404980

Please sign in to comment.