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/4079#issuecomment-1435715372,https://api.github.com/repos/pydata/xarray/issues/4079,1435715372,IC_kwDOAMm_X85Vk0cs,14808389,2023-02-18T16:51:14Z,2023-02-18T16:51:14Z,MEMBER,"> hmm... would `np.nan` work? not sure about alignment, but at least `obj.sizes` would break with multiple dims: while it does not compare as equal, the `hash()` of `np.nan` stays constant (same with any other object, I guess).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,621078539 https://github.com/pydata/xarray/issues/4079#issuecomment-1434805981,https://api.github.com/repos/pydata/xarray/issues/4079,1434805981,IC_kwDOAMm_X85VhWbd,14808389,2023-02-17T15:28:07Z,2023-02-17T15:28:07Z,MEMBER,"I'd probably use `itertools.count()` or the `uuid` module to generate globally unique dimension names... something like ```python class _UnnamedDimensions: def __init__(self): self.dimension_names = (f""unnamed_dim_{number}"" for number in itertools.count()) def __call__(self, n): return list(itertools.islice(dimension_names, None, n)) unnamed_dimensions = _UnnamedDimensions() ``` or using `uuid` (probably overkill): ```python def unnamed_dimensions(n): return [uuid.uuid4() for _ in range(n)] ``` you'd use it like this: ```python d1 = xr.DataArray(data=[1, 2], dims=unnamed_dimensions(1)) d2 = xr.DataArray(data=[[1, 2]], dims=unnamed_dimensions(2)) ``` which would make ""unnamed"" a bit more explicit. Edit: that's probably not so different from what you meant with `d1_i`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,621078539