cf-xarray icon indicating copy to clipboard operation
cf-xarray copied to clipboard

Correctly shaped bounds for add_bounds method

Open MuellerSeb opened this issue 3 years ago • 4 comments

Closes #346

MuellerSeb avatar Jul 06 '22 11:07 MuellerSeb

Thanks @MuellerSeb . Thanks for taking the time to contribute!

Can you modify the existing tests to assert that bounds is the last dimension?

To fix the tests, you'll have to transpose the "expected" values in the tests too.

dcherian avatar Jul 06 '22 16:07 dcherian

I think you need to fix one more test with a transpose: def test_vertices_to_bounds():

dcherian avatar Jul 08 '22 15:07 dcherian

I think you need to fix one more test with a transpose: def test_vertices_to_bounds():

Was just wondering, why only one out of three asserts there fails.

MuellerSeb avatar Jul 08 '22 15:07 MuellerSeb

Oh, I guess the routines bounds_to_vertices and vertices_to_bounds would need some adjustment too. I could need some help with these routines.

MuellerSeb avatar Jul 08 '22 15:07 MuellerSeb

@aulemahal can you take a look here please?

dcherian avatar Nov 11 '22 16:11 dcherian

Last commits should have fixed the last issues in the helpers as well as adapted the new 2D bounds with this change!

aulemahal avatar Nov 11 '22 17:11 aulemahal

LGTM. Thanks for your help!

MuellerSeb avatar Nov 15 '22 08:11 MuellerSeb