def _array_convert(a):
from numpy import ndarray<EOL>if isinstance(a, ndarray):<EOL><INDENT>larr = a.tolist()<EOL>if len(larr) == <NUM_LIT:1>:<EOL><INDENT>return larr[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>return larr<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return a<EOL><DEDENT>
Converts the specified value to a list if it is a :class:`numpy.ndarray`;
    otherwise it is just returned as is.