Check if this Manager can be treated as a single ndarray.
(mgr: BlockManager, first_dtype: DtypeObj)
| 189 | |
| 190 | |
| 191 | def _is_homogeneous_mgr(mgr: BlockManager, first_dtype: DtypeObj) -> bool: |
| 192 | """ |
| 193 | Check if this Manager can be treated as a single ndarray. |
| 194 | """ |
| 195 | if mgr.nblocks != 1: |
| 196 | return False |
| 197 | blk = mgr.blocks[0] |
| 198 | if not (blk.mgr_locs.is_slice_like and blk.mgr_locs.as_slice.step == 1): |
| 199 | return False |
| 200 | |
| 201 | return blk.dtype == first_dtype |
| 202 | |
| 203 | |
| 204 | def _concat_homogeneous_fastpath( |
no outgoing calls
no test coverage detected