WrightTools.kit.get_index

WrightTools.kit.get_index(lis, argument)[source]

Find the index of an item, given either the item or index as an argument.

Particularly useful as a wrapper for arguments like channel or axis.

Parameters:
  • lis (list) – List to parse.

  • argument (int or object) – Argument.

Returns:

Index of chosen object.

Return type:

int