| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Python312/Lib/site-packages/numpy/ma/__pycache__/ |
Upload File : |
�
�g� � �l � d Z g d�ZddlZddlZddlmZ ddlmZmZm Z m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlZddlmZm
Z ddl m!Z!m"Z" dd l#m$Z$ dd
l%m&Z& d� Z'dMd�Z(e)fd
�Z*d� Z+ G d� d� Z, G d� de,� Z- G d� de,� Z. G d� de,� Z/ G d� de,� Z0 e0d� Z1 e0d� Z2 e0d� Z3 e.d� xZ4Z5 e.d� Z6 e.d� Z7 e.d� Z8 e.d � Z9 e-d!� Z: e-d"� Z;d#� Z<d$� Z=ejz j e=_ d%� Z>e>j �Rej| j dej| j j d&� j� � d'z e>_ dNej� d(�d)�ZBdOd*�ZCdNd+�ZDdMd,�ZEdMd-�ZFd.� ZGd/� ZHdMd0�ZIej� fd1�ZJej� fd2�ZKdPd3�ZLdQd4�ZMdRd5�ZNdRd6�ZOdQd7�ZPdQd8�ZQd9� ZRdRd:�ZSdSd<�ZTdTd=�ZUdd;ej� d;ej� fd>�ZV G d?� d@e&� ZW G dA� dBeW� ZX eX� ZYdUdC�ZZdD� Z[dMdE�Z\dF� Z]dMdG�Z^dH� Z_dI� Z`dJ� ZadMdK�Zb ej� ej� j ebj � eb_ dVdL�Zd ej� ej� j edj � ed_ y)Wz�
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 �8 � t | t t t f� S )z6
Is seq a sequence (ndarray, list or tuple)?
)�
isinstancerG �tuple�list)�seqs �1C:\Python312\Lib\site-packages\numpy/ma/extras.py�
issequencerR ( s � �
�c�G�U�D�1�2�2� c �: � t | � }|j |� 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 as np
>>> a = np.arange(9).reshape((3,3))
>>> a = np.ma.array(a)
>>> 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)
>>> np.ma.count_masked(a)
3
When the `axis` keyword is used an array is returned.
>>> np.ma.count_masked(a, axis=0)
array([1, 1, 1])
>>> np.ma.count_masked(a, axis=1)
array([0, 2, 1])
)r<