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/2495#issuecomment-431999869,https://api.github.com/repos/pydata/xarray/issues/2495,431999869,MDEyOklzc3VlQ29tbWVudDQzMTk5OTg2OQ==,2443309,2018-10-22T21:43:01Z,2018-10-22T21:43:01Z,MEMBER,"@max-sixty - thanks for bringing this full circle. After reading the prior issue, I agree, this is a fine behavior. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,371990138 https://github.com/pydata/xarray/issues/2495#issuecomment-431973631,https://api.github.com/repos/pydata/xarray/issues/2495,431973631,MDEyOklzc3VlQ29tbWVudDQzMTk3MzYzMQ==,5635139,2018-10-22T20:32:48Z,2018-10-22T20:32:48Z,MEMBER,"Confirmed as fixed: ```python In [1]: import xarray impor In [2]: import numpy In [3]: xarray.DataArray(numpy.arange(3), dims=(""x"",), coords={""x"": {""a"", ""b"", ""c""}}) ...: --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in ----> 1 xarray.DataArray(numpy.arange(3), dims=(""x"",), coords={""x"": {""a"", ""b"", ""c""}}) ~/workspace/xarray/xarray/core/dataarray.py in __init__(self, data, coords, dims, name, attrs, encoding, fastpath) 225 226 data = as_compatible_data(data) --> 227 coords, dims = _infer_coords_and_dims(data.shape, coords, dims) 228 variable = Variable(dims, data, attrs, encoding, fastpath=True) 229 ~/workspace/xarray/xarray/core/dataarray.py in _infer_coords_and_dims(shape, coords, dims) 62 if utils.is_dict_like(coords): 63 for k, v in coords.items(): ---> 64 new_coords[k] = as_variable(v, name=k) 65 elif coords is not None: 66 for dim, coord in zip(dims, coords): ~/workspace/xarray/xarray/core/variable.py in as_variable(obj, name) 88 elif isinstance(obj, (set, dict)): 89 raise TypeError( ---> 90 ""variable %r has invalid type %r"" % (name, type(obj))) 91 elif name is not None: 92 data = as_compatible_data(obj) TypeError: variable 'x' has invalid type ``` The original issue is https://github.com/pydata/xarray/issues/1691, and includes why we raise rather than coerce to an array","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,371990138 https://github.com/pydata/xarray/issues/2495#issuecomment-431490100,https://api.github.com/repos/pydata/xarray/issues/2495,431490100,MDEyOklzc3VlQ29tbWVudDQzMTQ5MDEwMA==,5635139,2018-10-19T20:30:54Z,2018-10-19T20:30:54Z,MEMBER,I thought I fixed this. Please can you try on the latest version? Or I'll look when by a computer,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,371990138 https://github.com/pydata/xarray/issues/2495#issuecomment-431404087,https://api.github.com/repos/pydata/xarray/issues/2495,431404087,MDEyOklzc3VlQ29tbWVudDQzMTQwNDA4Nw==,2443309,2018-10-19T15:33:55Z,2018-10-19T15:33:55Z,MEMBER,"I agree this seems like a bug. In the case of a `set`, I think we should try to cast this to a list/array.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,371990138