def METHOD_NAME(np_array: np.ndarray, cols: List[str]) -> Table:
    """  Creates a new table from a numpy array.
    Args:
        np_array (np.ndarray): the numpy array
        cols (List[str]): the table column names that will be assigned to each column in the numpy array
    Returns:
        a Deephaven table
    Raise:
        DHError
    """
    try:
        _, *dims = np_array.shape
        if dims:
            if not cols or len(cols) != dims[0]:
                raise DHError(
                    message=f"the number of array columns {dims[0]} doesn't match "
                            f"the number of column names {len(cols)}")
        input_cols = []
        dtype = dtypes.from_np_dtype(np_array.dtype)
        if len(cols) == 1:
            input_cols.append(_make_input_column(cols[0], np.stack(np_array, axis=1)[0], dtype))
        else:
            for i, col in enumerate(cols):
                input_cols.append(_make_input_column(col, np.stack(np_array[:, [i]], axis=1)[0], dtype))
        return new_table(cols=input_cols)
    except DHError:
        raise
    except Exception as e:
        raise DHError(e, "failed to create a Deephaven Table from a Pandas DataFrame.") from e