pints
pints copied to clipboard
Transformed rectangular boundaries
It should be possible to add a check in Transformation.convert_boundaries()
- are the boundaries rectangular?
isinstance(boundaries, pints.RectangularBoundaries)
- is the transformation elementwise?
self.elementwise()
If so, a new RectangularBoundaries can be returned instead of a wrapped boundaries object.
a = transform.to_search(boundaries.lower())
b = transform.to_search(boundaries.upper())
lower = np.minimum(a, b)
upper = np.maximum(a, b)
return pints.RectangularBoundaries(lower, upper)
Would that make sense @chonlei ? Or am I missing something?
I guess you will be spacing in the q-space whilst the current implementation is sampling in the p-space and convert to q.
Veeeeery good point
Might be desirable in some cases. Might not be. Either way not consistent with other transformations... OK. Closing this!
Still need this! We can work around the sample() method.