o
    »i e:
  ã                   @   s”   d Z ddlmZ ddlmZ ddlmZ dd„ Zdd„ Zd	d
„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS ) z(Logical boolean operators: not, and, or.é    )Útensor_util©Úcond)Úgen_math_opsc                 C   s   t  | ¡r	t| ƒS t| ƒS )zFunctional form of "not".)r   Ú
is_tf_typeÚ_tf_notÚ_py_not©Úa© r   ú\/var/www/myenv/lib/python3.10/site-packages/tensorflow/python/autograph/operators/logical.pyÚnot_   s   
r   c                 C   s
   t  | ¡S )z5Implementation of the "not_" operator for TensorFlow.)r   Úlogical_notr	   r   r   r   r      ó   
r   c                 C   s   |  S )z5Default Python implementation of the "not_" operator.r   r	   r   r   r   r   "   s   r   c                 C   ó$   | ƒ }t  |¡rt||ƒS t||ƒS )z9Functional form of "and". Uses lazy evaluation semantics.)r   r   Ú_tf_lazy_andÚ_py_lazy_and©r
   ÚbÚa_valr   r   r   Úand_'   ó   


r   c                    s   t  ˆ |‡ fdd„¡S )z*Lazy-eval equivalent of "and" for Tensors.c                      ó   ˆ S ©Nr   r   r   r   r   Ú<lambda>2   ó    z_tf_lazy_and.<locals>.<lambda>©Útf_condr   ©r   r   r   r   r   r   /   ó   r   c                 C   s
   | o|ƒ S )z(Lazy-eval equivalent of "and" in Python.r   r   r   r   r   r   5   r   r   c                 C   r   )z8Functional form of "or". Uses lazy evaluation semantics.)r   r   Ú_tf_lazy_orÚ_py_lazy_orr   r   r   r   Úor_:   r   r"   c                    s   t  ˆ ‡ fdd„|¡S )z)Lazy-eval equivalent of "or" for Tensors.c                      r   r   r   r   r   r   r   r   E   r   z_tf_lazy_or.<locals>.<lambda>r   r   r   r   r   r    B   r   r    c                 C   s
   | p|ƒ S )z'Lazy-eval equivalent of "or" in Python.r   r   r   r   r   r!   H   r   r!   c                 C   s(   t  | ¡s
t  |¡rt| |ƒS t| |ƒS )zFunctional form of "equal".)r   r   Ú	_tf_equalÚ	_py_equal©r
   r   r   r   r   ÚeqM   s   

r&   c                 C   s   t  | |¡S )z Overload of "equal" for Tensors.)r   Úequalr%   r   r   r   r#   T   s   r#   c                 C   s   | |kS )zGOverload of "equal" that falls back to Python's default implementation.r   r%   r   r   r   r$   Y   s   r$   c                 C   s   t t| |ƒƒS )zFunctional form of "not-equal".)r   r&   r%   r   r   r   Únot_eq^   s   r(   N)Ú__doc__Útensorflow.python.frameworkr   Útensorflow.python.opsr   r   r   r   r   r   r   r   r   r"   r    r!   r&   r#   r$   r(   r   r   r   r   Ú<module>   s"   