B @`#@s ddlmZmZddlZddlZddlmmZddl m Z m Z m Z m Z ejddgdddZejd d d d d dddgdddZejddddgdddZejdddddddd d!d"g dd#d$Zejd%d&d'd(gdd)d*Zejddgdd+d,Zejdd-gdd.d/Zejddgdd0d1Zejddgdd2d3Zejddgdd4d5Zejddgdd6d7Zejddgdd8d9Zejejd:ed:d;d<d=gdd>d?Zejejd@ed:d;d<dAdBgddCdDZdEdFZejeddGdHZ ejdIdJZ!ejdKdLZ"ejdMed-dNgddOdPZ#ejdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_ejd`ej$%dad<gddbdcZ&eje dddegd-ddgdfddgdgd-ggd-dgdhe dddegd-ddgdfddgdgd-ggd-d-gdhe dddegd-ddgdfddgdgd-ggdidigdhe dddegd-ddgdfddgdgd-ggdjdgdhe dddegd-ddgdfddgdgd-ggdkd-gdhe dddegd-ddgdfddgdgd-ggdid-gdhe dldmgdjdlgdndlgdodjggd-dkgdhe dddmgd-dlgdfdlgdgdjggddjgdhe dddegd-ddgdfddgdgdjggdjdpgdhg ddqdrZ'ejdsdtZ(ejdudvZ)dS)w)datetime timedeltaN) DataFrameSeries bdate_rangenotnaTF)paramscCs|jS)z&raw keyword argument for rolling.apply)param)requestr @/tmp/pip-unpacked-wheel-q9tj5l6a/pandas/tests/window/conftest.pyraw sr ZtriangZblackmanZhammingZbartlettZbohmanZblackmanharrisZnuttallZbarthanncCs|jS)N)r )r r r r win_typess rZkaiserZgaussianZgeneral_gaussianZ exponentialcCs|jS)N)r )r r r r win_types_special!srsumZmeanZmedianmaxminvarZstdZkurtZskewcountcCs|jS)N)r )r r r r arithmetic_win_operators&srrightleftZbothZneithercCs|jS)N)r )r r r r closed8srcCs|jS)N)r )r r r r center=srcCs|jS)N)r )r r r r min_periodsBsrcCs|jS)z'parallel keyword argument for numba.jit)r )r r r r parallelGsrcCs|jS)z$nogil keyword argument for numba.jit)r )r r r r nogilMsrcCs|jS)z'nopython keyword argument for numba.jit)r )r r r r nopythonSsrcCs|jS)zadjust keyword argument for ewm)r )r r r r adjustYsrcCs|jS)z"ignore_na keyword argument for ewm)r )r r r r ignore_na_sr numbaz0.46.0)ZmarkscythoncCs|jS)z)engine keyword argument for rolling.apply)r )r r r r enginees r#)r!T)r"T)r"FcCs|jS)z2engine and raw keyword arguments for rolling.apply)r )r r r r engine_and_rawrs r$csDddfdd}dddd|}fd d |DS) NcSsttdttjgttjtjgtdgttjdgtdtjgtddgtddgtddgtddddtjtjtjddtjtjg ttjdddtjtjtjddtjtjg ttjtjddtjtjtjddtjtjg ttjdtjddddtjtjdd d d d gttjdtjddd dtjtjdd d d d gtddtjddddtjtjdd d d d gtddtjddd dtjtjdd d d d gttdttdddgS)N)Zdtypeg@g?g@g@g@g@g@g(@g*@g,@g.@gg"@ r)robjectnpnanranger r r r create_seriess      $ z/_create_consistency_data..create_seriesc s~ttdgdtddgdtddgdttddttddttdddddd d gdgd d DS) Na)columnsbr%))r0r0cdcSsg|] }t|qSr )r).0sr r r szG_create_consistency_data..create_dataframes..)rr)arangeZreshaper )r,r r create_dataframess   "z3_create_consistency_data..create_dataframescSs$|jd}tt|t|dkS)NKr)valuesZravellensetr)xr;r r r is_constants z-_create_consistency_data..is_constantcSs|S)N)rall)r>r r r no_nanssz)_create_consistency_data..no_nanscsg|]}|||fqSr r )r5r>)r?rAr r r7 sz,_create_consistency_data..r )r9datar )r,r?rAr _create_consistency_datas x  rCcCs|jS)zCreate consistency data)r )r r r r consistency_datasrDcCs.ttjddttdddddtddS)zMake mocked frame as fixture.dr%ir)periods)indexr.)rr)randomrandnrrr8r r r r frames rJcCsBtjd}tdd}tj||<t|ttdddddd}|S)zMake mocked series as fixture.rEr&(ir)rF)rG)r)rHrIr8NaNrrr)ZarrZlocsseriesr r r rM s    rMz1 day)dayscCs|jS)z2Halflife argument for EWM when times is specified.)r )r r r r halflife_with_times*srOr(categoryZint8Zint16Zint32Zint64Zuint8Zuint16Zuint32Zuint64Zfloat16Zfloat32Zfloat64zm8[ns]zM8[ns]zdatetime64[ns, UTC]zKdirect creation of extension dtype datetime64[ns, UTC] is not supported ATMcCs|jS)zDtypes for window tests)r )r r r r dtypes0srQr1r0)r.Cg?gg@g@g@g @XcCs|jS)zPairwise frames test_pairwise)r )r r r r pairwise_framesOsrVcCs(tddgddgddgddggddgdS)z'Pairwise target frame for test_pairwiser1rRrr0rSr)r.)rr r r r pairwise_target_frameasrWcCs2tdddgdddgdddgdddggdddgd S) z&Pairwise other frame for test_pairwiseNrr1rSYZrU)r.)rr r r r pairwise_other_framegs"r[)*rrZnumpyr)ZpytestZpandas.util._test_decoratorsutilZ_test_decoratorstdZpandasrrrrZfixturer rrrrrrrrrrr r Z skip_if_nor#r$rCrDrJrMrOmarkskiprQrVrWr[r r r r s    &&&&&&&&6