/ lib / numpy / __init__.pyc
__init__.pyc
  1  o

  2  Z��c;�
  3  @s&dZddlZddlZddlmZmZmZmZzeWne	y%dZYnwer0ej
  4  �d��n�zddlm
ZWneyKZzdZee�e�dZ[wwd	d
  5  gZiZddlmZddlmZdd
lTddlmZddlmZdd
lTddlmZddlmZddlmZddlmZddlmZddlmZddlmZ dd
lTdZ!de"dfde#dfde$dfde%dfd e&d!fd"e'd#fd$e(d%fgZ)hd&�Z*e�+d'd(�e)D��[![)dd)lm,Z,m-Z-m.Z.m/Z/ej0�1�e�2d*d+g�e�2ej�e�2e j�e�2ej�e�2gd,��e�3d-�[4[5e�3d.�e�3d/�e�3d0�[6gd1�Z7d2d(�e7D�Z8ej9d3d4d5�ej9d3d6d5�ej9d3d7d5�d8Z:d8Z;d9d:�Z<d;d<�Z=dd=l>m?Z?e?e@�ZA[?d>d?�ZBeB�[Bd@dA�ZCejDdBk�r�ejEdCdD��,ZFeC�dEZGeHeF�dk�r�dF�IeFdGjJj@eKeFdGjL��ZGdH�IeG�ZeMe��Wd�n	1�s�wY[CddlNZNeNjO�PdId�ZQejDdJk�r�eQdu�r�z dZQeN�R�jS�TdK�ddL�ZUeVdMdN�eUD��ZUeUdOk�r�dZQWneW�y�dZXYn
weQdu�r�dZQneYeQ�ZQejZ�[eQ�ejZj\�]�e�^eNjO�PdPdQ��dRdS�Z_[NddTl`maZambZc[[dS)UaS
  6  NumPy
  7  =====
  8  
  9  Provides
 10    1. An array object of arbitrary homogeneous items
 11    2. Fast mathematical operations over arrays
 12    3. Linear Algebra, Fourier Transforms, Random Number Generation
 13  
 14  How to use the documentation
 15  ----------------------------
 16  Documentation is available in two forms: docstrings provided
 17  with the code, and a loose standing reference guide, available from
 18  `the NumPy homepage <https://numpy.org>`_.
 19  
 20  We recommend exploring the docstrings using
 21  `IPython <https://ipython.org>`_, an advanced Python shell with
 22  TAB-completion and introspection capabilities.  See below for further
 23  instructions.
 24  
 25  The docstring examples assume that `numpy` has been imported as ``np``::
 26  
 27    >>> import numpy as np
 28  
 29  Code snippets are indicated by three greater-than signs::
 30  
 31    >>> x = 42
 32    >>> x = x + 1
 33  
 34  Use the built-in ``help`` function to view a function's docstring::
 35  
 36    >>> help(np.sort)
 37    ... # doctest: +SKIP
 38  
 39  For some objects, ``np.info(obj)`` may provide additional help.  This is
 40  particularly true if you see the line "Help on ufunc object:" at the top
 41  of the help() page.  Ufuncs are implemented in C, not Python, for speed.
 42  The native Python help() does not know how to view their help, but our
 43  np.info() function does.
 44  
 45  To search for documents containing a keyword, do::
 46  
 47    >>> np.lookfor('keyword')
 48    ... # doctest: +SKIP
 49  
 50  General-purpose documents like a glossary and help on the basic concepts
 51  of numpy are available under the ``doc`` sub-module::
 52  
 53    >>> from numpy import doc
 54    >>> help(doc)
 55    ... # doctest: +SKIP
 56  
 57  Available subpackages
 58  ---------------------
 59  lib
 60      Basic functions used by several sub-packages.
 61  random
 62      Core Random Tools
 63  linalg
 64      Core Linear Algebra Tools
 65  fft
 66      Core FFT routines
 67  polynomial
 68      Polynomial tools
 69  testing
 70      NumPy testing tools
 71  distutils
 72      Enhancements to distutils with support for
 73      Fortran compilers support and more.
 74  
 75  Utilities
 76  ---------
 77  test
 78      Run numpy unittests
 79  show_config
 80      Show numpy build configuration
 81  dual
 82      Overwrite certain functions with high-performance SciPy tools.
 83      Note: `numpy.dual` is deprecated.  Use the functions from NumPy or Scipy
 84      directly instead of importing them from `numpy.dual`.
 85  matlib
 86      Make everything matrices.
 87  __version__
 88      NumPy version string
 89  
 90  Viewing documentation using IPython
 91  -----------------------------------
 92  
 93  Start IPython and import `numpy` usually under the alias ``np``: `import
 94  numpy as np`.  Then, directly past or use the ``%cpaste`` magic to paste
 95  examples into the shell.  To see which functions are available in `numpy`,
 96  type ``np.<TAB>`` (where ``<TAB>`` refers to the TAB key), or use
 97  ``np.*cos*?<ENTER>`` (where ``<ENTER>`` refers to the ENTER key) to narrow
 98  down the list.  To view the docstring for a function, use
 99  ``np.cos?<ENTER>`` (to view the docstring) and ``np.cos??<ENTER>`` (to view
100  the source code).
101  
102  Copies vs. in-place operation
103  -----------------------------
104  Most of the functions in `numpy` return a copy of the array argument
105  (e.g., `np.sort`).  In-place versions of these functions are often
106  available as array methods, i.e. ``x = np.array([1,2,3]); x.sort()``.
107  Exceptions to this rule are documented.
108  
109  �N�)�ModuleDeprecationWarning�VisibleDeprecationWarning�_NoValue�	_CopyModeFz%Running from numpy source directory.
110  )�showz�Error importing numpy: you should not try to import numpy from
111          its source directory; please exit the numpy source tree, and relaunch
112          your python interpreter from there.rr)�_distributor_init)�core)�*)�compat)�lib)�linalg)�fft)�
113  polynomial)�random)�	ctypeslib)�ma)�	matrixlibzC`np.{n}` is a deprecated alias for `{an}`.  (Deprecated NumPy 1.24)�bool8znp.bool_�int0znp.intp�uint0znp.uintp�str0znp.str_�bytes0z	np.bytes_�void0znp.void�object0zk`np.object0` is a deprecated alias for `np.object_`. `object` can be used instead.  (Deprecated NumPy 1.24)>�bytes�ulong�bool�str�long�objectcCs&i|]\}}}||tj||d�f�qS))�n�an)�_msg�format)�.0r!�aliasr"�r'��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\__init__.py�
114  <dictcomp>�s�r))�round�abs�max�min�__version__�show_config)r
rrrr�
115  issubdtyper�unicode�Arrayterator)
116  �fvZipmt�irrZmirr�nper�npv�pmtZppmt�pv�ratecCsi|]	}|d|�d��qS)z(In accordance with NEP 32, the function z� was removed from NumPy version 1.20.  A replacement for this function is available in the numpy_financial library: https://pypi.org/project/numpy-financialr')r%�namer'r'r(r)�s���ignoreznumpy.dtype size changed)�messageznumpy.ufunc size changedznumpy.ndarray size changed�removedcs�ddl}zt|�Wn	tyYnw|j�tdd��fdd�}|Szt|\}�Wn	ty5Ynw|j�tdd�|S|tvrP|jd|�d�tdd�|dkr\ddlm	}|S|d	krhd
117  dl	m
118  }|Std�t
|���)
Nr�)�
119  stacklevelcst����N)�RuntimeError)�args�kwds��msgr'r(�_expired�sz__getattr__.<locals>._expiredzIn the future `np.zn` will be defined as the corresponding NumPy scalar.  (This may have returned Python scalars in past versions.�testing�Testerr)rHz!module {!r} has no attribute {!r})�warnings�__expired_functions__�KeyError�warn�DeprecationWarning�__deprecated_attrs__�__future_scalars__�
FutureWarning�
numpy.testingrGrH�AttributeErrorr$�__name__)�attrrIrF�valrGrHr'rDr(�__getattr__�s<��
120  ��rVcCs&t���ddhB}|ddh8}t|�S)NrHrGr	r)�globals�keys�list)Zpublic_symbolsr'r'r(�__dir__s
121  �rZ)�PytestTestercCsVztdtd�}t|�|�td��dkst��WdSty*d}t|�t��d�w)a�
122          Quick sanity checks for common bugs caused by environment.
123          There are some cases e.g. with wrong BLAS ABI that cause wrong
124          results under specific runtime conditions that are not necessarily
125          achieved during test suite runs, and it is useful to catch those early.
126  
127          See https://github.com/numpy/numpy/issues/8577 and other
128          similar bug reports.
129  
130          r>)�dtype�@g�h㈵��>z�The current Numpy installation ({!r}) fails to pass simple sanity checks. This can be caused for example by incorrect BLAS library being linked in, or by mixing package managers (pip, conda, apt, ...). Search closed numpy issues for similar problems.N)�ones�float32r+�dot�AssertionErrorrAr$�__file__)�xrEr'r'r(�
_sanity_check+s��rdcCsNztgd��}tddd�}t||�}t||ddd�}WdSty&YdSw)z�
131          Quick Sanity check for Mac OS look for accelerate build bugs.
132          Testing numpy polyfit calls init_dgelsd(LAPACK)
133          )g@r]g�?rr>�T)�covN)�array�linspace�polyval�polyfit�
134  ValueError)�crc�y�_r'r'r(�
_mac_os_checkEs
135  �ro�darwinT)�record�z{}: {}�����a&Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend.
136  If you compiled yourself, more information is available at:
137  https://numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries
138  Otherwise report this to the vendor that provided NumPy.
139  {}
140  ZNUMPY_MADVISE_HUGEPAGE�linux�.r>ccs�|]}t|�VqdSr@)�int)r%�vr'r'r(�	<genexpr>qs�rx)��ZNPY_PROMOTION_STATE�legacycCs$ddlm}t|t��d����gS)Nr��Path�_pyinstaller)�pathlibr}rrb�	with_name�resolver|r'r'r(�_pyinstaller_hooks_dir�sr�)r.�git_revision)d�__doc__�sysrI�_globalsrrrr�__NUMPY_SETUP__�	NameError�stderr�writeZnumpy.__config__rr/�ImportError�erE�__all__rNrrrr	rrr
rrrrrr�_matr#�bool_�intp�uintp�str_�bytes_�void�object_�
141  _type_inforO�updater*r+r,r-�	getlimits�_register_known_types�extend�removerr1r2�_financial_namesrJ�filterwarnings�
142  oldnumeric�numarrayrVrZ�numpy._pytesttesterr[rS�testrdro�platform�catch_warnings�w�
error_message�lenr$�categoryrr<rA�os�environ�get�use_hugepage�uname�release�split�kernel_version�tuplerk�
use_hugepagesrv�
143  multiarray�_set_madvise_hugepage�_multiarray_umathZ
_reload_guard�_set_promotion_stater��versionr.r��__git_version__r'r'r'r(�<module>s�i�
144  ������
145  �
146  
147  
148  
149  
150  �1
���
151  ��
152