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

Allow specifying Bivariate levels #2474

Merged
merged 2 commits into from Mar 26, 2018
Merged

Allow specifying Bivariate levels #2474

merged 2 commits into from Mar 26, 2018

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 22, 2018

This PR allows specifying levels for the Bivariate element as requested in #2099. Additionally it also ensures that the contours operation actually generates the requested number of levels, which was not the case before. Probably changes some test data but it's a clear bug fix.

@philippjfr philippjfr added type: bug Something isn't correct or isn't working type: feature A major new feature labels Mar 22, 2018
@jlstevens
Copy link
Contributor

Looks good to me. Happy to merge when the tests are green.

@philippjfr
Copy link
Member Author

Ready to merge, push build failed due to updated test data.

contour = Contours([[(-0.5, 0.416667, 0.5), (-0.25, 0.5, 0.5)],
[(0.25, 0.5, 0.5), (0.5, 0.45, 0.5)]],
contour = Contours([[(-0.5, 0.416667, 0.5), (-0.25, 0.5, 0.5),
(np.NaN, np.NaN, 0.5), (0.25, 0.5, 0.5),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand where the NaNs come from...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

contours now returns a Contours element with one array per level, if there's multiple contours at a level they will be NaN separated.

@jlstevens
Copy link
Contributor

Change looks good to me - levels should be exposed.

As long as you have checked that the notebooks with the updated test data now have the correct number of contours, I'm happy to merge once the tests are green.

@philippjfr
Copy link
Member Author

As long as you have checked that the notebooks with the updated test data now have the correct number of contours, I'm happy to merge once the tests are green.

I have, also added unit tests to check this.

@jlstevens
Copy link
Contributor

Looks good and the pr tests are green. Merging.

@jlstevens jlstevens merged commit a9cc8b5 into master Mar 26, 2018
@philippjfr philippjfr deleted the bivariate_levels branch March 31, 2018 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working type: feature A major new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants