arviz-devs / arviz-devs/arviz-base
Allow empty coords?
- Dominant language
- Python
- Stars
- 8
- Forks
- 26
- Avg merge
- 7d 23h
- Merged PRs (30d)
- 2
Description
When trying to use `az.from_dict` I would like to be able to specify dims without coords.
For example say I have a variable `x`, and a deterministic `x[::-1]`, they would have the same dims but reversed coords. It's currently not possible to specify coords per variable using the `from_dict` constructor, which I think it's fine, at that point you may as well use xarray directly.
But could we perhaps allow unspecified coords for some dims?
```python
import arviz as az
import numpy as np
az.from_dict({"x": np.zeros((1, 1, 5))}, dims={"x": ["a"]}, coords={"a": None})
```
If it's too much of an ask I'll go down the venue of creating a dataset.
Contributor guide
Research direction
Start at the az.from_dict entry point and trace how dims and coords are processed. Use the example in the issue to verify that coords={"a": None} permits a dimension without supplied coordinates, while preserving the requested dimension mapping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100