narrowed_data_id
narrowed_data_id(
attrs ,
before: ‘ArraySource | None’ ,
after: ‘ArraySource | None’ ,
coords = None,
new_coords = None,
)-> ‘str | None’
Return the id of a window of the array a patch already is, or None.
A patch nothing has been done to is its source, so narrowing it to something the source can still load names a window of the same array rather than the result of an operation. Windows compose, so which selections led there does not matter.
Parameters
| Parameter | Description |
|---|---|
| attrs | The attrs of the patch being narrowed. |
| before | The source of that patch, if it has one. |
| after | The source the narrowed patch would load from, if any. |
| coords, new_coords |
The coordinates before and after the narrowing. A source states a dimensional window and nothing else, so without them, or when anything outside that window moved, there is no window to name. |
Returns
The window’s id, or None when the result must be derived as usual: the patch is no longer what its source loads (anything was done to it), or one of the two describes no array (a stepped, fancy or non-contiguous selection detaches the source).