U
    Kvf$                     @   sl  d Z ddlZddlmZ ddlZejdrVddlZejddd ejdd	e	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 )zpatsy 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)moduleignorez"is_categorical_dtype is deprecatedc                   @   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   2/tmp/pip-unpacked-wheel-68fdvdus/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   5   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   	_reexportG   s    
r    ))r   sysZpatsy.versionr   osenvirongetwarningsfilterwarningsDeprecationWarningZ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>   sN   )











