-
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
Add free-standing function to concatenate datasets #10
Conversation
What do you think about the special case, that the input to concatenate is only one dataset? if len(datasets) == 1:
return datasets[0] |
Good point. Furthermore, this increases symmetry ith the member function. Short circuiting is implemented with commit 0e47822 |
Maybe datasets should be a list so behavior is the same as in numpy, tf, pytorch etc. |
We could do that, but I tried to stay as close as possible to the corresponding member function. If we would change this here, we should change it in the member function as well. However, that would be a breaking change and would thus need another pull request. |
Good point with the compatibility. We should try to support code that is valid in other software. |
I have no objections to the suggestion, but I suggest that we merge this pull request and open a separate issue which we can adress with another pull request in the near future. |
You are right. This PR is fine. I will merge it. |
This branch adds a free-standing function to create a new datset as the concatenation of others. That way the usage of the instance method Dataset as a class method is sidestepped and user code becomes less confusing.