Sindbad~EG File Manager
�
MٜgW � �� � d Z ddlmZ ddlmZ ddlZddlmZ ddl m
Z
ddlmZm
Z
ddlmZ dd lmZ dd
lmZmZmZmZmZ erddlmZ ddlmZ d dd
�Zdd�Zdd�Zy)z�
This is a pseudo-public API for downstream libraries. We ask that downstream
authors
1) Try to avoid using internals directly altogether, and failing that,
2) Use only functions exposed here (or in core.internals)
� )�annotations)�
TYPE_CHECKINGN)�BlockPlacement)�pandas_dtype)�DatetimeTZDtype�PeriodDtype)�
DatetimeArray)�
extract_array)�
check_ndim�ensure_block_shape�extract_pandas_array�get_block_type�maybe_coerce_values)�Dtype��Blockc �: � |�t |� }t | ||� \ } }ddlm}m} ||u rt | j t � rd}|�|xs | j }t |� }n5||u r1t | j t � st j | |�� } t |t � st |� }t | ||� }t | j t t f� rt | d�� } t | |� } t! | ||� t# | � } || ||�� S )a+
This is a pseudo-public analogue to blocks.new_block.
We ask that downstream libraries use this rather than any fully-internal
APIs, including but not limited to:
- core.internals.blocks.make_block
- Block.make_block
- Block.make_block_same_class
- Block.__init__
Nr )�DatetimeTZBlock�ExtensionBlock)�dtypeT)�
extract_numpy)�ndim� placement)r r
�pandas.core.internals.blocksr r �
isinstancer r r r r �_simple_newr �maybe_infer_ndimr
r r r )�valuesr �klassr r r r s �D/usr/local/lib/python3.12/site-packages/pandas/core/internals/api.py�
make_blockr! '