spiketools.utils.base.listify¶
- spiketools.utils.base.listify(param, index=False)[source]¶
Check and embed a parameter into a list, if is not already in a list.
- Parameters:
- paramobject
Parameter to check and embed in a list, if it is not already.
- indexbool, optional
If True, indexes into param to check the 0th element, instead of param itself. This can be used for checking and embedding a list into a list.
- Returns:
- list
Parameter embedded in a list.