+
    Y°³j|ƒ  ã                   ó¸   € R t ^ RIt^ RIHt ^ RIt^ RIHtHtHtH	t	H
t
HtHtHtHt ^ RIHtHtHt ^ RIHt . ROtR tR tR	]/R
 ltRR lt ! R R4      tR tR# )z�
Matrix Market I/O in Python.
See http://math.nist.gov/MatrixMarket/formats.html
for information about the Matrix Market format.
N)Úwarn)	ÚasarrayÚrealÚimagÚconjÚzerosÚndarrayÚconcatenateÚonesÚcan_cast)Ú	coo_arrayÚissparseÚ
coo_matrix)Ú_NoValueÚMMFilec                 óf   € \        V \        4      '       d   V P                  R 4      # \        V 4      # )Úlatin1)Ú
isinstanceÚbytesÚdecodeÚstr)Úss   &ÚO/home/luca/screen-checking/.venv/lib/python3.14/site-packages/scipy/io/_mmio.pyÚasstrr      s'   € Ü�!”U×ÒØ�x‰x˜Ó!Ð!Üˆq‹6€Mó    c                ó,   € \         P                  V 4      # )a  
Return size and storage parameters from Matrix Market file-like 'source'.

Parameters
----------
source : str or file-like
    Matrix Market filename (extension .mtx) or open file-like object

Returns
-------
rows : int
    Number of matrix rows.
cols : int
    Number of matrix columns.
entries : int
    Number of non-zero entries of a sparse matrix
    or rows*cols for a dense matrix.
format : str
    Either 'coordinate' or 'array'.
field : str
    Either 'real', 'complex', 'pattern', or 'integer'.
symmetry : str
    Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.

Examples
--------
>>> from io import StringIO
>>> from scipy.io import mminfo

>>> text = '''%%MatrixMarket matrix coordinate real general
...  5 5 7
...  2 3 1.0
...  3 4 2.0
...  3 5 3.0
...  4 1 4.0
...  4 2 5.0
...  4 3 6.0
...  4 4 7.0
... '''


``mminfo(source)`` returns the number of rows, number of columns,
format, field type and symmetry attribute of the source file.

