Ë
    âQ(hÅ  ã                   óN   — 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	y)	é    )Úarray_namespaceÚ	np_compat)Úcached_property)Úroots_legendreé   )Ú	FixedRulec                   ó(   — e Zd ZdZdd„Zed„ «       Zy)Ú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        |j	                  d«      «      | _        y )Né   z5At least 2 nodes required for Gauss-Legendre cubaturer   )Ú
ValueErrorÚnpointsr   r   ÚemptyÚxp)Úselfr   r   s      úd/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/scipy/integrate/_rules/_gauss_legendre.pyÚ__init__z GaussLegendreQuadrature.__init__)   s@   € Ø�QŠ;ÜØGóð ð ˆŒàˆ:ÜˆBä! "§(¡(¨1£+Ó.ˆ�ó    c                 óö   — t        | j                  «      \  }}| j                  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   sZ   € ô (¨¯©Ó5‰ˆˆwð �G‰G�O‰O˜E¨¯©¯©ˆOÓ9Ø�G‰G�O‰O˜G¨4¯7©7¯?©?ˆOÓ;ð
ð 	
r   )N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   © r   r   r
   r
   
   s    „ ñó</ð ñ
ó ñ
r   r
   N)
Úscipy._lib._array_apir   r   Ú	functoolsr   Úscipy.specialr   Ú_baser   r
   r    r   r   ú<module>r%      s   ðß <å %å (å ô4
˜iõ 4
r   