xdas.virtual.VirtualStack#

class xdas.virtual.VirtualStack(sources=[], axis=0)[source]#

Lazy concatenation of multiple VirtualSource objects along one axis.

Parameters:
  • sources (list of VirtualSource, optional) – Initial list of sources to stack. All sources must share the same dtype and shape on every axis other than axis.

  • axis (int, optional) – Concatenation axis. Defaults to 0.

__init__(sources=[], axis=0)[source]#

Methods

__init__([sources, axis])

append(source)

Append source to the stack.

create_variable(file, name[, dims, dtype])

Write this virtual array into file and register it as a named variable.

extend(sources)

Extend the stack with an iterable of sources.

to_dataset(file_or_group, name)

Write the stacked virtual array as an HDF5 virtual dataset.

Attributes

axis

Concatenation axis index.

dtype

NumPy dtype shared by all sources in the stack.

empty

True if the array contains no elements.

nbytes

Total number of bytes occupied by the array elements.

ndim

Number of dimensions.

shape

Shape of the concatenated virtual array.

size

Total number of elements.

sources

List of VirtualSource objects in the stack.