>>> mminfo(StringIO(text))
(5, 5, 7, 'coordinate', 'real', 'general')
)r   Úinfo)Úsources   &r   Úmminfor   !   s   € ô` �;‰;�vÓÐr   Úspmatrixc               ó6   € \        4       P                  WR7      # )aÊ  
Reads the contents of a Matrix Market file-like 'source' into a matrix.

Parameters
----------
source : str or file-like
    Matrix Market filename (extensions .mtx, .mtz.gz)
    or open file-like object.
spmatrix : bool, optional (default: True)
    If ``True``, return sparse matrix. Otherwise return sparse array.

    .. deprecated:: 1.18.0
        The default value for `spmatrix` is changing to False in v1.20.
        That means the default return value will be a sparse array.
        Unless you use * instead of @, ** for matrix power, or you depend
        on 2D shapes from e.g. ``A.sum(axis=0)`` it may not matter to you.
        See :ref:`Migration from spmatrix to sparray <migration_to_sparray>`.

Returns
-------
a : ndarray or coo_array or coo_matrix
    Dense or sparse array depending on the matrix format in the
    Matrix Market file.

Examples
--------
>>> from io import StringIO
>>> from scipy.io import mmread

>>> text = '''%%MatrixMarket matrix coordinate real general
...  5 5 7
...  2 3 1.0
...  3 4 2.0
...  3 5 3.0
...  4 1 4.0
...  4 2 5.0
...  4 3 6.0
...  4 4 7.0
... '''

``mmread(source)`` returns the data as sparse matrix in COO format.

>>> m = mmread(StringIO(text), spmatrix=False)
>>> m
<COOrdinate sparse array of dtype 'float64'
     with 7 stored elements and shape (5, 5)>
>>> m.toarray()
array([[0., 0., 0., 0., 0.],
       [0., 0., 1., 0., 0.],
       [0., 0., 0., 2., 3.],
       [4., 5., 6., 7., 0.],
       [0., 0., 0., 0., 0.]])
)r   )r   Úread)r   r   s   &$r   Úmmreadr"   V   s   € ôl ‹8�=‰=˜ˆ=Ó3Ð3r   c                ó<   € \        4       P                  WW#WE4       R# )a”	  
Writes the sparse or dense array `a` to Matrix Market file-like `target`.

Parameters
----------
target : str or file-like
    Matrix Market filename (extension .mtx) or open file-like object.
a : array like
    Sparse or dense 2-D array.
comment : str, optional
    Comments to be prepended to the Matrix Market file.
field : None or str, optional
    Either 'real', 'complex', 'pattern', or 'integer'.
precision : None or int, optional
    Number of digits to display for real or complex values.
symmetry : None or str, optional
    Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
    If symmetry is None the symmetry type of 'a' is determined by its
    values.

Examples
--------
>>> from io import BytesIO
>>> import numpy as np
>>> from scipy.sparse import coo_array
>>> from scipy.io import mmwrite

Write a small NumPy array to a matrix market file.  The file will be
written in the ``'array'`` format.

>>> a = np.array([[1.0, 0, 0, 0], [0, 2.5, 0, 6.25]])
>>> target = BytesIO()
>>> mmwrite(target, a)
>>> print(target.getvalue().decode('latin1'))
%%MatrixMarket matrix array real general
%
2 4
1
0
0
2.5
0
0
0
6.25

Add a comment to the output file, and set the precision to 3.

>>> target = BytesIO()
>>> mmwrite(target, a, comment='\n Some test data.\n', precision=3)
>>> print(target.getvalue().decode('latin1'))
%%MatrixMarket matrix array real general
%
% Some test data.
%
2 4
1.00e+00
0.00e+00
0.00e+00
2.50e+00
0.00e+00
0.00e+00
0.00e+00
6.25e+00

Convert to a sparse matrix before calling ``mmwrite``.  This will
result in the output format being ``'coordinate'`` rather than
``'array'``.

>>> target = BytesIO()
>>> mmwrite(target, coo_array(a), precision=3)
>>> print(target.getvalue().decode('latin1'))
%%MatrixMarket matrix coordinate real general
%
2 4 3
1 1 1.00e+00
2 2 2.50e+00
2 4 6.25e+00

Write a complex Hermitian array to a matrix market file.  Note that
only six values are actually written to the file; the other values
are implied by the symmetry.

>>> z = np.array([[3, 1+2j, 4-3j], [1-2j, 1, -5j], [4+3j, 5j, 2.5]])
>>> z
array([[ 3. +0.j,  1. +2.j,  4. -3.j],
       [ 1. -2.j,  1. +0.j, -0. -5.j],
       [ 4. +3.j,  0. +5.j,  2.5+0.j]])

>>> target = BytesIO()
>>> mmwrite(target, z, precision=2)
>>> print(target.getvalue().decode('latin1'))
%%MatrixMarket matrix array complex hermitian
%
3 3
3.0e+00 0.0e+00
1.0e+00 -2.0e+00
4.0e+00 3.0e+00
1.0e+00 0.0e+00
0.0e+00 5.0e+00
2.5e+00 0.0e+00

N)r   Úwrite)ÚtargetÚaÚcommentÚfieldÚ	precisionÚsymmetrys   &&&&&&r   Úmmwriter+   ‘   s   € ôP ƒH‡N�N�6˜g¨iÖBr   c            
       óÈ  a € ] tR t^ýt o R*t]R 4       t]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       tRtR	t]]3t]R
 4       tRtRtRtRtRt]]]]]3t]R 4       tRtRtRtRt]]]]3t]R 4       t]R]R]R]R]R/t] R 4       t!] R 4       t"]R 4       t#] R+R l4       t$] R 4       t%] R 4       t&R  t'R!](/R" lt)R,R$ lt*R% t+R& t,R' t-R,R( lt.R)t/V t0R## )-r   c                ó   € V P                   # ©N)Ú_rows©Úselfs   &r   ÚrowsÚMMFile.rows  ó   € à�z‰zÐr   c                ó   € V P                   # r.   )Ú_colsr0   s   &r   ÚcolsÚMMFile.cols	  r4   r   c                ó   € V P                   # r.   )Ú_entriesr0   s   &r   ÚentriesÚMMFile.entries  s   € à�}‰}Ðr   c                ó   € V P                   # r.   )Ú_formatr0   s   &r   ÚformatÚMMFile.format  s   € à�|‰|Ðr   c                ó   € V P                   # r.   )Ú_fieldr0   s   &r   r(   ÚMMFile.field  s   € à�{‰{Ðr   c                ó   € V P                   # r.   )Ú	_symmetryr0   s   &r   r*   ÚMMFile.symmetry  s   € à�~‰~Ðr   c                ób   € V P                   V P                  V P                  V P                  39   # r.   )rE   ÚSYMMETRY_SYMMETRICÚSYMMETRY_SKEW_SYMMETRICÚSYMMETRY_HERMITIANr0   s   &r   Úhas_symmetryÚMMFile.has_symmetry  s2   € à�~‰~ $×"9Ñ"9Ø"&×">Ñ">Ø"&×"9Ñ"9ð";ñ ;ð 	;r   Ú
coordinateÚarrayc                ó`   € WP                   9  d   R V RV P                    2p\        V4      hR# )zunknown format type ú, must be one of N)ÚFORMAT_VALUESÚ
ValueError)r1   r?   Úmsgs   && r   Ú_validate_formatÚMMFile._validate_format(  s7   € à×+Ñ+Ô+Ø(¨¨Ð0AÀ$×BTÑBTÐAUÐVˆCÜ˜S“/Ð!ñ ,r   Úintegerúunsigned-integerr   ÚcomplexÚpatternc                ó`   € WP                   9  d   R V RV P                    2p\        V4      hR# )zunknown field type rP   N)ÚFIELD_VALUESrR   )r1   r(   rS   s   && r   Ú_validate_fieldÚMMFile._validate_field7  s7   € à×)Ñ)Ô)Ø'¨ wÐ.?À×@QÑ@QÐ?RÐSˆCÜ˜S“/Ð!ñ *r   ÚgeneralÚ	symmetriczskew-symmetricÚ	hermitianc                ó\   € WP                   9  d   \        R V RV P                    24      hR# )zunknown symmetry type rP   N)ÚSYMMETRY_VALUESrR   )r1   r*   s   &&r   Ú_validate_symmetryÚMMFile._validate_symmetryE  sA   € à×/Ñ/Ô/ÜÐ5°h°Zð @/Ø/3×/CÑ/CÐ.DðFó Gð Gñ 0r   ÚintpÚuint64ÚdÚDc                 ó   € R # r.   © rj   r   r   ÚreaderÚMMFile.readerR  ó   € ár   c                 ó   € R # r.   rj   rj   r   r   ÚwriterÚMMFile.writerW  rm   r   c                ó”  € V P                  V4      w  r# VP                  4       pR VP                  4        4       w  rVrxp	VP                  R4      '       g   \	        R4      hVP                  4       R8X  g   \	        RV,           4      hVP                  4       R8X  d   V P                  pM!VP                  4       R8X  d   V P                  pV'       dF   VP                  4       '       d/   VP                  4       ^ ,          R9   d   VP                  4       pKL   VP                  4       '       g   VP                  4       pK(  VP                  4       p
WpP                  8X  dM   \        V
4      ^8X  g"   \	        RVP                  R	4      ,           4      h\        \        V
4      w  r¼W¼,          pMD\        V
4      ^8X  g"   \	        R
VP                  R	4      ,           4      h\        \        V
4      w  r¼pW¼W×VP                  4       V	P                  4       3V'       d   VP                  4        # #   T'       d   TP                  4        i i ; i)aK  
Return size, storage parameters from Matrix Market file-like 'source'.

Parameters
----------
source : str or file-like
    Matrix Market filename (extension .mtx) or open file-like object

Returns
-------
rows : int
    Number of matrix rows.
cols : int
    Number of matrix columns.
entries : int
    Number of non-zero entries of a sparse matrix
    or rows*cols for a dense matrix.
format : str
    Either 'coordinate' or 'array'.
field : str
    Either 'real', 'complex', 'pattern', or 'integer'.
symmetry : str
    Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
c              3   óT   "  € T F  p\        VP                  4       4      x € K   	  R # 5ir.   )r   Ústrip)Ú.0Úparts   & r   Ú	<genexpr>ÚMMFile.info.<locals>.<genexpr>~  s   é € Ð>±¨”�t—z‘z“|×$Ð$³ùs   ‚&(z%%MatrixMarketz%source is not in Matrix Market formatÚmatrixzProblem reading file header: rN   rM   zHeader line not of length 2: ÚasciizHeader line not of length 3: ©Ú%é%   )Ú_openÚreadlineÚsplitÚ
startswithrR   ÚlowerÚFORMAT_ARRAYÚFORMAT_COORDINATEÚlstriprs   Úlenr   ÚmapÚintÚclose)r1   r   ÚstreamÚclose_itÚlineÚmmidrx   r?   r(   r*   Ú
split_liner2   r7   r;   s   &&            r   r   ÚMMFile.info\  sÒ  € ð6  Ÿ:™: fÓ-Ñˆð/	ð —?‘?Ó$ˆDá>°·±´Ó>ñ 2ˆD˜&¨à—?‘?Ð#3×4Ò4Ü Ð!HÓIÐIØ—<‘<“> XÔ-Ü Ð!@À4Õ!GÓHÐHð �|‰|‹~ Ô(Ø×*Ñ*‘Ø—‘“ <Ô/Ø×/Ñ/�÷ Ø—;‘;—=’= T§[¡[£]°1Õ%5¸Ô%BØ!Ÿ?™?Ó,’Dàð —j‘j—l’lØ—‘Ó(’àŸ™›ˆJØ×*Ñ*Ô*Ü˜:“¨!Ô+Ü$Ð%DØ%)§[¡[°Ó%9õ&:ó ;ð ;ä ¤ jÓ1‘
�Ø�+‘ä˜:“¨!Ô+Ü$Ð%DØ%)§[¡[°Ó%9õ&:ó ;ð ;ä&)¬#¨zÓ&:Ñ#�˜Gà °·±³Ø—N‘NÓ$ð&÷ Ø—‘•ð ø�xØ—‘•ð ús    •B>H, ÃH, Ã*AH, Ä/C#H, È,Ic                ó*  €  \         P                  ! V 4      p T^ ,          R8X  Ed8   \         P                  P	                  T 4      '       g¢   \         P                  P	                  T R,           4      '       d   T R,           p Mk\         P                  P	                  T R,           4      '       d   T R,           p M5\         P                  P	                  T R,           4      '       d
   T R,           p T P                  R4      '       d   ^ RIpTP                  Y4      pTR
3# T P                  R4      '       d   ^ RIpTP                  T R	4      pTR
3# \        Y4      p TR
3# T RR R8w  d
   T R,           p \        Y4      pTR
3#   \         d    T R3u # i ; i)a  Return an open file stream for reading based on source.

If source is a file name, open it (after trying to find it with mtx and
gzipped mtx extensions). Otherwise, just return source.

Parameters
----------
filespec : str or file-like
    String giving file name or file-like object
mode : str, optional
    Mode with which to open file, if `filespec` is a file name.

Returns
-------
fobj : file-like
    Open file-like object.
close_it : bool
    True if the calling function should close this file when done,
    false otherwise.
FÚrz.mtxz.mtx.gzz.mtx.bz2z.gzNz.bz2ÚrbTéüÿÿÿ)
ÚosÚfspathÚ	TypeErrorÚpathÚisfileÚendswithÚgzipÚopenÚbz2ÚBZ2File)ÚfilespecÚmoder™   r‰   r›   s   &&   r   r}   ÚMMFile._open«  s^  € ð4	#Ü—y’y Ó*ˆHð ��7�c�>ô —7‘7—>‘> (×+Ò+Ü—7‘7—>‘> (¨6¥/×2Ò2Ø'¨&Õ0‘HÜ—W‘W—^‘^ H¨YÕ$6×7Ò7Ø'¨)Õ3‘HÜ—W‘W—^‘^ H¨ZÕ$7×8Ò8Ø'¨*Õ4�Hà× Ñ  ×'Ò'ÛØŸ™ 8Ó2�ð �tˆ|Ðð ×"Ñ" 6×*Ò*ÛØŸ™ X¨tÓ4�ð �tˆ|Ðô ˜hÓ-‘ð �tˆ|Ðð	 ˜˜ˆ} Ô&Ø# fÕ,�Ü˜(Ó)ˆFà�tˆ|ÐøôA ô 	#Ø˜U�?Ò"ð	#ús   ‚F  Æ FÆFc                óÊ  a a€ S P                   w  poVS8w  d   \        P                  # R pR pS P                  P                  R9   p\        S 4      '       dq   S P                  4       o S P                  4       w  rVWV8  P                  4       WV8„  P                  4       8w  d   \        P                  # S P                  4       o V 3R lpMV V3R lpV! 4        F¡  w  r‰p
V'       d   V
'       d   V^ 8w  d   RpMcV'       d	   W‰8w  d   Rp\        P                  ! RR7      ;_uu_ 4        V'       d
   W‰) 8w  d   RpRRR4       V'       d   V\        V	4      8w  d   RpV'       d   K�  V'       d   K—  V'       d   K¡   M	  V'       d   \        P                  # V'       d   \        P                  # V'       d   \        P                  # \        P                  #   + '       g   i     L¤; i)TÚFDc               3   ó”   <"  € SP                  4        F.  w  w  rpW8”  d   SW3,          pW#R 3x € K   W8X  g   K(  W"R3x € K0  	  R# 5i)FTN)Úitems)ÚiÚjÚaijÚajir&   s       €r   Úsymm_iteratorÚ+MMFile._get_symmetry.<locals>.symm_iteratorÿ  sG   øé € Ø%&§W¡W¦Y‘M‘V�a˜SØ”uØ  �g˜Ø"¨Ð/Ô/ØžØ"¨Ð.Ô.ó &/ùs
   ƒ4A¼Ac               3   ó¨   <"  € \        S4       F=  p \        V S4       F*  pSV,          V ,          SV ,          V,          r2W#W8H  3x € K,  	  K?  	  R # 5ir.   )Úrange)r¥   r¤   r¦   r§   r&   Úns       €€r   r¨   r©   
  sH   øé € Ü˜qž�AÜ" 1 až[˜Ø#$ Q¥4¨¥7¨A¨a­D°­G˜SØ"¨©Ð0Ô0ó )ó "ùs   ƒAAFÚignore)ÚoverN)Úshaper   ÚSYMMETRY_GENERALÚdtypeÚcharr   ÚtocooÚnonzeroÚsumÚtodokÚnpÚerrstater   rH   rI   rJ   )r&   ÚmÚissymmÚisskewÚishermÚrowÚcolr¨   r¦   r§   Úis_diagonalr¬   s   f          @r   Ú_get_symmetryÚMMFile._get_symmetryê  s[  ù€ à�w‰w‰ˆˆ1Ø�Œ6Ü×*Ñ*Ð*ØˆØˆØ—‘—‘ Ñ%ˆô �A�;Š;ð —‘“	ˆAØŸ™›‰JˆSØ‘	�‰Ó  S¡Y§O¡OÓ$5Ô5Ü×.Ñ.Ð.ð —‘“	ˆAö/ö1ñ (5¦Ñ#ˆS�{ßŸ+¨#°¬(Ø‘ç˜cœjØ"�FÜ—[’[ h×/Ö/ç #¨¤+Ø!&˜÷ 0÷ ˜c¤T¨#£YÔ.Ø"�Fß‘FŸf™f¯©Ùñ (7÷  Ü×,Ñ,Ð,ßÜ×1Ñ1Ð1ßÜ×,Ñ,Ð,Ü×&Ñ&Ð&÷! 0×/ús   Ä$GÇG"c           
     óÄ   € \         P                  R V,          \         P                  R\         P                  R\         P                  RW3,          /P                  V R4      # )z%%.%ie
z%i
z%u
z%%.%ie %%.%ie
N)r   Ú
FIELD_REALÚFIELD_INTEGERÚFIELD_UNSIGNEDÚFIELD_COMPLEXÚget)r(   r)   s   &&r   Ú_field_templateÚMMFile._field_template+  sW   € ä×!Ñ! :°	Õ#9Ü×$Ñ$ fÜ×%Ñ% vÜ×$Ñ$Ð&7ØÐ*õ'+ð÷
 ‘#�e˜TÓ"ð	#r   c                ó*   € V P                   ! R/ VB  R # )Nrj   )Ú_init_attrs)r1   Úkwargss   &,r   Ú__init__ÚMMFile.__init__5  s   € Ø×ÒÑ"˜6Ô"r   r   c               ó¸  € V P                  V4      w  r4 V P                  V4       V P                  V4      pV'       d   VP                  4        T\        J d;   Rp\
        P                  P                  \        4      3p\        T\        TR7       RpT'       d"   \        T\        4      '       d   \        T4      pT#   T'       d   TP                  4        i i ; i)aT  
Reads the contents of a Matrix Market file-like 'source' into a matrix.

Parameters
----------
source : str or file-like
    Matrix Market filename (extensions .mtx, .mtz.gz)
    or open file object.
spmatrix : bool, optional (default: True)
    If ``True``, return sparse matrix. Otherwise return sparse array.

    .. deprecated:: 1.18.0
        The default value for `spmatrix` is changing to False in v1.20.
        That means the default return value will be a sparse array.
        Unless you use * instead of @, ** for matrix power, or you depend
        on 2D shapes from e.g. ``A.sum(axis=0)`` it may not matter to you.
        See :ref:`Migration from spmatrix to sparray <migration_to_sparray>`.

Returns
-------
a : ndarray or coo_array or coo_matrix
    Dense or sparse array depending on the matrix format in the
    Matrix Market file.
aÓ  The default value for `spmatrix` is changing to `False` in v1.20.
             That means the default return type will be a sparse array.
             Unless you use * instead of @, ** for matrix power, or you depend
             on 2D shapes from e.g. `A.sum(axis=0)` it may not matter to you.
             See the spmatrix to sparray migration guide for details.
             https://docs.scipy.org/doc/scipy/reference/sparse.migration_to_sparray.html
             )Úskip_file_prefixesT)r}   Ú_parse_headerÚ_parse_bodyrˆ   r   r“   r–   ÚdirnameÚ__file__r   ÚDeprecationWarningr   r   r   )r1   r   r   r‰   rŠ   ÚdatarS   Úprefixess   &&$     r   r!   ÚMMFile.read9  s±   € ð2  Ÿ:™: fÓ-Ñˆð	Ø×Ñ˜vÔ&Ø×#Ñ# FÓ+ˆD÷ Ø—‘”à”xÓðˆCô Ÿ™Ÿ™¬Ó1Ð3ˆHÜ�Ô(¸XÕFØˆHçœ
 4¬×3Ò3Ü˜dÓ#ˆDØˆø÷# Ø—‘•ð ús   •"B> Â>CNc                ó  € V P                  VR4      w  rx V P                  WrW4WV4       V'       d   VP                  4        R# VP                  4        R#   T'       d   TP                  4        i TP                  4        i ; i)a§  
Writes sparse or dense array `a` to Matrix Market file-like `target`.

Parameters
----------
target : str or file-like
    Matrix Market filename (extension .mtx) or open file-like object.
a : array like
    Sparse or dense 2-D array.
comment : str, optional
    Comments to be prepended to the Matrix Market file.
field : None or str, optional
    Either 'real', 'complex', 'pattern', or 'integer'.
precision : None or int, optional
    Number of digits to display for real or complex values.
symmetry : None or str, optional
    Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
    If symmetry is None the symmetry type of 'a' is determined by its
    values.
ÚwbN)r}   Ú_writerˆ   Úflush)	r1   r%   r&   r'   r(   r)   r*   r‰   rŠ   s	   &&&&&&&  r   r$   ÚMMFile.writen  s\   € ð.  Ÿ:™: f¨dÓ3Ñˆð	Ø�K‰K˜ 7°9ÔG÷ Ø—‘–à—‘–ø÷ Ø—‘•à—‘•ús   –A °A Á+B c           	     óX  € V P                   P                  pV Uu. uF  q3R,          NK  	  pp\        VP                  4       4      \        V4      ,
          pV'       d   \	        R\        V4       RV 24      hV F&  p\        WVP                  VR,          R4      4       K(  	  R# u upi )zZ
Initialize each attributes with the corresponding keyword arg value
or a default of None
:é   NNzfound z, invalid keyword arguments, please only use N)Ú	__class__Ú	__slots__ÚsetÚkeysrR   ÚtupleÚsetattrrÇ   )r1   rÌ   ÚattrsÚattrÚpublic_attrsÚinvalid_keyss   &,    r   rË   ÚMMFile._init_attrs‘  s�   € ð —‘×(Ñ(ˆÙ-2Ó3©U T˜RŸ˜©UˆÐ3Ü˜6Ÿ;™;›=Ó)¬C°Ó,=Õ=ˆçÜ˜v¤e¨LÓ&9Ð%:ð ;;Ø;G¸.ðJó Kð Kó ˆDÜ�D §
¡
¨4°­8°TÓ :Ö;ó ùò 4s   ›B'c           	     ól   € V P                   P                  V4      w  r#rErgV P                  W#WEWgR 7       R# ))r2   r7   r;   r?   r(   r*   N)rà   r   rË   )r1   r‰   r2   r7   r;   r?   r(   r*   s   &&      r   rÑ   ÚMMFile._parse_header£  s9   € à�N‰N×Ñ Ó'ñ 	5ˆ�G Uà×Ñ˜d°wØ$ð 	ö 	9r   c                ó:
  € V P                   V P                  V P                  V P                  V P                  V P
                  3w  r#rErgV P                  P                  VR 4      pV P                  p	W`P                  8H  p
W`P                  8H  pW`P                  8H  pWpP                  8H  pWpP                  8H  pW`P                  8H  pWPP                  8X  EdÖ   \!        W#3VR7      p^p^ ^ ppV'       d   ^ VVV3&   VV^,
          8  d
   V^,          pV'       EdH   VP#                  4       pV'       d%   V^ ,          R9   g   VP%                  4       '       g   KG  V
'       d   \'        V4      pMMV'       d   \'        V4      pM9V'       d'   \)        \+        \,        VP/                  4       4      !  pM\-        V4      pVVVV3&   V	'       d9   VV8w  d2   V'       d
   V) VVV3&   M V'       d   \1        V4      VVV3&   MVVVV3&   VV^,
          8  d   V^,           pEK	  V^,           pV	'       g   ^ pEK  TpV'       g   EK,  ^ VVV3&   VV^,
          8  g   EKD  V^,          pEKP  V'       d&   V^ V39   d   VV^,
          8X  g   \3        R4      h V# V^ V39   d   VV8X  g   \3        R4      h V# WPP4                  8X  EdW   V^ 8X  d   \7        W#3VR7      # \!        VRR7      p\!        VRR7      pV'       d   \9        VRR7      pMOV
'       d   \!        VRR7      pM9V'       d   \!        VRR7      pM#V'       d   \!        VRR7      pM\!        VRR7      p^ pV EF  pV'       d%   V^ ,          R9   g   VP%                  4       '       g   K2  V^,           V8”  d   \3        R	4      hVP/                  4       p\+        \&        VR
,          4      w  VV&   VV&   V'       g|   V
'       d   \'        V^,          4      VV&   M]V'       d   \'        V^,          4      VV&   M?V'       d#   \)        \+        \,        VR,          4      !  VV&   M\-        V^,          4      VV&   V^,          pEK
  	  VV8  d   \3        R4      hV^,          pV^,          pV	'       dr   VV8g  pVV,          pVV,          pVV,          p\;        VV34      p\;        VV34      pV'       d   VR,          pMV'       d   VP=                  4       p\;        VV34      p\7        VVV33W#3VR7      pV# \?        V4      h)N)r±   z$Parse error, did not read all lines.ÚintcÚint8re   rf   rX   Úfloatz5'entries' in header is smaller than number of entries:Né   N:rñ   NNz4'entries' in header is larger than number of entries)r¯   r±   rz   éÿÿÿÿ) r2   r7   r;   r?   r(   r*   ÚDTYPES_BY_FIELDrÇ   rK   rÄ   rÅ   rÆ   rI   rJ   ÚFIELD_PATTERNr‚   r   r~   rs   r‡   rX   r†   rð   r   r   rR   rƒ   r   r
   r	   Ú	conjugateÚNotImplementedError)r1   r‰   r2   r7   r;   r?   r(   Úsymmr±   rK   Ú
is_integerÚis_unsigned_integerÚ
is_complexÚis_skewÚis_hermÚ
is_patternr&   r‹   r¤   r¥   r¦   ÚIÚJÚVÚentry_numberÚlÚmaskÚod_IÚod_JÚod_Vs   &&                            r   rÒ   ÚMMFile._parse_bodyª  s|  € Ø48·I±I¸t¿y¹yØ48·L±LÀ$Ç+Á+Ø48·J±JÀÇÁð4OÑ0ˆ�G Uð ×$Ñ$×(Ñ(¨°Ó5ˆà×(Ñ(ˆØ×0Ñ0Ñ0ˆ
Ø#×':Ñ':Ñ:ÐØ×0Ñ0Ñ0ˆ
Ø×6Ñ6Ñ6ˆØ×1Ñ1Ñ1ˆØ×0Ñ0Ñ0ˆ
à×&Ñ&Õ&Ü�t�l¨%Ô0ˆAØˆDØ�aˆqˆAßØ��!�Q�$‘Ø�t˜a•x”<Ø˜•F�Aß�$Ø—‘Ó(�ç˜t A�w¨)Ô3¸4¿:¹:¿<º<ÙßÜ˜d›)‘Cß(Ü˜d›)‘CßÜ!¤3¤u¨d¯j©j«lÓ#;Ñ<‘Cä ›+�CØ��!�Q�$‘ß A¨¤FßØ#& $˜˜!˜Q˜$šß Ü"& s£)˜˜!˜Q˜$šà"%˜˜!˜Q˜$™Ø�t˜A•v”:Ø˜A�“Aà˜A��Aß'Ø›à˜ß"š7Ø&'˜A˜a ˜d™GØ  4¨¥6ŸzØ ! Q¥£çØ˜a ˜Vœ¨¨T°A­X¬Ü$Ð%KÓLÐLð )6ðV ˆðQ ˜a ˜Vœ¨¨T¬	Ü$Ð%KÓLÐLð )2ðP ˆðK ×-Ñ-Õ-ð ˜!Œ|ä  $ °UÔ;Ð;ä�g VÔ,ˆAÜ�g VÔ,ˆAßÜ˜¨Ô/‘ßÜ˜'¨Ô0‘ß$Ü˜'¨Ô2‘ßÜ˜'¨Ô3‘ä˜'¨Ô1�àˆLÜ�ç˜t A�w¨)Ô3¸4¿:¹:¿<º<Ùà •> GÔ+Ü$ð &9ó :ð :à—J‘J“L�Ü36´s¸A¸b½E³?Ñ0��,‘  <¡ç!ß!Ü*-¨a°­d«)˜˜,šß,Ü*-¨a°­d«)˜˜,šß#Ü*1´3´u¸aÀ½eÓ3DÑ*E˜˜,šä*/°°!µ«+˜˜,™Ø Õ!“ñ) ð* ˜gÔ%Ü ð "5ó 6ð 6ð ��FˆAØ��FˆAçØ˜Q™�Ø˜•w�Ø˜•w�Ø˜•w�ä  D 	Ó*�Ü  D 	Ó*�çØ˜B•J‘DßØŸ>™>Ó+�Dä  D 	Ó*�ä˜1˜q !˜f˜+¨d¨\ÀÔGˆAð ˆô & fÓ-Ð-r   c                óð  € \        V\        4      '       g@   \        V\        4      '       g*   \        V\        4      '       g   \	        VR 4      '       Ed   V P
                  p\        V4      p\        VP                  4      ^8w  d   \        R4      hVP                  w  r‰VeÃ   W@P                  8X  d:   \        VP                  R4      '       g   \        R4      hVP                  R4      pM²W@P                  8X  d.   VP                  P                   R9  d   VP                  R4      pMuW@P"                  8X  d-   VP                  P                   R9  d   VP                  R4      pM8\%        V4      '       g   \        R	\'        V4       24      hR
pVP                  w  r‰VP                  P                   p
Vf   V
R9   d   ^pM^pVfx   VP                  P(                  pVR8X  d+   \        VP                  R4      '       g   \        R4      hRpM0VR8X  d   RpM&VR8X  d   RpMVR8X  d   RpM\+        RV,           4      hVf   V P-                  V4      pV P.                  P1                  V4       V P.                  P3                  V4       V P.                  P5                  V4       RV RV RV R2pVP7                  VP9                  R4      4       VP;                  R4       F)  pRV R2pVP7                  VP9                  R4      4       K+  	  V P=                  WE4      pWpP
                  8X  Ed¥   RW‰3,          pVP7                  VP9                  R4      4       W@P                  V P                  V P>                  39   Ed.   W`P@                  8X  dX   \C        V	4       FF  p\C        V4       F4  pWâVV3,          ,          pVP7                  VP9                  R4      4       K6  	  KH  	  R# W`PD                  8X  d`   \C        V	4       FN  p\C        V^,           V4       F4  pWâVV3,          ,          pVP7                  VP9                  R4      4       K6  	  KP  	  R# \C        V	4       FF  p\C        Wø4       F4  pWâVV3,          ,          pVP7                  VP9                  R4      4       K6  	  KH  	  R# W@P"                  8X  dí   W`P@                  8X  do   \C        V	4       F]  p\C        V4       FK  pVVV3,          pV\G        V4      \I        V4      3,          pVP7                  VP9                  R4      4       KM  	  K_  	  R# \C        V	4       F]  p\C        Wø4       FK  pVVV3,          pV\G        V4      \I        V4      3,          pVP7                  VP9                  R4      4       KM  	  K_  	  R# W@PJ                  8X  d   \        R4      h\+        RV 24      hVPM                  4       pW`P@                  8w  dh   VPN                  VPP                  8¬  p\S        VPT                  V,          VPN                  V,          VPP                  V,          33VP                  R7      pRW‰VPV                  3,          pVP7                  VP9                  R4      4       V P=                  WE^,
          4      pW@PJ                  8X  df   \Y        VPN                  ^,           VPP                  ^,           4       F1  w  ppRVV3,          pVP7                  VP9                  R4      4       K3  	  R# W@P                  V P                  V P>                  39   d€   \Y        VPN                  ^,           VPP                  ^,           VPT                  4       F@  w  pppRVV3,          VV,          ,           pVP7                  VP9                  R4      4       KB  	  R# W@P"                  8X  d–   \Y        VPN                  ^,           VPP                  ^,           VPT                  4       FV  w  pppRVV3,          VVPF                  VPH                  3,          ,           pVP7                  VP9                  R4      4       KX  	  R# \+        RV 24      h) Ú	__array__zExpected 2 dimensional arrayNre   zBmmwrite does not support integer dtypes larger than native 'intp'.Úfdrg   r¡   rh   zunknown matrix type: rM   ÚfFr¤   rV   Úfr   ÚcrX   ÚurW   zunexpected dtype kind z%%MatrixMarket matrix Ú Ú
r   r{   z%i %i
z*pattern type inconsisted with dense formatzUnknown field type )r¯   z	%i %i %i
z%i %i )-r   Úlistr   rä   Úhasattrr‚   r   r…   r¯   rR   rÄ   r   r±   ÚOverflowErrorÚastyperÃ   r²   rÆ   r   ÚtypeÚkindr•   rÀ   rà   rT   r\   rc   r$   Úencoder   rÈ   rÅ   r°   r«   rI   r   r   rô   r³   r½   r¾   r   rÖ   ÚnnzÚzip)r1   r‰   r&   r'   r(   r)   r*   Úrepr2   r7   Útypecoder  rÖ   r‹   Útemplater¥   r¤   r¦   ÚcooÚlower_triangle_maskr�   r  rg   s   &&&&&&&                r   rÛ   ÚMMFile._write2  sÖ  € ä�aœ×Ò¤*¨Q´×"8Ò"8Ü�aœ×Ò¤7¨1¨k×#:Ó#:Ø×#Ñ#ˆCÜ˜“
ˆAÜ�1—7‘7‹|˜qÔ Ü Ð!?Ó@Ð@ØŸ™‰JˆDàÒ à×.Ñ.Ô.Ü# A§G¡G¨V×4Ò4Ü+ð -Pó Qð QàŸ™ Ó(‘AØŸo™oÔ-Ø—w‘w—|‘|¨4Ô/ØŸH™H S›M˜øØ×0Ñ0Ô0Ø—w‘w—|‘|¨4Ô/ØŸH™H S›M˜øô ˜A—;’;Ü Ð#8¼¸a»¸	Ð!BÓCÐCàˆCØŸ™‰JˆDà—7‘7—<‘<ˆàÒØ˜4ÔØ‘	à�	ØŠ=Ø—7‘7—<‘<ˆDØ�sŒ{Ü §¡¨×0Ò0Ü'ð )Ló Mð Mà!‘Ø˜”Ø‘Ø˜”Ø!‘Ø˜”Ø*‘äÐ 8¸4Õ ?Ó@Ð@àÒØ×)Ñ)¨!Ó,ˆHð 	�‰×'Ñ'¨Ô,Ø�‰×&Ñ& uÔ-Ø�‰×)Ñ)¨(Ô3ð (¨ u¨A¨e¨W°A°h°Z¸rÐBˆØ�‰�T—[‘[ Ó*Ô+ð —M‘M $Ö'ˆDØ�t�f˜B�<ˆDØ�L‰L˜Ÿ™ XÓ.Ö/ñ (ð ×'Ñ'¨Ó9ˆà×#Ñ#Õ#à ˜|Õ+ˆDØ�L‰L˜Ÿ™ XÓ.Ô/à×+Ñ+¨T¯_©_Ø×,Ñ,ð.õ .à×4Ñ4Ô4Ü" 4ž[˜Ü!& t¦˜AØ#+°°1°­gÕ#5˜DØ"ŸL™L¨¯©°XÓ)>Ö?ó "-ó )ð
 ×!=Ñ!=Ô=Ü" 4ž[˜Ü!& q¨1¥u¨dÖ!3˜AØ#+°°1°­gÕ#5˜DØ"ŸL™L¨¯©°XÓ)>Ö?ó "4ó )ô # 4ž[˜Ü!& q¦˜AØ#+°°1°­gÕ#5˜DØ"ŸL™L¨¯©°XÓ)>Ö?ó "0ó )ð
 ×,Ñ,Ô,à×4Ñ4Ô4Ü" 4ž[˜Ü!& t¦˜AØ"# A q D¥'˜CØ#+¬t°C«y¼$¸s»)Ð.DÕ#D˜DØ"ŸL™L¨¯©°XÓ)>Ö?ó "-ó )ô # 4ž[˜Ü!& q¦˜AØ"# A q D¥'˜CØ#+¬t°C«y¼$¸s»)Ð.DÕ#D˜DØ"ŸL™L¨¯©°XÓ)>Ö?ó "0ó )ð ×,Ñ,Ô,Ü Ð!MÓNÐNô  Ð"5°e°WÐ =Ó>Ð>ð —'‘'“)ˆCð ×0Ñ0Ô0Ø&)§g¡g°·±Ñ&8Ð#Ü §¡Ð*=Õ!>Ø!$§¡Ð)<Õ!=Ø!$§¡Ð)<Õ!=ð!?ð!@ð '*§i¡iô1�ð   4¨s¯w©wÐ"7Õ7ˆDØ�L‰L˜Ÿ™ XÓ.Ô/à×+Ñ+¨E¸Qµ;Ó?ˆHà×*Ñ*Ô*Ü §¡¨¥	¨3¯7©7°1­9Ö5‘D�A�qØ$¨¨1 vÕ-�DØ—L‘L §¡¨XÓ!6Ö7ó 6ð ×-Ñ-¨t¯©Ø×.Ñ.ð0ô 0ä" 3§7¡7¨1¥9¨c¯g©g°a­i¸¿¹ÖB‘G�A�q˜!Ø$¨¨1 vÕ-°(¸Qµ,Õ?�DØ—L‘L §¡¨XÓ!6Ö7ó  Cð ×,Ñ,Ô,Ü" 3§7¡7¨1¥9¨c¯g©g°a­i¸¿¹ÖB‘G�A�q˜!Ø$¨¨1 vÕ-°(¸a¿f¹fÀaÇfÁfÐ=MÕ2MÕN�DØ—L‘L §¡¨XÓ!6Ö7ó  Cô  Ð"5°e°WÐ =Ó>Ð>r   rj   )r/   r6   r:   r>   rB   rE   )r‘   ©Ú NNN)1Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rá   Úpropertyr2   r7   r;   r?   r(   r*   rK   rƒ   r‚   rQ   ÚclassmethodrT   rÄ   rÅ   rÃ   rÆ   rô   r[   r\   r°   rH   rI   rJ   rb   rc   ró   Ústaticmethodrk   ro   r   r}   rÀ   rÈ   rÍ   r   r!   r$   rË   rÑ   rÒ   rÛ   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r   ý   s  ø‡ € ð€Ið ñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñó ðð ñ;ó ð;ð %ÐØ€LØ&¨Ð5€Màñ"ó ð"ð €MØ'€NØ€JØ€MØ€MØ! >°:¸}Ø!ð#€Lð ñ"ó ð"ð !ÐØ$ÐØ.ÐØ$ÐØ'Ð);Ø.Ð0BðD€Oð ñGó ðGð
 % fØ% xØ! 3Ø$ cØ$ cð	+€Oð ñó ðð ñó ðð ñKó ðKð\ ó;ó ð;ð| ñ='ó ð='ð@ ñ#ó ð#ò#ð1 xô 1ôj òF<ò$9òE÷PW?ò W?r   c                ó   € . p ^ RI pVP                  VP                  4        ^ RIpVP                  VP
                  4       \        V4      p\        W4      '       * #   \         d     LHi ; i  \         d     L9i ; i)z‘
Check whether `stream` is compatible with numpy.fromfile.

Passing a gzipped file object to ``fromfile/fromstring`` doesn't work with
Python 3.
N)r™   ÚappendÚGzipFileÚImportErrorr›   rœ   rä   r   )r‰   Úbad_clsr™   r›   s   &   r   Ú_is_fromfile_compatibler1  Ì  sy   € ð €GðÛØ�‰�t—}‘}Ô%ðÛØ�‰�s—{‘{Ô#ô �G‹n€GÜ˜&Ó*Ô*Ð*øô ô Ùðûô
 ô Ùðús"   „A ¤A/ ÁA,Á+A,Á/A=Á<A=)r   r"   r+   r   r   )Ú__doc__r“   Úwarningsr   Únumpyr·   r   r   r   r   r   r   r	   r
   r   Úscipy.sparser   r   r   Úscipy._lib.deprecationr   Ú__all__r   r   r"   r+   r   r1  rj   r   r   Ú<module>r8     sf   ðñó 
Ý ã ÷#÷ #õ #÷ 9Ñ 8Ý +â
3€òò0ðj64˜xô 64ôvhC÷XL?ñ L?ô^+r   