chime-experiment / ch_util

CHIME utilities
https://chime-experiment.github.io/ch_util
MIT License
3 stars 3 forks source link

fix(tools): Provide public `ensure_list` function #74

Closed ketiltrout closed 3 months ago

ketiltrout commented 3 months ago

The private function fluxcat._ensure_list has escaped, so let's make a public version of this very generic thing in tools.

It's sets a bad precedent to be importing private functions.

ketiltrout commented 3 months ago

This looks fine, but I think we have other similar functions throughout the codebase (in mpiarray for example). I think it would be a good idea to unify these and put them in a more common place, like caput.tools

Yeah, there are a number of these very generic functions that get created for a specific case (like this one in fluxcat) but could be provided on a more general purpose case.