Skip to content
New: Star-import, signal unraveling, Python 3.12 support, and more

#
chunking module

Extensions for chunking of base operations.

## array_gl_slicer ArraySlicer

2-dim array slicer along the column axis based on group lengths.

## flex_1d_array_gl_slicer FlexArraySlicer

Flexible 1-dim array slicer along the column axis based on group lengths.

## flex_array_gl_slicer FlexArraySlicer

Flexible 2-dim array slicer along the column axis based on group lengths.

## group_idxs_mapper GroupIdxsMapper

Default instance of GroupIdxsMapper.

## group_lens_mapper GroupLensMapper

Default instance of GroupLensMapper.

## shape_gl_slicer ShapeSlicer

Flexible 2-dim shape slicer along the column axis based on group lengths.

## get_group_lens_slice function

    get_group_lens_slice(
        group_lens,
        chunk_meta
    )

Get slice of each chunk in group lengths.

## ChunkedFlexArray class

    ChunkedFlexArray(
        *args,
        **kwargs
    )

Class representing a chunkable flexible array.

Superclasses

- Annotatable
- Chunkable
- Chunked

Inherited members

- Chunked.check_value()
- Chunked.get_take_spec()
- Chunked.get_value()
- Chunked.resolve_take_spec()
- Chunked.select
- Chunked.take_spec
- Chunked.take_spec_kwargs
- Chunked.take_spec_missing
- Chunked.value
- Chunked.value_missing

## ChunkedGroupLens class

    ChunkedGroupLens(
        *args,
        **kwargs
    )

Class representing chunkable group lengths.

Superclasses

- Annotatable
- Chunkable
- Chunked

Inherited members

- Chunked.check_value()
- Chunked.get_take_spec()
- Chunked.get_value()
- Chunked.resolve_take_spec()
- Chunked.select
- Chunked.take_spec
- Chunked.take_spec_kwargs
- Chunked.take_spec_missing
- Chunked.value
- Chunked.value_missing

## ChunkedGroupMap class

    ChunkedGroupMap(
        *args,
        **kwargs
    )

Class representing a chunkable group map.

Superclasses

- Annotatable
- Chunkable
- Chunked

Inherited members

- Chunked.check_value()
- Chunked.get_take_spec()
- Chunked.get_value()
- Chunked.resolve_take_spec()
- Chunked.select
- Chunked.take_spec
- Chunked.take_spec_kwargs
- Chunked.take_spec_missing
- Chunked.value
- Chunked.value_missing

## FlexArraySelector class

    FlexArraySelector(
        single_type=None,
        ignore_none=True,
        mapper=None,
        keep_dims=False,
        axis=None
    )

Class for selecting one element from a NumPy array's axis flexibly based on the chunk index.

The result is intended to be used together with flex_select_1d_nb() and flex_select_nb().

Method generated by attrs for class FlexArraySelector.

Superclasses

- Annotatable
- ArraySelector
- AxisSpecifier
- ChunkSelector
- ChunkTaker
- DimRetainer
- ShapeSelector

Inherited members

- ArraySelector.axis
- ArraySelector.get_size()
- ArraySelector.ignore_none
- ArraySelector.keep_dims
- ArraySelector.mapper
- ArraySelector.single_type
- ArraySelector.take()
- ChunkSelector.suggest_size()
- ChunkTaker.apply()
- ChunkTaker.should_take()

## FlexArraySizer class

    FlexArraySizer(
        arg_query=None,
        single_type=None,
        axis=None
    )

Class for getting the size from the length of an axis in a flexible array.

Method generated by attrs for class ShapeSizer.

Superclasses

- Annotatable
- ArgGetter
- ArgSizer
- ArraySizer
- AxisSpecifier
- ShapeSizer
- Sizer

Inherited members

- ArgGetter.get_arg()
- ArgSizer.apply()
- ArraySizer.arg_query
- ArraySizer.axis
- ArraySizer.get_obj_size()
- ArraySizer.get_size()
- ArraySizer.single_type

