HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyo
�
]�3Lc@sDddljZddljZddlZdefd��YZdS(i����Nt
TriangulationcBseeZdZddd�Zed��Zd�Zd�Ze	d��Z
ed��Zd�ZRS(	s�
    An unstructured triangular grid consisting of npoints points and
    ntri triangles.  The triangles can either be specified by the user
    or automatically generated using a Delaunay triangulation.

    Read-only attributes:

      *x*: array of shape (npoints).
        x-coordinates of grid points.

      *y*: array of shape (npoints).
        y-coordinates of grid points.

      *triangles*: integer array of shape (ntri,3).
        For each triangle, the indices of the three points that make
        up the triangle, ordered in an anticlockwise manner.

      *mask*: optional boolean array of shape (ntri).
        Which triangles are masked out.

      *edges*: integer array of shape (?,2).
        All edges of non-masked triangles.  Each edge is the start
        point index and end point index.  Each edge (start,end and
        end,start) appears only once.

      *neighbors*: integer array of shape (ntri,3).
        For each triangle, the indices of the three triangles that
        share the same edges, or -1 if there is no such neighboring
        triangle.  neighbors[i,j] is the triangle that is the neighbor
        to the edge from point index triangles[i,j] to point index
        triangles[i,(j+1)%3].
    cCsYtj|dtj�|_tj|dtj�|_|jj|jjksft|jj�dkrutd��nd|_	d|_
d|_|dkr8tj
|j|j�}tj|jdtj�|_|dkr�tj|jdtj�|_
tj|jdtj�}tj|ddd�|_q�n�tj|dtj�|_|jjdks{|jjddkr�td��n|jj�t|j�kr�td��n|jj�d	kr�td
��n|dk	rLtj|dtj�|_	t|j	j�dks:|j	jd	|jjd	krLtd��qLnd|_dS(
s�
        Create a Triangulation object.

        The first two arguments must be:

        *x*, *y*: arrays of shape (npoints).
          Point coordinates.

        Optional arguments (args or keyword args):

        *triangles*: integer array of shape (ntri,3).
          For each triangle, the indices of the three points that make
          up the triangle.  If the points are ordered in a clockwise
          manner, they are converted to anticlockwise.

          If not specified, matplotlib.delaunay is used to create a
          Delaunay triangulation of the points.

        *mask*: optional boolean array of shape (ntri).
          Which triangles are masked out.
        tdtypeis'x and y must be equal-length 1-D arraystaxisiistriangles must be a (?,3) arrays&triangles max element is out of boundsis&triangles min element is out of boundss3mask array must have same length as triangles arrayN(tnptasarraytfloat64txtytshapetlent
ValueErrortNonetmaskt_edgest
_neighborstdelaunayRttriangle_nodestint32t	trianglestedge_dbttriangle_neighborstrolltndimtmaxtmintboolt_cpp_triangulation(tselfRRRRtdtt	neighbors((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyt__init__&s60			!( cCs.|jdkr'|j�j�|_n|jS(N(R
Rtget_cpp_triangulationt	get_edges(R((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pytedgescscCsL|jdkrEtj|j|j|j|j|j|j	�|_n|jS(sc
        Return the underlying C++ Triangulation object, creating it
        if necessary.
        N(
RRt_triRRRRRR
R(R((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyRis
cCs7|jdk	r,|jjd|jdd�S|jSdS(sC
        Return an array of triangles that are not masked.
        iRiN(RRRtcompress(R((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pytget_masked_trianglestsc	Oslt|dt�r*|d}|d}n5|d}|d}|d}t}|jdd�}t}|dkr�t|�dkr�|d}t}n|dk	r�ytj|dtj	�}Wq�t
k
r�d}q�Xn|dk	r|jdks
|jddkrd}n|dk	r8|r8|d}t}n|jdd�}t}|dkr�|r�t|�dkr�|d}t}n|dk	r�ytj|dtj
�}Wq�t
k
r�d}q�Xn|dk	r�|jdkr�d}n|dk	r+|dk	r+t|�|jdkr+d}n|dk	rJ|rJ|d}nt||||�}|||fS(	s�
        Return a Triangulation object from the args and kwargs, and
        the remaining args and kwargs with the consumed values removed.

        There are two alternatives: either the first argument is a
        Triangulation object, in which case it is returned, or the args
        and kwargs are sufficient to create a new Triangulation to
        return.  In the latter case, see Triangulation.__init__ for
        the possible args and kwargs.
        iiiRRiRN(t
isinstanceRtTruetpopRtFalseR	RRRR
RRR(	targstkwargst
triangulationRRtignore_remaining_argsRt	from_argsR((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pytget_from_args_and_kwargs}sT





	

	
	%
	

		
cCs.|jdkr'|j�j�|_n|jS(N(RRt_get_cpp_triangulationt
get_neighbors(R((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyR�scCs�|dkrd|_nbtj|dtj�|_t|jj�dksk|jjd|jjdkrztd��n|j	dk	r�|j	j
|j�nd|_d|_dS(sp
        Set or clear the mask array.  This is either None, or a boolean
        array of shape (ntri).
        Riis3mask array must have same length as triangles arrayN(
RRRRRR	RRR
Rtset_maskR
R(RR((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyR1�s 	N(
t__name__t
__module__t__doc__RRtpropertyR!RR$tstaticmethodR.RR1(((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyRs =			D(tmatplotlib.delaunayRtmatplotlib._triR"tnumpyRtobjectR(((sO/opt/alt/python27/lib64/python2.7/site-packages/matplotlib/tri/triangulation.pyt<module>s