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LaG 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. N)version)__expired_attributes__) _CopyMode_NoValue) __version__Fz%Running from numpy source directory. )_distributor_init) show_configzError 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) ediff1din1d intersect1disin setdiff1dsetxor1dunion1dunique unique_all unique_countsunique_inverse unique_values)&angleappendasarray_chkfiniteaveragebartlettbincountblackmancopycorrcoefcovdeletediffdigitizeextractflipgradienthamminghanningi0insertinterpiterablekaisermedianmeshgrid percentile piecewiseplacequantilerot90selectsinc sort_complex trapezoidtrapz 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>mafftrRreccharcoref2pytestdtypeslinalgrandomtypingstringstesting 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.)objectfloatrcomplexrVstrr)intn extended_msg>rbytesrz2024.12)__array_namespace_info__>emathrr r ignoreznumpy.dtype size changed)messageznumpy.ufunc size changedznumpy.ndarray size changedcbddl}|dk(rddlm}|S|dk(rddlm}|S|dk(rddlm}|S|dk(rddlm}|S|dk(rddl m }|S|dk(rddl m }|S|dk(rddl m}|S|d k(rddlm} | S|d k(rddlm} | S|d k(rddlm} | S|d k(rddlm} | S|d k(rddlm} | S|dk(rddlm}|S|dk(rddlm}|S|dk(r t;dd|dk(rddlm}|S|dk(rddl m!}|S|dk(rdtDvrddl#m$}|St;dd|tJvr|jLd|dtNd|tPvrt;tP|d|tRvrt;d|dtR|d|dk(r+|jLdtTdddlm}|jVSt;dtXd |)!Nrrrrrrrrrrmatlibrrrr 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.polynomialrnumpy.marnumpy.ctypeslibrnumpy.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__)attrrrrrrrrrrrrrrrrrrrs T/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/numpy/__init__.py __getattr__r4s  8  )M U] #J X  )M X  )M \ ! 1  T\ !I [ /  \ ! 1  Y  +N X  )M V^ %K X  )M U] #J V^ %K [  "5;?A A V^ %K Y  +N [ 223  $&;AEGG % % HMM$TF+../< L # # !1$!7dC C ) ) tfD)$/02  ;  HMM*+=! M &>> !wxl2DTHMNNcdtjtz}|hdz}t|S)N>testsrrconftestrrrS)globalskeysr*list)public_symbolss r3__dir__r=s7 INN 3 3    N##r5) PytestTesterc tdt}t|j|tdz dksty#t$r"d}t |j 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)rt@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)rrrrrAssertionError RuntimeErrorformat__file__)xmsgs r3 _sanity_checkrG,sj ?Qg&AquuQx'#,./$6$$7 ?8C szz(34$ >  ?s AA+A.c tgd}tddd}t||}t||dd}y#t$rYywxYw)z Quick Sanity check for Mac OS look for accelerate build bugs. Testing numpy polyfit calls init_dgelsd(LAPACK) )g@r@g?rrT)rkN)r'rrr ValueError)crEy_s r3 _mac_os_checkrNFsL  l#AAq!A1 A1aT*A   s58 AAdarwin)rT)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} ||zdddy#t$r@tjj d}|rt jdtdYQwxYw#1swYyxYw)Nraise)r)rSFzgSpurious warnings given by blas but suppression not set up on this platform. Please open a NumPy issue.rr) r{rFloatingPointErrorr _multiarray_umath_blas_supports_fperr- UserWarning)rEress r3blas_fpe_checkrYls{ ' " 3XA 3A 3 3& 3--@@GMMN#3 3 3 3s' A4(AA1.A40A11A44A=cRtjjdd}tjdk(rP|N d}tj j jddd}td|D}|dkrd }|S|d}|St|}|S#t$rd }Y|SwxYw) 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.rc32K|]}t|yw)N)r).0vs r3 z!hugepage_setup..s&F!s1v&Fs)r) osenvirongetsysplatformunamereleasertuplerJr) use_hugepagekernel_versions r3hugepage_setuprn}szz~~&>E <<7 "|';  ! !#!3!3!9!9#!>r!B!&&F~&F!F!F*#$L  !L|,L !  !sA B B&%B&NPY_PROMOTION_STATEweakzdNPY_PROMOTION_STATE was a temporary feature for NumPy 2.0 transition and is ignored after NumPy 2.2.rrctddlm}t|tj dj gS)NrPath _pyinstaller)pathlibrsrrD with_nameresolverrs r3_pyinstaller_hooks_dirrxs+ DN,,^<DDFGHHr5(H__doc__rdrgrrr_expired_attrs_2_0r_globalsrrr__NUMPY_SETUP__ NameErrorstderrwriter numpy.__config__r ImportErrorrurFr 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[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrvrwrxryrzr{r|r}r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 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@rArBrCrDrErFrGrHrIrJrKrLrMtagetattrr9r'rRrS_matrTr lib._arraypad_implrUlib._arraysetops_implrVrWrXrYrZr[r\r]r^r_r`ralib._function_base_implrbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtrurvrwrxryrzr{r|r}r~rrrrrrrrrlib._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*_msg _specific_msg_int_extended_msgrC _type_infor/r,__array_api_version___array_api_infor  getlimits_register_known_typesr;set__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_implfilterwarningsr4r=numpy._pytesttesterr>r1rrGrNrhrcatch_warningswlen_wncategory RankWarningr error_messagerBrYrn multiarray_set_madvise_hugepagerU _reload_guardrerfr-rWrxrs00r3rs| Vn 6) JJ=>NXI$&0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCN B #E2.GIbM #%%''       ''''''''''''''''''''PRQQ              " "       =<<@@@111  O  N "  -&&y12 M((67  $$V,- !((/0 2J!+ Q  DKK!,K 7 74%99 OO))+ EMM  DLL  C ( () * C " " * *+  , C # # + +,  - C ! ! ) )*  + C ( () * C ( () * C ! ! ) )* + C   ' '( ) C   & &' ( COO # #$ % C # # + +, - C ( () * COO # #$ % C " " * *+! ," L# LG,HH.HIHH.HIHH.JKXOt$10  !D?.O  ||x $X $ $D 1 Q O1vz 0C||z'='== #||445R }E&7 8EoR I+3// 0) *  3< **>+;<  &&446 ,f5?  9 A ' I XWO &/#A% &b    h~  sTl ll34 m*:m%Am lll0 l++l03l=<l=m