-
Notifications
You must be signed in to change notification settings - Fork 8
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
update get dimensionality method. #361
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test missing
dimensions = 3 | ||
|
||
return dimensions | ||
return np.where(box != 0, 0, 1, 0).sum() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems thre has actually been a test for this the whole time. One of the first added.
def test_get_dimensionality(self):
"""
Test the get_dimensionality method.
Returns
-------
assert that for all choices of dimension array the correct dimension comes out.
"""
one_d = [1, 0, 0]
two_d = [1, 1, 0]
three_d = [1, 1, 1]
assert get_dimensionality(one_d) == 1
assert get_dimensionality(two_d) == 2
assert get_dimensionality(three_d) == 3
Summary of additions and changes