html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/988#issuecomment-482925611,https://api.github.com/repos/pydata/xarray/issues/988,482925611,MDEyOklzc3VlQ29tbWVudDQ4MjkyNTYxMQ==,425260,2019-04-14T07:06:29Z,2019-04-14T07:06:41Z,NONE,"> Speaking of PEP 472, if someone has energy to push on that, it would be really awesome to see that happen. Looks like that ship has sailed, [PEP-472 has been rejected](https://groups.google.com/forum/#!topic/dev-python/ONl-VUpFT_g)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173612265 https://github.com/pydata/xarray/issues/988#issuecomment-316393986,https://api.github.com/repos/pydata/xarray/issues/988,316393986,MDEyOklzc3VlQ29tbWVudDMxNjM5Mzk4Ng==,11941546,2017-07-19T13:51:09Z,2017-07-19T13:51:09Z,NONE,"Hi, I would really appreciate having some simple way to store some persisting attributes in xarray objects. One typical use case in my interactive work is that I have functions that have a DataArray or Dataset object as their only input, they perform some processing on the data and return an updated Dataset. Some additional information needed for this processing, such as an integer identifier of the experiment from which the data come from, are stored as attributes, so that when I have multiple instances of the same kind of objects, I will not mess up data from different experiments together. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173612265 https://github.com/pydata/xarray/issues/988#issuecomment-283524084,https://api.github.com/repos/pydata/xarray/issues/988,283524084,MDEyOklzc3VlQ29tbWVudDI4MzUyNDA4NA==,23484003,2017-03-02T01:09:44Z,2017-03-02T01:09:44Z,NONE,"@gerritholl In my line of work we often deal with 2+1 or 3+1 dimensional datasets (space + time). I have been bitten when I expected space in meters, but it was in centimeters, or time in seconds but it was in milliseconds. Also, I would like to improve the plotting functionality so that publication-quality plots can be made directly by automatically including units in the axis labels (and while I'm wishing for a pony, there could be pretty-printing versions of coordinate names (ie, LaTeX symbols or something)).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173612265 https://github.com/pydata/xarray/issues/988#issuecomment-283492897,https://api.github.com/repos/pydata/xarray/issues/988,283492897,MDEyOklzc3VlQ29tbWVudDI4MzQ5Mjg5Nw==,23484003,2017-03-01T22:32:24Z,2017-03-01T22:32:24Z,NONE,"@gerritholl Interesting! The difficulty I am seeing with this approach is that the units apply only to the main data array, and not the coordinates. In a scientific application, the coordinates are generally physical quantities with units as well. If we want xarray with units to be really useful for scientific computation, we need to have the coordinate arrays be unitful 'quantities' too, rather than tacking the units on as an attribute of xarray.DataArray. I tinkered with making the 'units' attribute into a dictionary, with units for each coordinate (and for the data) as key-value pairs, but it is very cumbersome and goes against my philosophy (for instance, extracting a coordinate from a DataArray leaves it without units). ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173612265 https://github.com/pydata/xarray/issues/988#issuecomment-243124532,https://api.github.com/repos/pydata/xarray/issues/988,243124532,MDEyOklzc3VlQ29tbWVudDI0MzEyNDUzMg==,4992424,2016-08-29T13:32:11Z,2016-08-29T13:32:11Z,NONE,"I definitely see the logic with regards to encouraging users to use a context manager, and from the perspective of someone building a third-party library on top of xarray it would be fine. However, I think that from the perspective of an end-user (for example, a scientist) crunching numbers and analyzing data with xarray simply as a convenience library, this produces much too obfuscated code - a standard library import (`contextlib`, which isn't something many scientific coders would regularly use or necessarily know about) and a lot of boiler-plate ""enabling"" the extra features they want in their calculation. I think your earlier proposal of an `xarray.set_options` is a cleaner and simpler way forward, even if it does have thorns. Do you have any estimate of the performance penalty checking hooks on all xarray objects would incur? ","{""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173612265