get_batches_index: Assign cases to batches

View source: R/utils_python_data_management.R

get_batches_indexR Documentation

Assign cases to batches

Description

Function groups cases into batches.

Usage

get_batches_index(number_rows, batch_size, zero_based = FALSE)

Arguments

number_rows

int representing the number of cases or rows of a matrix or array.

batch_size

int size of a batch.

zero_based

bool If TRUE the indices of the cases within each batch are zero based. One based if FALSE.

Value

Returns a list of batches. Each entry in the list contains a vector of int representing the cases belonging to that batch.

See Also

Other Utils Python Data Management Developers: class_vector_to_py_dataset(), create_py_dataset_cache_file_path(), data.frame_to_py_dataset(), extract_column_from_py_dataset(), prepare_r_array_for_dataset(), py_dataset_to_embeddings(), reduce_to_unique(), tensor_list_to_numpy(), tensor_to_numpy()


aifeducation documentation built on March 3, 2026, 1:06 a.m.