-
Notifications
You must be signed in to change notification settings - Fork 28
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
Implement masked view #102
Implement masked view #102
Conversation
ce98bfb
to
b441e3b
Compare
987380b
to
a2a9418
Compare
3b3fe1f
to
dedb521
Compare
dedb521
to
f6c8660
Compare
f6c8660
to
f75518a
Compare
what's the equivalent to a masked_view in pandas / xarray? |
ok, i see it's the where op in xarray. |
template <class S> | ||
disable_integral_t<S, reference> operator[](const S& index); | ||
template <class I> | ||
reference operator[](std::initializer_list<I> index); |
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 think we should not make this an initializer_list of any more. I've noted the same for xtensor. There is a cost when it get's casted from int32 to int64 which can be avoided by making it size_t from the start.
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.
So you want me to remove it completely ? Isn't it a breaking change in xtensor ?
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.
actually we need to define what we make it i guess.
I think it should take an index_type (i.e. std::array<std::size_t, ... > or svector<size_t>) then we can still easily construct it from an initializer list.
we need to discuss this (anyways, since it is implemented like this in xtensor, we can prob keep it for now :)
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.
Ok I see :) maybe we should open an issue in xtensor ?
No description provided.