� n1�V�1 � @ sj d d l Z d d l Td d l Td d l Td d � Z d d � Z d d � Z d d � Z d d � Z d S) � N)�*c C s. d d l } d d d � } | | j j _ d S)Nr Fc S s� | r1 d } d d d g } d d � | D� } n d } d d g } | r[ t t | � � n g } t j g | } t | � d k r� | St j � �� t j d d � x� | D]� \ } } d d � | | D� } d d � | | D� } | rt | d t j � rt j | � | | <n | r3t j | � | | <n | ret | d t j � ret j | � | | <q� | r� t j | � | | <q� q� WWd QXt | � S)z� Computes the maximal extent in 2D and 3D space from list of 4-tuples or 6-tuples. If zrange is enabled all extents are converted to 6-tuples to comput x-, y- and z-limits. � r � � � � � c S sP g | ]F } t | � d k r$ | n% | d | d d | d | d d f � q S)r r r Nr r )�len)�.0�e� r �../code/patch_holoviews.py� <listcomp> s z8patch_core_util.<locals>.max_extents.<locals>.<listcomp>�ignorez All-NaN (slice|axis) encounteredc S s"