# resolve_split_pieces

<table class=".origin_table">
    <tr>
        <td style="text-align: left; border-style: hidden">*function*  of [dascore.core._spool_inventory](`dascore.core._spool_inventory`)</td>
        <td style="text-align: right; border-style: hidden">[source](https://github.com/DASDAE/dascore/blob/dev/dascore/core/_spool_inventory.py#L1166-L1215)</td>
    </tr>
</table>

:::{.padded_bottom_10pt}

:::{.def_block}


<b>resolve_split_pieces</b>(<br>
    &nbsp;&nbsp;&nbsp;&nbsp;inventory
,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;contexts
,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;frame
,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;name
,<br>
    &nbsp;&nbsp;&nbsp;&nbsp;keep
,<br>
)-> 'tuple'


:::

:::
Return the channel dimension, each row's pieces by value, and refusals.

Splitting expands the spool into one patch per value a group takes
along each row, so a row is answered with a list of `(value, piece)`
pairs rather than pieces alone. A value the group states in two
places gives that value two pieces, so a row's pieces are disjoint
but neither contiguous nor in envelope order — they arrive grouped by
value, and the values are sorted rather than the envelopes.

## Parameters

<table class="table">
  <thead>
    <tr>
            <th scope="col"> Parameter</th>
            <th scope="col"> Description</th>
    </tr>
  </thead>
  <tbody>
        <tr>
            <td>inventory</td>
            <td>The inventory to resolve against.</td>
        </tr>
        <tr>
            <td>contexts</td>
            <td>Each row's resolved context, or None where it has none.</td>
        </tr>
        <tr>
            <td>frame</td>
            <td>The relation being split; one row per patch.</td>
        </tr>
        <tr>
            <td>name</td>
            <td>The inventory-derived coordinate to split on.</td>
        </tr>
        <tr>
            <td>keep</td>
            <td>Decides which values to emit, by the value itself.</td>
        </tr>
  </tbody>
</table>

## Returns
A `(dim, rows, reasons)` triple, `rows` holding the `(value, piece)`
pairs of each row in value order.

