Skip to content

fix(array): fix edge case on single boolean index#28

Merged
hanxiao merged 1 commit intomainfrom
fix-single-bool-index
Jan 11, 2022
Merged

fix(array): fix edge case on single boolean index#28
hanxiao merged 1 commit intomainfrom
fix-single-bool-index

Conversation

@hanxiao
Copy link
Copy Markdown
Member

@hanxiao hanxiao commented Jan 11, 2022

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 11, 2022

Codecov Report

Merging #28 (0232a30) into main (2704500) will increase coverage by 0.15%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   82.93%   83.09%   +0.15%     
==========================================
  Files          67       67              
  Lines        3135     3135              
==========================================
+ Hits         2600     2605       +5     
+ Misses        535      530       -5     
Flag Coverage Δ
docarray 83.09% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/array/document.py 84.25% <100.00%> (+0.46%) ⬆️
docarray/helper.py 64.28% <0.00%> (+2.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b534fc3...0232a30. Read the comment docs.

@hanxiao hanxiao merged commit 79ad236 into main Jan 11, 2022
@hanxiao hanxiao deleted the fix-single-bool-index branch January 11, 2022 11:26
<DocumentArray (length=50) at 4513619088>
```

Note that if the length of the boolean mask is smaller than the length of a DocumentArray, then the remaining part is padded to `False`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add 'The length of the boolean mask should be at least 2'.

Copy link
Copy Markdown
Contributor

@davidbp davidbp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants