Conversation
gonuke
left a comment
There was a problem hiding this comment.
I see this passes tests as expected, but I'm not sure the data structure this returns is as obvious as the comments suggest... maybe I'm just a little confused?
| coords = self.triangle_coords | ||
| min_coord = np.min(coords, axis=0) | ||
| max_coord = np.max(coords, axis=0) | ||
| return min_coord, max_coord |
There was a problem hiding this comment.
Why isn't this (xmin, ymin, zmin), (xmax, ymax, zmax)? Is it really a tuple? or is it a pair of numpy arrays that can be iterated like a tuple like they are in the tests?
There was a problem hiding this comment.
My bad here. I changed the data structure to something I liked better but didn't update the docs/expected test data structure -- the result of pytest.approx was a boolean array that it always considered to be true. No bueno. I brought in numpy.testing.assert_equal to remedy this. I also selected different surface bounds. Some which are the top and bottom of the cylinder and have the same min/max coordinate in one dimension for more varitey.
gonuke
left a comment
There was a problem hiding this comment.
This makes a little more sense now 😀 - thanks @pshriwise
This adds the ability to return a minimum and maximum coordinate for
GeometricSetvia aboundsproperty. This is useful for defining source boundaries in downstream codes from Python.