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

Add convenient implementations of __len__ for CBAOIs #541

Merged
merged 1 commit into from
Jan 4, 2020
Merged

Conversation

aleju
Copy link
Owner

@aleju aleju commented Dec 30, 2019

This patch adds implementations of the __len__
magic method to coordinate-based *OnImage
classes, e.g. BoundingBoxesOnImage. This allows
to call len(cbaoi) to get the count of items
within the instance, e.g. the number of bounding
boxes.

This patch adds implementations of the __len__
magic method to coordinate-based `*OnImage`
classes, e.g. `BoundingBoxesOnImage`. This allows
to call `len(cbaoi)` to get the count of items
within the instance, e.g. the number of bounding
boxes.
@codecov-io
Copy link

codecov-io commented Dec 30, 2019

Codecov Report

Merging #541 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #541      +/-   ##
==========================================
+ Coverage   96.33%   96.35%   +0.02%     
==========================================
  Files          37       37              
  Lines       13369    13377       +8     
==========================================
+ Hits        12879    12889      +10     
+ Misses        490      488       -2

@aleju aleju changed the title Add convenient implementations of __len__ CBAOIs Add convenient implementations of __len__ for CBAOIs Jan 4, 2020
@aleju aleju merged commit 5ff8827 into master Jan 4, 2020
@aleju aleju deleted the len_attr branch January 4, 2020 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants