/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/ma/__pycache__
NameSizeModeActions
core.cpython-311.pyc3186820644editdlrm
extras.cpython-311.pyc821000644editdlrm
mrecords.cpython-311.pyc379410644editdlrm
setup.cpython-311.pyc9530644editdlrm
testutils.cpython-311.pyc146640644editdlrm
timer_comparison.cpython-311.pyc280180644editdlrm
__init__.cpython-311.pyc17490644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/ma/__pycache__/extras.cpython-311.pyc (82100B)
§ ¤¶iN±H ¬ãó@—dZgd¢ZddlZddlZddlmZddlmZmZm Z m Z m Z m Z m Z mZmZmZmZmZmZmZmZmZmZmZmZmZmZddlZddlmZm Zddl m!Z!dd l"m#Z#dd l$m%Z%dd l&m'Z'd „Z(dOd „Z)e*fd„Z+d„Z,Gd„d¦«Z-Gd„de-¦«Z.Gd„de-¦«Z/Gd„de-¦«Z0Gd„de-¦«Z1e1d¦«Z2e1d¦«Z3e1d¦«Z4e/d¦«xZ5Z6e/d¦«Z7e/d¦«Z8e/d ¦«Z9e/d!¦«Z:e.d"¦«Z;e.d#¦«Zej>je>_d&„Z?e?j�Kej?jdej?j @d'¦«… A¦«d(ze?_dPejBd*œd+„ZCdQd,„ZDdPd-„ZEdOd.„ZFdOd/„ZGd0„ZHd1„ZIdOd2„ZJejBfd3„ZKejBfd4„ZLdRd5„ZMdSd6„ZNdTd7„ZOdTd8„ZPdSd9„ZQdSd:„ZRd;„ZSdTd<„ZTdUd>„ZUdVd?„ZVdd=ejBd=ejBfd@„ZWGdA„dBe'¦«ZXGdC„dDeX¦«ZYeY¦«ZZdWdE„Z[dF„Z\dOdG„Z]dH„Z^dOdI„Z_dJ„Z`dK„ZadL„ZbdOdM„Zcejdejcjecj¦«ec_dXdN„Zeejdejejeej¦«ee_dS)YzË Masked arrays add-ons. A collection of utilities for `numpy.ma`. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ ).Úapply_along_axisÚapply_over_axesÚ atleast_1dÚ atleast_2dÚ atleast_3dÚaverageÚ clump_maskedÚclump_unmaskedÚ column_stackÚ compress_colsÚ compress_ndÚcompress_rowcolsÚ compress_rowsÚ count_maskedÚcorrcoefÚcovÚdiagflatÚdotÚdstackÚediff1dÚflatnotmasked_contiguousÚflatnotmasked_edgesÚhsplitÚhstackÚisinÚin1dÚ intersect1dÚ mask_colsÚ mask_rowcolsÚ mask_rowsÚ masked_allÚmasked_all_likeÚmedianÚmr_Ú ndenumerateÚnotmasked_contiguousÚnotmasked_edgesÚpolyfitÚ row_stackÚ setdiff1dÚsetxor1dÚstackÚuniqueÚunion1dÚvanderÚvstackéNé)Úcore)Ú MaskedArrayÚMAErrorÚaddÚarrayÚasarrayÚ concatenateÚfilledÚcountÚgetmaskÚ getmaskarrayÚmake_mask_descrÚmaskedÚ masked_arrayÚmask_orÚnomaskÚonesÚsortÚzerosÚgetdataÚget_masked_subclassr)Úndarrayr6)Únormalize_axis_index)Únormalize_axis_tuple)Ú_ureduce)ÚAxisConcatenatorcóF—t|tttf¦«S)z6 Is seq a sequence (ndarray, list or tuple)? )Ú isinstancerGÚtupleÚlist)Úseqs úc/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib64/python3.11/site-packages/numpy/ma/extras.pyÚ issequencerR)s€õ �c�G¥U­DÐ1Ñ 2Ô 2Ð2ócóJ—t|¦«}| |¦«S)a² Count the number of masked elements along the given axis. Parameters ---------- arr : array_like An array with (possibly) masked elements. axis : int, optional Axis along which to count. If None (default), a flattened version of the array is used. Returns ------- count : int, ndarray The total number of masked elements (axis=None) or the number of masked elements along each slice of the given axis. See Also -------- MaskedArray.count : Count non-masked elements. Examples -------- >>> import numpy.ma as ma >>> a = np.arange(9).reshape((3,3)) >>> a = ma.array(a) >>> a[1, 0] = ma.masked >>> a[1, 2] = ma.masked >>> a[2, 1] = ma.masked >>> a masked_array( data=[[0, 1, 2], [--, 4, --], [6, --, 8]], mask=[[False, False, False], [ True, False, True], [False, True, False]], fill_value=999999) >>> ma.count_masked(a) 3 When the `axis` keyword is used an array is returned. >>> ma.count_masked(a, axis=0) array([1, 1, 1]) >>> ma.count_masked(a, axis=1) array([0, 2, 1]) )r<Úsum)ÚarrÚaxisÚms rQrr1s"€õd �SÑÔ€AØ �5Š5�‰;Œ;ÐrSc óŽ—ttj||¦«tj|t |¦«¦«¬¦«}|S)aC Empty masked array with all elements masked. Return an empty masked array of the given shape and dtype, where all the data are masked. Parameters ---------- shape : int or tuple of ints Shape of the required MaskedArray, e.g., ``(2, 3)`` or ``2``. dtype : dtype, optional Data type of the output. Returns ------- a : MaskedArray A masked array with all data masked. See Also -------- masked_all_like : Empty masked array modelled on an existing array. Examples -------- >>> import numpy.ma as ma >>> ma.masked_all((3, 3)) masked_array( data=[[--, --, --], [--, --, --], [--, --, --]], mask=[[ True, True, True], [ True, True, True], [ True, True, True]], fill_value=1e+20, dtype=float64) The `dtype` parameter defines the underlying data type. >>> a = ma.masked_all((3, 3)) >>> a.dtype dtype('float64') >>> a = ma.masked_all((3, 3), dtype=np.int32) >>> a.dtype dtype('int32') ©Úmask)r?ÚnpÚemptyrBr=)ÚshapeÚdtypeÚas rQr r gsF€õ^ •R”X˜e UÑ+Ô+Ýœ' %­¸Ñ)?Ô)?Ñ@Ô@ð Bñ Bô B€Aà €HrScó—tj|¦« t¦«}tj|jt |j¦«¬¦«|_|S)a’ Empty masked array with the properties of an existing array. Return an empty masked array of the same shape and dtype as the array `arr`, where all the data are masked. Parameters ---------- arr : ndarray An array describing the shape and dtype of the required MaskedArray. Returns ------- a : MaskedArray A masked array with all data masked. Raises ------ AttributeError If `arr` doesn't have a shape attribute (i.e. not an ndarray) See Also -------- masked_all : Empty masked array with all elements masked. Examples -------- >>> import numpy.ma as ma >>> arr = np.zeros((2, 3), dtype=np.float32) >>> arr array([[0., 0., 0.], [0., 0., 0.]], dtype=float32) >>> ma.masked_all_like(arr) masked_array( data=[[--, --, --], [--, --, --]], mask=[[ True, True, True], [ True, True, True]], fill_value=1e+20, dtype=float32) The dtype of the masked array matches the dtype of `arr`. >>> arr.dtype dtype('float32') >>> ma.masked_all_like(arr).dtype dtype('float32') ©r_) r\Ú empty_likeÚviewr3rBr^r=r_Ú_mask)rVr`s rQr!r!›sI€õd Œ �cÑÔ×Ò¥ Ñ,Ô,€AÝŒg�a”g¥_°Q´WÑ%=Ô%=Ð>Ñ>Ô>€A„GØ €HrScó$—eZdZdZd„Zd„Zd„ZdS)Ú_fromnxfunctionaV Defines a wrapper to adapt NumPy functions to masked arrays. An instance of `_fromnxfunction` can be called with the same parameters as the wrapped NumPy function. The docstring of `newfunc` is adapted from the wrapped function as well, see `getdoc`. This class should not be used directly. Instead, one of its extensions that provides support for a specific type of input should be used. Parameters ---------- funcname : str The name of the function to be adapted. The function should be in the NumPy namespace (i.e. ``np.funcname``). cóF—||_| ¦«|_dS©N)Ú__name__ÚgetdocÚ__doc__)ÚselfÚfuncnames rQÚ__init__z_fromnxfunction.__init__és€Ø ˆŒ Ø—{’{‘}”}ˆŒ ˆ ˆ rScóò—tt|jd¦«}t|dd¦«}|rH|jtj|¦«z}tj|d¦«}d ||f¦«SdS)aK Retrieve the docstring and signature from the function. The ``__doc__`` attribute of the function is used as the docstring for the new masked array version of the function. A note on application of the function to the mask is appended. Parameters ---------- None Nrlz@The function is applied to both the _data and the _mask, if any.z )Úgetattrr\rjÚmaÚget_object_signatureÚdoc_noteÚjoin)rmÚnpfuncÚdocÚsigs rQrkz_fromnxfunction.getdocísz€õ�˜Tœ]¨DÑ1Ô1ˆÝ�f˜i¨Ñ.Ô.ˆØ ð +Ø”-¥"Ô"9¸&Ñ"AÔ"AÑAˆCÝ”+˜cð$<ñ=ô=ˆCà—;’;  S˜zÑ*Ô*Ð *؈rScó—dSri©)rmÚargsÚparamss rQÚ__call__z_fromnxfunction.__call__s€Ø ˆrSN)rjÚ __module__Ú __qualname__rlrorkr}rzrSrQrgrgÕsK€€€€€ððð&%ð%ð%ðððð, ð ð ð ð rSrgcó—eZdZdZd„ZdS)Ú_fromnxfunction_singlez² A version of `_fromnxfunction` that is called with a single array argument followed by auxiliary args that are passed verbatim for both the data and mask calls. có€—tt|j¦«}t|t¦«rH|| ¦«g|¢Ri|¤Ž}|t |¦«g|¢Ri|¤Ž}t||¬¦«S|tj|¦«g|¢Ri|¤Ž}|t |¦«g|¢Ri|¤Ž}t||¬¦«S)NrZ) rqr\rjrMrGÚ __array__r<r?r7©rmÚxr{r|ÚfuncÚ_dÚ_ms rQr}z_fromnxfunction_single.__call__ sã€Ý•r˜4œ=Ñ)Ô)ˆÝ �a�Ñ !Ô !ð -Ø��a—k’k‘m”mÐ5 dÐ5Ð5Ð5¨fÐ5Ð5ˆBØ�•l 1‘o”oÐ7¨Ð7Ð7Ð7°Ð7Ð7ˆBÝ ¨Ð,Ñ,Ô,Ð ,à�•b”j ‘m”mÐ5 dÐ5Ð5Ð5¨fÐ5Ð5ˆBØ�•l 1‘o”oÐ7¨Ð7Ð7Ð7°Ð7Ð7ˆBÝ ¨Ð,Ñ,Ô,Ð ,rSN©rjr~rrlr}rzrSrQr�r�s-€€€€€ððð -ð -ð -ð -ð -rSr�có—eZdZdZd„ZdS)Ú_fromnxfunction_seqz¶ A version of `_fromnxfunction` that is called with a single sequence of arrays followed by auxiliary args that are passed verbatim for both the data and mask calls. cóä—tt|j¦«}|td„|D¦«¦«g|¢Ri|¤Ž}|td„|D¦«¦«g|¢Ri|¤Ž}t ||¬¦«S)Ncó6—g|]}tj|¦«‘ŒSrz)r\r7©Ú.0r`s rQú z0_fromnxfunction_seq.__call__..!s €Ð2Ð2Ð2¨1�œ A™œÐ2Ð2Ð2rScó,—g|]}t|¦«‘ŒSrz)r<rŽs rQr�z0_fromnxfunction_seq.__call__.."s€Ð4Ð4Ð4¨Q� a™œÐ4Ð4Ð4rSrZ)rqr\rjrNr?r„s rQr}z_fromnxfunction_seq.__call__s’€Ý•r˜4œ=Ñ)Ô)ˆØ ˆT•%Ð2Ð2°Ð2Ñ2Ô2Ñ3Ô3Ð E°dÐ EÐ EÐ E¸fÐ EÐ EˆØ ˆT•%Ð4Ð4°!Ð4Ñ4Ô4Ñ5Ô5Ð G¸Ð GÐ GÐ GÀÐ GÐ GˆÝ˜B RÐ(Ñ(Ô(Ð(rSNr‰rzrSrQr‹r‹s-€€€€€ððð )ð)ð)ð)ð)rSr‹có—eZdZdZd„ZdS)Ú_fromnxfunction_argsa™ A version of `_fromnxfunction` that is called with multiple array arguments. The first non-array-like input marks the beginning of the arguments that are passed verbatim for both the data and mask calls. Array arguments are processed independently and the results are returned in a list. If only one array is found, the return value is just the processed array instead of a list. cóF—tt|j¦«}g}t|¦«}t |¦«dkret |d¦«rP| | d¦«¦«t |¦«dkrt |d¦«°Pg}|D]]}|tj|¦«g|¢Ri|¤Ž}|t|¦«g|¢Ri|¤Ž}| t||¬¦«¦«Œ^t |¦«dkr|dS|S)Nr0rZr1) rqr\rjrOÚlenrRÚappendÚpopr7r<r?) rmr{r|r†ÚarraysÚresr…r‡rˆs rQr}z_fromnxfunction_args.__call__/s €Ý•r˜4œ=Ñ)Ô)ˆØˆÝ�D‰zŒzˆÝ�$‰iŒi˜!Šmˆm¥ ¨4°¬7Ñ 3Ô 3ˆmØ �MŠM˜$Ÿ(š( 1™+œ+Ñ &Ô &Ð &õ�$‰iŒi˜!Šmˆm¥ ¨4°¬7Ñ 3Ô 3ˆmàˆØð 2ð 2ˆAØ�•b”j ‘m”mÐ5 dÐ5Ð5Ð5¨fÐ5Ð5ˆBØ�•l 1‘o”oÐ7¨Ð7Ð7Ð7°Ð7Ð7ˆBØ �JŠJ•| B¨RÐ0Ñ0Ô0Ñ 1Ô 1Ð 1Ð 1Ý ˆv‰;Œ;˜!Ò Ð Ø�q”6ˆM؈ rSNr‰rzrSrQr“r“&s-€€€€€ððð ð ð ð ð rSr“có—eZdZdZd„ZdS)Ú_fromnxfunction_allargsa A version of `_fromnxfunction` that is called with multiple array arguments. Similar to `_fromnxfunction_args` except that all args are converted to arrays even if they are not so already. This makes it possible to process scalars as 1-D arrays. Only keyword arguments are passed through verbatim for the data and mask calls. Arrays arguments are processed independently and the results are returned in a list. If only one arg is present, the return value is just the processed array instead of a list. có(—tt|j¦«}g}|D]W}|tj|¦«fi|¤Ž}|t |¦«fi|¤Ž}| t ||¬¦«¦«ŒXt|¦«dkr|dS|S)NrZr1r0)rqr\rjr7r<r–r?r•)rmr{r|r†r™r…r‡rˆs rQr}z _fromnxfunction_allargs.__call__Js¢€Ý•r˜4œ=Ñ)Ô)ˆØˆØð 2ð 2ˆAØ�•b”j ‘m”mÐ.Ð. vÐ.Ð.ˆBØ�•l 1‘o”oÐ0Ð0¨Ð0Ð0ˆBØ �JŠJ•| B¨RÐ0Ñ0Ô0Ñ 1Ô 1Ð 1Ð 1Ý ˆt‰9Œ9˜Š>ˆ>Ø�q”6ˆM؈ rSNr‰rzrSrQr›r›?s-€€€€€ð ð ð ð ð ð ð rSr›rrrr/rr rr+rrcóØ—d}|t|¦«krTt||d¦«r&|||||dz…<t||d¦«°&|dz }|t|¦«k°T|S)zFlatten a sequence in place.r0Ú__iter__r1)r•Úhasattr)rPÚks rQÚflatten_inplacer¡hsz€à €AØ •�C‘”Š=ˆ=Ý�c˜!”f˜jÑ)Ô)ð $Ø  œVˆC��1�q‘5� ‰Nõ�c˜!”f˜jÑ)Ô)ð $à ˆQ‰ˆð •�C‘”Š=ˆ=ð €JrScóÀ —t|dd¬¦«}|j}t||¦«}dg|dz z}tj|d¦«}t t |¦«¦«}| |¦«tdd¦«||<tj |j ¦«  |¦«} |  ||¦«||t| ¦«¦«g|¢Ri|¤Ž} tj| ¦«} | s# t!| ¦«n#t"$rd} YnwxYwg} | �ra|  tj | ¦«j¦«t | t(¦«} | | t|¦«<tj| ¦«}d}||krð|dxxdz cc<d}||| |krA|d|z kr8||dz xxdz cc<d||<|dz}||| |kr |d|z k°8|  ||¦«||t| ¦«¦«g|¢Ri|¤Ž} | | t|¦«<|  t| ¦«j¦«|dz }||k°ð�n7t| dd¬¦«} | ¦«}tdd¦«g| jz||<|  ||¦«tj| ¦«}| }t |j ¦«} | j | |<|  t| ¦«j¦«t/| ¦«} t | t(¦«} | | tt/| ¦«¦«¦«<d}||k�r&|dxxdz cc<d}||||krA|d|z kr8||dz xxdz cc<d||<|dz}||||kr |d|z k°8|  ||¦«|  ||¦«||t| ¦«¦«g|¢Ri|¤Ž} | | tt/| ¦«¦«¦«<|  t| ¦«j¦«|dz }||k�°&tjtj | ¦« ¦«¦«}t3|d ¦«stj | |¬ ¦«}n*t| |¬ ¦«}t5j|¦«|_|S) z0 (This docstring should be overwritten) FT)ÚcopyÚsubokr0r1ÚONéÿÿÿÿrerb)r6ÚndimrHr\rDrOÚrangeÚremoveÚslicer7r^ÚtakeÚputrNÚtolistÚisscalarr•Ú TypeErrorr–r_ÚobjectÚprodr£r¡ÚmaxrŸrrÚdefault_fill_valueÚ fill_value)Úfunc1drWrVr{ÚkwargsÚndÚindÚiÚindlistÚoutshaper™ÚasscalarÚdtypesÚoutarrÚNtotr ÚnÚjÚ holdshapeÚ max_dtypesÚresults rQrrrsC€õ �˜% tÐ ,Ñ ,Ô ,€CØ Œ€BÝ   bÑ )Ô )€DØ ˆ#��a‘‰.€CÝ Œ��SÑÔ€AÝ•5˜‘9”9‰oŒo€GØ ‡N‚N�4ÑÔÐÝ�D˜$ÑÔ€A€d�GÝŒz˜#œ)Ñ$Ô$×)Ò)¨'Ñ2Ô2€H؇E‚Eˆ'�3ÑÔÐØ ˆ&�•U˜1Ÿ8š8™:œ:Ñ&Ô&Ô'Ð 9¨$Ð 9Ð 9Ð 9°&Ð 9Ð 9€CåŒ{˜3ÑÔ€HØ ðð Ý �‰HŒHˆHˆHøÝð ð ð ØˆHˆHˆHð øøøð €FØñ.Ø� Š •b”j ‘o”oÔ+Ñ,Ô,Ð,Ý�x¥Ñ(Ô(ˆØ ˆ�u�S‰zŒzÑÝŒw�xÑ Ô ˆØ ˆØ�$Šhˆhà �ˆGˆGŒG�q‰LˆGˆG‰G؈AØ�q”6˜X aœ[Ò(Ð(¨q°A¸±Fª|¨|Ø�A˜‘E� � ” ˜a‘� � ‘ Ø��A‘Ø�Q‘�ð�q”6˜X aœ[Ò(Ð(¨q°A¸±Fª|¨|ð �EŠE�'˜3Ñ Ô Ð Ø�&˜�U 1§8¢8¡:¤:Ñ.Ô.Ô/ÐA°$ÐAÐAÐA¸&ÐAÐAˆCØ!$ˆF•5˜‘:”:Ñ Ø �MŠM�' #™,œ,Ô,Ñ -Ô -Ð -Ø �‰FˆAð�$Šhˆhùõ�C˜e¨4Ð0Ñ0Ô0ˆØ �FŠF‰HŒHˆÝ˜$ Ñ%Ô%Ð&¨¬Ñ1ˆˆ$‰Ø �Šˆg�sÑÔÐÝŒw�xÑ Ô ˆØˆ ݘœ ‘?”?ˆØœˆ�‰Ø� Š •g˜c‘l”lÔ(Ñ)Ô)Ð)Ý" 8Ñ,Ô,ˆÝ�x¥Ñ(Ô(ˆØ58ˆ�u•_ Q§X¢X¡Z¤ZÑ0Ô0Ñ1Ô1Ñ2Ø ˆØ�$Šh‰hà �ˆGˆGŒG�q‰LˆGˆG‰G؈AØ�q”6˜Y qœ\Ò)Ð)°°Q¸±V² ° Ø�A˜‘E� � ” ˜a‘� � ‘ Ø��A‘Ø�Q‘�ð�q”6˜Y qœ\Ò)Ð)°°Q¸±V² ° ð �EŠE�'˜3Ñ Ô Ð Ø �EŠE�'˜3Ñ Ô Ð Ø�&˜�U 1§8¢8¡:¤:Ñ.Ô.Ô/ÐA°$ÐAÐAÐA¸&ÐAÐAˆCØ9<ˆF•5�¨¯ª©¬Ñ4Ô4Ñ5Ô5Ñ 6Ø �MŠM�' #™,œ,Ô,Ñ -Ô -Ð -Ø �‰FˆAð�$Šh‰hõ”�"œ* VÑ,Ô,×0Ò0Ñ2Ô2Ñ3Ô3€JÝ �3˜Ñ Ô ð:Ý”˜F¨*Ð5Ñ5Ô5ˆˆå˜ zÐ2Ñ2Ô2ˆÝÔ1°&Ñ9Ô9ˆÔØ €MsÄD&Ä& D5Ä4D5có,—t|¦«}|j}t|¦«jdkr|f}|D]_}|dkr||z}||f}||Ž}|j|jkr|}Œ)tj||¦«}|j|jkr|}ŒQt d¦«‚|S)z. (This docstring will be overwritten) r0z7function is not returning an array of the correct shape)r7r§r6rrÚ expand_dimsÚ ValueError)r†r`ÚaxesÚvalÚNrWr{r™s rQrrÅs¿€õ �!‰*Œ*€CØ Œ€AÝ ˆT�{„{Ô˜1ÒÐØˆwˆØð 9ð 9ˆØ �!Š8ˆ8Ø�t‘8ˆDØ�Tˆ{ˆØˆd�DˆkˆØ Œ8�s”xÒ Ð ØˆCˆCå”.  dÑ+Ô+ˆCØŒx˜3œ8Ò#Ð#Ø��å ð"8ñ9ô9ð9à €JrSÚNotesao Examples -------- >>> a = np.ma.arange(24).reshape(2,3,4) >>> a[:,0,1] = np.ma.masked >>> a[:,1,:] = np.ma.masked >>> a masked_array( data=[[[0, --, 2, 3], [--, --, --, --], [8, 9, 10, 11]], [[12, --, 14, 15], [--, --, --, --], [20, 21, 22, 23]]], mask=[[[False, True, False, False], [ True, True, True, True], [False, False, False, False]], [[False, True, False, False], [ True, True, True, True], [False, False, False, False]]], fill_value=999999) >>> np.ma.apply_over_axes(np.ma.sum, a, [0,2]) masked_array( data=[[[46], [--], [124]]], mask=[[[False], [ True], [False]]], fill_value=999999) Tuple axis arguments to ufuncs are equivalent: >>> np.ma.sum(a, axis=(0,2)).reshape((1,-1,1)) masked_array( data=[[[46], [--], [124]]], mask=[[[False], [ True], [False]]], fill_value=999999) F)Úkeepdimscóv—t|¦«}t|¦«}|tjuri}nd|i}|€=|j|fi|¤Ž}|j | |¦«¦«}�n„t|¦«} t|jjtj tj f¦«r!tj |j| jd¦«} ntj |j| j¦«} |j | j kr–|€td¦«‚| jdkrtd¦«‚| j d|j |krtd¦«‚tj| |jdz d z| j zd ¬ ¦«} |  d |¦«} |t$ur | |jz} | xj|jzc_| jd|| d œ|¤Ž}tj|| | ¬¦«j|fi|¤Ž|z }|r@|j |j kr,tj||j ¦« ¦«}||fS|S)aó Return the weighted average of array over the given axis. Parameters ---------- a : array_like Data to be averaged. Masked entries are not taken into account in the computation. axis : int, optional Axis along which to average `a`. If None, averaging is done over the flattened array. weights : array_like, optional The importance that each element has in the computation of the average. The weights array can either be 1-D (in which case its length must be the size of `a` along the given axis) or of the same shape as `a`. If ``weights=None``, then all data in `a` are assumed to have a weight equal to one. The 1-D calculation is:: avg = sum(a * weights) / sum(weights) The only constraint on `weights` is that `sum(weights)` must not be 0. returned : bool, optional Flag indicating whether a tuple ``(result, sum of weights)`` should be returned as output (True), or just the result (False). Default is False. keepdims : bool, optional If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the original `a`. *Note:* `keepdims` will not work with instances of `numpy.matrix` or other classes whose methods do not support `keepdims`. .. versionadded:: 1.23.0 Returns ------- average, [sum_of_weights] : (tuple of) scalar or MaskedArray The average along the specified axis. When returned is `True`, return a tuple with the average as the first element and the sum of the weights as the second element. The return type is `np.float64` if `a` is of integer type and floats smaller than `float64`, or the input data-type, otherwise. If returned, `sum_of_weights` is always `float64`. Examples -------- >>> a = np.ma.array([1., 2., 3., 4.], mask=[False, False, True, True]) >>> np.ma.average(a, weights=[3, 1, 0, 0]) 1.25 >>> x = np.ma.arange(6.).reshape(3, 2) >>> x masked_array( data=[[0., 1.], [2., 3.], [4., 5.]], mask=False, fill_value=1e+20) >>> avg, sumweights = np.ma.average(x, axis=0, weights=[1, 2, 3], ... returned=True) >>> avg masked_array(data=[2.6666666666666665, 3.6666666666666665], mask=[False, False], fill_value=1e+20) With ``keepdims=True``, the following result has shape (3, 1). >>> np.ma.average(x, axis=1, keepdims=True) masked_array( data=[[0.5], [2.5], [4.5]], mask=False, fill_value=1e+20) rÌNÚf8z;Axis must be specified when shapes of a and weights differ.r1z81D weights expected when shapes of a and weights differ.r0z5Length of weights not compatible with specified axis.)r1T©r¤r¦)rWr_rbrz)r7r;r\Ú_NoValueÚmeanr_Útyper:Ú issubclassÚintegerÚbool_Ú result_typer^r¯r§rÇÚ broadcast_toÚswapaxesrAr[rUÚmultiplyr£) r`rWÚweightsÚreturnedrÌrXÚ keepdims_kwÚavgÚsclÚwgtÚ result_dtypes rQrrse€õZ �‰ Œ €AÝ�‰ Œ €Að•2”;ÐÐàˆ ˆ à! 8Ð,ˆ à€ØˆaŒf�TÐ)Ð)˜[Ð)Ð)ˆØŒi�nŠn˜QŸWšW T™]œ]Ñ+Ô+ˆ‰å�gÑÔˆå �a”g”l¥R¤Zµ´Ð$:Ñ ;Ô ;ð >Ýœ>¨!¬'°3´9¸dÑCÔCˆLˆLåœ>¨!¬'°3´9Ñ=Ô=ˆLð Œ7�c”iÒ Ð Øˆ|ÝðñôððŒx˜1Š}ˆ}ÝØNñPôPðPàŒy˜Œ|˜qœw tœ}Ò,Ð,Ý ØKñMôMðMõ”/ #¨¬¨q©°$¡¸¼Ñ'BÈ$ÐOÑOÔOˆCØ—,’,˜r 4Ñ(Ô(ˆCà •Fˆ?ˆ?ؘœ�w‘-ˆCØ ˆHŒH˜œÑ ˆHŒHàˆcŒgÐC˜4 |ÐCÐC°{ÐCÐCˆð2�bŒk˜!˜SØ ,ð.ñ.ô.Ü.1°$ðGðGØ:EðGðGØILñMˆððØ Œ9˜œ Ò !Ð !Ý”/ # s¤yÑ1Ô1×6Ò6Ñ8Ô8ˆCØ�Cˆxˆàˆ rScó—t|d¦«s`tjt|d¬¦«||||¬¦«}t |tj¦«rd|jkrt|d¬¦«S|St|t||||¬¦«S) a> Compute the median along the specified axis. Returns the median of the array elements. Parameters ---------- a : array_like Input array or object that can be converted to an array. axis : int, optional Axis along which the medians are computed. The default (None) is to compute the median along a flattened version of the array. out : ndarray, optional Alternative output array in which to place the result. It must have the same shape and buffer length as the expected output but the type will be cast if necessary. overwrite_input : bool, optional If True, then allow use of memory of input array (a) for calculations. The input array will be modified by the call to median. This will save memory when you do not need to preserve the contents of the input array. Treat the input as undefined, but it will probably be fully or partially sorted. Default is False. Note that, if `overwrite_input` is True, and the input is not already an `ndarray`, an error will be raised. keepdims : bool, optional If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array. .. versionadded:: 1.10.0 Returns ------- median : ndarray A new array holding the result is returned unless out is specified, in which case a reference to out is returned. Return data-type is `float64` for integers and floats smaller than `float64`, or the input data-type, otherwise. See Also -------- mean Notes ----- Given a vector ``V`` with ``N`` non masked values, the median of ``V`` is the middle value of a sorted copy of ``V`` (``Vs``) - i.e. ``Vs[(N-1)/2]``, when ``N`` is odd, or ``{Vs[N/2 - 1] + Vs[N/2]}/2`` when ``N`` is even. Examples -------- >>> x = np.ma.array(np.arange(8), mask=[0]*4 + [1]*4) >>> np.ma.median(x) 1.5 >>> x = np.ma.array(np.arange(10).reshape(2, 5), mask=[0]*6 + [1]*4) >>> np.ma.median(x) 2.5 >>> np.ma.median(x, axis=-1, overwrite_input=True) masked_array(data=[2.0, 5.0], mask=[False, False], fill_value=1e+20) r[TrÏ)rWÚoutÚoverwrite_inputrÌr1F©r£)r†rÌrWrârã) rŸr\r"rErMrGr§r?rJÚ_median)r`rWrârãrÌrXs rQr"r"“s¢€õD �1�fÑ Ô ðÝ ŒI•g˜a tÐ,Ñ,Ô,°4بØ'ð )ñ )ô )ˆõ �a�œÑ $Ô $𠨨a¬fª¨Ý ¨Ð.Ñ.Ô.Ð .àˆHå �A�G¨h¸TÀsØ$3ð 5ñ 5ô 5ð5rScóü‡‡—tj|jtj¦«r tj}nd}|rG‰€+| ¦«Š‰ |¬¦«n,| ‰|¬¦«|Šnt |‰|¬¦«Š‰€dŠnt‰‰j¦«Š‰j ‰dkrbtd¦«g‰jz}tdd¦«|‰<t|¦«}tj   ‰|‰|¬¦«S‰jdk�r(tt‰¦«d¦«\}}‰||zdz |dz…}tj‰jtj¦«rb‰jdkrW| |¬¦«} |stj| dd |¬ ¦«} tjj ‰| ‰¦«} n|  |¬¦«} tj  | ¦«r8tj‰j¦«stj  ‰¦«S| St‰‰d ¬ ¦«} | dz} | dzdk}tj|| | dz ¦«} tj| | g‰¬ ¦«} tj‰| ‰¬ ¦«}ˆˆfd„}||¦«tj‰jtj¦«rktj  |‰|¬¦«} tj| jdd| j¬ ¦«tjj ‰| ‰¦«} n"tj   |‰|¬¦«} | S)N)r´)rWr´r0)rWrâr1é)râg@Úsafe)ÚcastingrâT©rWrÌ©rWcóö•—tj |¦«rXtj‰j‰d¬¦«|jz}tj ‰¦«|j|<d|j|<dSdS)NTrêF)r\rrÚ is_maskedÚallr[Úminimum_fill_valueÚdata)ÚsÚrepÚasortedrWs €€rQÚreplace_maskedz_median..replace_maskedsqø€õ Œ5�?Š?˜1Ñ Ô ð Ý”F˜7œ<¨d¸TÐBÑBÔBÐBÀaÄfÑLˆCÝœ%×2Ò2°7Ñ;Ô;ˆAŒF�3‰K؈AŒF�3‰KˆKˆKð ð rSÚunsafe)r\Ú issubdtyper_ÚinexactÚinfÚravelrCrHr§r^rªrNrrrÑÚdivmodr:ÚsizerUÚ true_divideÚlibÚutilsÚ_median_nancheckrírîr[rïÚwherer8Útake_along_axisrð)r`rWrârãr´ÚindexerÚidxÚoddÚmidrñÚcountsÚhÚlÚlhÚlow_highrôrós ` @rQråråâsJøø€õ „}�Q”W�bœjÑ)Ô)ðÝ”Vˆ ˆ àˆ Øð<Ø ˆ<Ø—g’g‘i”iˆGØ �LŠL JˆLÑ /Ô /Ð /Ð /à �FŠF˜¨ˆFÑ 4Ô 4Ð 4؈GˆGå�q˜t° Ð;Ñ;Ô;ˆà €|؈ˆå# D¨'¬,Ñ7Ô7ˆà„}�TÔ˜aÒÐõ˜‘;”;�- '¤,Ñ.ˆÝ˜a ™ œ ˆ�‰ ݘ‘.”.ˆÝŒu�zŠz˜' 'Ô*°¸3ˆzÑ?Ô?Ð?à„|�qÒÑÝ�% ™.œ.¨!Ñ,Ô,‰ˆˆSØ�c˜C‘i !‘m C¨!¡GÐ+Ô,ˆÝ Œ=˜œ­¬ Ñ 3Ô 3ð "¸¼ ÀqÒ8HÐ8Hà—’˜C�Ñ Ô ˆAØð CÝ”N 1 b°&¸cÐBÑBÔB�Ý”” ×-Ò-¨g°q¸$Ñ?Ô?ˆAˆAà—’˜S�Ñ!Ô!ˆAõ Œ5�?Š?˜1Ñ Ô ð 5¥b¤f¨W¬\Ñ&:Ô&:ð 5Ý”5×+Ò+¨GÑ4Ô4Ð 4؈å �7 °Ð 5Ñ 5Ô 5€FØ�!‰ €Að �1‰*˜Š/€CÝ Œ��a˜˜1™ÑÔ€Aå Œ˜˜1˜ DÐ )Ñ )Ô )€BõÔ! '¨2°DÐ9Ñ9Ô9€Hð ð ð ð ð ð ð€N�8ÑÔÐå „}�W”]¥B¤JÑ/Ô/ð5å ŒE�IŠI�h T¨sˆIÑ 3Ô 3ˆÝ Œ�q”v˜r¨8¸¼Ð@Ñ@Ô@Ð@å ŒFŒL× )Ò )¨'°1°dÑ ;Ô ;ˆˆå ŒE�JŠJ�x d°ˆJÑ 4Ô 4ˆà €HrSc ó\—t|¦«}t|¦«}|€"tt|j¦«¦«}nt ||j¦«}|t us| ¦«s|jS|  ¦«rtg¦«S|j}|D]ƒ}ttt|¦«¦«tt|dz|j¦«¦«z¦«}|td¦«f|z| |¬¦«fz}Œ„|S)aòSuppress slices from multiple dimensions which contain masked values. Parameters ---------- x : array_like, MaskedArray The array to operate on. If not a MaskedArray instance (or if no array elements are masked), `x` is interpreted as a MaskedArray with `mask` set to `nomask`. axis : tuple of ints or int, optional Which dimensions to suppress slices from can be configured with this parameter. - If axis is a tuple of ints, those are the axes to suppress slices from. - If axis is an int, then that is the only axis to suppress slices from. - If axis is None, all axis are selected. Returns ------- compress_array : ndarray The compressed array. Nr1rë) r7r;rNr¨r§rIrAÚanyÚ_datarîÚnxarrayrOrª)r…rWrXrðÚaxrÈs rQr r 7s€õ* �‰ Œ €AÝ�‰ Œ €Aà €|Ý•U˜1œ6‘]”]Ñ#Ô#ˆˆå# D¨!¬&Ñ1Ô1ˆð �F€{€{˜!Ÿ%š%™'œ'€{ØŒwˆà‡u‚u�w„wðÝ�r‰{Œ{Ðà Œ7€DØð>ð>ˆÝ•T�% ™)œ)‘_”_¥t­E°"°q±&¸!¼&Ñ,AÔ,AÑ'BÔ'BÑBÑCÔCˆØ•U˜4‘[”[�N 2Ñ%¨!¯%ª%°T¨%Ñ*:Ô*:Ð):Ð(<Ñ<Ô=ˆˆØ €KrScór—t|¦«jdkrtd¦«‚t||¬¦«S)a£ Suppress the rows and/or columns of a 2-D array that contain masked values. The suppression behavior is selected with the `axis` parameter. - If axis is None, both rows and columns are suppressed. - If axis is 0, only rows are suppressed. - If axis is 1 or -1, only columns are suppressed. Parameters ---------- x : array_like, MaskedArray The array to operate on. If not a MaskedArray instance (or if no array elements are masked), `x` is interpreted as a MaskedArray with `mask` set to `nomask`. Must be a 2D array. axis : int, optional Axis along which to perform the operation. Default is None. Returns ------- compressed_array : ndarray The compressed array. Examples -------- >>> x = np.ma.array(np.arange(9).reshape(3, 3), mask=[[1, 0, 0], ... [1, 0, 0], ... [0, 0, 0]]) >>> x masked_array( data=[[--, 1, 2], [--, 4, 5], [6, 7, 8]], mask=[[ True, False, False], [ True, False, False], [False, False, False]], fill_value=999999) >>> np.ma.compress_rowcols(x) array([[7, 8]]) >>> np.ma.compress_rowcols(x, 0) array([[6, 7, 8]]) >>> np.ma.compress_rowcols(x, 1) array([[1, 2], [4, 5], [7, 8]]) rçz*compress_rowcols works for 2D arrays only.rë)r7r§ÚNotImplementedErrorr )r…rWs rQr r bs:€õdˆq�z„z„˜!ÒÐÝ!Ð"NÑOÔOÐOÝ �q˜tÐ $Ñ $Ô $Ð$rScót—t|¦«}|jdkrtd¦«‚t|d¦«S)zÞ Suppress whole rows of a 2-D array that contain masked values. This is equivalent to ``np.ma.compress_rowcols(a, 0)``, see `compress_rowcols` for details. See Also -------- compress_rowcols rçz'compress_rows works for 2D arrays only.r0©r7r§rr ©r`s rQrr™ó9€õ �‰ Œ €AØ„v�‚{€{Ý!Ð"KÑLÔLÐLÝ ˜A˜qÑ !Ô !Ð!rScót—t|¦«}|jdkrtd¦«‚t|d¦«S)zá Suppress whole columns of a 2-D array that contain masked values. This is equivalent to ``np.ma.compress_rowcols(a, 1)``, see `compress_rowcols` for details. See Also -------- compress_rowcols rçz'compress_cols works for 2D arrays only.r1rrs rQr r «rrScó¸—t|d¬¦«}|jdkrtd¦«‚t|¦«}|tus| ¦«s|S| ¦«}|j ¦«|_|s"t|tj |d¦«<|dvr&t|dd…tj |d¦«f<|S) aÝ Mask rows and/or columns of a 2D array that contain masked values. Mask whole rows and/or columns of a 2D array that contain masked values. The masking behavior is selected using the `axis` parameter. - If `axis` is None, rows *and* columns are masked. - If `axis` is 0, only rows are masked. - If `axis` is 1 or -1, only columns are masked. Parameters ---------- a : array_like, MaskedArray The array to mask. If not a MaskedArray instance (or if no array elements are masked), the result is a MaskedArray with `mask` set to `nomask` (False). Must be a 2D array. axis : int, optional Axis along which to perform the operation. If None, applies to a flattened version of the array. Returns ------- a : MaskedArray A modified version of the input array, masked depending on the value of the `axis` parameter. Raises ------ NotImplementedError If input array `a` is not 2D. See Also -------- mask_rows : Mask rows of a 2D array that contain masked values. mask_cols : Mask cols of a 2D array that contain masked values. masked_where : Mask where a condition is met. Notes ----- The input array's mask is modified by this function. Examples -------- >>> import numpy.ma as ma >>> a = np.zeros((3, 3), dtype=int) >>> a[1, 1] = 1 >>> a array([[0, 0, 0], [0, 1, 0], [0, 0, 0]]) >>> a = ma.masked_equal(a, 1) >>> a masked_array( data=[[0, 0, 0], [0, --, 0], [0, 0, 0]], mask=[[False, False, False], [False, True, False], [False, False, False]], fill_value=1) >>> ma.mask_rowcols(a) masked_array( data=[[0, --, 0], [--, --, --], [0, --, 0]], mask=[[False, True, False], [ True, True, True], [False, True, False]], fill_value=1) FrÏrçz&mask_rowcols works for 2D arrays only.r0)Nr1r¦Nr1) r6r§rr;rAr Únonzerorer£r>r\r,)r`rWrXÚ maskedvals rQrr½sÅ€õR ˆa�uÐÑÔ€AØ„v�‚{€{Ý!Ð"JÑKÔKÐKÝ�‰ Œ €Aà�F€{€{˜!Ÿ%š%™'œ'€{؈ؗ ’ ‘ ” €IØŒg�lŠl‰nŒn€A„GØ ð,Ý%+ˆ�"Œ)�I˜a”LÑ !Ô !Ñ"Ø ˆ}ÐÐÝ(.ˆˆ!ˆ!ˆ!�RŒY�y ”|Ñ $Ô $Ð $Ñ%Ø €HrScóv—|tjurtjdtd¬¦«t |d¦«S)aÊ Mask rows of a 2D array that contain masked values. This function is a shortcut to ``mask_rowcols`` with `axis` equal to 0. See Also -------- mask_rowcols : Mask rows and/or columns of a 2D array. masked_where : Mask where a condition is met. Examples -------- >>> import numpy.ma as ma >>> a = np.zeros((3, 3), dtype=int) >>> a[1, 1] = 1 >>> a array([[0, 0, 0], [0, 1, 0], [0, 0, 0]]) >>> a = ma.masked_equal(a, 1) >>> a masked_array( data=[[0, 0, 0], [0, --, 0], [0, 0, 0]], mask=[[False, False, False], [False, True, False], [False, False, False]], fill_value=1) >>> ma.mask_rows(a) masked_array( data=[[0, 0, 0], [--, --, --], [0, 0, 0]], mask=[[False, False, False], [ True, True, True], [False, False, False]], fill_value=1) úTThe axis argument has always been ignored, in future passing it will raise TypeErrorrç©Ú stacklevelr0©r\rÐÚwarningsÚwarnÚDeprecationWarningr©r`rWs rQrrsM€ðT •2”;ÐÐõ Œ ð #Ý$6À1ð Fñ Fô Fð Fõ ˜˜1Ñ Ô ÐrScóv—|tjurtjdtd¬¦«t |d¦«S)aÌ Mask columns of a 2D array that contain masked values. This function is a shortcut to ``mask_rowcols`` with `axis` equal to 1. See Also -------- mask_rowcols : Mask rows and/or columns of a 2D array. masked_where : Mask where a condition is met. Examples -------- >>> import numpy.ma as ma >>> a = np.zeros((3, 3), dtype=int) >>> a[1, 1] = 1 >>> a array([[0, 0, 0], [0, 1, 0], [0, 0, 0]]) >>> a = ma.masked_equal(a, 1) >>> a masked_array( data=[[0, 0, 0], [0, --, 0], [0, 0, 0]], mask=[[False, False, False], [False, True, False], [False, False, False]], fill_value=1) >>> ma.mask_cols(a) masked_array( data=[[0, --, 0], [0, --, 0], [0, --, 0]], mask=[[False, True, False], [False, True, False], [False, True, False]], fill_value=1) rrçrr1rr"s rQrrIsM€ðR •2”;ÐÐõ Œ ð #Ý$6À1ð Fñ Fô Fð Fõ ˜˜1Ñ Ô ÐrScó —tj|¦«j}|dd…|dd…z }|g}|�| d|¦«|�| |¦«t |¦«dkrt |¦«}|S)a! Compute the differences between consecutive elements of an array. This function is the equivalent of `numpy.ediff1d` that takes masked values into account, see `numpy.ediff1d` for details. See Also -------- numpy.ediff1d : Equivalent function for ndarrays. r1Nr¦r0)rrÚ asanyarrayÚflatÚinsertr–r•r)rVÚto_endÚto_beginÚedr˜s rQrrsŒ€õ Œ-˜Ñ Ô Ô !€CØ ˆQˆRˆRŒ�3�s˜�s”8Ñ €B؈T€FàÐØ� Š �a˜Ñ"Ô"Ð"Ø ÐØ� Š �fÑÔÐå ˆ6�{„{�aÒÐõ�F‰^Œ^ˆà €IrScó—tj|||¬¦«}t|t¦«rBt |¦«}|d t ¦«|d<t|¦«}n| t ¦«}|S)a. Finds the unique elements of an array. Masked values are considered the same element (masked). The output array is always a masked array. See `numpy.unique` for more details. See Also -------- numpy.unique : Equivalent function for ndarrays. Examples -------- >>> import numpy.ma as ma >>> a = [1, 2, 1000, 2, 3] >>> mask = [0, 0, 1, 0, 0] >>> masked_a = ma.masked_array(a, mask) >>> masked_a masked_array(data=[1, 2, --, 2, 3], mask=[False, False, True, False, False], fill_value=999999) >>> ma.unique(masked_a) masked_array(data=[1, 2, 3, --], mask=[False, False, False, True], fill_value=999999) >>> ma.unique(masked_a, return_index=True) (masked_array(data=[1, 2, 3, --], mask=[False, False, False, True], fill_value=999999), array([0, 1, 4, 2])) >>> ma.unique(masked_a, return_inverse=True) (masked_array(data=[1, 2, 3, --], mask=[False, False, False, True], fill_value=999999), array([0, 1, 3, 1, 2])) >>> ma.unique(masked_a, return_index=True, return_inverse=True) (masked_array(data=[1, 2, 3, --], mask=[False, False, False, True], fill_value=999999), array([0, 1, 4, 2]), array([0, 1, 3, 1, 2])) )Ú return_indexÚreturn_inverser0)r\r,rMrNrOrdr3)Úar1r,r-Úoutputs rQr,r,œs~€õLŒY�sØ$0Ø&4ð6ñ6ô6€Fõ�&�%Ñ Ô ð*Ý�f‘”ˆØ˜1”I—N’N¥;Ñ/Ô/ˆˆq‰ Ý�v‘”ˆˆà—’�[Ñ)Ô)ˆØ €MrScó—|rtj||f¦«}n0tjt|¦«t|¦«f¦«}| ¦«|dd…|dd…|dd…kS)a> Returns the unique elements common to both arrays. Masked values are considered equal one to the other. The output is always a masked array. See `numpy.intersect1d` for more details. See Also -------- numpy.intersect1d : Equivalent function for ndarrays. Examples -------- >>> x = np.ma.array([1, 3, 3, 3], mask=[0, 0, 0, 1]) >>> y = np.ma.array([3, 1, 1, 1], mask=[0, 0, 0, 1]) >>> np.ma.intersect1d(x, y) masked_array(data=[1, 3, --], mask=[False, False, True], fill_value=999999) Nr¦r1)rrr8r,rC)r.Úar2Ú assume_uniqueÚauxs rQrrÎsx€ð.ð9ÝŒn˜c 3˜ZÑ(Ô(ˆˆõŒn�f S™kœk­6°#©;¬;Ð7Ñ8Ô8ˆØ‡H‚H�J„J€JØ ˆs�ˆsŒ8�C˜˜˜”G˜s 3 B 3œxÒ'Ô (Ð(rScón—|st|¦«}t|¦«}tj||f¦«}|jdkr|S| ¦«| ¦«}tjdg|dd…|dd…kdgf¦«}|dd…|dd…k}||S)zâ Set exclusive-or of 1-D arrays with unique elements. The output is always a masked array. See `numpy.setxor1d` for more details. See Also -------- numpy.setxor1d : Equivalent function for ndarrays. r0Tr1Nr¦)r,rrr8rûrCr9)r.r1r2r3ÚauxfÚflagÚflag2s rQr*r*îs²€ð ðÝ�S‰kŒkˆÝ�S‰kŒkˆå Œ.˜#˜s˜Ñ $Ô $€CØ „x�1‚}€}؈ ؇H‚H�J„J€JØ �:Š:‰<Œ<€Då Œ>˜D˜6 D¨¨¨¤H°°S°b°S´ Ò$9¸T¸FÐCÑ DÔ D€Dà �!�"�"ŒX˜˜c˜r˜cœÒ "€EØ ˆuŒ:ÐrScóÆ—|s#t|d¬¦«\}}t|¦«}tj||f¦«}| d¬¦«}||}|r|dd…|dd…k}n|dd…|dd…k}tj||gf¦«} | d¬¦«dt |¦«…} |r| | S| | |S)a³ Test whether each element of an array is also present in a second array. The output is always a masked array. See `numpy.in1d` for more details. We recommend using :func:`isin` instead of `in1d` for new code. See Also -------- isin : Version of this function that preserves the shape of ar1. numpy.in1d : Equivalent function for ndarrays. Notes ----- .. versionadded:: 1.4.0 T)r-Ú mergesort)Úkindr1Nr¦)r,rrr8Úargsortr•) r.r1r2ÚinvertÚrev_idxÚarÚorderÚsarÚbool_arr6Úindxs rQrr sõ€ð& ðݘc°$Ð7Ñ7Ô7‰ ˆˆWÝ�S‰kŒkˆå Œ˜˜c˜ Ñ #Ô #€Bð �JŠJ˜KˆJÑ (Ô (€EØ ˆUŒ)€CØ ð(Ø�q�r�r”7˜c # 2 #œhÒ&ˆˆà�q�r�r”7˜c # 2 #œhÒ&ˆÝ Œ>˜7 V HÐ-Ñ .Ô .€DØ �=Š=˜kˆ=Ñ *Ô *¨9­C°©H¬H¨9Ô 5€Dàð#Ø�DŒzÐà�DŒz˜'Ô"Ð"rScó€—tj|¦«}t||||¬¦« |j¦«S)a| Calculates `element in test_elements`, broadcasting over `element` only. The output is always a masked array of the same shape as `element`. See `numpy.isin` for more details. See Also -------- in1d : Flattened version of this function. numpy.isin : Equivalent function for ndarrays. Notes ----- .. versionadded:: 1.13.0 ©r2r<)rrr7rÚreshaper^)ÚelementÚ test_elementsr2r<s rQrr3sB€õ$Œj˜Ñ!Ô!€GÝ �˜°mØð ñ ô ß&šw w¤}Ñ5Ô5ð6rScóL—ttj||fd¬¦«¦«S)zÀ Union of two arrays. The output is always a masked array. See `numpy.union1d` for more details. See Also -------- numpy.union1d : Equivalent function for ndarrays. Nrë)r,rrr8)r.r1s rQr-r-Js%€õ •"”. # s °$Ð7Ñ7Ô7Ñ 8Ô 8Ð8rScó—|r'tj|¦« ¦«}nt|¦«}t|¦«}|t ||dd¬¦«S)a¿ Set difference of 1D arrays with unique elements. The output is always a masked array. See `numpy.setdiff1d` for more details. See Also -------- numpy.setdiff1d : Equivalent function for ndarrays. Examples -------- >>> x = np.ma.array([1, 2, 3, 4], mask=[0, 1, 0, 1]) >>> np.ma.setdiff1d(x, [1, 2]) masked_array(data=[3, --], mask=[False, True], fill_value=999999) TrD)rrr7rùr,r)r.r1r2s rQr)r)XsY€ð(ðÝŒj˜‰oŒo×#Ò#Ñ%Ô%ˆˆå�S‰kŒkˆÝ�S‰kŒkˆØ �t�C˜¨D¸Ð>Ñ>Ô>Ô ?Ð?rSTcóF—tj|ddt¬¦«}tj|¦«}|s#| ¦«rt d¦«‚|jddkrd}tt|¦«¦«}d|z }|rtd¦«df}ndtd¦«f}|€.tj |¦«  t¦«}�nt|ddt¬ ¦«}tj|¦«}|s#| ¦«rt d¦«‚| ¦«s| ¦«rN|j|jkr>tj ||¦«} | tur | x}x|_x|_}d|_d|_tj||f|¦«}tj tj||f|¦«¦«  t¦«}|| |¬ ¦«|z}|||fS) z_ Private function for the computation of covariance and correlation coefficients. rçT)Úndminr£r_zCannot process masked data.r0r1NF)r£rKr_rë)rrr6Úfloatr<r rÇr^ÚintÚboolrªr\Ú logical_notÚastypeÚ logical_orrAreÚ _sharedmaskr8rÑ) r…ÚyÚrowvarÚ allow_maskedÚxmaskrWÚtupÚxnotmaskÚymaskÚ common_masks rQÚ _covhelperr[ysö€õ Œ�˜! $­eÐ4Ñ4Ô4€AÝ ŒO˜AÑ Ô €Eà ð8˜EŸIšI™KœKð8ÝÐ6Ñ7Ô7Ð7à„wˆq„z�Q‚€Øˆå •�f‘”Ñ Ô €FØ ˆv‰:€DØ ð"Ý�T‰{Œ{˜DÐ!ˆˆà•U˜4‘[”[Ð!ˆà€yÝ”> %Ñ(Ô(×/Ò/µÑ4Ô4ˆ‰å �!˜% qµÐ 6Ñ 6Ô 6ˆÝ” Ñ"Ô"ˆØð < § ¢ ¡ ¤ ð <ÝÐ:Ñ;Ô;Ð ;Ø �9Š9‰;Œ;ð *˜%Ÿ)š)™+œ+ð *ØŒw˜!œ'Ò!Ð!å œm¨E°5Ñ9Ô9� Ø¥fÐ,Ð,Ø8CÐC�EÐC˜AœGÐC a¤g°Ø$)�A”MØ$)�A”MÝ ŒN˜A˜q˜6 4Ñ (Ô (ˆÝ”>¥"¤.°%¸°ÀÑ"FÔ"FÑGÔG×NÒNÍsÑSÔSˆØˆ�Š�VˆÑ Ô ˜SÔ !Ñ!€AØ ˆx˜Ð Ð rScó —|�"|t|¦«krtd¦«‚|€|rd}nd}t||||¦«\}}}|s_tj|j|¦«dz|z }t |j| ¦«d¬¦«|z  ¦«}n^tj||j¦«dz|z }t ||j ¦«d¬¦«|z  ¦«}|S)aK Estimate the covariance matrix. Except for the handling of missing data this function does the same as `numpy.cov`. For more details and examples, see `numpy.cov`. By default, masked values are recognized as such. If `x` and `y` have the same shape, a common mask is allocated: if ``x[i,j]`` is masked, then ``y[i,j]`` will also be masked. Setting `allow_masked` to False will raise an exception if values are missing in either of the input arrays. Parameters ---------- x : array_like A 1-D or 2-D array containing multiple variables and observations. Each row of `x` represents a variable, and each column a single observation of all those variables. Also see `rowvar` below. y : array_like, optional An additional set of variables and observations. `y` has the same shape as `x`. rowvar : bool, optional If `rowvar` is True (default), then each row represents a variable, with observations in the columns. Otherwise, the relationship is transposed: each column represents a variable, while the rows contain observations. bias : bool, optional Default normalization (False) is by ``(N-1)``, where ``N`` is the number of observations given (unbiased estimate). If `bias` is True, then normalization is by ``N``. This keyword can be overridden by the keyword ``ddof`` in numpy versions >= 1.5. allow_masked : bool, optional If True, masked values are propagated pair-wise: if a value is masked in `x`, the corresponding value is masked in `y`. If False, raises a `ValueError` exception when some values are missing. ddof : {None, int}, optional If not ``None`` normalization is by ``(N - ddof)``, where ``N`` is the number of observations; this overrides the value implied by ``bias``. The default value is ``None``. .. versionadded:: 1.5 Raises ------ ValueError Raised if some values are missing and `allow_masked` is False. See Also -------- numpy.cov Nzddof must be an integerr0r1çð?F©Ústrict)rMrÇr[r\rÚTÚconjÚsqueeze) r…rSrTÚbiasrUÚddofrXÚfactrÄs rQrr¤s€ðl ИD¥C¨¡I¤IÒ-Ð-ÝÐ2Ñ3Ô3Ð3à €|Ø ð ØˆDˆDàˆDå& q¨!¨V°\ÑBÔBÑ€Qˆ�&Ø ðEÝŒv�h”j (Ñ+Ô+¨bÑ0°4Ñ7ˆÝ�a”c˜1Ÿ6š6™8œ8¨EÐ2Ñ2Ô2°TÑ9×BÒBÑDÔDˆˆåŒv�h ¤ Ñ+Ô+¨bÑ0°4Ñ7ˆÝ�a˜œŸš™œ¨EÐ2Ñ2Ô2°TÑ9×BÒBÑDÔDˆØ €MrSc óö—d}|tjus|tjurtj|td¬¦«t ||||¦«\}}}|s\tj|j|¦«dz}t |j| ¦«d¬¦«|z   ¦«} n[tj||j¦«dz}t ||j ¦«d¬¦«|z   ¦«} tj | ¦«} n#t$rYdSwxYw|  ¦«r4tjtj | | ¦«¦«} �n}t#| ¦«} d| _|jd|z } |r§t)| dz ¦«D]“} t)| dz| ¦«D]}}t+t-|| ||f¦«¦« d¬¦«}tjtj |¦«¦«x| | |f<| || f<Œ~Œ”n®t)| dz ¦«D]›} t)| dz| ¦«D]…}t+t-|d d …| f|d d …|ff¦«¦« d¬¦«}tjtj |¦«¦«x| | |f<| || f<Œ†Œœ| | z S) a6 Return Pearson product-moment correlation coefficients. Except for the handling of missing data this function does the same as `numpy.corrcoef`. For more details and examples, see `numpy.corrcoef`. Parameters ---------- x : array_like A 1-D or 2-D array containing multiple variables and observations. Each row of `x` represents a variable, and each column a single observation of all those variables. Also see `rowvar` below. y : array_like, optional An additional set of variables and observations. `y` has the same shape as `x`. rowvar : bool, optional If `rowvar` is True (default), then each row represents a variable, with observations in the columns. Otherwise, the relationship is transposed: each column represents a variable, while the rows contain observations. bias : _NoValue, optional Has no effect, do not use. .. deprecated:: 1.10.0 allow_masked : bool, optional If True, masked values are propagated pair-wise: if a value is masked in `x`, the corresponding value is masked in `y`. If False, raises an exception. Because `bias` is deprecated, this argument needs to be treated as keyword only to avoid a warning. ddof : _NoValue, optional Has no effect, do not use. .. deprecated:: 1.10.0 See Also -------- numpy.corrcoef : Equivalent function in top-level NumPy module. cov : Estimate the covariance matrix. Notes ----- This function accepts but discards arguments `bias` and `ddof`. This is for backwards compatibility with previous versions of this function. These arguments had no effect on the return values of the function and can be safely ignored in this and previous versions of numpy. z/bias and ddof have no effect and are deprecatedrçrr]Fr^r1rëN)r\rÐrr r!r[rr`rarbrrÚdiagonalrÇrîÚsqrtrÙÚouterrrRr^r¨rr/ÚvarÚreduce)r…rSrTrcrUrdÚmsgrXreÚcÚdiagÚ_denomrÀr¹rÁÚ_xs rQrrísû€ð` <€CØ •2”;ÐР$­b¬kÐ"9Ð"9åŒ �cÕ-¸!Ð<Ñ<Ô<Ð<å& q¨!¨V°\ÑBÔBÑ€Qˆ�&à ð@ÝŒv�h”j (Ñ+Ô+¨bÑ0ˆÝ �”�a—f’f‘h”h uÐ -Ñ -Ô -°Ñ 4× =Ò =Ñ ?Ô ?ˆˆåŒv�h ¤ Ñ+Ô+¨bÑ0ˆÝ ��A”C—H’H‘J”J uÐ -Ñ -Ô -°Ñ 4× =Ò =Ñ ?Ô ?ˆðÝŒ{˜1‰~Œ~ˆˆøÝ ððð؈qˆqðøøøð‡|‚|�~„~ðRÝ”�œ×*Ò*¨4°Ñ6Ô6Ñ7Ô7ˆ‰å˜$‘”ˆØ"ˆÔØ ŒG�A˜‘JÔ ˆØ ð Rݘ1˜q™5‘\”\ð Rð R�ݘq 1™u a™œðRðR�AÝ"¥6¨1¨Q¬4°°1´¨,Ñ#7Ô#7Ñ8Ô8×<Ò<À!Ð<ÑDÔD�BÝ24´'½"¼+×:LÒ:LÈRÑ:PÔ:PÑ2QÔ2QÐQ�F˜1˜a˜4‘L 6¨!¨Q¨$¡< <ðRð Rõ ˜1˜q™5‘\”\ð Rð R�ݘq 1™u a™œðRðR�AÝ"Ý" A a a a¨ d¤G¨Q¨q¨q¨q°!¨t¬WÐ#5Ñ6Ô6ñ8ô8ß8;ºÀ¸¹ ¼ ðå24´'½"¼+×:LÒ:LÈRÑ:PÔ:PÑ2QÔ2QÐQ�F˜1˜a˜4‘L 6¨!¨Q¨$¡< <ðRð ˆv‰:ÐsÄ D Ä D.Ä-D.cóR‡—eZdZdZee¦«Zeˆfd„¦«Zˆfd„ZˆxZ S)ÚMAxisConcatenatorz› Translate slice objects to concatenation along an axis. For documentation on usage, see `mr_class`. See Also -------- mr_class c󀕗t¦« |jd¬¦«}t||j¬¦«S)NFrärZ)ÚsuperÚmakematrðr6r[)ÚclsrVrðÚ __class__s €rQruzMAxisConcatenator.makematTs5ø€õ ‰wŒw�Š˜sœx¨eˆÑ4Ô4ˆÝ�T ¤Ð)Ñ)Ô)Ð)rScóŽ•—t|t¦«rtd¦«‚t¦« |¦«S)NzUnavailable for masked array.)rMÚstrr4rtÚ __getitem__)rmÚkeyrws €rQrzzMAxisConcatenator.__getitem__]s<ø€å �c�3Ñ Ô ð ;ÝÐ9Ñ:Ô:Ð :å‰wŒw×"Ò" 3Ñ'Ô'Ð'rS) rjr~rrlÚ staticmethodr8Ú classmethodrurzÚ __classcell__)rws@rQrrrrGsvø€€€€€ð ð ð�,˜{Ñ+Ô+€Kàð*ð*ð*ð*ñ„[ð*ð(ð(ð(ð(ð(ð(ð(ð(ð(rSrrcó—eZdZdZd„ZdS)Úmr_classa� Translate slice objects to concatenation along the first axis. This is the masked array version of `lib.index_tricks.RClass`. See Also -------- lib.index_tricks.RClass Examples -------- >>> np.ma.mr_[np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6])] masked_array(data=[1, 2, 3, ..., 4, 5, 6], mask=False, fill_value=999999) có<—t |d¦«dS)Nr0)rrro)rms rQrozmr_class.__init__ws€Ý×"Ò" 4¨Ñ+Ô+Ð+Ð+Ð+rSN)rjr~rrlrorzrSrQr€r€es-€€€€€ððð",ð,ð,ð,ð,rSr€c#ó²K—ttj|¦«t|¦«j¦«D]\}}|s|V—Œ |s|dt fV—Œ dS)a¤ Multidimensional index iterator. Return an iterator yielding pairs of array coordinates and values, skipping elements that are masked. With `compressed=False`, `ma.masked` is yielded as the value of masked elements. This behavior differs from that of `numpy.ndenumerate`, which yields the value of the underlying data array. Notes ----- .. versionadded:: 1.23.0 Parameters ---------- a : array_like An array with (possibly) masked elements. compressed : bool, optional If True (default), masked elements are skipped. See Also -------- numpy.ndenumerate : Equivalent function ignoring any mask. Examples -------- >>> a = np.ma.arange(9).reshape((3, 3)) >>> a[1, 0] = np.ma.masked >>> a[1, 2] = np.ma.masked >>> a[2, 1] = np.ma.masked >>> a masked_array( data=[[0, 1, 2], [--, 4, --], [6, --, 8]], mask=[[False, False, False], [ True, False, True], [False, True, False]], fill_value=999999) >>> for index, x in np.ma.ndenumerate(a): ... print(index, x) (0, 0) 0 (0, 1) 1 (0, 2) 2 (1, 1) 4 (2, 0) 6 (2, 2) 8 >>> for index, x in np.ma.ndenumerate(a, compressed=False): ... print(index, x) (0, 0) 0 (0, 1) 1 (0, 2) 2 (1, 0) -- (1, 1) 4 (1, 2) -- (2, 0) 6 (2, 1) -- (2, 2) 8 r0N)Úzipr\r$r<r&r>)r`Ú compressedÚitr[s rQr$r$�ssèè€õz�œ qÑ)Ô)­<¸©?¬?Ô+?Ñ@Ô@ð 𠉈ˆDØð ؈HˆHˆHˆHØð Ø�Q”%��-Ð Ð Ð øð  ð rScóþ—t|¦«}|tustj|¦«stjd|jdz g¦«Stj|¦«}t|¦«dkr |ddgSdS)aµ Find the indices of the first and last unmasked values. Expects a 1-D `MaskedArray`, returns None if all values are masked. Parameters ---------- a : array_like Input 1-D `MaskedArray` Returns ------- edges : ndarray or None The indices of first and last non-masked value in the array. Returns None if all values are masked. See Also -------- flatnotmasked_contiguous, notmasked_contiguous, notmasked_edges clump_masked, clump_unmasked Notes ----- Only accepts 1-D arrays. Examples -------- >>> a = np.ma.arange(10) >>> np.ma.flatnotmasked_edges(a) array([0, 9]) >>> mask = (a < 3) | (a > 8) | (a == 5) >>> a[mask] = np.ma.masked >>> np.array(a[~a.mask]) array([3, 4, 6, 7, 8]) >>> np.ma.flatnotmasked_edges(a) array([3, 8]) >>> a[:] = np.ma.masked >>> print(np.ma.flatnotmasked_edges(a)) None r0r1r¦N)r;rAr\r r6rûÚ flatnonzeror•)r`rXÚunmaskeds rQrrÅsu€õZ �‰ Œ €AØ�F€{€{�"œ& ™)œ)€{ÝŒx˜˜AœF Q™J˜Ñ(Ô(Ð(ÝŒ~˜q˜bÑ!Ô!€HÝ ˆ8�}„}�qÒÐØ˜˜B˜Ô Ð àˆtrSc󸇇—t|¦«}‰� |jdkrt|¦«St|¦«}t t j|j¦«t j|g|jz¦«¬¦«Štˆˆfd„t|j¦«D¦«¦«tˆˆfd„t|j¦«D¦«¦«gS)a_ Find the indices of the first and last unmasked values along an axis. If all values are masked, return None. Otherwise, return a list of two tuples, corresponding to the indices of the first and last unmasked values respectively. Parameters ---------- a : array_like The input array. axis : int, optional Axis along which to perform the operation. If None (default), applies to a flattened version of the array. Returns ------- edges : ndarray or list An array of start and end indexes if there are any masked data in the array. If there are no masked data in the array, `edges` is a list of the first and last index. See Also -------- flatnotmasked_contiguous, flatnotmasked_edges, notmasked_contiguous clump_masked, clump_unmasked Examples -------- >>> a = np.arange(9).reshape((3, 3)) >>> m = np.zeros_like(a) >>> m[1:, 1:] = 1 >>> am = np.ma.array(a, mask=m) >>> np.array(am[~am.mask]) array([0, 1, 2, 3, 6]) >>> np.ma.notmasked_edges(am) array([0, 6]) Nr1rZcój•—g|]/}‰| ‰¦« ¦«‘Œ0Srz)Úminr„©r�r¹rWrs €€rQr�z#notmasked_edges..+ó5ø€ÐHÐHÐH°Q�3�q”6—:’:˜dÑ#Ô#×.Ò.Ñ0Ô0ÐHÐHÐHrScój•—g|]/}‰| ‰¦« ¦«‘Œ0Srz)r²r„rŒs €€rQr�z#notmasked_edges..,r�rS) r7r§rr<r6r\Úindicesr^rNr¨)r`rWrXrs ` @rQr&r&üsÌøø€õT �‰ Œ €AØ €|�q”v ’{�{Ý" 1Ñ%Ô%Ð%Ý�Q‰Œ€AÝ •” ˜1œ7Ñ#Ô#­"¬*°a°S¸1¼6±\Ñ*BÔ*BÐ CÑ CÔ C€CÝ ÐHÐHÐHÐHÐH½%ÀĹ-¼-ÐHÑHÔHÑ IÔ IÝ ÐHÐHÐHÐHÐH½%ÀĹ-¼-ÐHÑHÔHÑ IÔ Ið MðMrScóT—t|¦«}|turtd|j¦«gSd}g}t j| ¦«¦«D]N\}}tt|¦«¦«}|s&|  t|||z¦«¦«||z }ŒO|S)aÆ Find contiguous unmasked data in a masked array. Parameters ---------- a : array_like The input array. Returns ------- slice_list : list A sorted sequence of `slice` objects (start index, end index). .. versionchanged:: 1.15.0 Now returns an empty list instead of None for a fully masked array See Also -------- flatnotmasked_edges, notmasked_contiguous, notmasked_edges clump_masked, clump_unmasked Notes ----- Only accepts 2-D arrays at most. Examples -------- >>> a = np.ma.arange(10) >>> np.ma.flatnotmasked_contiguous(a) [slice(0, 10, None)] >>> mask = (a < 3) | (a > 8) | (a == 5) >>> a[mask] = np.ma.masked >>> np.array(a[~a.mask]) array([3, 4, 6, 7, 8]) >>> np.ma.flatnotmasked_contiguous(a) [slice(3, 5, None), slice(6, 9, None)] >>> a[:] = np.ma.masked >>> np.ma.flatnotmasked_contiguous(a) [] r0) r;rArªrûÚ itertoolsÚgroupbyrùr•rOr–)r`rXr¹rÄr ÚgrÀs rQrr/s¥€õX �‰ Œ €AØ�F€{€{Ý�a˜œÑ Ô Ð!Ð!Ø €AØ €FÝÔ# A§G¢G¡I¤IÑ.Ô.ðð‰ˆˆAÝ •�Q‘”‰LŒLˆØð +Ø �MŠM�%  1 q¡5™/œ/Ñ *Ô *Ð *Ø ˆQ‰ˆˆØ €MrSc óz—t|¦«}|j}|dkrtd¦«‚|�|dkrt|¦«Sg}|dzdz}ddg}t dd¦«||<t |j|¦«D]<}|||<| t|t|¦«¦«¦«Œ=|S)a³ Find contiguous unmasked data in a masked array along the given axis. Parameters ---------- a : array_like The input array. axis : int, optional Axis along which to perform the operation. If None (default), applies to a flattened version of the array, and this is the same as `flatnotmasked_contiguous`. Returns ------- endpoints : list A list of slices (start and end indexes) of unmasked indexes in the array. If the input is 2d and axis is specified, the result is a list of lists. See Also -------- flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges clump_masked, clump_unmasked Notes ----- Only accepts 2-D arrays at most. Examples -------- >>> a = np.arange(12).reshape((3, 4)) >>> mask = np.zeros_like(a) >>> mask[1:, :-1] = 1; mask[0, 1] = 1; mask[-1, 0] = 0 >>> ma = np.ma.array(a, mask=mask) >>> ma masked_array( data=[[0, --, 2, 3], [--, --, --, 7], [8, --, --, 11]], mask=[[False, True, False, False], [ True, True, True, False], [False, True, True, False]], fill_value=999999) >>> np.array(ma[~ma.mask]) array([ 0, 2, 3, 7, 8, 11]) >>> np.ma.notmasked_contiguous(ma) [slice(0, 1, None), slice(2, 4, None), slice(7, 9, None), slice(11, 12, None)] >>> np.ma.notmasked_contiguous(ma, axis=0) [[slice(0, 1, None), slice(2, 3, None)], [], [slice(0, 1, None)], [slice(0, 3, None)]] >>> np.ma.notmasked_contiguous(ma, axis=1) [[slice(0, 1, None), slice(2, 4, None)], [slice(3, 4, None)], [slice(0, 1, None), slice(3, 4, None)]] rçz&Currently limited to at most 2D array.Nr1r0) r7r§rrrªr¨r^r–rN)r`rWr·rÄÚotherrr¹s rQr%r%hsË€õt �‰ Œ €AØ Œ€BØ ˆA‚v€vÝ!Ð"JÑKÔKÐKØ €|�r˜Q’w�wÝ'¨Ñ*Ô*Ð*à €Fà �A‰X˜‰N€EØ ˆaˆ&€CÝ�d˜DÑ!Ô!€Cˆ�Iå �1”7˜5”>Ñ "Ô "ð?ð?ˆØˆˆE‰ Ø� Š Õ.¨qµ°s±´¬}Ñ=Ô=Ñ>Ô>Ð>Ð>Ø €MrSc ó¦—|jdkr| ¦«}|dd…|dd…z  ¦«}|ddz}|dr€t|¦«dkrt d|j¦«gSt d|d¦«g}| d„t|ddd…|ddd…¦«D¦«¦«nAt|¦«dkrgSd„t|ddd…|ddd…¦«D¦«}|dr.| t |d|j¦«¦«|S)zv Finds the clumps (groups of data with the same values) for a 1D bool array. Returns a series of slices. r1Nr¦r0c3ó<K—|]\}}t||¦«V—ŒdSri©rª©r�ÚleftÚrights rQú z_ezclump..ÅsLèè€ðBðBÙ!�d˜Eõ˜˜eÑ$Ô$ðBðBðBðBðBðBrSrçcó4—g|]\}}t||¦«‘ŒSrzr˜r™s rQr�z_ezclump..Ës&€Ð NÐ NÐ N¡K D¨%�U�4˜Ñ Ô Ð NÐ NÐ NrS) r§rùrr•rªrûÚextendrƒr–)r[rÚrs rQÚ_ezclumpr µsn€ð  „y�1‚}€}Ø�zŠz‰|Œ|ˆØ ���Œ8�d˜3˜B˜3”iÑ × (Ò (Ñ *Ô *€CØ ˆaŒ&�1‰*€Cà ˆA„wð OÝ ˆs‰8Œ8�qŠ=ˆ=ݘ!˜TœYÑ'Ô'Ð(Ð (å �1�c˜!”fÑ Ô Ð ˆØ �ŠðBðBÝ%(¨¨Q¨r°!¨V¬°c¸!¸$¸Q¸$´iÑ%@Ô%@ðBñBôBñ Cô Cð Cð Cõ ˆs‰8Œ8�qŠ=ˆ=؈Ià NÐ Nµ3°s¸5¸B¸q¸5´zÀ3ÀqÀtÈ!ÀtÄ9Ñ3MÔ3MÐ NÑ NÔ Nˆà ˆB„xð,Ø �Š•�s˜2”w ¤ Ñ*Ô*Ñ+Ô+Ð+Ø €HrScóŒ—t|dt¦«}|turtd|j¦«gSt |¦«S)a÷ Return list of slices corresponding to the unmasked clumps of a 1-D array. (A "clump" is defined as a contiguous region of the array). Parameters ---------- a : ndarray A one-dimensional masked array. Returns ------- slices : list of slice The list of slices, one for each continuous region of unmasked elements in `a`. Notes ----- .. versionadded:: 1.4.0 See Also -------- flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges notmasked_contiguous, clump_masked Examples -------- >>> a = np.ma.masked_array(np.arange(10)) >>> a[[0, 1, 2, 6, 8, 9]] = np.ma.masked >>> np.ma.clump_unmasked(a) [slice(3, 6, None), slice(7, 8, None)] rer0)rqrArªrûr ©r`r[s rQr r ÒsB€õB �1�g�vÑ &Ô &€DØ �v€~€~Ý�a˜œÑ Ô Ð!Ð!Ý �T�E‰?Œ?ÐrScó^—tj|¦«}|turgSt|¦«S)a  Returns a list of slices corresponding to the masked clumps of a 1-D array. (A "clump" is defined as a contiguous region of the array). Parameters ---------- a : ndarray A one-dimensional masked array. Returns ------- slices : list of slice The list of slices, one for each continuous region of masked elements in `a`. Notes ----- .. versionadded:: 1.4.0 See Also -------- flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges notmasked_contiguous, clump_unmasked Examples -------- >>> a = np.ma.masked_array(np.arange(10)) >>> a[[0, 1, 2, 6, 8, 9]] = np.ma.masked >>> np.ma.clump_masked(a) [slice(0, 3, None), slice(6, 7, None), slice(8, 10, None)] )rrr;rAr r¢s rQrrùs,€õB Œ:�a‰=Œ=€DØ �v€~€~؈ Ý �D‰>Œ>ÐrScój—tj||¦«}t|¦«}|turd||<|S)zD Masked values in the input array result in rows of zeros. r0)r\r.r;rA)r…rÀÚ_vanderrXs rQr.r.%s5€õ Œi˜˜1‰oŒo€GÝ�‰ Œ €AØ•€€Øˆ�‰ Ø €NrSc óô—t|¦«}t|¦«}t|¦«}|jdkrt|t|¦«¦«}nZ|jdkr@tt |¦«¦«}|t urt||dd…df¦«}nt d¦«‚|�qt|¦«}|jdkrt d¦«‚|jd|jdkrt d¦«‚t|t|¦«¦«}|t ur3|} |�|| }tj || || |||||¦«Stj |||||||¦«S)zE Any masked values in x is propagated in y, and vice-versa. r1rçNr0z Expected a 1D or 2D array for y!z expected a 1-d array for weightsz(expected w and y to have the same length) r7r;r§r@rrAr¯r^r\r') r…rSÚdegÚrcondÚfullÚwrrXÚmyÚnot_ms rQr'r'3s^€õ �‰ Œ €AÝ�‰ Œ €Aå�‰ Œ €AØ„v�‚{€{Ý �A•w˜q‘z”zÑ "Ô "ˆˆØ Œ�1ŠˆÝ •Y˜q‘\”\Ñ "Ô "ˆØ •VРРݘ˜2˜a˜a˜a ˜dœ8Ñ$Ô$ˆAøåÐ:Ñ;Ô;Ð;à€}Ý �A‰JŒJˆØ Œ6�QŠ;ˆ;ÝÐ>Ñ?Ô?Ð ?Ø Œ7�1Œ:˜œ œÒ #Ð #ÝÐFÑGÔGÐ GÝ �A•w˜q‘z”zÑ "Ô "ˆà•€€Ø�ˆØ ˆ=Ø�%”ˆAÝŒz˜!˜Eœ( A e¤H¨c°5¸$ÀÀ3ÑGÔGÐGåŒz˜!˜Q  U¨D°!°SÑ9Ô9Ð9rSri)NNF)NNFF)NN)FF)F)NTT)NTFTN)T)NFNF)frlÚ__all__r‘rÚr2rrr3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrÚnumpyr\rGrÚnumpy.core.multiarrayrHÚnumpy.core.numericrIÚnumpy.lib.function_baserJÚnumpy.lib.index_tricksrKrRrrLr r!rgr�r‹r“r›rrrr/r(rr rr+rrr¡rrÚfindÚrstriprÐrr"rår r rr rrrrr,rr*rrr-r)r[rrrrr€r#r$rr&rr%r r rr.rtr'rzrSrQúr¶sJðð ð ð ð ð €ðÐÐÐØ€€€àÐÐÐÐÐððððððððððððððððððððððððððððððððððððððððððððððð ÐÐÐØ+Ð+Ð+Ð+Ð+Ð+Ð+Ð+Ø6Ð6Ð6Ð6Ð6Ð6Ø3Ð3Ð3Ð3Ð3Ð3Ø,Ð,Ð,Ð,Ð,Ð,Ø3Ð3Ð3Ð3Ð3Ð3ð3ð3ð3ð3ð3ð3ð3ðl"ð1 ð1 ð1 ð1 ðh4 ð4 ð4 ðt/ ð/ ð/ ð/ ð/ ñ/ ô/ ð/ ðd-ð-ð-ð-ð-˜_ñ-ô-ð-ð$ )ð )ð )ð )ð )˜/ñ )ô )ð )ððððð˜?ñôðð2ðððð˜oñôðð.%Ð $ \Ñ 2Ô 2€ Ø $Ð $ \Ñ 2Ô 2€ Ø $Ð $ \Ñ 2Ô 2€ à(Ð(¨Ñ2Ô2Ð2€ˆØ Ð ˜XÑ &Ô &€Ø"Ð" >Ñ2Ô2€ Ø Ð ˜XÑ &Ô &€ØÐ˜GÑ$Ô$€à Ð  Ñ )Ô )€à !Ð ! *Ñ -Ô -€ð ðððOðOðOð`Ô.Ô6ÐÔðððð2ÔÐ&Ø Ô0Ô8Ø1ˆÔ Ô #× (Ò (¨Ñ 1Ô 1Ð1ô3ß39²6±8´8ð+ñ-€OÔð`AØ”[ðAðAðAðAðAðHL5ðL5ðL5ðL5ð^R ðR ðR ðR ðj(ð(ð(ð(ðV4%ð4%ð4%ð4%ðn"ð"ð"ð$"ð"ð"ð$V ðV ðV ðV ðr”kð0ð0ð0ð0ðf”kð/ð/ð/ð/ðlðððð:/ð/ð/ð/ðd)ð)ð)ð)ð@ðððð6'#ð'#ð'#ð'#ðT6ð6ð6ð6ð. 9ð 9ð 9ð@ð@ð@ð@ðB(!ð(!ð(!ð(!ðVFðFðFðFðR˜t¨"¬+ÀDØ”+ðTðTðTðTðt(ð(ð(ð(ð(Ð(ñ(ô(ð(ð<,ð,ð,ð,ð,Ð ñ,ô,ð,ð*€h�j„j€ðA ðA ðA ðA ðH4ð4ð4ðn0Mð0Mð0Mð0Mðf6ð6ð6ðrJðJðJðJðZ ð ð ð:$ð$ð$ðN$ð$ð$ðX ð ð ð ð�”˜RœYÔ.°´Ñ?Ô?€„ð :ð :ð :ð :ðD�"”+˜bœjÔ0°'´/ÑBÔB€„€€rS