You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following methods have an inplace argument: DataArray.reset_coords DataArray.set_index DataArray.reset_index DataArray.reorder_levels Dataset.set_coords Dataset.reset_coords Dataset.rename Dataset.swap_dims Dataset.set_index Dataset.reset_index Dataset.reorder_levels Dataset.update Dataset.merge
As proposed in #1755 (comment), let's deprecate all of these at the next major release (v0.11). They add unnecessary complexity to methods and promote confusing about xarray's data model.
Practically, we would change all of the default values to inplace=None and issue either a DeprecationWarning or FutureWarning (see PEP 565 for more details on that choice).
Reacted by Maximilian Roos, Keisuke Fujii, Joe Hamman and Leevi Annala
Hi,
Sorry for the late comment about a closed bug. But I find changing the API a bit irritating to say the least, and this is a serious change. Although apparently not many people use it, some actually may (myself included). And so far there has been only one bug report, so what problem are you trying to fix?
I can fix my own code but there may be others out there that cannot keep pace with the development and including their packages may then break software. For my taste the deprecation warning is a bit short if you are going to remove such a feature already in the next version. A few more cycles would be appreciated.
At the very least put a big warning sign to the documentation that xarray is still beta and the API is still subject to change.
@st-bender - sorry to hear this change has caught you by surprise. We're a ways off from 0.12 so you should have time to work in any necessary changes before the feature if fully removed. If you have questions about how to adjust our use these methods, let us know.
Hi,
Thanks for the replies, I was indeed caught by surprise and given that the version number is 0.11.x, I had the impression that 0.12.x would be the next major minor release (and coming soon).
@shoyer In that case I would take it back and vote for a change as soon as possible to stabilize the API. Although xarray is still considered beta, I guess some people already use it productively.
@jhamman Thanks for the offer, I think the changes were simple enough. I merely wanted to point out that some more people use(d) that feature.
Is there a recommendation for merging a dataset without inplacewhen the dataset is a subclass of xr.Dataset, other than through composition? Perhaps lower level functions to merge?
On Mon, Mar 25, 2019 at 11:54 AM Nathan Lyons ***@***.***> wrote:
Is there a recommendation for merging a dataset without inplacewhen the
dataset is a subclass of xr.Dataset, other than through composition?
Perhaps lower level functions to merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1756 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABKS1j_EqfrXRLdXtKgy_wQFVpk27vMgks5vaRtYgaJpZM4QzchO>
.
Activity
Replace deprecated inplace methods in xarray.
st-bender commentedon Jan 24, 2019
Hi,
Sorry for the late comment about a closed bug. But I find changing the API a bit irritating to say the least, and this is a serious change. Although apparently not many people use it, some actually may (myself included). And so far there has been only one bug report, so what problem are you trying to fix?
I can fix my own code but there may be others out there that cannot keep pace with the development and including their packages may then break software. For my taste the deprecation warning is a bit short if you are going to remove such a feature already in the next version. A few more cycles would be appreciated.
At the very least put a big warning sign to the documentation that xarray is still beta and the API is still subject to change.
jhamman commentedon Jan 25, 2019
@st-bender - sorry to hear this change has caught you by surprise. We're a ways off from 0.12 so you should have time to work in any necessary changes before the feature if fully removed. If you have questions about how to adjust our use these methods, let us know.
shoyer commentedon Jan 25, 2019
We will probably actually wait longer than until 0.12 for removing this argument, depending on the timing for that release.
Unfortunately our API is indeed not entirely stable yet -- that's why the version number is still 0.X, not 1.X.
st-bender commentedon Jan 25, 2019
Hi,
Thanks for the replies, I was indeed caught by surprise and given that the version number is 0.11.x, I had the impression that 0.12.x would be the next major minor release (and coming soon).
@shoyer In that case I would take it back and vote for a change as soon as possible to stabilize the API. Although xarray is still considered beta, I guess some people already use it productively.
@jhamman Thanks for the offer, I think the changes were simple enough. I merely wanted to point out that some more people use(d) that feature.
nathanlyons commentedon Mar 25, 2019
Is there a recommendation for merging a dataset without
inplacewhen the dataset is a subclass of xr.Dataset, other than through composition? Perhaps lower level functions to merge?shoyer commentedon Mar 25, 2019
avoid setting index inplace