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mDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[dD]+Z\ e]ee\e^e\< #e_$rY(wxYw[\ddlm`Z`maZbddl`mcZdddlemfZfddlgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrddlsmtZtmuZumvZvmwZwmxZxmyZymzZzm{Z{m|Z|m}Z}m~Z~mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZmZmZmZmZmZmÐZÐmĐZĐmŐZddlƐmǐZǐmȐZȐmɐZɐmʐZʐmːZːm̐Z̐m͐Z͐mΐZΐmϐZϐmАZАmѐZddlҐmӐZӐmԐZԐmՐZՐm֐Z֐mאZאmؐZؐmِZِmڐZڐmېZېmܐZܐmݐZݐmސZސmߐZߐmZmZddlmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZdd lmZmZmZdd!lmZmZm Z dd"lam Z m Z m Z hd#Z d$Zd%Zd&Zd'd(ed)fd*ed+fd,ed-fd.ed.fgZd/eDZhd0Zd1Zdd2lmZee eejzeebjzee`jjzee`jjzee`jjzee`jjzee`jjzee`j jzee`j!jzee`j"jzee`j#jzee`j$jzee`j%jzee`j&jzee`j'jzee`j(jzhd3zZej)d4d56ej)d4d76ej)d4d86d9Z*d:Z+dd;l,m-Z-e-e.Z/[-d<Z0e0[0d=Z1ej2d>krdd?lm3Z3ej4d@A5Z5e1e6e5dkrJe5D]DZ7e7j8e3j9ur/e7j8j.dBe7j:Z;dCe;dDZeej?@e>[>ej?jABejCDdGdHdHkrejEdIeFdJKdLZG[[[dS)MaG 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. Available subpackages --------------------- 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 distutils Enhancements to distutils with support for Fortran compilers support and more (for Python <= 3.11) Utilities --------- test Run numpy unittests show_config Show numpy build configuration __version__ NumPy version string Viewing documentation using IPython ----------------------------------- Start IPython and import `numpy` usually under the alias ``np``: `import numpy as np`. Then, directly past or use the ``%cpaste`` magic 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. c ddl}|j|j|j|jt |jdx}r|j|dSdS)Nz numpy.libs) ospathisdirabspathjoindirname__file__pardiradd_dll_directory)rlibs_dirs =c:\PYTHON\DbComparer\venv\Lib\site-packages\numpy/__init__.py_delvewheel_patch_1_11_2r[s| III w}}bgooh>W>WY[Ybdp1q1q!r!rrXss'X&&&&&''rN)version)__expired_attributes__) _CopyMode_NoValue) __version__Fz%Running from numpy source directory. )_distributor_init) show_configznumpy.__config__zError 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.)_core(BFalse_ ScalarTypeTrue_absabsoluteacosacoshaddallallcloseamaxaminanyarangearccosarccosharcsinarcsinharctanarctan2arctanhargmaxargmin argpartitionargsortargwherearoundarray array2string array_equal array_equiv array_repr array_str asanyarrayasarrayascontiguousarrayasfortranarrayasinasinhastypeatanatan2atanh atleast_1d atleast_2d atleast_3d base_repr binary_repr bitwise_and bitwise_countbitwise_invertbitwise_left_shift bitwise_not bitwise_orbitwise_right_shift bitwise_xorblockboolbool_ broadcast busday_count busday_offsetbusdaycalendarbytebytes_can_castcbrtcdoubleceil characterchooseclip clongdouble complex64 complex128complexfloatingcompressconcat concatenateconj conjugateconvolvecopysigncopyto correlatecoscosh count_nonzerocrosscsinglecumprodcumsumcumulative_prodcumulative_sum datetime64datetime_as_string datetime_datadeg2raddegreesdiagonaldividedivmoddotdoubledtypeeeinsum einsum_pathempty empty_likeequalerrstate euler_gammaexpexp2expm1fabsfinfoflatiter flatnonzeroflexiblefloat16float32float64 float_powerfloatingfloor floor_dividefmaxfminfmodformat_float_positionalformat_float_scientificfrexp from_dlpack frombufferfromfile fromfunctionfromiter frompyfunc fromstringfull full_likegcdgeneric geomspaceget_printoptions getbufsizegeterr geterrcallgreater greater_equalhalf heavisidehstackhypotidentityiinfoindicesinexactinfinnerint8int16int32int64int_intcintegerintpinvert is_busdayiscloseisdtypeisfinite isfortranisinfisnanisnatisscalar issubdtypelcmldexp left_shiftless less_equallexsortlinspace little_endianloglog1plog2log10 logaddexp logaddexp2 logical_and logical_not logical_or logical_xorlogspacelong longdoublelonglongmatmulmatrix_transposematvecmaxmaximummay_share_memorymeanmemmapminmin_scalar_typeminimummodmodfmoveaxismultiplynanndarrayndimnditernegative nested_itersnewaxis nextafternonzero not_equalnumberobject_ones ones_likeouter partition permute_dimspipositivepowpower printoptionsprod promote_typesptpputputmaskrad2degradiansravelrecarray reciprocalrecord remainderrepeatrequirereshaperesize result_type right_shiftrintrollrollaxisround sctypeDict searchsortedset_printoptions setbufsizeseterr seterrcallshape shares_memoryshortsignsignbit signedintegersinsinglesinhsizesortspacingsqrtsquaresqueezestackstdstr_subtractsumswapaxestaketantanh tensordot timedelta64trace transpose true_dividetrunc typecodesubyteufuncuintuint8uint16uint32uint64uintcuintpulong ulonglongunsignedintegerunstackushortvarvdotvecdotvecmatvoidvstackwherezeros zeros_like)float96float128 complex192 complex256)lib matrixlib)scimath)pad) ediff1d intersect1disin setdiff1dsetxor1dunion1dunique unique_all unique_countsunique_inverse unique_values)%angleappendasarray_chkfiniteaveragebartlettbincountblackmancopycorrcoefcovdeletediffdigitizeextractflipgradienthamminghanningi0insertinterpiterablekaisermedianmeshgrid percentile piecewiseplacequantilerot90selectsinc sort_complex trapezoid trim_zerosunwrap vectorize) histogramhistogram_bin_edges histogramdd)c_ diag_indicesdiag_indices_from fill_diagonal index_expix_mgrid ndenumeratendindexogridr_ravel_multi_indexs_ unravel_index) nanargmax nanargmin nancumprod nancumsumnanmaxnanmean nanmediannanmin nanpercentilenanprod nanquantilenanstdnansumnanvar) fromregex genfromtxtloadloadtxtpackbitssavesavetxtsavezsavez_compressed unpackbits) polypoly1dpolyaddpolyderpolydivpolyfitpolyintpolymulpolysubpolyvalroots)apply_along_axisapply_over_axes array_split column_stackdsplitdstack expand_dimshsplitkronput_along_axis row_stacksplittake_along_axistilevsplit)broadcast_arraysbroadcast_shapes broadcast_to)diagdiagflateyefliplrflipud histogram2d mask_indicestritril tril_indicestril_indices_fromtriu triu_indicestriu_indices_fromvander) common_typeimag iscomplex iscomplexobjisreal isrealobj mintypecode nan_to_numreal real_if_closetypename)fixisneginfisposinf) get_includeinfo show_runtime)asmatrixbmatmatrix>mafftr`reccharcoref2pytestdtypeslinalgrandomtypingstringstesting ctypeslib exceptions polynomialamodule 'numpy' has no attribute '{n}'. `np.{n}` was a deprecated alias for the builtin `{n}`. To avoid this error in existing code, use `{n}` by itself. Doing this will not modify any behavior and is safe. {extended_msg} The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationszCIf you specifically wanted the numpy scalar type, use `np.{}` here.zWhen 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.)objectfloatrcomplexrdstrr7intcNi|]"\}}|t||#S))n extended_msg)_msgformat).0rrs r rs> Q  DKK!,K 7 7r>rbytesr z2024.12)__array_namespace_info__>emathrrrignoreznumpy.dtype size changed)messageznumpy.ufunc size changedznumpy.ndarray size changedcddl}|dkrddlm}|S|dkrddlm}|S|dkrddlm}|S|dkrddlm}|S|dkrddl m }|S|dkrddl m }|S|dkrddl m}|S|d krddlm} | S|d krddlm} | S|d krddlm} | S|d krddlm} | S|d krddlm} | S|dkrddlm}|S|dkrddlm}|S|dkrt;dd|dkrddlm}|S|dkrddl m!}|S|dkr"dtDvrddl#m$}|St;dd|tJvr|j&d|dtNd|tPvrt;tP|d|tRvr"t;d|dtR|d|dkr%|j&dtTdddlm}|j+St;dtXd |)!Nrrrrrr rr r r matlibrrrr array_apiz9`numpy.array_api` is not available from numpy 2.0 onwards)namerr distutilsz;`numpy.distutils` is not available from Python 3.12 onwardszIn the future `np.z4` will be defined as the corresponding NumPy scalar. stacklevelz`np.z(` was removed in the NumPy 2.0 release. chararrayz`np.chararray` is deprecated and will be removed from the main namespace in the future. Use an array with a string or bytes dtype instead.zmodule z has no attribute )-warnings numpy.linalgr numpy.fftr numpy.dtypesr numpy.randomrnumpy.polynomialr numpy.marnumpy.ctypeslibr numpy.exceptionsr  numpy.testingr  numpy.matlibr  numpy.f2pyr numpy.typingr numpy.recr numpy.charrAttributeError numpy.corer numpy.stringsr__numpy_submodules__numpy.distutilsr#__future_scalars__warn FutureWarning__former_attrs__rDeprecationWarningr'__name__)attrr(rrrrr rr r r r rrrrrrr#s r __getattr__rCs 8   ) ) ) ) ) )M U]] # # # # # #J X   ) ) ) ) ) )M X   ) ) ) ) ) )M \ ! ! 1 1 1 1 1 1  T\\ ! ! ! ! ! !I [ / / / / / /  \ ! ! 1 1 1 1 1 1  Y   + + + + + +N X   ) ) ) ) ) )M V^^ % % % % % %K X   ) ) ) ) ) )M U]] # # # # # #J V^^ % % % % % %K [  "5;?AAA A V^^ % % % % % %K Y   + + + + + +N [ 222333333  $&;AEGGGG % % % HM.T.../< L L L L # # # !1$!7dCCC C ) ) ) 2t22)$/22  ;   HM*+=! M M M M & % % % % %> !MxMMTMMNNNrc~ttz}|hdz}t|S)N>testsr rconftestr!r#ra)globalskeysr:list)public_symbolss r__dir__rK'sI IINN  3 3      N###r) PytestTesterc tdt}t||tdz dkstdS#t$r+d}t |tdwxYw)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. r$)r@gh㈵>zThe 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)rrrrAssertionError RuntimeErrorrr )xmsgs r _sanity_checkrS6s ?Qg&&&AquuQxx'#,,.//$66$$76 ? ? ?8C szz(3344$ >  ?s AA5B c tgd}tddd}t||}t||dd}dS#t$rYdSwxYw)z Quick Sanity check for Mac OS look for accelerate build bugs. Testing numpy polyfit calls init_dgelsd(LAPACK) )g@rNg?rr$T)rxN)r5rrr ValueError)crQy_s r _mac_os_checkrZPsr  lll##AAq!!A1 A1aT***AAA    DD sAA AAdarwin)r T)rz: aPolyfit 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/devdocs/building/index.html Otherwise report this to the vendor that provided NumPy.  ctd5td} ||znM#t$r@tjd}|rt jdtdYnwxYwddddS#1swxYwYdS)Nraise)r")r_FzgSpurious warnings given by blas but suppression not set up on this platform. Please open a NumPy issue.r$r%) rrFloatingPointErrorr_multiarray_umath_blas_supports_fper(r= UserWarning)rQress rblas_fpe_checkrevs ' " " " 3 3XA 3A% 3 3 3-@@GG3MN#3333 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3s2B(BAA2/B1A22BB Bcftjdd}tjdkrl|j d}tjjddd}td|D}|dkrd }n&#t$rd }YnwxYw|d}nt|}|S) a* We usually use madvise hugepages support, but on some old kernels it is slow and thus better avoided. Specifically kernel version 4.6 had a bug fix which probably fixed this: https://github.com/torvalds/linux/commit/7cf91a98e607c2f935dbcc177d70011e95b8faff NUMPY_MADVISE_HUGEPAGENlinuxr.r$c34K|]}t|VdS)N)r)rvs r z!hugepage_setup..s(&F&F!s1vv&F&F&F&F&F&Fr)r) renvirongetsysplatformunamereleasertuplerVr) use_hugepagekernel_versions rhugepage_setuprxsz~~&>EE <7 " "|';  ! !#!3!9!9#!>!>rr!B!&&F&F~&F&F&F!F!F!F**#$L ! ! !  !  !LL|,,LsAB BBNPY_PROMOTION_STATEweakzdNPY_PROMOTION_STATE was a temporary feature for NumPy 2.0 transition and is ignored after NumPy 2.2.r$r%cddlm}t|tdgS)NrPath _pyinstaller)pathlibr}rr with_nameresolver|s r_pyinstaller_hooks_dirrsG      DDNN,,^<<DDFFGGHHr(H__doc__rrrqr(rr_expired_attrs_2_0r_globalsrrr__NUMPY_SETUP__ NameErrorstderrwriternumpy.__config__r ImportErrorr isinstanceModuleNotFoundErrorr"rRrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[tagetattrrGr7r`ra_matrbrlib._arraypad_implrclib._arraysetops_implrdrerfrgrhrirjrkrlrmrnlib._function_base_implrorprqrrrsrtrurvrwrxryrzr{r|r}r~rrrrrrrrrrrrrrrrrrrrrlib._histograms_implrrrlib._index_tricks_implrrrrrrrrrrrrrrlib._nanfunctions_implrrrrrrrrrrrrrrlib._npyio_implrrrrrrrrrrlib._polynomial_implrrrrrrrrrrrlib._shape_base_implrrrrrrrrrrrrrrrlib._stride_tricks_implrrrlib._twodim_base_implrrrrrrrrrrrrrrrlib._type_check_implrrrrrrrrrrrlib._ufunclike_implrrrlib._utils_implrrrrrrr:r _specific_msg_int_extended_msgr _type_infor?r<__array_api_version___array_api_inforrIset__all___histograms_impl_nanfunctions_impl_function_base_impl_twodim_base_impl_shape_base_impl_type_check_impl_arraysetops_impl_ufunclike_impl_arraypad_impl _utils_impl_stride_tricks_impl_polynomial_impl _npyio_impl_index_tricks_implfilterwarningsrCrKnumpy._pytesttesterrLrArrSrZrrr catch_warningswlen_wncategory RankWarningr error_messagerPrerx multiarray_set_madvise_hugepagera _reload_guardrorpr=rcrrrrs|VVt'''  666666)))))))) OOOOOA IJ=>>>>$##### 0000000  :a, - - *!&)               *  3 3 3N< **>>+;+;<<<  &44666 ,f55??  9 A ' ' ' ' III XXXsL;AA-A44B$9&BB$3PPP1A*h''h+.h+