def split_data_matrix(data_matrix, window_length, columns_to_extract):
    """
    Splits data matrix for nn input vectors (time windows).

    :param data_matrix: data matrix which will be split
    :param window_length: length of time window of input vector
    :param columns_to_extract: columns present in result input vectors
    :return: split matrix
    """

    # Derive number of available input vector from number of time points in
    # data matrix and window length.
    number_of_time_windows = data_matrix.shape[0] // window_length

    extracted_data = data_matrix[
        :number_of_time_windows * window_length, columns_to_extract
    ]
    split_matrix = extracted_data.reshape([number_of_time_windows, -1])

    return split_matrix