## FlexArraySlicer class

    FlexArraySlicer(
        single_type=None,
        ignore_none=True,
        mapper=None,
        axis=None
    )

Class for selecting one element from a NumPy array's axis flexibly based on the chunk index.

The result is intended to be used together with flex_select_1d_nb() and flex_select_nb().

Method generated by attrs for class FlexArraySlicer.

Superclasses

- Annotatable
- ArraySlicer
- AxisSpecifier
- ChunkSlicer
- ChunkTaker
- ShapeSlicer

Inherited members

- ArraySlicer.axis
- ArraySlicer.get_size()
- ArraySlicer.ignore_none
- ArraySlicer.mapper
- ArraySlicer.single_type
- ArraySlicer.take()
- ChunkTaker.apply()
- ChunkTaker.should_take()
- ChunkTaker.suggest_size()

## GroupIdxsMapper class

    GroupIdxsMapper(
        should_cache=True,
        chunk_meta_cache=NOTHING,
        arg_query=None
    )

Class for mapping chunk metadata to per-group column indices.

Argument must be a group map tuple.

Method generated by attrs for class GroupIdxsMapper.

Superclasses

- ArgGetter
- ChunkMapper

Inherited members

- ArgGetter.arg_query
- ArgGetter.get_arg()
- ChunkMapper.apply()
- ChunkMapper.chunk_meta_cache
- ChunkMapper.map()
- ChunkMapper.should_cache

## GroupLensMapper class

    GroupLensMapper(
        should_cache=True,
        chunk_meta_cache=NOTHING,
        arg_query=None
    )

Class for mapping chunk metadata to per-group column lengths.

Argument can be either a group map tuple or a group lengths array.

Method generated by attrs for class GroupLensMapper.

Superclasses

- ArgGetter
- ChunkMapper

Inherited members

- ArgGetter.arg_query
- ArgGetter.get_arg()
- ChunkMapper.apply()
- ChunkMapper.chunk_meta_cache
- ChunkMapper.map()
- ChunkMapper.should_cache

## GroupLensSizer class

    GroupLensSizer(
        arg_query=None,
        single_type=None
    )

Class for getting the size from group lengths.

Argument can be either a group map tuple or a group lengths array.

Method generated by attrs for class ArgSizer.

Superclasses

- Annotatable
- ArgGetter
- ArgSizer
- Sizer

Inherited members

- ArgGetter.get_arg()
- ArgSizer.apply()
- ArgSizer.arg_query
- ArgSizer.get_size()
- ArgSizer.single_type

### get_obj_size class method

    GroupLensSizer.get_obj_size(
        obj,
        single_type=None
    )

Get size of an object.

## GroupLensSlicer class

    GroupLensSlicer(
        single_type=None,
        ignore_none=True,
        mapper=None
    )

Class for slicing multiple elements from group lengths based on the chunk range.

Method generated by attrs for class ChunkTaker.

Superclasses

- Annotatable
- ChunkSlicer
- ChunkTaker

Inherited members

- ChunkSlicer.get_size()
- ChunkSlicer.ignore_none
- ChunkSlicer.mapper
- ChunkSlicer.single_type
- ChunkSlicer.take()
- ChunkTaker.apply()
- ChunkTaker.should_take()
- ChunkTaker.suggest_size()

## GroupMapSlicer class

    GroupMapSlicer(
        single_type=None,
        ignore_none=True,
        mapper=None
    )

Class for slicing multiple elements from a group map based on the chunk range.

Method generated by attrs for class ChunkTaker.

Superclasses

- Annotatable
- ChunkSlicer
- ChunkTaker

Inherited members

- ChunkSlicer.get_size()
- ChunkSlicer.ignore_none
- ChunkSlicer.mapper
- ChunkSlicer.single_type
- ChunkSlicer.take()
- ChunkTaker.apply()
- ChunkTaker.should_take()
- ChunkTaker.suggest_size()

#### Cookie consent

We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.

- Google Analytics
- GitHub

Manage settings