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(), data.frame_to_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 Nov. 19, 2025, 5:08 p.m.