§
    l¬¸jÅ  ã                   óV   — d dl mZmZ d dlmZ d dlmZ ddlmZ  G d„ de¦  «        Z	dS )	é    )Úarray_namespaceÚ	np_compat)Úcached_property)Úroots_legendreé   )Ú	FixedRulec                   ó0   — e Zd ZdZdd„Zed„ ¦   «         ZdS )ÚGaussLegendreQuadratureaw  
    Gauss-Legendre quadrature.

    Parameters
    ----------
    npoints : int
        Number of nodes for the higher-order rule.

    xp : array_namespace, optional
        The namespace for the node and weight arrays. Default is None, where NumPy is
        used.

    Examples
    --------
    Evaluate a 1D integral. Note in this example that ``f`` returns an array, so the
    estimates will also be arrays.

    >>> import numpy as np
    >>> from scipy.integrate import cubature
    >>> from scipy.integrate._rules import GaussLegendreQuadrature
    >>> def f(x):
    ...     return np.cos(x)
    >>> rule = GaussLegendreQuadrature(21) # Use 21-point GaussLegendre
    >>> a, b = np.array([0]), np.array([1])
    >>> rule.estimate(f, a, b) # True value sin(1), approximately 0.84147
     array([0.84147098])
    >>> rule.estimate_error(f, a, b)
     array([1.11022302e-16])
    Nc                 óž   — |dk     rt          d¦  «        ‚|| _        |€t          }t          |                     d¦  «        ¦  «        | _        d S )Né   z5At least 2 nodes required for Gauss-Legendre cubaturer   )Ú
ValueErrorÚnpointsr   r   ÚemptyÚxp)Úselfr   r   s      úv/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/scipy/integrate/_rules/_gauss_legendre.pyÚ__init__z GaussLegendreQuadrature.__init__)   sP   € Ø�QŠ;ˆ;ÝØGñô ð ð ˆŒàˆ:ÝˆBå! "§(¢(¨1¡+¤+Ñ.Ô.ˆŒˆˆó    c                 óÈ   — t          | j        ¦  «        \  }}| j                             || j        j        ¬¦  «        | j                             || j        j        ¬¦  «        fS )N)Údtype)r   r   r   ÚasarrayÚfloat64)r   ÚnodesÚweightss      r   Únodes_and_weightsz)GaussLegendreQuadrature.nodes_and_weights6   sU   € õ (¨¬Ñ5Ô5‰ˆˆwð ŒG�OŠO˜E¨¬¬ˆOÑ9Ô9ØŒG�OŠO˜G¨4¬7¬?ˆOÑ;Ô;ð
ð 	
r   )N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r
   r
   
   sM   € € € € € ðð ð</ð /ð /ð /ð ð
ð 
ñ „_ð
ð 
ð 
r   r
   N)
Úscipy._lib._array_apir   r   Ú	functoolsr   Úscipy.specialr   Ú_baser   r
   r    r   r   ú<module>r%      s‡   ðØ <Ð <Ð <Ð <Ð <Ð <Ð <Ð <à %Ð %Ð %Ð %Ð %Ð %à (Ð (Ð (Ð (Ð (Ð (à Ð Ð Ð Ð Ð ð4
ð 4
ð 4
ð 4
ð 4
˜iñ 4
ô 4
ð 4
ð 4
ð 4
r   