GRAYBYTE WORDPRESS FILE MANAGER5752

Server IP : 198.54.121.189 / Your IP : 216.73.216.112
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/ma/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/ma//__init__.py
"""
=============
Masked Arrays
=============

Arrays sometimes contain invalid or missing data.  When doing operations
on such arrays, we wish to suppress invalid values, which is the purpose masked
arrays fulfill (an example of typical use is given below).

For example, examine the following array:

>>> x = np.array([2, 1, 3, np.nan, 5, 2, 3, np.nan])

When we try to calculate the mean of the data, the result is undetermined:

>>> np.mean(x)
nan

The mean is calculated using roughly ``np.sum(x)/len(x)``, but since
any number added to ``NaN`` [1]_ produces ``NaN``, this doesn't work.  Enter
masked arrays:

>>> m = np.ma.masked_array(x, np.isnan(x))
>>> m
masked_array(data = [2.0 1.0 3.0 -- 5.0 2.0 3.0 --],
      mask = [False False False  True False False False  True],
      fill_value=1e+20)

Here, we construct a masked array that suppress all ``NaN`` values.  We
may now proceed to calculate the mean of the other values:

>>> np.mean(m)
2.6666666666666665

.. [1] Not-a-Number, a floating point value that is the result of an
       invalid operation.

.. moduleauthor:: Pierre Gerard-Marchant
.. moduleauthor:: Jarrod Millman

"""
from . import core
from .core import *

from . import extras
from .extras import *

__all__ = ['core', 'extras']
__all__ += core.__all__
__all__ += extras.__all__

from numpy._pytesttester import PytestTester
test = PytestTester(__name__)
del PytestTester

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 15 2025 08:30:34
root / root
0755
__pycache__
--
May 15 2025 08:31:38
root / root
0755
tests
--
May 15 2025 08:30:33
root / root
0755
__init__.py
1.371 KB
April 17 2025 13:10:58
root / root
0644
__init__.pyi
5.921 KB
April 17 2025 13:10:58
root / root
0644
core.py
271.506 KB
April 17 2025 13:10:58
root / root
0644
core.pyi
13.97 KB
April 17 2025 13:10:58
root / root
0644
extras.py
62.874 KB
April 17 2025 13:10:58
root / root
0644
extras.pyi
2.584 KB
April 17 2025 13:10:58
root / root
0644
mrecords.py
26.594 KB
April 17 2025 13:10:58
root / root
0644
mrecords.pyi
1.889 KB
April 17 2025 13:10:58
root / root
0644
setup.py
0.408 KB
April 17 2025 13:10:58
root / root
0644
testutils.py
9.995 KB
April 17 2025 13:10:58
root / root
0644
timer_comparison.py
15.291 KB
April 17 2025 13:10:58
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF