-
Notifications
You must be signed in to change notification settings - Fork 10
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
[New Check]: TimeSeries with empty dataset #403
base: dev
Are you sure you want to change the base?
[New Check]: TimeSeries with empty dataset #403
Conversation
@alessandratrapani Very minor thing, but it seems as if GitHub is not smart enough to recognize the keyphrase 'Related to Issue #...' when automatically adding the development issue link I always do 'fix #...', I think I've seen 'resolve #...' work for others No worries, though - it's easy to add it afterward through the web interface |
def is_empty_data(data): | ||
if isinstance(data, ndarray): | ||
return data.size == 0 | ||
elif isinstance(data, (list, tuple)): | ||
return all(is_empty_data(item) for item in data) | ||
else: | ||
return not bool(data) |
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.
I wouldn't mind if this were moved to the common utils
to be used by any other check (or anyone else) going forward 😃
I want to say the basic structure looks good for checking the The best way to tell will be to add several tests (cases where it should pass without raising a message, cases where it should catch 'emptiness', skips on certain edge cases such as |
Related to Issue #324
add check function for empty dataset