require_group#

caput.memdata._BaseGroup.require_group(name)[source]#

Require a group to exist, create if it doesn’t.

Parameters:
namestr

Group name.

Returns:
groupGroupLike

The requested group, or a new group if the requested one did not exist.

Raises:
TypeError

If an object with the requested name exists but it is not a Group.