iarray.IArray.attrs#

IArray.attrs#

Instance to a Blosc2 Attributes class to manage the attributes of an IArray. This class inherites from MutableMapping so every method in this class is available.

This class behaves very similarly to a dictionary, and attributes can be appended in the usual way:

iarr.attrs['attr1'] = 'something'

And can be retrieved similarly:

value = iarr.attrs['attr1']

Once added, an attribute can be deleted with:

del iarr.attrs['attr1']

Methods#

Attributes.__getitem__

Get the content of an attr.

Attributes.__setitem__

Add or update an attr.

Attributes.__delitem__

Delete the attr given by name.

Attributes.__iter__

Attributes.__len__

Attributes.__contains__

Attributes.popitem

as a 2-tuple; but raise KeyError if D is empty.

Attributes.pop

If key is not found, d is returned if given, otherwise KeyError is raised.

Attributes.values

Attributes.keys

Attributes.items

Attributes.clear

Attributes.update

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Attributes.setdefault

Attributes.get

Attributes.__eq__

Return self==value.

Attributes.__ne__

Return self!=value.