Skip to content

Commit

Permalink
Fix checks when slice arguments are NumPy vectors (#92).
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche authored Jan 5, 2024
1 parent bb72a6b commit 3db1f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biocframe/BiocFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ def get_slice(
A ``BiocFrame`` with the specified rows and columns.
"""
new_column_names = self._column_names
if columns != slice(None):
if not (isinstance(columns, slice) and columns == slice(None)):
new_column_indices, _ = ut.normalize_subscript(
columns, len(new_column_names), new_column_names
)
Expand All @@ -711,7 +711,7 @@ def get_slice(

new_row_names = self._row_names
new_number_of_rows = self.shape[0]
if rows != slice(None):
if not (isinstance(rows, slice) and rows == slice(None)):
new_row_names = self.row_names
new_row_indices, _ = ut.normalize_subscript(
rows, self.shape[0], new_row_names
Expand Down

0 comments on commit 3db1f6e

Please sign in to comment.