numojo.core.indexing.slicing¶
Slicing (numojo.core.indexing.slicing)
This module defines internal data structures and utilities for handling slicing operations in NuMojo.
Structs¶
IndexTypeInfo¶
Memory convention: memory_only
Implements: AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable
Fields¶
is_integer(Bool)is_slice(Bool)is_ellipsis(Bool)is_newaxis(Bool)
Aliases¶
__del__is_trivial¶
Value: True
__move_ctor_is_trivial¶
Value: True
__copy_ctor_is_trivial¶
Value: True
Methods¶
__init__¶
__init__(out self, is_integer: Bool = False, is_slice: Bool = False, is_ellipsis: Bool = False, is_newaxis: Bool = False)
static
Args:
is_integer(Bool)is_slice(Bool)is_ellipsis(Bool)is_newaxis(Bool)self(Self)[out]
Returns:
Self
size¶
Returns the number of active index types in this IndexTypeInfo.
Args:
self(Self)
Returns:
Int
InternalSlice¶
Memory convention: memory_only
Implements: AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDestructible, Movable
Fields¶
start(Int)end(Int)step(Int)
Aliases¶
__del__is_trivial¶
Value: True
__move_ctor_is_trivial¶
Value: True
__copy_ctor_is_trivial¶
Value: True
Methods¶
get_slice_info¶
Overload 1¶
static
Get complete slice information for a given dimension.
Notes: For cases with step = 0, error handling should be done prior to calling this function.
Args:
s(Slice): The slice to process.dim(Int): The dimension size to process against.
Returns:
Tuple
Overload 2¶
Get complete slice information for a given dimension.
Args:
self(Self)dim(Int): The dimension size to process against.
Returns:
Tuple