B «@`Ÿ;ã @s®dZddlZddlZddlmZmZddlmZyeWnek rPdZYnXerfej   d¡�nDyddl m Z Wn0ek r¦Zzd Zeeƒe‚WddZ[XYnXdd lmZdd lmZd d gZiZddlmZddlmZddlTddlmZddlmZddlTddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z#ddl"Tddl$Z%dZ&dZ'dZ(dde' )d¡fd e' )d!¡fd"e' )d#¡fd$e' )d%¡fd&e( )d&¡fgZ*e +d'd(„e*Dƒ¡d)Z&e,ed*ƒe&j)d*d&e( )d*¡d+�fed*<e,ed*ƒe&j)d,d$e' )d%¡d+�fed-<[&['[([*[%dd.lm-Z-m.Z.m/Z/m0Z0ej1 2¡e 3d/d0g¡e 3ej¡e 3e#j¡e 3ej¡e 3d1d2d3d4d5g¡[4[5e 6d*¡e 6d-¡e 6d6¡[7d7d8d9d:d;dd?d@g Z8dAd(„e8DƒZ9ej:dBdCdD�ej:dBdEdD�ej:dBdFdD�dGZ;dGZdLdM„Z?n&ddNl@mAZAeBƒ +dOd(„e C¡Dƒ¡ddPlDmEZEeEeFƒZG[EdQdR„ZHeHƒ[HdSdT„ZIddlZejJdUk�rúejKdVdW��NZLeIƒdXZMeNeLƒdk�rðdY )eLdZjOjFePeLdZjQƒ¡ZMd[ )eM¡ZeReƒ‚WdQRX[IddlSZSeSjT Ud\d¡ZVejJd]k�r†eVdk�r†y@dZVeS W¡jX Yd^¡ddH…ZZe[d_d`„eZDƒƒZZeZdak�rfdZVWne\k �r‚dZ]YnXneVdk�r–dZVne^eVƒZVej_ `eV¡dS)baÈ NumPy ===== Provides 1. An array object of arbitrary homogeneous items 2. Fast mathematical operations over arrays 3. Linear Algebra, Fourier Transforms, Random Number Generation How to use the documentation ---------------------------- Documentation is available in two forms: docstrings provided with the code, and a loose standing reference guide, available from `the NumPy homepage `_. We recommend exploring the docstrings using `IPython `_, an advanced Python shell with TAB-completion and introspection capabilities. See below for further instructions. The docstring examples assume that `numpy` has been imported as `np`:: >>> import numpy as np Code snippets are indicated by three greater-than signs:: >>> x = 42 >>> x = x + 1 Use the built-in ``help`` function to view a function's docstring:: >>> help(np.sort) ... # doctest: +SKIP For some objects, ``np.info(obj)`` may provide additional help. This is particularly true if you see the line "Help on ufunc object:" at the top of the help() page. Ufuncs are implemented in C, not Python, for speed. The native Python help() does not know how to view their help, but our np.info() function does. To search for documents containing a keyword, do:: >>> np.lookfor('keyword') ... # doctest: +SKIP General-purpose documents like a glossary and help on the basic concepts of numpy are available under the ``doc`` sub-module:: >>> from numpy import doc >>> help(doc) ... # doctest: +SKIP Available subpackages --------------------- doc Topical documentation on broadcasting, indexing, etc. lib Basic functions used by several sub-packages. random Core Random Tools linalg Core Linear Algebra Tools fft Core FFT routines polynomial Polynomial tools testing NumPy testing tools f2py Fortran to Python Interface Generator. distutils Enhancements to distutils with support for Fortran compilers support and more. Utilities --------- test Run numpy unittests show_config Show numpy build configuration dual Overwrite certain functions with high-performance SciPy tools. Note: `numpy.dual` is deprecated. Use the functions from NumPy or Scipy directly instead of importing them from `numpy.dual`. matlib Make everything matrices. __version__ NumPy version string Viewing documentation using IPython ----------------------------------- Start IPython with the NumPy profile (``ipython -p numpy``), which will import `numpy` under the alias `np`. Then, use the ``cpaste`` command to paste examples into the shell. To see which functions are available in `numpy`, type ``np.`` (where ```` refers to the TAB key), or use ``np.*cos*?`` (where ```` refers to the ENTER key) to narrow down the list. To view the docstring for a function, use ``np.cos?`` (to view the docstring) and ``np.cos??`` (to view the source code). Copies vs. in-place operation ----------------------------- Most of the functions in `numpy` return a copy of the array argument (e.g., `np.sort`). In-place versions of these functions are often available as array methods, i.e. ``x = np.array([1,2,3]); x.sort()``. Exceptions to this rule are documented. éNé)ÚModuleDeprecationWarningÚVisibleDeprecationWarning)Ú_NoValueFz%Running from numpy source directory. )Úshowz¸Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.)Ú git_revision)Úversionrr)Ú_distributor_init)Úcore)Ú*)Úcompat)Úlib)Úlinalg)Úfft)Ú polynomial)Úrandom)Ú ctypeslib)Úma)Ú matrixliba!`np.{n}` is a deprecated alias for the builtin `{n}`. To silence this warning, use `{n}` by itself. Doing this will not modify any behavior and is safe. {extended_msg} Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationszCIf you specifically wanted the numpy scalar type, use `np.{}` here.zÃWhen replacing `np.{}`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.)ÚobjectÚÚboolZbool_ÚfloatZfloat64ÚcomplexZ complex128ÚstrZstr_ÚintcCs*i|]"\}}tt|ƒtj||d�f|“qS))ÚnÚ extended_msg)ÚgetattrÚ _builtinsÚ_msgÚformat)Ú.0rr©r#ú2/tmp/pip-unpacked-wheel-ecq9wray/numpy/__init__.pyú ½sr%a·`np.{n}` is a deprecated alias for `np.compat.{n}`. To silence this warning, use `np.compat.{n}` by itself. In the likely event your code does not need to work on Python 2 you can use the builtin `{n2}` for which `np.compat.{n}` is itself an alias. Doing this will not modify any behaviour and is safe. {extended_msg} Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsÚlong)rZn2rZunciodeÚunicode)ÚroundÚabsÚmaxÚminÚ __version__Ú show_configrrrrrÚ ArrayteratorZfvZipmtZirrZmirrZnperZnpvZpmtZppmtÚpvZratecCsi|]}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Úremovedé)éécsÀy t|‰Wntk r Yn"Xtjˆtdd�‡fdd„}|Syt|\}‰Wntk rfYnXtjˆtdd�|S|dkr”ddlm}|S|dkr¬dd lm}|St d   t |¡ƒ‚dS) Nr4)Ú stacklevelcs tˆƒ‚dS)N)Ú RuntimeError)ÚargsÚkwds)Úmsgr#r$Ú_expiredsz__getattr__.._expiredÚtestingrÚTesterr)r>z!module {!r} has no attribute {!r}) Ú__expired_functions__ÚKeyErrorÚwarningsÚwarnÚDeprecationWarningÚ__deprecated_attrs__Z numpy.testingr=r>ÚAttributeErrorr!Ú__name__)Úattrr<Úvalr=r>r#)r;r$Ú __getattr__ s*    rIcCsttƒ ¡ddhBƒS)Nr>r=)ÚlistÚglobalsÚkeysr#r#r#r$Ú__dir__2srM)r>cCsi|]\}\}}||“qSr#r#)r"ÚkÚvr;r#r#r$r%;s)Ú PytestTestercCsZy,tdtd�}t| |¡dƒdks*tƒ‚Wn(tk rTd}t| t¡ƒd‚YnXdS)aŽ Quick sanity checks for common bugs caused by environment. There are some cases e.g. with wrong BLAS ABI that cause wrong results under specific runtime conditions that are not necessarily achieved during test suite runs, and it is useful to catch those early. See https://github.com/numpy/numpy/issues/8577 and other similar bug reports. r4)Zdtypeg@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)ZonesZfloat32r)ÚdotÚAssertionErrorr8r!Ú__file__)Úxr;r#r#r$Ú _sanity_checkGs   rUcCsRy8tdddgƒ}tdddƒ}t||ƒ}t||ddd�}Wntk rLYnXd S) z‡ Quick Sanity check for Mac OS look for accelerate build bugs. Testing numpy polyfit calls init_dgelsd(LAPACK) g@g@gð?rr4éT)ZcovN)ÚarrayZlinspaceZpolyvalZpolyfitÚ ValueError)ÚcrTÚyÚ_r#r#r$Ú _mac_os_checkas  r\ÚdarwinT)Úrecordrz{}: {}éÿÿÿÿa%Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, more information is available at https://numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries Otherwise report this to the vendor that provided NumPy. {} ZNUMPY_MADVISE_HUGEPAGEÚlinuxÚ.ccs|]}t|ƒVqdS)N)r)r"rOr#r#r$ú Žsrb)éé)aÚ__doc__ÚsysrAZ_globalsrrrZ__NUMPY_SETUP__Ú NameErrorÚstderrÚwriteZnumpy.__config__rr-Ú ImportErrorÚer;rrZ__git_revision__r,Ú__all__rDrr r r r rrrrrrrZ_matÚbuiltinsrr Z _specific_msgZ_int_extended_msgr!Z _type_infoÚupdaterr(r)r*r+Z getlimitsZ_register_known_typesÚextendr&r'Úremover.Z_financial_namesr?ÚfilterwarningsZ oldnumericZnumarrayÚ version_inforIrMr=r>rKÚitemsZnumpy._pytesttesterrPrFÚtestrUr\ÚplatformÚcatch_warningsÚwÚ error_messageÚlenÚcategoryrr2r8ÚosÚenvironÚgetZ use_hugepageÚunameÚreleaseÚsplitZkernel_versionÚtuplerXZ use_hugepagesrZ multiarrayZ_set_madvise_hugepager#r#r#r$Úlsä                               (