ó
    ‰*£h±  ã                   óB   • S SK Jr  S	S jrS\4S jrS	S jrSSS.S jrg)
é   )Ú_iszeroFc                 ór   • U R                  USS9u  p#U Vs/ s H  o@R                  U5      PM     sn$ s  snf )aY  Returns a list of vectors (Matrix objects) that span columnspace of ``M``

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.columnspace()
[Matrix([
[ 1],
[-2],
[ 3]]), Matrix([
[0],
[0],
[6]])]

See Also
========

nullspace
rowspace
T©ÚsimplifyÚwith_pivots)Úechelon_formÚcol©ÚMr   ÚreducedÚpivotsÚis        ÚU/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sympy/matrices/subspaces.pyÚ_columnspacer      s6   € ð: —n‘n¨hÀD�nÐI�O€Gá$Ó%šf˜�E‰E�!ŽH™fÑ%Ð%ùÒ%s   —4c                 óº  • U R                  X!S9u  p4[        U R                  5       Vs/ s H  oUU;  d  M
  UPM     nn/ nU H`  nU R                  /U R                  -  n	U R                  X˜'   [        U5       H  u  p«X›==   X:U4   -  ss'   M     UR                  U	5        Mb     U Vs/ s H  oÀR                  U R                  SU5      PM!     sn$ s  snf s  snf )a;  Returns list of vectors (Matrix objects) that span nullspace of ``M``

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.nullspace()
[Matrix([
[-3],
[ 1],
[ 0]])]

See Also
========

columnspace
rowspace
)Ú
iszerofuncr   r   )ÚrrefÚrangeÚcolsÚzeroÚoneÚ	enumerateÚappendÚ_new)r   r   r   r   r   r   Ú	free_varsÚbasisÚfree_varÚvecÚpiv_rowÚpiv_colÚbs                r   Ú
_nullspacer"   &   sÊ   € ð4 —f‘f¨
�fÐF�O€Gä! !§&¡&œMÓ=šM�q°f©_—™M€IÐ=Ø€Eãˆð Ÿ™˜ 1§6¡6Ñ)ˆØŸ™ˆ‰ä )¨&Ö 1ÑˆGØ‹L˜G¨XÐ$5Ñ6Ñ6�Lñ !2ð 	�‰�SÖñ ñ +0Ó0ª% Q�F‰F�1—6‘6˜1˜aÖ ©%Ñ0Ð0ùò >ùò 1s   ©	C¶CÂ*&Cc                 ó–   • U R                  USS9u  p#[        [        U5      5       Vs/ s H  oBR                  U5      PM     sn$ s  snf )a  Returns a list of vectors that span the row space of ``M``.

Examples
========

>>> from sympy import Matrix
>>> M = Matrix(3, 3, [1, 3, 0, -2, -6, 0, 3, 9, 6])
>>> M
Matrix([
[ 1,  3, 0],
[-2, -6, 0],
[ 3,  9, 6]])
>>> M.rowspace()
[Matrix([[1, 3, 0]]), Matrix([[0, 0, 6]])]
Tr   )r   r   ÚlenÚrowr
   s        r   Ú	_rowspacer&   S   sA   € ð" —n‘n¨hÀD�nÐI�O€Gä$)¬#¨f«+Ô$6Ó7Ò$6˜q�K‰K˜ŽNÑ$6Ñ7Ð7ùÒ7s   ©A)Ú	normalizeÚ	rankcheckc                óÒ  • SSK Jn  U(       d  / $ US   R                  S:H  nU Vs/ s H  ofR                  5       PM     nnU R                  " U6 nU" XqS9u  p‰U(       a$  UR
                  [        U5      :  a  [        S5      e/ n
[        UR
                  5       HD  nU(       a  U " USS2U4   R                  5      nOU " USS2U4   5      nU
R                  U5        MF     U
$ s  snf )a0  Apply the Gram-Schmidt orthogonalization procedure
to vectors supplied in ``vecs``.

Parameters
==========

vecs
    vectors to be made orthogonal

normalize : bool
    If ``True``, return an orthonormal basis.

rankcheck : bool
    If ``True``, the computation does not stop when encountering
    linearly dependent vectors.

    If ``False``, it will raise ``ValueError`` when any zero
    or linearly dependent vectors are found.

Returns
=======

list
    List of orthogonal (or orthonormal) basis vectors.

Examples
========

>>> from sympy import I, Matrix
>>> v = [Matrix([1, I]), Matrix([1, -I])]
>>> Matrix.orthogonalize(*v)
[Matrix([
[1],
[I]]), Matrix([
[ 1],
[-I]])]

See Also
========

MatrixBase.QRdecomposition

References
==========

.. [1] https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process
r   )Ú_QRdecomposition_optionalé    )r'   z0GramSchmidt: vector set not linearly independentN)Údecompositionsr*   Úrowsr   Úhstackr   r$   Ú
ValueErrorr   ÚTr   )Úclsr'   r(   Úvecsr*   Úall_row_vecsÚxr   ÚQÚRÚretr   r	   s                r   Ú_orthogonalizer8   i   sÉ   € õ` :æØˆ	à˜‘G—L‘L AÑ%€Lá!Ó"šT˜�E‰EŽG™T€DÐ"Ø�
Š
�DÐ€AÙ$ QÑ<�D€Aæ�Q—V‘Vœc $›iÓ'ÜÐKÓLÐLà
€CÜ�1—6‘6Ž]ˆÞÙ�aš˜1˜‘g—i‘i“.‰Cá�aš˜1˜‘g“,ˆCØ�
‰
�3Žñ ð €Jùò #s   ¦C$N)F)Ú	utilitiesr   r   r"   r&   r8   © ó    r   Ú<module>r<      s-   ðÝ ô&ðD !¨Wô *1ôZ8ð, */¸%ö Er;   