pyresample.utils.row_appendable_array module

Appendable numpy array which allows for efficient pre-allocation.

class pyresample.utils.row_appendable_array.RowAppendableArray(reserved_capacity)

Bases: object

Helper class which allows efficient concatenation of numpy arrays bey pre-allocating buffers.

By default, this class behaves the same as subsequent array concatenations.

Create an appendable array with a pre-allocated buffer.

The size of the buffer depends also on the shape after the first axis of the first segment.

__init__(reserved_capacity)

Create an appendable array with a pre-allocated buffer.

The size of the buffer depends also on the shape after the first axis of the first segment.

append_row(next_array)

Append the specified array.

to_array()

Return the numpy array with all the data appended until now.