I have a function that takes a given variable as an argument. This variable is a numpy array. Example in pseudo-code:
def foo(var):
if 'test' in the name of var:
do something
return
I have tried different options, like
if 'test' in var:
or
if var == 'test_complete_name_of_var'
But these just check the values of the array, and not the variable name. I was hoping there could be some sort of trick such as:
if 'test' in var.name()
Any ideas on how to solve this?