scipp.merge#

scipp.merge(lhs, rhs)#

Merge two datasets or data groups into one.

If an item appears in both inputs, it must have an identical value in both.

Parameters:
  • lhs (Dataset | DataGroup) – First dataset or data group.

  • rhs (Dataset | DataGroup) – Second dataset or data group.

Returns:

Dataset | DataGroup – A new object that contains the union of all data items, coords, masks and attributes.

Raises:

scipp.DatasetError – If there are conflicting items with different content.