scipp.Masks#

class scipp.Masks#

dict-like collection of masks.

Returned by DataArray.masks()

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

get(key[, default])

Get the value associated with the provided key or the default value.

is_edges(self, key[, dim])

Return True if the given key contains bin-edges in the given dim.

items(self)

view on self's items

keys(self)

view on self's keys

pop(key[, default])

Remove and return an element.

values(self)

view on self's values

get(key, default=None)#

Get the value associated with the provided key or the default value.

is_edges(self: scipp._scipp.core.Masks, key: str, dim: Optional[scipp._scipp.core.Dim] = None) bool#

Return True if the given key contains bin-edges in the given dim.

items(self: scipp._scipp.core.Masks) scipp._scipp.core.Masks_items_view#

view on self’s items

keys(self: scipp._scipp.core.Masks) scipp._scipp.core.Masks_keys_view#

view on self’s keys

pop(key, default=NotSpecified)#

Remove and return an element.

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

values(self: scipp._scipp.core.Masks) scipp._scipp.core.Masks_values_view#

view on self’s values