Create a new block, with type inference propagate any values that are not specified
(
self,
values,
placement: BlockPlacement | None = None,
refs: BlockValuesRefs | None = None,
)
| 227 | |
| 228 | @final |
| 229 | def make_block( |
| 230 | self, |
| 231 | values, |
| 232 | placement: BlockPlacement | None = None, |
| 233 | refs: BlockValuesRefs | None = None, |
| 234 | ) -> Block: |
| 235 | """ |
| 236 | Create a new block, with type inference propagate any values that are |
| 237 | not specified |
| 238 | """ |
| 239 | if placement is None: |
| 240 | placement = self._mgr_locs |
| 241 | if self.is_extension: |
| 242 | values = ensure_block_shape(values, ndim=self.ndim) |
| 243 | |
| 244 | return new_block(values, placement=placement, ndim=self.ndim, refs=refs) |
| 245 | |
| 246 | @final |
| 247 | def make_block_same_class( |