Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

hanxiao
Copy link
Member

@hanxiao hanxiao commented Jan 11, 2022

No description provided.

@codecov
Copy link

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
@@ -120,6 +120,8 @@ print(da)
<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
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
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.

None yet

2 participants