confusing dataset creation process
Open
Nobody has claimed this yet.
topic-error reporting
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
In another issue I create a simple dataset like so:
lat = np.random.rand(50000) * 180 - 90
lon = np.random.rand(50000) * 360 - 180
d = xr.Dataset({'latitude':lat, 'longitude':lon})
I expected d to contain two variables (latitude and longitude) with no coordinates. Instead d appears to contain two coordinates and no variables:
In [5]: d
Out[5]:
<xarray.Dataset>
Dimensions: (latitude: 50000, longitude: 50000)
Coordinates:
* latitude (latitude) float64 -76.0 -84.36 26.69 66.44 -37.85 50.13 ...
* longitude (longitude) float64 -148.7 -74.82 18.37 117.7 80.63 12.25 ...
Data variables:
*empty*
Is this desired behavior?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the NumPy example and start at the xarray.Dataset constructor to understand how the supplied arrays are classified. Done means establishing whether the resulting coordinates and empty data-variable section are intended, then identifying the corresponding behavior or documentation change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100