-
Notifications
You must be signed in to change notification settings - Fork 308
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
NdProducer::Dim
of axis_windows()
should be Ix1
#1304
Comments
I'm not sure what you ask for.
The result of
But you clearly want a 1D array. What would it look like? If what you want is
then you're simply not using the right methods. |
It's a reasonable request. The current status is because it's reusing the existing Windows producer. The NdProducer Dim is the dimensionality of the space that the producer itself is travelling (not to be mixed with the dimensionality of elements produced). For axis windows, it is traversing a straight line, the axis, hence it can be 1d. |
I'd like to add an adjacent feature request: My use case needs strided windows so I am trying to use |
@goertzenator seems like a reasonable request to me! Thanks for the PR; I'm going to mark that PR as closing this issue once it's merged. |
Please correct me if I am wrong, but it is my understanding that calling
axis_windows
will return a Producer that traverses along the provided axis, not in any other axis. Therefore the associated typeNdProducer::Dim
should beIx1
, and theNdProducer::Item = ArrayView<'_, _, D>
. Unfortunately they are bothD
.I have a use-case where I need to zip some n-D data with a 1-D vector to calculate some result:
Error
I can not think of any reason why the dimension being
D
instead ofIx1
would be useful.axis_iter()
is essentially the same thing with the window size set to 1 and it hasNdProducer::Dim = Ix1
.Actually the x in my example is not needed to produce the error, but it highlights the fact that I can not use
axis_windows_mut(Axis(0), 1)
(which does not exist for mut?) as a workaround.The text was updated successfully, but these errors were encountered: