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/pull/549#issuecomment-134637212,https://api.github.com/repos/pydata/xarray/issues/549,134637212,MDEyOklzc3VlQ29tbWVudDEzNDYzNzIxMg==,2443309,2015-08-25T15:46:39Z,2015-08-25T15:46:39Z,MEMBER,"@shoyer -
> Maybe the only place to silently convert is in the to_dataset method of DataArray, when splitting an existing dimension to create a dataset with new variables? Otherwise that method is not guaranteed to succeed, which seems like a Bad Thing.
If you are splitting a dataset along a dimension, we don't use the `name` argument: https://github.com/xray/xray/blob/master/xray/core/dataarray.py#L243-L273. So I don't think any changes are needed in that case. In fact, in `_to_dataset_split()`, the labels are cast to strings.
I'm going to close this PR and open a new one with errors raised instead of silently converting.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,102840892
https://github.com/pydata/xarray/pull/549#issuecomment-134399426,https://api.github.com/repos/pydata/xarray/issues/549,134399426,MDEyOklzc3VlQ29tbWVudDEzNDM5OTQyNg==,1217238,2015-08-24T22:26:49Z,2015-08-24T22:26:49Z,MEMBER,"Indeed, I think it's better to raise than silently convert -- that's much more Pythonic.
The keys of a dataset would be the other place to enforce this.
Maybe the only place to silently convert is in the `to_dataset` method of DataArray, when splitting an existing dimension to create a dataset with new variables? Otherwise that method is not guaranteed to succeed, which seems like a Bad Thing.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,102840892
https://github.com/pydata/xarray/pull/549#issuecomment-134364506,https://api.github.com/repos/pydata/xarray/issues/549,134364506,MDEyOklzc3VlQ29tbWVudDEzNDM2NDUwNg==,2443309,2015-08-24T20:18:30Z,2015-08-24T20:18:30Z,MEMBER,"I'm happy to raise an error instead. I may have misunderstood @shoyer's comment in #533.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,102840892
https://github.com/pydata/xarray/pull/549#issuecomment-134362572,https://api.github.com/repos/pydata/xarray/issues/549,134362572,MDEyOklzc3VlQ29tbWVudDEzNDM2MjU3Mg==,5356122,2015-08-24T20:10:12Z,2015-08-24T20:10:12Z,MEMBER,"You mentioned in the bug report:
> Another way is just to raise an error if a not string variable name is used.
Raising a `TypeError` seems like the way to go here, since `str` works on anything. Relevant line in 'Zen':
> In the face of ambiguity, refuse the temptation to guess.
Also, are there other places to implement this? Say the keys of a `dataset`?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,102840892