Sindbad~EG File Manager
�
Mٜg� � �P � d Z ddlmZ ddlZddlmZ ddlZerddlm Z dd�Z
d d�Zy)
z#
Templates for invalid operations.
� )�annotationsN)�
TYPE_CHECKING)�nptc �F � |t j u r't j | j t
�� }|S |t j u r't j | j t
�� }|S t |� j }t d| j � d|� �� �)a�
If a comparison has mismatched types and is not necessarily meaningful,
follow python3 conventions by:
- returning all-False for equality
- returning all-True for inequality
- raising TypeError otherwise
Parameters
----------
left : array-like
right : scalar, array-like
op : operator.{eq, ne, lt, le, gt}
Raises
------
TypeError : on inequality comparisons
)�dtypez!Invalid comparison between dtype=z and )�operator�eq�np�zeros�shape�bool�ne�ones�type�__name__� TypeErrorr )�left�right�op�
res_values�typs �B/usr/local/lib/python3.12/site-packages/pandas/core/ops/invalid.py�invalid_comparisonr s� � �&