xarray.Dataset.set_close#
- Dataset.set_close(close)[source]#
Register the function that releases any resources linked to this object.
This method controls how xarray cleans up resources associated with this object when the
.close()
method is called. It is mostly intended for backend developers and it is rarely needed by regular end-users.- Parameters:
close (
callable()
) – The function that when called likeclose()
releases any resources linked to this object.