-
Notifications
You must be signed in to change notification settings - Fork 13
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
Corr.__getitem__ unexpected behaviour #236
Comments
Hi, I don't know what you opinion on this would be. |
I also remember discussing this with @s-kuberski some time ago. So far we have been very strict about not introducing breaking changes in minor releases. Should we consider making an exception here or, do we want to stick to our policy? |
I am not sure. It is the question if you consider this fixing a bug or introducing a breaking change, but I think the semantic versioning would tell you not to break the behavior anyways, right? I am fine with not fixing this for now, although any workaround that would break when this is fixed might be introduced in more and more workflows the longer we keep it in here. I personally would also be able to adapt my codes to work with the new behavior. |
Hi, |
Hi,
so, I was using the Corr class the other day and I found that there is a small issue, when picking ranges of timeslices from a correlator using slicing.
When using one item from a correlator, such as
pe.Corr[10]
on a correlator that has a single value per timeslice (i.e. is no matrix valued Correlator),I receive a
pe.Obs
back, as expected.However, if I use
pe.Corr[10:12]
in the same correlator, I receive an object of the formlist[np.ndarray(pe.Obs), np.ndarray(pe.Obs)]
, where the inner arrays hold onepe.Obs
item.This should come from
pe.Corr
line 126, which evaluates to 2 == 1 -> False in the second case, as the slicing is handed over in a weird way.This is not a
pyerrors
specific problem, but maybe we should circumvent this somehow?Cheers
Justus
The text was updated successfully, but these errors were encountered: