� ��g ����ddlmZmZmZddlmZGd�de��Zej�ee��d���Z ej�ee��d���Z dS)�)�Kind� _NumberKind� NumberKind)�Mulc�,��eZdZdZef�fd� Zd�Z�xZS)� MatrixKinda� Kind for all matrices in SymPy. Basic class for this kind is ``MatrixBase`` and ``MatrixExpr``, but any expression representing the matrix can have this. Parameters ========== element_kind : Kind Kind of the element. Default is :class:`sympy.core.kind.NumberKind`, which means that the matrix contains only numbers. Examples ======== Any instance of matrix class has kind ``MatrixKind``: >>> from sympy import MatrixSymbol >>> A = MatrixSymbol('A', 2, 2) >>> A.kind MatrixKind(NumberKind) An expression representing a matrix may not be an instance of the Matrix class, but it will have kind ``MatrixKind``: >>> from sympy import MatrixExpr, Integral >>> from sympy.abc import x >>> intM = Integral(A, x) >>> isinstance(intM, MatrixExpr) False >>> intM.kind MatrixKind(NumberKind) Use ``isinstance()`` to check for ``MatrixKind`` without specifying the element kind. Use ``is`` to check the kind including the element kind: >>> from sympy import Matrix >>> from sympy.core import NumberKind >>> from sympy.matrices import MatrixKind >>> M = Matrix([1, 2]) >>> isinstance(M.kind, MatrixKind) True >>> M.kind is MatrixKind(NumberKind) True See Also ======== sympy.core.kind.NumberKind sympy.core.kind.UndefinedKind sympy.core.containers.TupleKind sympy.sets.sets.SetKind c�Z��t���||��}||_|S)N)�super�__new__� element_kind)�clsr �obj� __class__s ��c/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/sympy/matrices/kind.pyr zMatrixKind.__new__@s'����g�g�o�o�c�<�0�0��'���� �c��d|jzS)NzMatrixKind(%s))r )�selfs r�__repr__zMatrixKind.__repr__Es���$�"3�3�3r)�__name__� __module__� __qualname__�__doc__rr r� __classcell__)rs@rrrs\�������7�7�p#-������� 4�4�4�4�4�4�4rrc��t|t��s||}}tj||j��}t|��S)z� Return MatrixKind. The element kind is selected by recursive dispatching. Do not need to dispatch in reversed order because KindDispatcher searches for this automatically. )� isinstancerr�_kind_dispatcherr ��k1�k2�elemks r� num_mat_mulr!IsA�� �b�*� %� %���R�B�� � ��R�_� 5� 5�E� �e� � �rc�^�tj|j|j��}t|��S)zS Return MatrixKind. The element kind is selected by recursive dispatching. )rrr rrs r� mat_mat_mulr#[s(�� � ���"�/� B� B�E� �e� � �rN) �sympy.core.kindrrr�sympy.core.mulrrr�registerr!r#�rr�<module>r(s���:�9�9�9�9�9�9�9�9�9�������?4�?4�?4�?4�?4��?4�?4�?4�D����{�J�7�7���8�7��"����z�:�6�6���7�6���r
Memory