linopy icon indicating copy to clipboard operation
linopy copied to clipboard

Slicing selection not aligned on "Python standards"

Open OBeaude opened this issue 1 year ago • 3 comments

Starting recently with Linopy, I discovered that, applying a slicing operation on a variable (with .loc[idx_start: idx_end] method), does select the last index idx_end, which seems non-aligned on some standards of key Python packages (e.g., numpy, pandas).

Is it directly related to xarray basis of Linopy - and in turn, not easy to be corrected, or could it evolve in a future version of Linopy?

Thank you

OBeaude avatar Jun 21 '24 13:06 OBeaude

thank you for raising the issue, this is indeed something unexpected. this will be something for a breaking change in version 1.0

FabianHofmann avatar Jul 05 '24 15:07 FabianHofmann

@FabianHofmann milestone should be v1.0

aurelije avatar Jul 09 '24 09:07 aurelije

thanks :), fixed it

FabianHofmann avatar Jul 09 '24 09:07 FabianHofmann