U
    ½mœd³  ã                   @   sZ  d Z ddlZddlmZ ddlZej d¡rDddlZejddd� [[ddl	Z
G dd	„ d	eƒZd	gZd
d„ ZddlZ
ee
jƒ ddlZ
ee
jƒ ddlZ
ee
jƒ ddlZ
ee
jƒ ddlZ
ee
jƒ ddlZ
ee
jƒ ddlZ
ee
jƒ ddl	Z
ee
jƒ ddlZ
ee
jƒ ddl Z
ee
j!ƒ ddl"Z
ee
j#ƒ ddl$Z
ee
j%ƒ ddl&Z
ee
j'ƒ dS )z patsy is a Python package for describing statistical models and building
design matrices. It is closely inspired by the 'formula' mini-language used in
R and S.é    N)Ú__version__ZPATSY_FORCE_NO_WARNINGSÚerrorz^patsy)Úmodulec                   @   s*   e Zd ZdZd	dd„Zdd„ Zdd„ ZdS )
Ú
PatsyErroraç  This is the main error type raised by Patsy functions.

    In addition to the usual Python exception features, you can pass a second
    argument to this function specifying the origin of the error; this is
    included in any error message, and used to help the user locate errors
    arising from malformed formulas. This second argument should be an
    :class:`Origin` object, or else an arbitrary object with a ``.origin``
    attribute. (If it is neither of these things, then it will simply be
    ignored.)

    For ordinary display to the user with default formatting, use
    ``str(exc)``. If you want to do something cleverer, you can use the
    ``.message`` and ``.origin`` attributes directly. (The latter may be
    None.)
    Nc                 C   s&   t  | |¡ || _d | _|  |¡ d S ©N)Ú	ExceptionÚ__init__ÚmessageÚoriginÚ
set_origin)Úselfr	   r
   © r   úG/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/patsy/__init__.pyr   '   s    zPatsyError.__init__c                 C   s,   | j d kr| jS d| j| j jdd�f S d S )Nz%s
%sé   )Úindent)r
   r	   Zcaretize)r   r   r   r   Ú__str__-   s
    
ÿzPatsyError.__str__c                 C   s6   | j d kr2t|dƒr|j }t|tj jƒs,d }|| _ d S )Nr
   )r
   ÚhasattrÚ
isinstanceÚpatsyZOrigin)r   r
   r   r   r   r   4   s    

zPatsyError.set_origin)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r      s   
r   c                 C   s,   t  | j ¡ | j D ]}t| |ƒtƒ |< qd S r   )Ú__all__ÚextendÚgetattrÚglobals)ÚmodÚvarr   r   r   Ú	_reexportF   s    
r   )(r   ÚsysZpatsy.versionr   ÚosÚenvironÚgetÚwarningsÚfilterwarningsZpatsy.originr   r   r   r   r   Zpatsy.highlevelZ	highlevelZpatsy.buildÚbuildZpatsy.constraintÚ
constraintZpatsy.contrastsZ	contrastsZ
patsy.descÚdescZpatsy.design_infoZdesign_infoZ
patsy.evalÚevalr
   Zpatsy.stateÚstateZpatsy.user_utilZ	user_utilZpatsy.missingÚmissingZpatsy.splinesZsplinesZpatsy.mgcv_cubic_splinesZmgcv_cubic_splinesr   r   r   r   Ú<module>   sL   )











