Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc improvement for DataArray.assign_coords #3952

Closed
EtienneCmb opened this issue Apr 7, 2020 · 2 comments · Fixed by #3958
Closed

Doc improvement for DataArray.assign_coords #3952

EtienneCmb opened this issue Apr 7, 2020 · 2 comments · Fixed by #3958

Comments

@EtienneCmb
Copy link
Contributor

EtienneCmb commented Apr 7, 2020

Hi, first I wanted to say that xarray is a really fantastic library, it saves so many manipulations in my work.

I was looking for a way to add a coordinate to a DataArray and attribute it to a specific dimension. I found that the following syntax was exactly what I was looking for :

da.assign_coords(new_coordinate=('dim_to_use', values))

However, the documentation of the method was not referencing this syntax. What do you think?

@dcherian
Copy link
Contributor

dcherian commented Apr 7, 2020

👍 can you send in a PR with some add text and an example?

@EtienneCmb
Copy link
Contributor Author

Sure, I'll add it to the doc and example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants