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

Drop ObsView etc. #8

Closed
darsnack opened this issue Dec 28, 2021 · 2 comments · Fixed by #11
Closed

Drop ObsView etc. #8

darsnack opened this issue Dec 28, 2021 · 2 comments · Fixed by #11

Comments

@darsnack
Copy link
Member

Should we drop DataView and ObsView? Most of the data iterators can be implemented without them, and I think we should minimize the number of extraneous (abstract) types.

@CarloLucibello
Copy link
Member

Should we drop DataView and ObsView?

I'd like to, but I tried to obtain the same functionality with

for x in datasubset(data) ...
# or 
for x in DataSubset(data) ...

but it's not quite the same as iterating over ObsView since x is still a DataSubset

I think we should minimize the number of extraneous (abstract) types.

agree.

@darsnack
Copy link
Member Author

That's because of the following override for DataSubsets:

# override AbstractDataContainer defaults
Base.getindex(subset::DataSubset, idx) =
    DataSubset(subset.data, _view(subset.indices, idx))

We could get rid of this. I am not sure what is to be gained by this override.

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 a pull request may close this issue.

2 participants