def normalize_attr_values(a: Any) -> np.ndarray:
scalar = False<EOL>if np.isscalar(a):<EOL><INDENT>a = np.array([a])<EOL>scalar = True<EOL><DEDENT>arr = normalize_attr_array(a)<EOL>if np.issubdtype(arr.dtype, np.integer) or np.issubdtype(arr.dtype, np.floating):<EOL><INDENT>pass  <EOL><DEDENT>elif np.issubdtype(arr.dtype, np.character) or np.issubdtype(arr.dtype, np.object_):<EOL><INDENT>arr = normalize_attr_strings(arr)<EOL><DEDENT>elif np.issubdtype(arr.dtype, np.bool_):<EOL><INDENT>arr = arr.astype('<STR_LIT>')<EOL><DEDENT>if scalar:<EOL><INDENT>return arr[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>return arr<EOL><DEDENT>
Take all kinds of input values and validate/normalize them.

Args:
        a	List, tuple, np.matrix, np.ndarray or sparse matrix
                Elements can be strings, numbers or bools

Returns
        a_normalized    An np.ndarray with elements conforming to one of the valid Loom attribute types

Remarks:
        This method should be used to prepare the values to be stored in the HDF5 file. You should not
        return the values to the caller; for that, use materialize_attr_values()