DEV: make sure all priors return float when needed #848
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For a long time, some prior classes have cast inputs to numpy arrays this MR removes that behaviour and adds a test to make sure that sampling and evaluating the CDF do not cast to array.
This caused an error when evaluating the CDF many times and then combining the results.
I also streamlined some other behaviour in applying prior constraints that were originally flagged by @cjhaster.
I noticed that the Fermi-Dirac CDF hadn't been implemented for some reason so I added that and added to the CI test suite.
Finally, there was an issue with sampling from joint distributions where the results could be returned out of order.
Copied from https://git.ligo.org/lscsoft/bilby/-/merge_requests/1285