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

Fix dims and coords #208

Merged
merged 5 commits into from
Sep 7, 2018
Merged

Fix dims and coords #208

merged 5 commits into from
Sep 7, 2018

Conversation

ahartikainen
Copy link
Contributor

Enable more flexible usage for dims and coords.

This PR enables that user can input names only to specific dims or coords.
If dims is None or not defined, it will use the default name, and if coord is not defined, it creates the default coord.

Enable more flexible usage for dims and coords.
@ahartikainen
Copy link
Contributor Author

Only thing that we might want to do, is to check that all given coords are found in the dims and all the dims are less or equal to the dim count.

Should these raise Warning or Exception?

@ColCarroll
Copy link
Member

It looks like this breaks converting numpy arrays: az.convert_to_dataset(np.random.randn(size=100)) now throws an exception.

Can you post an example/add a test of what this fixes?

@ColCarroll
Copy link
Member

Good tests, thanks! Looks good to merge if tests still pass.

@ColCarroll ColCarroll merged commit 2c19b86 into master Sep 7, 2018
@ColCarroll ColCarroll deleted the bugfix/dims_coords branch September 7, 2018 23:35
@ColCarroll
Copy link
Member

Thanks @ahartikainen !

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

Successfully merging this pull request may close these issues.

2 participants