ó
    EñiÅ  ã                   óN   • S SK JrJr  S SKJr  S SKJr  SSKJr   " S S\5      r	g)	é    )Úarray_namespaceÚ	np_compat)Úcached_property)Úroots_legendreé   )Ú	FixedRulec                   ó2   • \ rS rSrSrSS jr\S 5       rSrg)ÚGaussLegendreQuadratureé
   a  
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                 ó‚   • US:  a  [        S5      eXl        Uc  [        n[        UR	                  S5      5      U l        g )Né   z5At least 2 nodes required for Gauss-Legendre cubaturer   )Ú
ValueErrorÚnpointsr   r   ÚemptyÚxp)Úselfr   r   s      Úc/home/mande/repo/quber/.venv/lib/python3.13/site-packages/scipy/integrate/_rules/_gauss_legendre.pyÚ__init__Ú GaussLegendreQuadrature.__init__)   s>   € Ø�Q‹;ÜØGóð ð Œà‰:ÜˆBä! "§(¡(¨1£+Ó.ˆ�ó    c                 óä   • [        U R                  5      u  pU R                  R                  XR                  R                  S9U R                  R                  X R                  R                  S94$ )N)Údtype)r   r   r   ÚasarrayÚfloat64)r   ÚnodesÚweightss      r   Únodes_and_weightsÚ)GaussLegendreQuadrature.nodes_and_weights6   sT   € ô (¨¯©Ó5‰ˆð �G‰G�O‰O˜E¯©¯©ˆOÐ9Ø�G‰G�O‰O˜G¯7©7¯?©?ˆOÐ;ð
ð 	
r   )r   r   )N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   Ú__static_attributes__© 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   