larray.IGroup

class larray.IGroup(key, name=None, axis=None)[source]

Index Group.

Represents a subset of indices of an axis.

Parameters
keykey

Anything usable for indexing. A key should be either a single position, a sequence of positions, or a slice with integer bounds.

namestr, optional

Name of the group.

axisint, str, Axis, optional

Axis for group.

__init__(key, name=None, axis=None)

Methods

__init__(key[, name, axis])

by(length[, step, template])

Split group into several groups of specified length.

containing(substring)

Return a group with all the labels containing the specified substring.

difference(other)

Return (set) difference of this label group and other.

endingwith(suffix)

Return a group with the labels ending with the specified string.

equals(other)

Check if this group is equal to another group.

eval()

Translate key to labels, if it is not already, expanding slices in the process.

intersection(other)

Return (set) intersection of this label group and other.

matching([deprecated, pattern, regex])

Return a group with all the labels matching the specified pattern or regular expression.

named(name)

Return group with a different name.

retarget_to(target_axis)

Retarget group to another axis.

set()

Create LSet from this group.

startingwith(prefix)

Return a group with the labels starting with the specified string.

to_hdf(filepath[, key, axis_key])

Write group to a HDF file.

to_label()

Translate key to labels, if it is not already.

translate([bound, stop])

compute position(s) of group.

union(other)

Return (set) union of this label group and other.

with_axis(axis)

Return group with a different axis.

Attributes

axis

format_string

key

name