Array Manipulation#
Operations for reshaping, indexing, and manipulating array structure.
Functions
Quick Reference#
array_slice#
nabla.array_slice(arg: nabla.core.array.Array, slices: list[slice], squeeze_axes: list[int] | None = None) -> nabla.core.array.Array
Nabla operation: array_slice
broadcast_batch_dims#
nabla.broadcast_batch_dims(arg: nabla.core.array.Array, batch_dims: tuple[int, ...]) -> nabla.core.array.Array
Nabla operation: broadcast_batch_dims
broadcast_to#
nabla.broadcast_to(arg: nabla.core.array.Array, shape: tuple[int, ...]) -> nabla.core.array.Array
Nabla operation: broadcast_to
concatenate#
nabla.concatenate(args: list[nabla.core.array.Array], axis: int = 0) -> nabla.core.array.Array
Nabla operation: concatenate
move_axis_from_front#
nabla.move_axis_from_front(input_array: nabla.core.array.Array, target_axis: int) -> nabla.core.array.Array
Nabla operation: move_axis_from_front
move_axis_from_front_of_batch_dims#
nabla.move_axis_from_front_of_batch_dims(input_array: nabla.core.array.Array, target_axis: int) -> nabla.core.array.Array
Nabla operation: move_axis_from_front_of_batch_dims
move_axis_to_front#
nabla.move_axis_to_front(input_array: nabla.core.array.Array, axis: int) -> nabla.core.array.Array
Nabla operation: move_axis_to_front
move_axis_to_front_of_batch_dims#
nabla.move_axis_to_front_of_batch_dims(input_array: nabla.core.array.Array, axis: int) -> nabla.core.array.Array
Nabla operation: move_axis_to_front_of_batch_dims
pad#
nabla.pad(arg: nabla.core.array.Array, slices: list[slice], target_shape: tuple[int, ...]) -> nabla.core.array.Array
Nabla operation: pad
permute#
nabla.permute(input_array: nabla.core.array.Array, axes: tuple[int, ...]) -> nabla.core.array.Array
Nabla operation: permute
permute_batch_dims#
nabla.permute_batch_dims(input_array: nabla.core.array.Array, axes: tuple[int, ...]) -> nabla.core.array.Array
Nabla operation: permute_batch_dims
reshape#
nabla.reshape(arg: nabla.core.array.Array, shape: tuple[int, ...]) -> nabla.core.array.Array
Change the shape of an array without changing its data.
shallow_copy#
nabla.shallow_copy(arg: nabla.core.array.Array) -> nabla.core.array.Array
Nabla operation: shallow_copy
squeeze#
nabla.squeeze(arg: nabla.core.array.Array, axes: list[int] | None = None) -> nabla.core.array.Array
Remove single-dimensional entries from array shape.
squeeze_batch_dims#
nabla.squeeze_batch_dims(arg: nabla.core.array.Array, axes: list[int] | None = None) -> nabla.core.array.Array
Nabla operation: squeeze_batch_dims
stack#
nabla.stack(arrays: list[nabla.core.array.Array], axis: int = 0) -> nabla.core.array.Array
Nabla operation: stack
transpose#
nabla.transpose(arg: nabla.core.array.Array, axis_1: int = -2, axis_2: int = -1) -> nabla.core.array.Array
Permute the dimensions of an array.
unsqueeze#
nabla.unsqueeze(arg: nabla.core.array.Array, axes: list[int] | None = None) -> nabla.core.array.Array
Add single-dimensional entries to array shape.
unsqueeze_batch_dims#
nabla.unsqueeze_batch_dims(arg: nabla.core.array.Array, axes: list[int] | None = None) -> nabla.core.array.Array
Nabla operation: unsqueeze_batch_dims