_ufuncs.pyx 835 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949
  1. # This file is automatically generated by _generate_pyx.py.
  2. # Do not edit manually!
  3. from libc.math cimport NAN
  4. include "_ufuncs_extra_code_common.pxi"
  5. include "_ufuncs_extra_code.pxi"
  6. __all__ = ['agm', 'airy', 'airye', 'bdtr', 'bdtrc', 'bdtri', 'bdtrik', 'bdtrin', 'bei', 'beip', 'ber', 'berp', 'besselpoly', 'beta', 'betainc', 'betaincinv', 'betaln', 'binom', 'boxcox', 'boxcox1p', 'btdtr', 'btdtri', 'btdtria', 'btdtrib', 'cbrt', 'chdtr', 'chdtrc', 'chdtri', 'chdtriv', 'chndtr', 'chndtridf', 'chndtrinc', 'chndtrix', 'cosdg', 'cosm1', 'cotdg', 'dawsn', 'ellipe', 'ellipeinc', 'ellipj', 'ellipk', 'ellipkinc', 'ellipkm1', 'elliprc', 'elliprd', 'elliprf', 'elliprg', 'elliprj', 'entr', 'erf', 'erfc', 'erfcinv', 'erfcx', 'erfi', 'erfinv', 'eval_chebyc', 'eval_chebys', 'eval_chebyt', 'eval_chebyu', 'eval_gegenbauer', 'eval_genlaguerre', 'eval_hermite', 'eval_hermitenorm', 'eval_jacobi', 'eval_laguerre', 'eval_legendre', 'eval_sh_chebyt', 'eval_sh_chebyu', 'eval_sh_jacobi', 'eval_sh_legendre', 'exp1', 'exp10', 'exp2', 'expi', 'expit', 'expm1', 'expn', 'exprel', 'fdtr', 'fdtrc', 'fdtri', 'fdtridfd', 'fresnel', 'gamma', 'gammainc', 'gammaincc', 'gammainccinv', 'gammaincinv', 'gammaln', 'gammasgn', 'gdtr', 'gdtrc', 'gdtria', 'gdtrib', 'gdtrix', 'hankel1', 'hankel1e', 'hankel2', 'hankel2e', 'huber', 'hyp0f1', 'hyp1f1', 'hyp2f1', 'hyperu', 'i0', 'i0e', 'i1', 'i1e', 'inv_boxcox', 'inv_boxcox1p', 'it2i0k0', 'it2j0y0', 'it2struve0', 'itairy', 'iti0k0', 'itj0y0', 'itmodstruve0', 'itstruve0', 'iv', 'ive', 'j0', 'j1', 'jv', 'jve', 'k0', 'k0e', 'k1', 'k1e', 'kei', 'keip', 'kelvin', 'ker', 'kerp', 'kl_div', 'kn', 'kolmogi', 'kolmogorov', 'kv', 'kve', 'log1p', 'log_expit', 'log_ndtr', 'loggamma', 'logit', 'lpmv', 'mathieu_a', 'mathieu_b', 'mathieu_cem', 'mathieu_modcem1', 'mathieu_modcem2', 'mathieu_modsem1', 'mathieu_modsem2', 'mathieu_sem', 'modfresnelm', 'modfresnelp', 'modstruve', 'nbdtr', 'nbdtrc', 'nbdtri', 'nbdtrik', 'nbdtrin', 'ncfdtr', 'ncfdtri', 'ncfdtridfd', 'ncfdtridfn', 'ncfdtrinc', 'nctdtr', 'nctdtridf', 'nctdtrinc', 'nctdtrit', 'ndtr', 'ndtri', 'ndtri_exp', 'nrdtrimn', 'nrdtrisd', 'obl_ang1', 'obl_ang1_cv', 'obl_cv', 'obl_rad1', 'obl_rad1_cv', 'obl_rad2', 'obl_rad2_cv', 'owens_t', 'pbdv', 'pbvv', 'pbwa', 'pdtr', 'pdtrc', 'pdtri', 'pdtrik', 'poch', 'powm1', 'pro_ang1', 'pro_ang1_cv', 'pro_cv', 'pro_rad1', 'pro_rad1_cv', 'pro_rad2', 'pro_rad2_cv', 'pseudo_huber', 'psi', 'radian', 'rel_entr', 'rgamma', 'round', 'shichi', 'sici', 'sindg', 'smirnov', 'smirnovi', 'spence', 'sph_harm', 'stdtr', 'stdtridf', 'stdtrit', 'struve', 'tandg', 'tklmbda', 'voigt_profile', 'wofz', 'wright_bessel', 'wrightomega', 'xlog1py', 'xlogy', 'y0', 'y1', 'yn', 'yv', 'yve', 'zetac', 'geterr', 'seterr', 'errstate', 'jn']
  7. cdef void loop_D_DDDD__As_DDDD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  8. cdef np.npy_intp i, n = dims[0]
  9. cdef void *func = (<void**>data)[0]
  10. cdef char *func_name = <char*>(<void**>data)[1]
  11. cdef char *ip0 = args[0]
  12. cdef char *ip1 = args[1]
  13. cdef char *ip2 = args[2]
  14. cdef char *ip3 = args[3]
  15. cdef char *op0 = args[4]
  16. cdef double complex ov0
  17. for i in range(n):
  18. ov0 = (<double complex(*)(double complex, double complex, double complex, double complex) nogil>func)(<double complex>(<double complex*>ip0)[0], <double complex>(<double complex*>ip1)[0], <double complex>(<double complex*>ip2)[0], <double complex>(<double complex*>ip3)[0])
  19. (<double complex *>op0)[0] = <double complex>ov0
  20. ip0 += steps[0]
  21. ip1 += steps[1]
  22. ip2 += steps[2]
  23. ip3 += steps[3]
  24. op0 += steps[4]
  25. sf_error.check_fpe(func_name)
  26. cdef void loop_D_DDDD__As_FFFF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  27. cdef np.npy_intp i, n = dims[0]
  28. cdef void *func = (<void**>data)[0]
  29. cdef char *func_name = <char*>(<void**>data)[1]
  30. cdef char *ip0 = args[0]
  31. cdef char *ip1 = args[1]
  32. cdef char *ip2 = args[2]
  33. cdef char *ip3 = args[3]
  34. cdef char *op0 = args[4]
  35. cdef double complex ov0
  36. for i in range(n):
  37. ov0 = (<double complex(*)(double complex, double complex, double complex, double complex) nogil>func)(<double complex>(<float complex*>ip0)[0], <double complex>(<float complex*>ip1)[0], <double complex>(<float complex*>ip2)[0], <double complex>(<float complex*>ip3)[0])
  38. (<float complex *>op0)[0] = <float complex>ov0
  39. ip0 += steps[0]
  40. ip1 += steps[1]
  41. ip2 += steps[2]
  42. ip3 += steps[3]
  43. op0 += steps[4]
  44. sf_error.check_fpe(func_name)
  45. cdef void loop_D_DDD__As_DDD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  46. cdef np.npy_intp i, n = dims[0]
  47. cdef void *func = (<void**>data)[0]
  48. cdef char *func_name = <char*>(<void**>data)[1]
  49. cdef char *ip0 = args[0]
  50. cdef char *ip1 = args[1]
  51. cdef char *ip2 = args[2]
  52. cdef char *op0 = args[3]
  53. cdef double complex ov0
  54. for i in range(n):
  55. ov0 = (<double complex(*)(double complex, double complex, double complex) nogil>func)(<double complex>(<double complex*>ip0)[0], <double complex>(<double complex*>ip1)[0], <double complex>(<double complex*>ip2)[0])
  56. (<double complex *>op0)[0] = <double complex>ov0
  57. ip0 += steps[0]
  58. ip1 += steps[1]
  59. ip2 += steps[2]
  60. op0 += steps[3]
  61. sf_error.check_fpe(func_name)
  62. cdef void loop_D_DDD__As_FFF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  63. cdef np.npy_intp i, n = dims[0]
  64. cdef void *func = (<void**>data)[0]
  65. cdef char *func_name = <char*>(<void**>data)[1]
  66. cdef char *ip0 = args[0]
  67. cdef char *ip1 = args[1]
  68. cdef char *ip2 = args[2]
  69. cdef char *op0 = args[3]
  70. cdef double complex ov0
  71. for i in range(n):
  72. ov0 = (<double complex(*)(double complex, double complex, double complex) nogil>func)(<double complex>(<float complex*>ip0)[0], <double complex>(<float complex*>ip1)[0], <double complex>(<float complex*>ip2)[0])
  73. (<float complex *>op0)[0] = <float complex>ov0
  74. ip0 += steps[0]
  75. ip1 += steps[1]
  76. ip2 += steps[2]
  77. op0 += steps[3]
  78. sf_error.check_fpe(func_name)
  79. cdef void loop_D_DD__As_DD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  80. cdef np.npy_intp i, n = dims[0]
  81. cdef void *func = (<void**>data)[0]
  82. cdef char *func_name = <char*>(<void**>data)[1]
  83. cdef char *ip0 = args[0]
  84. cdef char *ip1 = args[1]
  85. cdef char *op0 = args[2]
  86. cdef double complex ov0
  87. for i in range(n):
  88. ov0 = (<double complex(*)(double complex, double complex) nogil>func)(<double complex>(<double complex*>ip0)[0], <double complex>(<double complex*>ip1)[0])
  89. (<double complex *>op0)[0] = <double complex>ov0
  90. ip0 += steps[0]
  91. ip1 += steps[1]
  92. op0 += steps[2]
  93. sf_error.check_fpe(func_name)
  94. cdef void loop_D_DD__As_FF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  95. cdef np.npy_intp i, n = dims[0]
  96. cdef void *func = (<void**>data)[0]
  97. cdef char *func_name = <char*>(<void**>data)[1]
  98. cdef char *ip0 = args[0]
  99. cdef char *ip1 = args[1]
  100. cdef char *op0 = args[2]
  101. cdef double complex ov0
  102. for i in range(n):
  103. ov0 = (<double complex(*)(double complex, double complex) nogil>func)(<double complex>(<float complex*>ip0)[0], <double complex>(<float complex*>ip1)[0])
  104. (<float complex *>op0)[0] = <float complex>ov0
  105. ip0 += steps[0]
  106. ip1 += steps[1]
  107. op0 += steps[2]
  108. sf_error.check_fpe(func_name)
  109. cdef void loop_D_D__As_D_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  110. cdef np.npy_intp i, n = dims[0]
  111. cdef void *func = (<void**>data)[0]
  112. cdef char *func_name = <char*>(<void**>data)[1]
  113. cdef char *ip0 = args[0]
  114. cdef char *op0 = args[1]
  115. cdef double complex ov0
  116. for i in range(n):
  117. ov0 = (<double complex(*)(double complex) nogil>func)(<double complex>(<double complex*>ip0)[0])
  118. (<double complex *>op0)[0] = <double complex>ov0
  119. ip0 += steps[0]
  120. op0 += steps[1]
  121. sf_error.check_fpe(func_name)
  122. cdef void loop_D_D__As_F_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  123. cdef np.npy_intp i, n = dims[0]
  124. cdef void *func = (<void**>data)[0]
  125. cdef char *func_name = <char*>(<void**>data)[1]
  126. cdef char *ip0 = args[0]
  127. cdef char *op0 = args[1]
  128. cdef double complex ov0
  129. for i in range(n):
  130. ov0 = (<double complex(*)(double complex) nogil>func)(<double complex>(<float complex*>ip0)[0])
  131. (<float complex *>op0)[0] = <float complex>ov0
  132. ip0 += steps[0]
  133. op0 += steps[1]
  134. sf_error.check_fpe(func_name)
  135. cdef void loop_D_Dld__As_Dld_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  136. cdef np.npy_intp i, n = dims[0]
  137. cdef void *func = (<void**>data)[0]
  138. cdef char *func_name = <char*>(<void**>data)[1]
  139. cdef char *ip0 = args[0]
  140. cdef char *ip1 = args[1]
  141. cdef char *ip2 = args[2]
  142. cdef char *op0 = args[3]
  143. cdef double complex ov0
  144. for i in range(n):
  145. ov0 = (<double complex(*)(double complex, long, double) nogil>func)(<double complex>(<double complex*>ip0)[0], <long>(<long*>ip1)[0], <double>(<double*>ip2)[0])
  146. (<double complex *>op0)[0] = <double complex>ov0
  147. ip0 += steps[0]
  148. ip1 += steps[1]
  149. ip2 += steps[2]
  150. op0 += steps[3]
  151. sf_error.check_fpe(func_name)
  152. cdef void loop_D_dD__As_dD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  153. cdef np.npy_intp i, n = dims[0]
  154. cdef void *func = (<void**>data)[0]
  155. cdef char *func_name = <char*>(<void**>data)[1]
  156. cdef char *ip0 = args[0]
  157. cdef char *ip1 = args[1]
  158. cdef char *op0 = args[2]
  159. cdef double complex ov0
  160. for i in range(n):
  161. ov0 = (<double complex(*)(double, double complex) nogil>func)(<double>(<double*>ip0)[0], <double complex>(<double complex*>ip1)[0])
  162. (<double complex *>op0)[0] = <double complex>ov0
  163. ip0 += steps[0]
  164. ip1 += steps[1]
  165. op0 += steps[2]
  166. sf_error.check_fpe(func_name)
  167. cdef void loop_D_dD__As_fF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  168. cdef np.npy_intp i, n = dims[0]
  169. cdef void *func = (<void**>data)[0]
  170. cdef char *func_name = <char*>(<void**>data)[1]
  171. cdef char *ip0 = args[0]
  172. cdef char *ip1 = args[1]
  173. cdef char *op0 = args[2]
  174. cdef double complex ov0
  175. for i in range(n):
  176. ov0 = (<double complex(*)(double, double complex) nogil>func)(<double>(<float*>ip0)[0], <double complex>(<float complex*>ip1)[0])
  177. (<float complex *>op0)[0] = <float complex>ov0
  178. ip0 += steps[0]
  179. ip1 += steps[1]
  180. op0 += steps[2]
  181. sf_error.check_fpe(func_name)
  182. cdef void loop_D_ddD__As_ddD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  183. cdef np.npy_intp i, n = dims[0]
  184. cdef void *func = (<void**>data)[0]
  185. cdef char *func_name = <char*>(<void**>data)[1]
  186. cdef char *ip0 = args[0]
  187. cdef char *ip1 = args[1]
  188. cdef char *ip2 = args[2]
  189. cdef char *op0 = args[3]
  190. cdef double complex ov0
  191. for i in range(n):
  192. ov0 = (<double complex(*)(double, double, double complex) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double complex>(<double complex*>ip2)[0])
  193. (<double complex *>op0)[0] = <double complex>ov0
  194. ip0 += steps[0]
  195. ip1 += steps[1]
  196. ip2 += steps[2]
  197. op0 += steps[3]
  198. sf_error.check_fpe(func_name)
  199. cdef void loop_D_ddD__As_ffF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  200. cdef np.npy_intp i, n = dims[0]
  201. cdef void *func = (<void**>data)[0]
  202. cdef char *func_name = <char*>(<void**>data)[1]
  203. cdef char *ip0 = args[0]
  204. cdef char *ip1 = args[1]
  205. cdef char *ip2 = args[2]
  206. cdef char *op0 = args[3]
  207. cdef double complex ov0
  208. for i in range(n):
  209. ov0 = (<double complex(*)(double, double, double complex) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double complex>(<float complex*>ip2)[0])
  210. (<float complex *>op0)[0] = <float complex>ov0
  211. ip0 += steps[0]
  212. ip1 += steps[1]
  213. ip2 += steps[2]
  214. op0 += steps[3]
  215. sf_error.check_fpe(func_name)
  216. cdef void loop_D_dddD__As_dddD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  217. cdef np.npy_intp i, n = dims[0]
  218. cdef void *func = (<void**>data)[0]
  219. cdef char *func_name = <char*>(<void**>data)[1]
  220. cdef char *ip0 = args[0]
  221. cdef char *ip1 = args[1]
  222. cdef char *ip2 = args[2]
  223. cdef char *ip3 = args[3]
  224. cdef char *op0 = args[4]
  225. cdef double complex ov0
  226. for i in range(n):
  227. ov0 = (<double complex(*)(double, double, double, double complex) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double complex>(<double complex*>ip3)[0])
  228. (<double complex *>op0)[0] = <double complex>ov0
  229. ip0 += steps[0]
  230. ip1 += steps[1]
  231. ip2 += steps[2]
  232. ip3 += steps[3]
  233. op0 += steps[4]
  234. sf_error.check_fpe(func_name)
  235. cdef void loop_D_dddD__As_fffF_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  236. cdef np.npy_intp i, n = dims[0]
  237. cdef void *func = (<void**>data)[0]
  238. cdef char *func_name = <char*>(<void**>data)[1]
  239. cdef char *ip0 = args[0]
  240. cdef char *ip1 = args[1]
  241. cdef char *ip2 = args[2]
  242. cdef char *ip3 = args[3]
  243. cdef char *op0 = args[4]
  244. cdef double complex ov0
  245. for i in range(n):
  246. ov0 = (<double complex(*)(double, double, double, double complex) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double complex>(<float complex*>ip3)[0])
  247. (<float complex *>op0)[0] = <float complex>ov0
  248. ip0 += steps[0]
  249. ip1 += steps[1]
  250. ip2 += steps[2]
  251. ip3 += steps[3]
  252. op0 += steps[4]
  253. sf_error.check_fpe(func_name)
  254. cdef void loop_D_dddd__As_dddd_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  255. cdef np.npy_intp i, n = dims[0]
  256. cdef void *func = (<void**>data)[0]
  257. cdef char *func_name = <char*>(<void**>data)[1]
  258. cdef char *ip0 = args[0]
  259. cdef char *ip1 = args[1]
  260. cdef char *ip2 = args[2]
  261. cdef char *ip3 = args[3]
  262. cdef char *op0 = args[4]
  263. cdef double complex ov0
  264. for i in range(n):
  265. ov0 = (<double complex(*)(double, double, double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0])
  266. (<double complex *>op0)[0] = <double complex>ov0
  267. ip0 += steps[0]
  268. ip1 += steps[1]
  269. ip2 += steps[2]
  270. ip3 += steps[3]
  271. op0 += steps[4]
  272. sf_error.check_fpe(func_name)
  273. cdef void loop_D_dddd__As_ffff_F(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  274. cdef np.npy_intp i, n = dims[0]
  275. cdef void *func = (<void**>data)[0]
  276. cdef char *func_name = <char*>(<void**>data)[1]
  277. cdef char *ip0 = args[0]
  278. cdef char *ip1 = args[1]
  279. cdef char *ip2 = args[2]
  280. cdef char *ip3 = args[3]
  281. cdef char *op0 = args[4]
  282. cdef double complex ov0
  283. for i in range(n):
  284. ov0 = (<double complex(*)(double, double, double, double) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double>(<float*>ip3)[0])
  285. (<float complex *>op0)[0] = <float complex>ov0
  286. ip0 += steps[0]
  287. ip1 += steps[1]
  288. ip2 += steps[2]
  289. ip3 += steps[3]
  290. op0 += steps[4]
  291. sf_error.check_fpe(func_name)
  292. cdef void loop_D_iidd__As_lldd_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  293. cdef np.npy_intp i, n = dims[0]
  294. cdef void *func = (<void**>data)[0]
  295. cdef char *func_name = <char*>(<void**>data)[1]
  296. cdef char *ip0 = args[0]
  297. cdef char *ip1 = args[1]
  298. cdef char *ip2 = args[2]
  299. cdef char *ip3 = args[3]
  300. cdef char *op0 = args[4]
  301. cdef double complex ov0
  302. for i in range(n):
  303. if <int>(<long*>ip0)[0] == (<long*>ip0)[0] and <int>(<long*>ip1)[0] == (<long*>ip1)[0]:
  304. ov0 = (<double complex(*)(int, int, double, double) nogil>func)(<int>(<long*>ip0)[0], <int>(<long*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0])
  305. else:
  306. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  307. ov0 = <double complex>NAN
  308. (<double complex *>op0)[0] = <double complex>ov0
  309. ip0 += steps[0]
  310. ip1 += steps[1]
  311. ip2 += steps[2]
  312. ip3 += steps[3]
  313. op0 += steps[4]
  314. sf_error.check_fpe(func_name)
  315. cdef void loop_D_lD__As_lD_D(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  316. cdef np.npy_intp i, n = dims[0]
  317. cdef void *func = (<void**>data)[0]
  318. cdef char *func_name = <char*>(<void**>data)[1]
  319. cdef char *ip0 = args[0]
  320. cdef char *ip1 = args[1]
  321. cdef char *op0 = args[2]
  322. cdef double complex ov0
  323. for i in range(n):
  324. ov0 = (<double complex(*)(long, double complex) nogil>func)(<long>(<long*>ip0)[0], <double complex>(<double complex*>ip1)[0])
  325. (<double complex *>op0)[0] = <double complex>ov0
  326. ip0 += steps[0]
  327. ip1 += steps[1]
  328. op0 += steps[2]
  329. sf_error.check_fpe(func_name)
  330. cdef void loop_d_d__As_d_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  331. cdef np.npy_intp i, n = dims[0]
  332. cdef void *func = (<void**>data)[0]
  333. cdef char *func_name = <char*>(<void**>data)[1]
  334. cdef char *ip0 = args[0]
  335. cdef char *op0 = args[1]
  336. cdef double ov0
  337. for i in range(n):
  338. ov0 = (<double(*)(double) nogil>func)(<double>(<double*>ip0)[0])
  339. (<double *>op0)[0] = <double>ov0
  340. ip0 += steps[0]
  341. op0 += steps[1]
  342. sf_error.check_fpe(func_name)
  343. cdef void loop_d_d__As_f_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  344. cdef np.npy_intp i, n = dims[0]
  345. cdef void *func = (<void**>data)[0]
  346. cdef char *func_name = <char*>(<void**>data)[1]
  347. cdef char *ip0 = args[0]
  348. cdef char *op0 = args[1]
  349. cdef double ov0
  350. for i in range(n):
  351. ov0 = (<double(*)(double) nogil>func)(<double>(<float*>ip0)[0])
  352. (<float *>op0)[0] = <float>ov0
  353. ip0 += steps[0]
  354. op0 += steps[1]
  355. sf_error.check_fpe(func_name)
  356. cdef void loop_d_dd__As_dd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  357. cdef np.npy_intp i, n = dims[0]
  358. cdef void *func = (<void**>data)[0]
  359. cdef char *func_name = <char*>(<void**>data)[1]
  360. cdef char *ip0 = args[0]
  361. cdef char *ip1 = args[1]
  362. cdef char *op0 = args[2]
  363. cdef double ov0
  364. for i in range(n):
  365. ov0 = (<double(*)(double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0])
  366. (<double *>op0)[0] = <double>ov0
  367. ip0 += steps[0]
  368. ip1 += steps[1]
  369. op0 += steps[2]
  370. sf_error.check_fpe(func_name)
  371. cdef void loop_d_dd__As_ff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  372. cdef np.npy_intp i, n = dims[0]
  373. cdef void *func = (<void**>data)[0]
  374. cdef char *func_name = <char*>(<void**>data)[1]
  375. cdef char *ip0 = args[0]
  376. cdef char *ip1 = args[1]
  377. cdef char *op0 = args[2]
  378. cdef double ov0
  379. for i in range(n):
  380. ov0 = (<double(*)(double, double) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0])
  381. (<float *>op0)[0] = <float>ov0
  382. ip0 += steps[0]
  383. ip1 += steps[1]
  384. op0 += steps[2]
  385. sf_error.check_fpe(func_name)
  386. cdef void loop_d_ddd__As_ddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  387. cdef np.npy_intp i, n = dims[0]
  388. cdef void *func = (<void**>data)[0]
  389. cdef char *func_name = <char*>(<void**>data)[1]
  390. cdef char *ip0 = args[0]
  391. cdef char *ip1 = args[1]
  392. cdef char *ip2 = args[2]
  393. cdef char *op0 = args[3]
  394. cdef double ov0
  395. for i in range(n):
  396. ov0 = (<double(*)(double, double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0])
  397. (<double *>op0)[0] = <double>ov0
  398. ip0 += steps[0]
  399. ip1 += steps[1]
  400. ip2 += steps[2]
  401. op0 += steps[3]
  402. sf_error.check_fpe(func_name)
  403. cdef void loop_d_ddd__As_fff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  404. cdef np.npy_intp i, n = dims[0]
  405. cdef void *func = (<void**>data)[0]
  406. cdef char *func_name = <char*>(<void**>data)[1]
  407. cdef char *ip0 = args[0]
  408. cdef char *ip1 = args[1]
  409. cdef char *ip2 = args[2]
  410. cdef char *op0 = args[3]
  411. cdef double ov0
  412. for i in range(n):
  413. ov0 = (<double(*)(double, double, double) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0])
  414. (<float *>op0)[0] = <float>ov0
  415. ip0 += steps[0]
  416. ip1 += steps[1]
  417. ip2 += steps[2]
  418. op0 += steps[3]
  419. sf_error.check_fpe(func_name)
  420. cdef void loop_d_dddd__As_dddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  421. cdef np.npy_intp i, n = dims[0]
  422. cdef void *func = (<void**>data)[0]
  423. cdef char *func_name = <char*>(<void**>data)[1]
  424. cdef char *ip0 = args[0]
  425. cdef char *ip1 = args[1]
  426. cdef char *ip2 = args[2]
  427. cdef char *ip3 = args[3]
  428. cdef char *op0 = args[4]
  429. cdef double ov0
  430. for i in range(n):
  431. ov0 = (<double(*)(double, double, double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0])
  432. (<double *>op0)[0] = <double>ov0
  433. ip0 += steps[0]
  434. ip1 += steps[1]
  435. ip2 += steps[2]
  436. ip3 += steps[3]
  437. op0 += steps[4]
  438. sf_error.check_fpe(func_name)
  439. cdef void loop_d_dddd__As_ffff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  440. cdef np.npy_intp i, n = dims[0]
  441. cdef void *func = (<void**>data)[0]
  442. cdef char *func_name = <char*>(<void**>data)[1]
  443. cdef char *ip0 = args[0]
  444. cdef char *ip1 = args[1]
  445. cdef char *ip2 = args[2]
  446. cdef char *ip3 = args[3]
  447. cdef char *op0 = args[4]
  448. cdef double ov0
  449. for i in range(n):
  450. ov0 = (<double(*)(double, double, double, double) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double>(<float*>ip3)[0])
  451. (<float *>op0)[0] = <float>ov0
  452. ip0 += steps[0]
  453. ip1 += steps[1]
  454. ip2 += steps[2]
  455. ip3 += steps[3]
  456. op0 += steps[4]
  457. sf_error.check_fpe(func_name)
  458. cdef void loop_d_dddd_d_As_dddd_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  459. cdef np.npy_intp i, n = dims[0]
  460. cdef void *func = (<void**>data)[0]
  461. cdef char *func_name = <char*>(<void**>data)[1]
  462. cdef char *ip0 = args[0]
  463. cdef char *ip1 = args[1]
  464. cdef char *ip2 = args[2]
  465. cdef char *ip3 = args[3]
  466. cdef char *op0 = args[4]
  467. cdef char *op1 = args[5]
  468. cdef double ov0
  469. cdef double ov1
  470. for i in range(n):
  471. ov0 = (<double(*)(double, double, double, double, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0], &ov1)
  472. (<double *>op0)[0] = <double>ov0
  473. (<double *>op1)[0] = <double>ov1
  474. ip0 += steps[0]
  475. ip1 += steps[1]
  476. ip2 += steps[2]
  477. ip3 += steps[3]
  478. op0 += steps[4]
  479. op1 += steps[5]
  480. sf_error.check_fpe(func_name)
  481. cdef void loop_d_dddd_d_As_ffff_ff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  482. cdef np.npy_intp i, n = dims[0]
  483. cdef void *func = (<void**>data)[0]
  484. cdef char *func_name = <char*>(<void**>data)[1]
  485. cdef char *ip0 = args[0]
  486. cdef char *ip1 = args[1]
  487. cdef char *ip2 = args[2]
  488. cdef char *ip3 = args[3]
  489. cdef char *op0 = args[4]
  490. cdef char *op1 = args[5]
  491. cdef double ov0
  492. cdef double ov1
  493. for i in range(n):
  494. ov0 = (<double(*)(double, double, double, double, double *) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double>(<float*>ip3)[0], &ov1)
  495. (<float *>op0)[0] = <float>ov0
  496. (<float *>op1)[0] = <float>ov1
  497. ip0 += steps[0]
  498. ip1 += steps[1]
  499. ip2 += steps[2]
  500. ip3 += steps[3]
  501. op0 += steps[4]
  502. op1 += steps[5]
  503. sf_error.check_fpe(func_name)
  504. cdef void loop_d_ddddddd__As_ddddddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  505. cdef np.npy_intp i, n = dims[0]
  506. cdef void *func = (<void**>data)[0]
  507. cdef char *func_name = <char*>(<void**>data)[1]
  508. cdef char *ip0 = args[0]
  509. cdef char *ip1 = args[1]
  510. cdef char *ip2 = args[2]
  511. cdef char *ip3 = args[3]
  512. cdef char *ip4 = args[4]
  513. cdef char *ip5 = args[5]
  514. cdef char *ip6 = args[6]
  515. cdef char *op0 = args[7]
  516. cdef double ov0
  517. for i in range(n):
  518. ov0 = (<double(*)(double, double, double, double, double, double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0], <double>(<double*>ip4)[0], <double>(<double*>ip5)[0], <double>(<double*>ip6)[0])
  519. (<double *>op0)[0] = <double>ov0
  520. ip0 += steps[0]
  521. ip1 += steps[1]
  522. ip2 += steps[2]
  523. ip3 += steps[3]
  524. ip4 += steps[4]
  525. ip5 += steps[5]
  526. ip6 += steps[6]
  527. op0 += steps[7]
  528. sf_error.check_fpe(func_name)
  529. cdef void loop_d_ddddddd__As_fffffff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  530. cdef np.npy_intp i, n = dims[0]
  531. cdef void *func = (<void**>data)[0]
  532. cdef char *func_name = <char*>(<void**>data)[1]
  533. cdef char *ip0 = args[0]
  534. cdef char *ip1 = args[1]
  535. cdef char *ip2 = args[2]
  536. cdef char *ip3 = args[3]
  537. cdef char *ip4 = args[4]
  538. cdef char *ip5 = args[5]
  539. cdef char *ip6 = args[6]
  540. cdef char *op0 = args[7]
  541. cdef double ov0
  542. for i in range(n):
  543. ov0 = (<double(*)(double, double, double, double, double, double, double) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double>(<float*>ip3)[0], <double>(<float*>ip4)[0], <double>(<float*>ip5)[0], <double>(<float*>ip6)[0])
  544. (<float *>op0)[0] = <float>ov0
  545. ip0 += steps[0]
  546. ip1 += steps[1]
  547. ip2 += steps[2]
  548. ip3 += steps[3]
  549. ip4 += steps[4]
  550. ip5 += steps[5]
  551. ip6 += steps[6]
  552. op0 += steps[7]
  553. sf_error.check_fpe(func_name)
  554. cdef void loop_d_ddi_d_As_ddl_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  555. cdef np.npy_intp i, n = dims[0]
  556. cdef void *func = (<void**>data)[0]
  557. cdef char *func_name = <char*>(<void**>data)[1]
  558. cdef char *ip0 = args[0]
  559. cdef char *ip1 = args[1]
  560. cdef char *ip2 = args[2]
  561. cdef char *op0 = args[3]
  562. cdef char *op1 = args[4]
  563. cdef double ov0
  564. cdef double ov1
  565. for i in range(n):
  566. if <int>(<long*>ip2)[0] == (<long*>ip2)[0]:
  567. ov0 = (<double(*)(double, double, int, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <int>(<long*>ip2)[0], &ov1)
  568. else:
  569. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  570. ov0 = <double>NAN
  571. ov1 = <double>NAN
  572. (<double *>op0)[0] = <double>ov0
  573. (<double *>op1)[0] = <double>ov1
  574. ip0 += steps[0]
  575. ip1 += steps[1]
  576. ip2 += steps[2]
  577. op0 += steps[3]
  578. op1 += steps[4]
  579. sf_error.check_fpe(func_name)
  580. cdef void loop_d_ddiiddd__As_ddllddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  581. cdef np.npy_intp i, n = dims[0]
  582. cdef void *func = (<void**>data)[0]
  583. cdef char *func_name = <char*>(<void**>data)[1]
  584. cdef char *ip0 = args[0]
  585. cdef char *ip1 = args[1]
  586. cdef char *ip2 = args[2]
  587. cdef char *ip3 = args[3]
  588. cdef char *ip4 = args[4]
  589. cdef char *ip5 = args[5]
  590. cdef char *ip6 = args[6]
  591. cdef char *op0 = args[7]
  592. cdef double ov0
  593. for i in range(n):
  594. if <int>(<long*>ip2)[0] == (<long*>ip2)[0] and <int>(<long*>ip3)[0] == (<long*>ip3)[0]:
  595. ov0 = (<double(*)(double, double, int, int, double, double, double) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <int>(<long*>ip2)[0], <int>(<long*>ip3)[0], <double>(<double*>ip4)[0], <double>(<double*>ip5)[0], <double>(<double*>ip6)[0])
  596. else:
  597. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  598. ov0 = <double>NAN
  599. (<double *>op0)[0] = <double>ov0
  600. ip0 += steps[0]
  601. ip1 += steps[1]
  602. ip2 += steps[2]
  603. ip3 += steps[3]
  604. ip4 += steps[4]
  605. ip5 += steps[5]
  606. ip6 += steps[6]
  607. op0 += steps[7]
  608. sf_error.check_fpe(func_name)
  609. cdef void loop_d_did__As_dld_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  610. cdef np.npy_intp i, n = dims[0]
  611. cdef void *func = (<void**>data)[0]
  612. cdef char *func_name = <char*>(<void**>data)[1]
  613. cdef char *ip0 = args[0]
  614. cdef char *ip1 = args[1]
  615. cdef char *ip2 = args[2]
  616. cdef char *op0 = args[3]
  617. cdef double ov0
  618. for i in range(n):
  619. if <int>(<long*>ip1)[0] == (<long*>ip1)[0]:
  620. ov0 = (<double(*)(double, int, double) nogil>func)(<double>(<double*>ip0)[0], <int>(<long*>ip1)[0], <double>(<double*>ip2)[0])
  621. else:
  622. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  623. ov0 = <double>NAN
  624. (<double *>op0)[0] = <double>ov0
  625. ip0 += steps[0]
  626. ip1 += steps[1]
  627. ip2 += steps[2]
  628. op0 += steps[3]
  629. sf_error.check_fpe(func_name)
  630. cdef void loop_d_id__As_ld_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  631. cdef np.npy_intp i, n = dims[0]
  632. cdef void *func = (<void**>data)[0]
  633. cdef char *func_name = <char*>(<void**>data)[1]
  634. cdef char *ip0 = args[0]
  635. cdef char *ip1 = args[1]
  636. cdef char *op0 = args[2]
  637. cdef double ov0
  638. for i in range(n):
  639. if <int>(<long*>ip0)[0] == (<long*>ip0)[0]:
  640. ov0 = (<double(*)(int, double) nogil>func)(<int>(<long*>ip0)[0], <double>(<double*>ip1)[0])
  641. else:
  642. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  643. ov0 = <double>NAN
  644. (<double *>op0)[0] = <double>ov0
  645. ip0 += steps[0]
  646. ip1 += steps[1]
  647. op0 += steps[2]
  648. sf_error.check_fpe(func_name)
  649. cdef void loop_d_iid__As_lld_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  650. cdef np.npy_intp i, n = dims[0]
  651. cdef void *func = (<void**>data)[0]
  652. cdef char *func_name = <char*>(<void**>data)[1]
  653. cdef char *ip0 = args[0]
  654. cdef char *ip1 = args[1]
  655. cdef char *ip2 = args[2]
  656. cdef char *op0 = args[3]
  657. cdef double ov0
  658. for i in range(n):
  659. if <int>(<long*>ip0)[0] == (<long*>ip0)[0] and <int>(<long*>ip1)[0] == (<long*>ip1)[0]:
  660. ov0 = (<double(*)(int, int, double) nogil>func)(<int>(<long*>ip0)[0], <int>(<long*>ip1)[0], <double>(<double*>ip2)[0])
  661. else:
  662. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  663. ov0 = <double>NAN
  664. (<double *>op0)[0] = <double>ov0
  665. ip0 += steps[0]
  666. ip1 += steps[1]
  667. ip2 += steps[2]
  668. op0 += steps[3]
  669. sf_error.check_fpe(func_name)
  670. cdef void loop_d_ld__As_ld_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  671. cdef np.npy_intp i, n = dims[0]
  672. cdef void *func = (<void**>data)[0]
  673. cdef char *func_name = <char*>(<void**>data)[1]
  674. cdef char *ip0 = args[0]
  675. cdef char *ip1 = args[1]
  676. cdef char *op0 = args[2]
  677. cdef double ov0
  678. for i in range(n):
  679. ov0 = (<double(*)(long, double) nogil>func)(<long>(<long*>ip0)[0], <double>(<double*>ip1)[0])
  680. (<double *>op0)[0] = <double>ov0
  681. ip0 += steps[0]
  682. ip1 += steps[1]
  683. op0 += steps[2]
  684. sf_error.check_fpe(func_name)
  685. cdef void loop_d_ldd__As_ldd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  686. cdef np.npy_intp i, n = dims[0]
  687. cdef void *func = (<void**>data)[0]
  688. cdef char *func_name = <char*>(<void**>data)[1]
  689. cdef char *ip0 = args[0]
  690. cdef char *ip1 = args[1]
  691. cdef char *ip2 = args[2]
  692. cdef char *op0 = args[3]
  693. cdef double ov0
  694. for i in range(n):
  695. ov0 = (<double(*)(long, double, double) nogil>func)(<long>(<long*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0])
  696. (<double *>op0)[0] = <double>ov0
  697. ip0 += steps[0]
  698. ip1 += steps[1]
  699. ip2 += steps[2]
  700. op0 += steps[3]
  701. sf_error.check_fpe(func_name)
  702. cdef void loop_d_lddd__As_lddd_d(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  703. cdef np.npy_intp i, n = dims[0]
  704. cdef void *func = (<void**>data)[0]
  705. cdef char *func_name = <char*>(<void**>data)[1]
  706. cdef char *ip0 = args[0]
  707. cdef char *ip1 = args[1]
  708. cdef char *ip2 = args[2]
  709. cdef char *ip3 = args[3]
  710. cdef char *op0 = args[4]
  711. cdef double ov0
  712. for i in range(n):
  713. ov0 = (<double(*)(long, double, double, double) nogil>func)(<long>(<long*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0])
  714. (<double *>op0)[0] = <double>ov0
  715. ip0 += steps[0]
  716. ip1 += steps[1]
  717. ip2 += steps[2]
  718. ip3 += steps[3]
  719. op0 += steps[4]
  720. sf_error.check_fpe(func_name)
  721. cdef void loop_f_f__As_f_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  722. cdef np.npy_intp i, n = dims[0]
  723. cdef void *func = (<void**>data)[0]
  724. cdef char *func_name = <char*>(<void**>data)[1]
  725. cdef char *ip0 = args[0]
  726. cdef char *op0 = args[1]
  727. cdef float ov0
  728. for i in range(n):
  729. ov0 = (<float(*)(float) nogil>func)(<float>(<float*>ip0)[0])
  730. (<float *>op0)[0] = <float>ov0
  731. ip0 += steps[0]
  732. op0 += steps[1]
  733. sf_error.check_fpe(func_name)
  734. cdef void loop_f_ff__As_ff_f(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  735. cdef np.npy_intp i, n = dims[0]
  736. cdef void *func = (<void**>data)[0]
  737. cdef char *func_name = <char*>(<void**>data)[1]
  738. cdef char *ip0 = args[0]
  739. cdef char *ip1 = args[1]
  740. cdef char *op0 = args[2]
  741. cdef float ov0
  742. for i in range(n):
  743. ov0 = (<float(*)(float, float) nogil>func)(<float>(<float*>ip0)[0], <float>(<float*>ip1)[0])
  744. (<float *>op0)[0] = <float>ov0
  745. ip0 += steps[0]
  746. ip1 += steps[1]
  747. op0 += steps[2]
  748. sf_error.check_fpe(func_name)
  749. cdef void loop_g_g__As_g_g(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  750. cdef np.npy_intp i, n = dims[0]
  751. cdef void *func = (<void**>data)[0]
  752. cdef char *func_name = <char*>(<void**>data)[1]
  753. cdef char *ip0 = args[0]
  754. cdef char *op0 = args[1]
  755. cdef long double ov0
  756. for i in range(n):
  757. ov0 = (<long double(*)(long double) nogil>func)(<long double>(<long double*>ip0)[0])
  758. (<long double *>op0)[0] = <long double>ov0
  759. ip0 += steps[0]
  760. op0 += steps[1]
  761. sf_error.check_fpe(func_name)
  762. cdef void loop_i_D_DDDD_As_D_DDDD(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  763. cdef np.npy_intp i, n = dims[0]
  764. cdef void *func = (<void**>data)[0]
  765. cdef char *func_name = <char*>(<void**>data)[1]
  766. cdef char *ip0 = args[0]
  767. cdef char *op0 = args[1]
  768. cdef char *op1 = args[2]
  769. cdef char *op2 = args[3]
  770. cdef char *op3 = args[4]
  771. cdef double complex ov0
  772. cdef double complex ov1
  773. cdef double complex ov2
  774. cdef double complex ov3
  775. for i in range(n):
  776. (<int(*)(double complex, double complex *, double complex *, double complex *, double complex *) nogil>func)(<double complex>(<double complex*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  777. (<double complex *>op0)[0] = <double complex>ov0
  778. (<double complex *>op1)[0] = <double complex>ov1
  779. (<double complex *>op2)[0] = <double complex>ov2
  780. (<double complex *>op3)[0] = <double complex>ov3
  781. ip0 += steps[0]
  782. op0 += steps[1]
  783. op1 += steps[2]
  784. op2 += steps[3]
  785. op3 += steps[4]
  786. sf_error.check_fpe(func_name)
  787. cdef void loop_i_D_DDDD_As_F_FFFF(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  788. cdef np.npy_intp i, n = dims[0]
  789. cdef void *func = (<void**>data)[0]
  790. cdef char *func_name = <char*>(<void**>data)[1]
  791. cdef char *ip0 = args[0]
  792. cdef char *op0 = args[1]
  793. cdef char *op1 = args[2]
  794. cdef char *op2 = args[3]
  795. cdef char *op3 = args[4]
  796. cdef double complex ov0
  797. cdef double complex ov1
  798. cdef double complex ov2
  799. cdef double complex ov3
  800. for i in range(n):
  801. (<int(*)(double complex, double complex *, double complex *, double complex *, double complex *) nogil>func)(<double complex>(<float complex*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  802. (<float complex *>op0)[0] = <float complex>ov0
  803. (<float complex *>op1)[0] = <float complex>ov1
  804. (<float complex *>op2)[0] = <float complex>ov2
  805. (<float complex *>op3)[0] = <float complex>ov3
  806. ip0 += steps[0]
  807. op0 += steps[1]
  808. op1 += steps[2]
  809. op2 += steps[3]
  810. op3 += steps[4]
  811. sf_error.check_fpe(func_name)
  812. cdef void loop_i_D_DD_As_D_DD(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  813. cdef np.npy_intp i, n = dims[0]
  814. cdef void *func = (<void**>data)[0]
  815. cdef char *func_name = <char*>(<void**>data)[1]
  816. cdef char *ip0 = args[0]
  817. cdef char *op0 = args[1]
  818. cdef char *op1 = args[2]
  819. cdef double complex ov0
  820. cdef double complex ov1
  821. for i in range(n):
  822. (<int(*)(double complex, double complex *, double complex *) nogil>func)(<double complex>(<double complex*>ip0)[0], &ov0, &ov1)
  823. (<double complex *>op0)[0] = <double complex>ov0
  824. (<double complex *>op1)[0] = <double complex>ov1
  825. ip0 += steps[0]
  826. op0 += steps[1]
  827. op1 += steps[2]
  828. sf_error.check_fpe(func_name)
  829. cdef void loop_i_D_DD_As_F_FF(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  830. cdef np.npy_intp i, n = dims[0]
  831. cdef void *func = (<void**>data)[0]
  832. cdef char *func_name = <char*>(<void**>data)[1]
  833. cdef char *ip0 = args[0]
  834. cdef char *op0 = args[1]
  835. cdef char *op1 = args[2]
  836. cdef double complex ov0
  837. cdef double complex ov1
  838. for i in range(n):
  839. (<int(*)(double complex, double complex *, double complex *) nogil>func)(<double complex>(<float complex*>ip0)[0], &ov0, &ov1)
  840. (<float complex *>op0)[0] = <float complex>ov0
  841. (<float complex *>op1)[0] = <float complex>ov1
  842. ip0 += steps[0]
  843. op0 += steps[1]
  844. op1 += steps[2]
  845. sf_error.check_fpe(func_name)
  846. cdef void loop_i_d_DDDD_As_d_DDDD(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  847. cdef np.npy_intp i, n = dims[0]
  848. cdef void *func = (<void**>data)[0]
  849. cdef char *func_name = <char*>(<void**>data)[1]
  850. cdef char *ip0 = args[0]
  851. cdef char *op0 = args[1]
  852. cdef char *op1 = args[2]
  853. cdef char *op2 = args[3]
  854. cdef char *op3 = args[4]
  855. cdef double complex ov0
  856. cdef double complex ov1
  857. cdef double complex ov2
  858. cdef double complex ov3
  859. for i in range(n):
  860. (<int(*)(double, double complex *, double complex *, double complex *, double complex *) nogil>func)(<double>(<double*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  861. (<double complex *>op0)[0] = <double complex>ov0
  862. (<double complex *>op1)[0] = <double complex>ov1
  863. (<double complex *>op2)[0] = <double complex>ov2
  864. (<double complex *>op3)[0] = <double complex>ov3
  865. ip0 += steps[0]
  866. op0 += steps[1]
  867. op1 += steps[2]
  868. op2 += steps[3]
  869. op3 += steps[4]
  870. sf_error.check_fpe(func_name)
  871. cdef void loop_i_d_DDDD_As_f_FFFF(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  872. cdef np.npy_intp i, n = dims[0]
  873. cdef void *func = (<void**>data)[0]
  874. cdef char *func_name = <char*>(<void**>data)[1]
  875. cdef char *ip0 = args[0]
  876. cdef char *op0 = args[1]
  877. cdef char *op1 = args[2]
  878. cdef char *op2 = args[3]
  879. cdef char *op3 = args[4]
  880. cdef double complex ov0
  881. cdef double complex ov1
  882. cdef double complex ov2
  883. cdef double complex ov3
  884. for i in range(n):
  885. (<int(*)(double, double complex *, double complex *, double complex *, double complex *) nogil>func)(<double>(<float*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  886. (<float complex *>op0)[0] = <float complex>ov0
  887. (<float complex *>op1)[0] = <float complex>ov1
  888. (<float complex *>op2)[0] = <float complex>ov2
  889. (<float complex *>op3)[0] = <float complex>ov3
  890. ip0 += steps[0]
  891. op0 += steps[1]
  892. op1 += steps[2]
  893. op2 += steps[3]
  894. op3 += steps[4]
  895. sf_error.check_fpe(func_name)
  896. cdef void loop_i_d_DD_As_d_DD(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  897. cdef np.npy_intp i, n = dims[0]
  898. cdef void *func = (<void**>data)[0]
  899. cdef char *func_name = <char*>(<void**>data)[1]
  900. cdef char *ip0 = args[0]
  901. cdef char *op0 = args[1]
  902. cdef char *op1 = args[2]
  903. cdef double complex ov0
  904. cdef double complex ov1
  905. for i in range(n):
  906. (<int(*)(double, double complex *, double complex *) nogil>func)(<double>(<double*>ip0)[0], &ov0, &ov1)
  907. (<double complex *>op0)[0] = <double complex>ov0
  908. (<double complex *>op1)[0] = <double complex>ov1
  909. ip0 += steps[0]
  910. op0 += steps[1]
  911. op1 += steps[2]
  912. sf_error.check_fpe(func_name)
  913. cdef void loop_i_d_DD_As_f_FF(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  914. cdef np.npy_intp i, n = dims[0]
  915. cdef void *func = (<void**>data)[0]
  916. cdef char *func_name = <char*>(<void**>data)[1]
  917. cdef char *ip0 = args[0]
  918. cdef char *op0 = args[1]
  919. cdef char *op1 = args[2]
  920. cdef double complex ov0
  921. cdef double complex ov1
  922. for i in range(n):
  923. (<int(*)(double, double complex *, double complex *) nogil>func)(<double>(<float*>ip0)[0], &ov0, &ov1)
  924. (<float complex *>op0)[0] = <float complex>ov0
  925. (<float complex *>op1)[0] = <float complex>ov1
  926. ip0 += steps[0]
  927. op0 += steps[1]
  928. op1 += steps[2]
  929. sf_error.check_fpe(func_name)
  930. cdef void loop_i_d_dd_As_d_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  931. cdef np.npy_intp i, n = dims[0]
  932. cdef void *func = (<void**>data)[0]
  933. cdef char *func_name = <char*>(<void**>data)[1]
  934. cdef char *ip0 = args[0]
  935. cdef char *op0 = args[1]
  936. cdef char *op1 = args[2]
  937. cdef double ov0
  938. cdef double ov1
  939. for i in range(n):
  940. (<int(*)(double, double *, double *) nogil>func)(<double>(<double*>ip0)[0], &ov0, &ov1)
  941. (<double *>op0)[0] = <double>ov0
  942. (<double *>op1)[0] = <double>ov1
  943. ip0 += steps[0]
  944. op0 += steps[1]
  945. op1 += steps[2]
  946. sf_error.check_fpe(func_name)
  947. cdef void loop_i_d_dd_As_f_ff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  948. cdef np.npy_intp i, n = dims[0]
  949. cdef void *func = (<void**>data)[0]
  950. cdef char *func_name = <char*>(<void**>data)[1]
  951. cdef char *ip0 = args[0]
  952. cdef char *op0 = args[1]
  953. cdef char *op1 = args[2]
  954. cdef double ov0
  955. cdef double ov1
  956. for i in range(n):
  957. (<int(*)(double, double *, double *) nogil>func)(<double>(<float*>ip0)[0], &ov0, &ov1)
  958. (<float *>op0)[0] = <float>ov0
  959. (<float *>op1)[0] = <float>ov1
  960. ip0 += steps[0]
  961. op0 += steps[1]
  962. op1 += steps[2]
  963. sf_error.check_fpe(func_name)
  964. cdef void loop_i_d_dddd_As_d_dddd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  965. cdef np.npy_intp i, n = dims[0]
  966. cdef void *func = (<void**>data)[0]
  967. cdef char *func_name = <char*>(<void**>data)[1]
  968. cdef char *ip0 = args[0]
  969. cdef char *op0 = args[1]
  970. cdef char *op1 = args[2]
  971. cdef char *op2 = args[3]
  972. cdef char *op3 = args[4]
  973. cdef double ov0
  974. cdef double ov1
  975. cdef double ov2
  976. cdef double ov3
  977. for i in range(n):
  978. (<int(*)(double, double *, double *, double *, double *) nogil>func)(<double>(<double*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  979. (<double *>op0)[0] = <double>ov0
  980. (<double *>op1)[0] = <double>ov1
  981. (<double *>op2)[0] = <double>ov2
  982. (<double *>op3)[0] = <double>ov3
  983. ip0 += steps[0]
  984. op0 += steps[1]
  985. op1 += steps[2]
  986. op2 += steps[3]
  987. op3 += steps[4]
  988. sf_error.check_fpe(func_name)
  989. cdef void loop_i_d_dddd_As_f_ffff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  990. cdef np.npy_intp i, n = dims[0]
  991. cdef void *func = (<void**>data)[0]
  992. cdef char *func_name = <char*>(<void**>data)[1]
  993. cdef char *ip0 = args[0]
  994. cdef char *op0 = args[1]
  995. cdef char *op1 = args[2]
  996. cdef char *op2 = args[3]
  997. cdef char *op3 = args[4]
  998. cdef double ov0
  999. cdef double ov1
  1000. cdef double ov2
  1001. cdef double ov3
  1002. for i in range(n):
  1003. (<int(*)(double, double *, double *, double *, double *) nogil>func)(<double>(<float*>ip0)[0], &ov0, &ov1, &ov2, &ov3)
  1004. (<float *>op0)[0] = <float>ov0
  1005. (<float *>op1)[0] = <float>ov1
  1006. (<float *>op2)[0] = <float>ov2
  1007. (<float *>op3)[0] = <float>ov3
  1008. ip0 += steps[0]
  1009. op0 += steps[1]
  1010. op1 += steps[2]
  1011. op2 += steps[3]
  1012. op3 += steps[4]
  1013. sf_error.check_fpe(func_name)
  1014. cdef void loop_i_dd_dd_As_dd_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1015. cdef np.npy_intp i, n = dims[0]
  1016. cdef void *func = (<void**>data)[0]
  1017. cdef char *func_name = <char*>(<void**>data)[1]
  1018. cdef char *ip0 = args[0]
  1019. cdef char *ip1 = args[1]
  1020. cdef char *op0 = args[2]
  1021. cdef char *op1 = args[3]
  1022. cdef double ov0
  1023. cdef double ov1
  1024. for i in range(n):
  1025. (<int(*)(double, double, double *, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], &ov0, &ov1)
  1026. (<double *>op0)[0] = <double>ov0
  1027. (<double *>op1)[0] = <double>ov1
  1028. ip0 += steps[0]
  1029. ip1 += steps[1]
  1030. op0 += steps[2]
  1031. op1 += steps[3]
  1032. sf_error.check_fpe(func_name)
  1033. cdef void loop_i_dd_dd_As_ff_ff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1034. cdef np.npy_intp i, n = dims[0]
  1035. cdef void *func = (<void**>data)[0]
  1036. cdef char *func_name = <char*>(<void**>data)[1]
  1037. cdef char *ip0 = args[0]
  1038. cdef char *ip1 = args[1]
  1039. cdef char *op0 = args[2]
  1040. cdef char *op1 = args[3]
  1041. cdef double ov0
  1042. cdef double ov1
  1043. for i in range(n):
  1044. (<int(*)(double, double, double *, double *) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], &ov0, &ov1)
  1045. (<float *>op0)[0] = <float>ov0
  1046. (<float *>op1)[0] = <float>ov1
  1047. ip0 += steps[0]
  1048. ip1 += steps[1]
  1049. op0 += steps[2]
  1050. op1 += steps[3]
  1051. sf_error.check_fpe(func_name)
  1052. cdef void loop_i_dd_dddd_As_dd_dddd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1053. cdef np.npy_intp i, n = dims[0]
  1054. cdef void *func = (<void**>data)[0]
  1055. cdef char *func_name = <char*>(<void**>data)[1]
  1056. cdef char *ip0 = args[0]
  1057. cdef char *ip1 = args[1]
  1058. cdef char *op0 = args[2]
  1059. cdef char *op1 = args[3]
  1060. cdef char *op2 = args[4]
  1061. cdef char *op3 = args[5]
  1062. cdef double ov0
  1063. cdef double ov1
  1064. cdef double ov2
  1065. cdef double ov3
  1066. for i in range(n):
  1067. (<int(*)(double, double, double *, double *, double *, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], &ov0, &ov1, &ov2, &ov3)
  1068. (<double *>op0)[0] = <double>ov0
  1069. (<double *>op1)[0] = <double>ov1
  1070. (<double *>op2)[0] = <double>ov2
  1071. (<double *>op3)[0] = <double>ov3
  1072. ip0 += steps[0]
  1073. ip1 += steps[1]
  1074. op0 += steps[2]
  1075. op1 += steps[3]
  1076. op2 += steps[4]
  1077. op3 += steps[5]
  1078. sf_error.check_fpe(func_name)
  1079. cdef void loop_i_dd_dddd_As_ff_ffff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1080. cdef np.npy_intp i, n = dims[0]
  1081. cdef void *func = (<void**>data)[0]
  1082. cdef char *func_name = <char*>(<void**>data)[1]
  1083. cdef char *ip0 = args[0]
  1084. cdef char *ip1 = args[1]
  1085. cdef char *op0 = args[2]
  1086. cdef char *op1 = args[3]
  1087. cdef char *op2 = args[4]
  1088. cdef char *op3 = args[5]
  1089. cdef double ov0
  1090. cdef double ov1
  1091. cdef double ov2
  1092. cdef double ov3
  1093. for i in range(n):
  1094. (<int(*)(double, double, double *, double *, double *, double *) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], &ov0, &ov1, &ov2, &ov3)
  1095. (<float *>op0)[0] = <float>ov0
  1096. (<float *>op1)[0] = <float>ov1
  1097. (<float *>op2)[0] = <float>ov2
  1098. (<float *>op3)[0] = <float>ov3
  1099. ip0 += steps[0]
  1100. ip1 += steps[1]
  1101. op0 += steps[2]
  1102. op1 += steps[3]
  1103. op2 += steps[4]
  1104. op3 += steps[5]
  1105. sf_error.check_fpe(func_name)
  1106. cdef void loop_i_ddd_dd_As_ddd_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1107. cdef np.npy_intp i, n = dims[0]
  1108. cdef void *func = (<void**>data)[0]
  1109. cdef char *func_name = <char*>(<void**>data)[1]
  1110. cdef char *ip0 = args[0]
  1111. cdef char *ip1 = args[1]
  1112. cdef char *ip2 = args[2]
  1113. cdef char *op0 = args[3]
  1114. cdef char *op1 = args[4]
  1115. cdef double ov0
  1116. cdef double ov1
  1117. for i in range(n):
  1118. (<int(*)(double, double, double, double *, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], &ov0, &ov1)
  1119. (<double *>op0)[0] = <double>ov0
  1120. (<double *>op1)[0] = <double>ov1
  1121. ip0 += steps[0]
  1122. ip1 += steps[1]
  1123. ip2 += steps[2]
  1124. op0 += steps[3]
  1125. op1 += steps[4]
  1126. sf_error.check_fpe(func_name)
  1127. cdef void loop_i_ddd_dd_As_fff_ff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1128. cdef np.npy_intp i, n = dims[0]
  1129. cdef void *func = (<void**>data)[0]
  1130. cdef char *func_name = <char*>(<void**>data)[1]
  1131. cdef char *ip0 = args[0]
  1132. cdef char *ip1 = args[1]
  1133. cdef char *ip2 = args[2]
  1134. cdef char *op0 = args[3]
  1135. cdef char *op1 = args[4]
  1136. cdef double ov0
  1137. cdef double ov1
  1138. for i in range(n):
  1139. (<int(*)(double, double, double, double *, double *) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], &ov0, &ov1)
  1140. (<float *>op0)[0] = <float>ov0
  1141. (<float *>op1)[0] = <float>ov1
  1142. ip0 += steps[0]
  1143. ip1 += steps[1]
  1144. ip2 += steps[2]
  1145. op0 += steps[3]
  1146. op1 += steps[4]
  1147. sf_error.check_fpe(func_name)
  1148. cdef void loop_i_ddddd_dd_As_ddddd_dd(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1149. cdef np.npy_intp i, n = dims[0]
  1150. cdef void *func = (<void**>data)[0]
  1151. cdef char *func_name = <char*>(<void**>data)[1]
  1152. cdef char *ip0 = args[0]
  1153. cdef char *ip1 = args[1]
  1154. cdef char *ip2 = args[2]
  1155. cdef char *ip3 = args[3]
  1156. cdef char *ip4 = args[4]
  1157. cdef char *op0 = args[5]
  1158. cdef char *op1 = args[6]
  1159. cdef double ov0
  1160. cdef double ov1
  1161. for i in range(n):
  1162. (<int(*)(double, double, double, double, double, double *, double *) nogil>func)(<double>(<double*>ip0)[0], <double>(<double*>ip1)[0], <double>(<double*>ip2)[0], <double>(<double*>ip3)[0], <double>(<double*>ip4)[0], &ov0, &ov1)
  1163. (<double *>op0)[0] = <double>ov0
  1164. (<double *>op1)[0] = <double>ov1
  1165. ip0 += steps[0]
  1166. ip1 += steps[1]
  1167. ip2 += steps[2]
  1168. ip3 += steps[3]
  1169. ip4 += steps[4]
  1170. op0 += steps[5]
  1171. op1 += steps[6]
  1172. sf_error.check_fpe(func_name)
  1173. cdef void loop_i_ddddd_dd_As_fffff_ff(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1174. cdef np.npy_intp i, n = dims[0]
  1175. cdef void *func = (<void**>data)[0]
  1176. cdef char *func_name = <char*>(<void**>data)[1]
  1177. cdef char *ip0 = args[0]
  1178. cdef char *ip1 = args[1]
  1179. cdef char *ip2 = args[2]
  1180. cdef char *ip3 = args[3]
  1181. cdef char *ip4 = args[4]
  1182. cdef char *op0 = args[5]
  1183. cdef char *op1 = args[6]
  1184. cdef double ov0
  1185. cdef double ov1
  1186. for i in range(n):
  1187. (<int(*)(double, double, double, double, double, double *, double *) nogil>func)(<double>(<float*>ip0)[0], <double>(<float*>ip1)[0], <double>(<float*>ip2)[0], <double>(<float*>ip3)[0], <double>(<float*>ip4)[0], &ov0, &ov1)
  1188. (<float *>op0)[0] = <float>ov0
  1189. (<float *>op1)[0] = <float>ov1
  1190. ip0 += steps[0]
  1191. ip1 += steps[1]
  1192. ip2 += steps[2]
  1193. ip3 += steps[3]
  1194. ip4 += steps[4]
  1195. op0 += steps[5]
  1196. op1 += steps[6]
  1197. sf_error.check_fpe(func_name)
  1198. cdef void loop_i_i__As_l_l(char **args, np.npy_intp *dims, np.npy_intp *steps, void *data) nogil:
  1199. cdef np.npy_intp i, n = dims[0]
  1200. cdef void *func = (<void**>data)[0]
  1201. cdef char *func_name = <char*>(<void**>data)[1]
  1202. cdef char *ip0 = args[0]
  1203. cdef char *op0 = args[1]
  1204. cdef int ov0
  1205. for i in range(n):
  1206. if <int>(<long*>ip0)[0] == (<long*>ip0)[0]:
  1207. ov0 = (<int(*)(int) nogil>func)(<int>(<long*>ip0)[0])
  1208. else:
  1209. sf_error.error(func_name, sf_error.DOMAIN, "invalid input argument")
  1210. ov0 = <int>0xbad0bad0
  1211. (<long *>op0)[0] = <long>ov0
  1212. ip0 += steps[0]
  1213. op0 += steps[1]
  1214. sf_error.check_fpe(func_name)
  1215. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1216. cdef double _func_cosine_cdf "cosine_cdf"(double) nogil
  1217. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1218. cdef double _func_cosine_invcdf "cosine_invcdf"(double) nogil
  1219. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1220. cdef double _func_cospi "cospi"(double) nogil
  1221. from ._trig cimport ccospi as _func_ccospi
  1222. ctypedef double complex _proto_ccospi_t(double complex) nogil
  1223. cdef _proto_ccospi_t *_proto_ccospi_t_var = &_func_ccospi
  1224. from ._ellip_harm cimport ellip_harmonic as _func_ellip_harmonic
  1225. ctypedef double _proto_ellip_harmonic_t(double, double, int, int, double, double, double) nogil
  1226. cdef _proto_ellip_harmonic_t *_proto_ellip_harmonic_t_var = &_func_ellip_harmonic
  1227. from ._legacy cimport ellip_harmonic_unsafe as _func_ellip_harmonic_unsafe
  1228. ctypedef double _proto_ellip_harmonic_unsafe_t(double, double, double, double, double, double, double) nogil
  1229. cdef _proto_ellip_harmonic_unsafe_t *_proto_ellip_harmonic_unsafe_t_var = &_func_ellip_harmonic_unsafe
  1230. from ._factorial cimport _factorial as _func__factorial
  1231. ctypedef double _proto__factorial_t(double) nogil
  1232. cdef _proto__factorial_t *_proto__factorial_t_var = &_func__factorial
  1233. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1234. cdef double _func_igam_fac "igam_fac"(double, double) nogil
  1235. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1236. cdef double _func_kolmogc "kolmogc"(double) nogil
  1237. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1238. cdef double _func_kolmogci "kolmogci"(double) nogil
  1239. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1240. cdef double _func_kolmogp "kolmogp"(double) nogil
  1241. from ._lambertw cimport lambertw_scalar as _func_lambertw_scalar
  1242. ctypedef double complex _proto_lambertw_scalar_t(double complex, long, double) nogil
  1243. cdef _proto_lambertw_scalar_t *_proto_lambertw_scalar_t_var = &_func_lambertw_scalar
  1244. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1245. cdef double _func_lanczos_sum_expg_scaled "lanczos_sum_expg_scaled"(double) nogil
  1246. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1247. cdef double _func_lgam1p "lgam1p"(double) nogil
  1248. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1249. cdef double _func_log1pmx "log1pmx"(double) nogil
  1250. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1251. cdef double _func_riemann_zeta "riemann_zeta"(double) nogil
  1252. from .sf_error cimport _sf_error_test_function as _func__sf_error_test_function
  1253. ctypedef int _proto__sf_error_test_function_t(int) nogil
  1254. cdef _proto__sf_error_test_function_t *_proto__sf_error_test_function_t_var = &_func__sf_error_test_function
  1255. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1256. cdef double _func_sinpi "sinpi"(double) nogil
  1257. from ._trig cimport csinpi as _func_csinpi
  1258. ctypedef double complex _proto_csinpi_t(double complex) nogil
  1259. cdef _proto_csinpi_t *_proto_csinpi_t_var = &_func_csinpi
  1260. from ._legacy cimport smirnovc_unsafe as _func_smirnovc_unsafe
  1261. ctypedef double _proto_smirnovc_unsafe_t(double, double) nogil
  1262. cdef _proto_smirnovc_unsafe_t *_proto_smirnovc_unsafe_t_var = &_func_smirnovc_unsafe
  1263. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1264. cdef double _func_smirnovc "smirnovc"(int, double) nogil
  1265. from ._legacy cimport smirnovci_unsafe as _func_smirnovci_unsafe
  1266. ctypedef double _proto_smirnovci_unsafe_t(double, double) nogil
  1267. cdef _proto_smirnovci_unsafe_t *_proto_smirnovci_unsafe_t_var = &_func_smirnovci_unsafe
  1268. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1269. cdef double _func_smirnovci "smirnovci"(int, double) nogil
  1270. from ._legacy cimport smirnovp_unsafe as _func_smirnovp_unsafe
  1271. ctypedef double _proto_smirnovp_unsafe_t(double, double) nogil
  1272. cdef _proto_smirnovp_unsafe_t *_proto_smirnovp_unsafe_t_var = &_func_smirnovp_unsafe
  1273. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1274. cdef double _func_smirnovp "smirnovp"(int, double) nogil
  1275. from ._spherical_bessel cimport spherical_in_complex as _func_spherical_in_complex
  1276. ctypedef double complex _proto_spherical_in_complex_t(long, double complex) nogil
  1277. cdef _proto_spherical_in_complex_t *_proto_spherical_in_complex_t_var = &_func_spherical_in_complex
  1278. from ._spherical_bessel cimport spherical_in_real as _func_spherical_in_real
  1279. ctypedef double _proto_spherical_in_real_t(long, double) nogil
  1280. cdef _proto_spherical_in_real_t *_proto_spherical_in_real_t_var = &_func_spherical_in_real
  1281. from ._spherical_bessel cimport spherical_in_d_complex as _func_spherical_in_d_complex
  1282. ctypedef double complex _proto_spherical_in_d_complex_t(long, double complex) nogil
  1283. cdef _proto_spherical_in_d_complex_t *_proto_spherical_in_d_complex_t_var = &_func_spherical_in_d_complex
  1284. from ._spherical_bessel cimport spherical_in_d_real as _func_spherical_in_d_real
  1285. ctypedef double _proto_spherical_in_d_real_t(long, double) nogil
  1286. cdef _proto_spherical_in_d_real_t *_proto_spherical_in_d_real_t_var = &_func_spherical_in_d_real
  1287. from ._spherical_bessel cimport spherical_jn_complex as _func_spherical_jn_complex
  1288. ctypedef double complex _proto_spherical_jn_complex_t(long, double complex) nogil
  1289. cdef _proto_spherical_jn_complex_t *_proto_spherical_jn_complex_t_var = &_func_spherical_jn_complex
  1290. from ._spherical_bessel cimport spherical_jn_real as _func_spherical_jn_real
  1291. ctypedef double _proto_spherical_jn_real_t(long, double) nogil
  1292. cdef _proto_spherical_jn_real_t *_proto_spherical_jn_real_t_var = &_func_spherical_jn_real
  1293. from ._spherical_bessel cimport spherical_jn_d_complex as _func_spherical_jn_d_complex
  1294. ctypedef double complex _proto_spherical_jn_d_complex_t(long, double complex) nogil
  1295. cdef _proto_spherical_jn_d_complex_t *_proto_spherical_jn_d_complex_t_var = &_func_spherical_jn_d_complex
  1296. from ._spherical_bessel cimport spherical_jn_d_real as _func_spherical_jn_d_real
  1297. ctypedef double _proto_spherical_jn_d_real_t(long, double) nogil
  1298. cdef _proto_spherical_jn_d_real_t *_proto_spherical_jn_d_real_t_var = &_func_spherical_jn_d_real
  1299. from ._spherical_bessel cimport spherical_kn_complex as _func_spherical_kn_complex
  1300. ctypedef double complex _proto_spherical_kn_complex_t(long, double complex) nogil
  1301. cdef _proto_spherical_kn_complex_t *_proto_spherical_kn_complex_t_var = &_func_spherical_kn_complex
  1302. from ._spherical_bessel cimport spherical_kn_real as _func_spherical_kn_real
  1303. ctypedef double _proto_spherical_kn_real_t(long, double) nogil
  1304. cdef _proto_spherical_kn_real_t *_proto_spherical_kn_real_t_var = &_func_spherical_kn_real
  1305. from ._spherical_bessel cimport spherical_kn_d_complex as _func_spherical_kn_d_complex
  1306. ctypedef double complex _proto_spherical_kn_d_complex_t(long, double complex) nogil
  1307. cdef _proto_spherical_kn_d_complex_t *_proto_spherical_kn_d_complex_t_var = &_func_spherical_kn_d_complex
  1308. from ._spherical_bessel cimport spherical_kn_d_real as _func_spherical_kn_d_real
  1309. ctypedef double _proto_spherical_kn_d_real_t(long, double) nogil
  1310. cdef _proto_spherical_kn_d_real_t *_proto_spherical_kn_d_real_t_var = &_func_spherical_kn_d_real
  1311. from ._spherical_bessel cimport spherical_yn_complex as _func_spherical_yn_complex
  1312. ctypedef double complex _proto_spherical_yn_complex_t(long, double complex) nogil
  1313. cdef _proto_spherical_yn_complex_t *_proto_spherical_yn_complex_t_var = &_func_spherical_yn_complex
  1314. from ._spherical_bessel cimport spherical_yn_real as _func_spherical_yn_real
  1315. ctypedef double _proto_spherical_yn_real_t(long, double) nogil
  1316. cdef _proto_spherical_yn_real_t *_proto_spherical_yn_real_t_var = &_func_spherical_yn_real
  1317. from ._spherical_bessel cimport spherical_yn_d_complex as _func_spherical_yn_d_complex
  1318. ctypedef double complex _proto_spherical_yn_d_complex_t(long, double complex) nogil
  1319. cdef _proto_spherical_yn_d_complex_t *_proto_spherical_yn_d_complex_t_var = &_func_spherical_yn_d_complex
  1320. from ._spherical_bessel cimport spherical_yn_d_real as _func_spherical_yn_d_real
  1321. ctypedef double _proto_spherical_yn_d_real_t(long, double) nogil
  1322. cdef _proto_spherical_yn_d_real_t *_proto_spherical_yn_d_real_t_var = &_func_spherical_yn_d_real
  1323. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1324. cdef double _func_struve_asymp_large_z "struve_asymp_large_z"(double, double, int, double *) nogil
  1325. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1326. cdef double _func_struve_bessel_series "struve_bessel_series"(double, double, int, double *) nogil
  1327. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1328. cdef double _func_struve_power_series "struve_power_series"(double, double, int, double *) nogil
  1329. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1330. cdef double _func_zeta "zeta"(double, double) nogil
  1331. from ._agm cimport agm as _func_agm
  1332. ctypedef double _proto_agm_t(double, double) nogil
  1333. cdef _proto_agm_t *_proto_agm_t_var = &_func_agm
  1334. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1335. cdef int _func_airy_wrap "airy_wrap"(double, double *, double *, double *, double *) nogil
  1336. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1337. cdef int _func_cairy_wrap "cairy_wrap"(double complex, double complex *, double complex *, double complex *, double complex *) nogil
  1338. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1339. cdef int _func_cairy_wrap_e "cairy_wrap_e"(double complex, double complex *, double complex *, double complex *, double complex *) nogil
  1340. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1341. cdef int _func_cairy_wrap_e_real "cairy_wrap_e_real"(double, double *, double *, double *, double *) nogil
  1342. from ._legacy cimport bdtr_unsafe as _func_bdtr_unsafe
  1343. ctypedef double _proto_bdtr_unsafe_t(double, double, double) nogil
  1344. cdef _proto_bdtr_unsafe_t *_proto_bdtr_unsafe_t_var = &_func_bdtr_unsafe
  1345. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1346. cdef double _func_bdtr "bdtr"(double, int, double) nogil
  1347. from ._legacy cimport bdtrc_unsafe as _func_bdtrc_unsafe
  1348. ctypedef double _proto_bdtrc_unsafe_t(double, double, double) nogil
  1349. cdef _proto_bdtrc_unsafe_t *_proto_bdtrc_unsafe_t_var = &_func_bdtrc_unsafe
  1350. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1351. cdef double _func_bdtrc "bdtrc"(double, int, double) nogil
  1352. from ._legacy cimport bdtri_unsafe as _func_bdtri_unsafe
  1353. ctypedef double _proto_bdtri_unsafe_t(double, double, double) nogil
  1354. cdef _proto_bdtri_unsafe_t *_proto_bdtri_unsafe_t_var = &_func_bdtri_unsafe
  1355. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1356. cdef double _func_bdtri "bdtri"(double, int, double) nogil
  1357. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1358. cdef double _func_cdfbin2_wrap "cdfbin2_wrap"(double, double, double) nogil
  1359. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1360. cdef double _func_cdfbin3_wrap "cdfbin3_wrap"(double, double, double) nogil
  1361. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1362. cdef double _func_bei_wrap "bei_wrap"(double) nogil
  1363. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1364. cdef double _func_beip_wrap "beip_wrap"(double) nogil
  1365. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1366. cdef double _func_ber_wrap "ber_wrap"(double) nogil
  1367. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1368. cdef double _func_berp_wrap "berp_wrap"(double) nogil
  1369. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1370. cdef double _func_besselpoly "besselpoly"(double, double, double) nogil
  1371. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1372. cdef double _func_beta "beta"(double, double) nogil
  1373. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1374. cdef double _func_incbet "incbet"(double, double, double) nogil
  1375. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1376. cdef double _func_incbi "incbi"(double, double, double) nogil
  1377. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1378. cdef double _func_lbeta "lbeta"(double, double) nogil
  1379. from .orthogonal_eval cimport binom as _func_binom
  1380. ctypedef double _proto_binom_t(double, double) nogil
  1381. cdef _proto_binom_t *_proto_binom_t_var = &_func_binom
  1382. from ._boxcox cimport boxcox as _func_boxcox
  1383. ctypedef double _proto_boxcox_t(double, double) nogil
  1384. cdef _proto_boxcox_t *_proto_boxcox_t_var = &_func_boxcox
  1385. from ._boxcox cimport boxcox1p as _func_boxcox1p
  1386. ctypedef double _proto_boxcox1p_t(double, double) nogil
  1387. cdef _proto_boxcox1p_t *_proto_boxcox1p_t_var = &_func_boxcox1p
  1388. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1389. cdef double _func_btdtr "btdtr"(double, double, double) nogil
  1390. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1391. cdef double _func_incbi "incbi"(double, double, double) nogil
  1392. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1393. cdef double _func_cdfbet3_wrap "cdfbet3_wrap"(double, double, double) nogil
  1394. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1395. cdef double _func_cdfbet4_wrap "cdfbet4_wrap"(double, double, double) nogil
  1396. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1397. cdef double _func_cbrt "cbrt"(double) nogil
  1398. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1399. cdef double _func_chdtr "chdtr"(double, double) nogil
  1400. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1401. cdef double _func_chdtrc "chdtrc"(double, double) nogil
  1402. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1403. cdef double _func_chdtri "chdtri"(double, double) nogil
  1404. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1405. cdef double _func_cdfchi3_wrap "cdfchi3_wrap"(double, double) nogil
  1406. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1407. cdef double _func_cdfchn1_wrap "cdfchn1_wrap"(double, double, double) nogil
  1408. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1409. cdef double _func_cdfchn3_wrap "cdfchn3_wrap"(double, double, double) nogil
  1410. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1411. cdef double _func_cdfchn4_wrap "cdfchn4_wrap"(double, double, double) nogil
  1412. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1413. cdef double _func_cdfchn2_wrap "cdfchn2_wrap"(double, double, double) nogil
  1414. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1415. cdef double _func_cosdg "cosdg"(double) nogil
  1416. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1417. cdef double _func_cosm1 "cosm1"(double) nogil
  1418. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1419. cdef double _func_cotdg "cotdg"(double) nogil
  1420. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1421. cdef double _func_ellpe "ellpe"(double) nogil
  1422. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1423. cdef double _func_ellie "ellie"(double, double) nogil
  1424. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1425. cdef int _func_ellpj "ellpj"(double, double, double *, double *, double *, double *) nogil
  1426. from ._ellipk cimport ellipk as _func_ellipk
  1427. ctypedef double _proto_ellipk_t(double) nogil
  1428. cdef _proto_ellipk_t *_proto_ellipk_t_var = &_func_ellipk
  1429. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1430. cdef double _func_ellik "ellik"(double, double) nogil
  1431. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1432. cdef double _func_ellpk "ellpk"(double) nogil
  1433. from ._convex_analysis cimport entr as _func_entr
  1434. ctypedef double _proto_entr_t(double) nogil
  1435. cdef _proto_entr_t *_proto_entr_t_var = &_func_entr
  1436. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1437. cdef double _func_erf "erf"(double) nogil
  1438. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1439. cdef double _func_erfc "erfc"(double) nogil
  1440. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1441. cdef double _func_erfcinv "erfcinv"(double) nogil
  1442. from .orthogonal_eval cimport eval_chebyc as _func_eval_chebyc
  1443. ctypedef double complex _proto_eval_chebyc_double_complex__t(double, double complex) nogil
  1444. cdef _proto_eval_chebyc_double_complex__t *_proto_eval_chebyc_double_complex__t_var = &_func_eval_chebyc[double_complex]
  1445. from .orthogonal_eval cimport eval_chebyc as _func_eval_chebyc
  1446. ctypedef double _proto_eval_chebyc_double__t(double, double) nogil
  1447. cdef _proto_eval_chebyc_double__t *_proto_eval_chebyc_double__t_var = &_func_eval_chebyc[double]
  1448. from .orthogonal_eval cimport eval_chebyc_l as _func_eval_chebyc_l
  1449. ctypedef double _proto_eval_chebyc_l_t(long, double) nogil
  1450. cdef _proto_eval_chebyc_l_t *_proto_eval_chebyc_l_t_var = &_func_eval_chebyc_l
  1451. from .orthogonal_eval cimport eval_chebys as _func_eval_chebys
  1452. ctypedef double complex _proto_eval_chebys_double_complex__t(double, double complex) nogil
  1453. cdef _proto_eval_chebys_double_complex__t *_proto_eval_chebys_double_complex__t_var = &_func_eval_chebys[double_complex]
  1454. from .orthogonal_eval cimport eval_chebys as _func_eval_chebys
  1455. ctypedef double _proto_eval_chebys_double__t(double, double) nogil
  1456. cdef _proto_eval_chebys_double__t *_proto_eval_chebys_double__t_var = &_func_eval_chebys[double]
  1457. from .orthogonal_eval cimport eval_chebys_l as _func_eval_chebys_l
  1458. ctypedef double _proto_eval_chebys_l_t(long, double) nogil
  1459. cdef _proto_eval_chebys_l_t *_proto_eval_chebys_l_t_var = &_func_eval_chebys_l
  1460. from .orthogonal_eval cimport eval_chebyt as _func_eval_chebyt
  1461. ctypedef double complex _proto_eval_chebyt_double_complex__t(double, double complex) nogil
  1462. cdef _proto_eval_chebyt_double_complex__t *_proto_eval_chebyt_double_complex__t_var = &_func_eval_chebyt[double_complex]
  1463. from .orthogonal_eval cimport eval_chebyt as _func_eval_chebyt
  1464. ctypedef double _proto_eval_chebyt_double__t(double, double) nogil
  1465. cdef _proto_eval_chebyt_double__t *_proto_eval_chebyt_double__t_var = &_func_eval_chebyt[double]
  1466. from .orthogonal_eval cimport eval_chebyt_l as _func_eval_chebyt_l
  1467. ctypedef double _proto_eval_chebyt_l_t(long, double) nogil
  1468. cdef _proto_eval_chebyt_l_t *_proto_eval_chebyt_l_t_var = &_func_eval_chebyt_l
  1469. from .orthogonal_eval cimport eval_chebyu as _func_eval_chebyu
  1470. ctypedef double complex _proto_eval_chebyu_double_complex__t(double, double complex) nogil
  1471. cdef _proto_eval_chebyu_double_complex__t *_proto_eval_chebyu_double_complex__t_var = &_func_eval_chebyu[double_complex]
  1472. from .orthogonal_eval cimport eval_chebyu as _func_eval_chebyu
  1473. ctypedef double _proto_eval_chebyu_double__t(double, double) nogil
  1474. cdef _proto_eval_chebyu_double__t *_proto_eval_chebyu_double__t_var = &_func_eval_chebyu[double]
  1475. from .orthogonal_eval cimport eval_chebyu_l as _func_eval_chebyu_l
  1476. ctypedef double _proto_eval_chebyu_l_t(long, double) nogil
  1477. cdef _proto_eval_chebyu_l_t *_proto_eval_chebyu_l_t_var = &_func_eval_chebyu_l
  1478. from .orthogonal_eval cimport eval_gegenbauer as _func_eval_gegenbauer
  1479. ctypedef double complex _proto_eval_gegenbauer_double_complex__t(double, double, double complex) nogil
  1480. cdef _proto_eval_gegenbauer_double_complex__t *_proto_eval_gegenbauer_double_complex__t_var = &_func_eval_gegenbauer[double_complex]
  1481. from .orthogonal_eval cimport eval_gegenbauer as _func_eval_gegenbauer
  1482. ctypedef double _proto_eval_gegenbauer_double__t(double, double, double) nogil
  1483. cdef _proto_eval_gegenbauer_double__t *_proto_eval_gegenbauer_double__t_var = &_func_eval_gegenbauer[double]
  1484. from .orthogonal_eval cimport eval_gegenbauer_l as _func_eval_gegenbauer_l
  1485. ctypedef double _proto_eval_gegenbauer_l_t(long, double, double) nogil
  1486. cdef _proto_eval_gegenbauer_l_t *_proto_eval_gegenbauer_l_t_var = &_func_eval_gegenbauer_l
  1487. from .orthogonal_eval cimport eval_genlaguerre as _func_eval_genlaguerre
  1488. ctypedef double complex _proto_eval_genlaguerre_double_complex__t(double, double, double complex) nogil
  1489. cdef _proto_eval_genlaguerre_double_complex__t *_proto_eval_genlaguerre_double_complex__t_var = &_func_eval_genlaguerre[double_complex]
  1490. from .orthogonal_eval cimport eval_genlaguerre as _func_eval_genlaguerre
  1491. ctypedef double _proto_eval_genlaguerre_double__t(double, double, double) nogil
  1492. cdef _proto_eval_genlaguerre_double__t *_proto_eval_genlaguerre_double__t_var = &_func_eval_genlaguerre[double]
  1493. from .orthogonal_eval cimport eval_genlaguerre_l as _func_eval_genlaguerre_l
  1494. ctypedef double _proto_eval_genlaguerre_l_t(long, double, double) nogil
  1495. cdef _proto_eval_genlaguerre_l_t *_proto_eval_genlaguerre_l_t_var = &_func_eval_genlaguerre_l
  1496. from .orthogonal_eval cimport eval_hermite as _func_eval_hermite
  1497. ctypedef double _proto_eval_hermite_t(long, double) nogil
  1498. cdef _proto_eval_hermite_t *_proto_eval_hermite_t_var = &_func_eval_hermite
  1499. from .orthogonal_eval cimport eval_hermitenorm as _func_eval_hermitenorm
  1500. ctypedef double _proto_eval_hermitenorm_t(long, double) nogil
  1501. cdef _proto_eval_hermitenorm_t *_proto_eval_hermitenorm_t_var = &_func_eval_hermitenorm
  1502. from .orthogonal_eval cimport eval_jacobi as _func_eval_jacobi
  1503. ctypedef double complex _proto_eval_jacobi_double_complex__t(double, double, double, double complex) nogil
  1504. cdef _proto_eval_jacobi_double_complex__t *_proto_eval_jacobi_double_complex__t_var = &_func_eval_jacobi[double_complex]
  1505. from .orthogonal_eval cimport eval_jacobi as _func_eval_jacobi
  1506. ctypedef double _proto_eval_jacobi_double__t(double, double, double, double) nogil
  1507. cdef _proto_eval_jacobi_double__t *_proto_eval_jacobi_double__t_var = &_func_eval_jacobi[double]
  1508. from .orthogonal_eval cimport eval_jacobi_l as _func_eval_jacobi_l
  1509. ctypedef double _proto_eval_jacobi_l_t(long, double, double, double) nogil
  1510. cdef _proto_eval_jacobi_l_t *_proto_eval_jacobi_l_t_var = &_func_eval_jacobi_l
  1511. from .orthogonal_eval cimport eval_laguerre as _func_eval_laguerre
  1512. ctypedef double complex _proto_eval_laguerre_double_complex__t(double, double complex) nogil
  1513. cdef _proto_eval_laguerre_double_complex__t *_proto_eval_laguerre_double_complex__t_var = &_func_eval_laguerre[double_complex]
  1514. from .orthogonal_eval cimport eval_laguerre as _func_eval_laguerre
  1515. ctypedef double _proto_eval_laguerre_double__t(double, double) nogil
  1516. cdef _proto_eval_laguerre_double__t *_proto_eval_laguerre_double__t_var = &_func_eval_laguerre[double]
  1517. from .orthogonal_eval cimport eval_laguerre_l as _func_eval_laguerre_l
  1518. ctypedef double _proto_eval_laguerre_l_t(long, double) nogil
  1519. cdef _proto_eval_laguerre_l_t *_proto_eval_laguerre_l_t_var = &_func_eval_laguerre_l
  1520. from .orthogonal_eval cimport eval_legendre as _func_eval_legendre
  1521. ctypedef double complex _proto_eval_legendre_double_complex__t(double, double complex) nogil
  1522. cdef _proto_eval_legendre_double_complex__t *_proto_eval_legendre_double_complex__t_var = &_func_eval_legendre[double_complex]
  1523. from .orthogonal_eval cimport eval_legendre as _func_eval_legendre
  1524. ctypedef double _proto_eval_legendre_double__t(double, double) nogil
  1525. cdef _proto_eval_legendre_double__t *_proto_eval_legendre_double__t_var = &_func_eval_legendre[double]
  1526. from .orthogonal_eval cimport eval_legendre_l as _func_eval_legendre_l
  1527. ctypedef double _proto_eval_legendre_l_t(long, double) nogil
  1528. cdef _proto_eval_legendre_l_t *_proto_eval_legendre_l_t_var = &_func_eval_legendre_l
  1529. from .orthogonal_eval cimport eval_sh_chebyt as _func_eval_sh_chebyt
  1530. ctypedef double complex _proto_eval_sh_chebyt_double_complex__t(double, double complex) nogil
  1531. cdef _proto_eval_sh_chebyt_double_complex__t *_proto_eval_sh_chebyt_double_complex__t_var = &_func_eval_sh_chebyt[double_complex]
  1532. from .orthogonal_eval cimport eval_sh_chebyt as _func_eval_sh_chebyt
  1533. ctypedef double _proto_eval_sh_chebyt_double__t(double, double) nogil
  1534. cdef _proto_eval_sh_chebyt_double__t *_proto_eval_sh_chebyt_double__t_var = &_func_eval_sh_chebyt[double]
  1535. from .orthogonal_eval cimport eval_sh_chebyt_l as _func_eval_sh_chebyt_l
  1536. ctypedef double _proto_eval_sh_chebyt_l_t(long, double) nogil
  1537. cdef _proto_eval_sh_chebyt_l_t *_proto_eval_sh_chebyt_l_t_var = &_func_eval_sh_chebyt_l
  1538. from .orthogonal_eval cimport eval_sh_chebyu as _func_eval_sh_chebyu
  1539. ctypedef double complex _proto_eval_sh_chebyu_double_complex__t(double, double complex) nogil
  1540. cdef _proto_eval_sh_chebyu_double_complex__t *_proto_eval_sh_chebyu_double_complex__t_var = &_func_eval_sh_chebyu[double_complex]
  1541. from .orthogonal_eval cimport eval_sh_chebyu as _func_eval_sh_chebyu
  1542. ctypedef double _proto_eval_sh_chebyu_double__t(double, double) nogil
  1543. cdef _proto_eval_sh_chebyu_double__t *_proto_eval_sh_chebyu_double__t_var = &_func_eval_sh_chebyu[double]
  1544. from .orthogonal_eval cimport eval_sh_chebyu_l as _func_eval_sh_chebyu_l
  1545. ctypedef double _proto_eval_sh_chebyu_l_t(long, double) nogil
  1546. cdef _proto_eval_sh_chebyu_l_t *_proto_eval_sh_chebyu_l_t_var = &_func_eval_sh_chebyu_l
  1547. from .orthogonal_eval cimport eval_sh_jacobi as _func_eval_sh_jacobi
  1548. ctypedef double complex _proto_eval_sh_jacobi_double_complex__t(double, double, double, double complex) nogil
  1549. cdef _proto_eval_sh_jacobi_double_complex__t *_proto_eval_sh_jacobi_double_complex__t_var = &_func_eval_sh_jacobi[double_complex]
  1550. from .orthogonal_eval cimport eval_sh_jacobi as _func_eval_sh_jacobi
  1551. ctypedef double _proto_eval_sh_jacobi_double__t(double, double, double, double) nogil
  1552. cdef _proto_eval_sh_jacobi_double__t *_proto_eval_sh_jacobi_double__t_var = &_func_eval_sh_jacobi[double]
  1553. from .orthogonal_eval cimport eval_sh_jacobi_l as _func_eval_sh_jacobi_l
  1554. ctypedef double _proto_eval_sh_jacobi_l_t(long, double, double, double) nogil
  1555. cdef _proto_eval_sh_jacobi_l_t *_proto_eval_sh_jacobi_l_t_var = &_func_eval_sh_jacobi_l
  1556. from .orthogonal_eval cimport eval_sh_legendre as _func_eval_sh_legendre
  1557. ctypedef double complex _proto_eval_sh_legendre_double_complex__t(double, double complex) nogil
  1558. cdef _proto_eval_sh_legendre_double_complex__t *_proto_eval_sh_legendre_double_complex__t_var = &_func_eval_sh_legendre[double_complex]
  1559. from .orthogonal_eval cimport eval_sh_legendre as _func_eval_sh_legendre
  1560. ctypedef double _proto_eval_sh_legendre_double__t(double, double) nogil
  1561. cdef _proto_eval_sh_legendre_double__t *_proto_eval_sh_legendre_double__t_var = &_func_eval_sh_legendre[double]
  1562. from .orthogonal_eval cimport eval_sh_legendre_l as _func_eval_sh_legendre_l
  1563. ctypedef double _proto_eval_sh_legendre_l_t(long, double) nogil
  1564. cdef _proto_eval_sh_legendre_l_t *_proto_eval_sh_legendre_l_t_var = &_func_eval_sh_legendre_l
  1565. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1566. cdef double complex _func_cexp1_wrap "cexp1_wrap"(double complex) nogil
  1567. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1568. cdef double _func_exp1_wrap "exp1_wrap"(double) nogil
  1569. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1570. cdef double _func_exp10 "exp10"(double) nogil
  1571. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1572. cdef double _func_exp2 "exp2"(double) nogil
  1573. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1574. cdef double complex _func_cexpi_wrap "cexpi_wrap"(double complex) nogil
  1575. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1576. cdef double _func_expi_wrap "expi_wrap"(double) nogil
  1577. from ._cunity cimport cexpm1 as _func_cexpm1
  1578. ctypedef double complex _proto_cexpm1_t(double complex) nogil
  1579. cdef _proto_cexpm1_t *_proto_cexpm1_t_var = &_func_cexpm1
  1580. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1581. cdef double _func_expm1 "expm1"(double) nogil
  1582. from ._legacy cimport expn_unsafe as _func_expn_unsafe
  1583. ctypedef double _proto_expn_unsafe_t(double, double) nogil
  1584. cdef _proto_expn_unsafe_t *_proto_expn_unsafe_t_var = &_func_expn_unsafe
  1585. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1586. cdef double _func_expn "expn"(int, double) nogil
  1587. from ._exprel cimport exprel as _func_exprel
  1588. ctypedef double _proto_exprel_t(double) nogil
  1589. cdef _proto_exprel_t *_proto_exprel_t_var = &_func_exprel
  1590. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1591. cdef double _func_fdtr "fdtr"(double, double, double) nogil
  1592. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1593. cdef double _func_fdtrc "fdtrc"(double, double, double) nogil
  1594. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1595. cdef double _func_fdtri "fdtri"(double, double, double) nogil
  1596. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1597. cdef double _func_cdff4_wrap "cdff4_wrap"(double, double, double) nogil
  1598. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1599. cdef int _func_fresnl "fresnl"(double, double *, double *) nogil
  1600. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1601. cdef int _func_cfresnl_wrap "cfresnl_wrap"(double complex, double complex *, double complex *) nogil
  1602. from ._loggamma cimport cgamma as _func_cgamma
  1603. ctypedef double complex _proto_cgamma_t(double complex) nogil
  1604. cdef _proto_cgamma_t *_proto_cgamma_t_var = &_func_cgamma
  1605. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1606. cdef double _func_Gamma "Gamma"(double) nogil
  1607. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1608. cdef double _func_igam "igam"(double, double) nogil
  1609. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1610. cdef double _func_igamc "igamc"(double, double) nogil
  1611. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1612. cdef double _func_igamci "igamci"(double, double) nogil
  1613. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1614. cdef double _func_igami "igami"(double, double) nogil
  1615. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1616. cdef double _func_lgam "lgam"(double) nogil
  1617. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1618. cdef double _func_gammasgn "gammasgn"(double) nogil
  1619. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1620. cdef double _func_gdtr "gdtr"(double, double, double) nogil
  1621. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1622. cdef double _func_gdtrc "gdtrc"(double, double, double) nogil
  1623. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1624. cdef double _func_cdfgam4_wrap "cdfgam4_wrap"(double, double, double) nogil
  1625. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1626. cdef double _func_cdfgam3_wrap "cdfgam3_wrap"(double, double, double) nogil
  1627. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1628. cdef double _func_cdfgam2_wrap "cdfgam2_wrap"(double, double, double) nogil
  1629. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1630. cdef double complex _func_cbesh_wrap1 "cbesh_wrap1"(double, double complex) nogil
  1631. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1632. cdef double complex _func_cbesh_wrap1_e "cbesh_wrap1_e"(double, double complex) nogil
  1633. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1634. cdef double complex _func_cbesh_wrap2 "cbesh_wrap2"(double, double complex) nogil
  1635. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1636. cdef double complex _func_cbesh_wrap2_e "cbesh_wrap2_e"(double, double complex) nogil
  1637. from ._convex_analysis cimport huber as _func_huber
  1638. ctypedef double _proto_huber_t(double, double) nogil
  1639. cdef _proto_huber_t *_proto_huber_t_var = &_func_huber
  1640. from ._hyp0f1 cimport _hyp0f1_cmplx as _func__hyp0f1_cmplx
  1641. ctypedef double complex _proto__hyp0f1_cmplx_t(double, double complex) nogil
  1642. cdef _proto__hyp0f1_cmplx_t *_proto__hyp0f1_cmplx_t_var = &_func__hyp0f1_cmplx
  1643. from ._hyp0f1 cimport _hyp0f1_real as _func__hyp0f1_real
  1644. ctypedef double _proto__hyp0f1_real_t(double, double) nogil
  1645. cdef _proto__hyp0f1_real_t *_proto__hyp0f1_real_t_var = &_func__hyp0f1_real
  1646. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1647. cdef double complex _func_chyp1f1_wrap "chyp1f1_wrap"(double, double, double complex) nogil
  1648. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1649. cdef double _func_hyp2f1 "hyp2f1"(double, double, double, double) nogil
  1650. from ._hyp2f1 cimport hyp2f1_complex as _func_hyp2f1_complex
  1651. ctypedef double complex _proto_hyp2f1_complex_t(double, double, double, double complex) nogil
  1652. cdef _proto_hyp2f1_complex_t *_proto_hyp2f1_complex_t_var = &_func_hyp2f1_complex
  1653. from ._hypergeometric cimport hyperu as _func_hyperu
  1654. ctypedef double _proto_hyperu_t(double, double, double) nogil
  1655. cdef _proto_hyperu_t *_proto_hyperu_t_var = &_func_hyperu
  1656. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1657. cdef double _func_i0 "i0"(double) nogil
  1658. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1659. cdef double _func_i0e "i0e"(double) nogil
  1660. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1661. cdef double _func_i1 "i1"(double) nogil
  1662. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1663. cdef double _func_i1e "i1e"(double) nogil
  1664. from ._boxcox cimport inv_boxcox as _func_inv_boxcox
  1665. ctypedef double _proto_inv_boxcox_t(double, double) nogil
  1666. cdef _proto_inv_boxcox_t *_proto_inv_boxcox_t_var = &_func_inv_boxcox
  1667. from ._boxcox cimport inv_boxcox1p as _func_inv_boxcox1p
  1668. ctypedef double _proto_inv_boxcox1p_t(double, double) nogil
  1669. cdef _proto_inv_boxcox1p_t *_proto_inv_boxcox1p_t_var = &_func_inv_boxcox1p
  1670. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1671. cdef int _func_it2i0k0_wrap "it2i0k0_wrap"(double, double *, double *) nogil
  1672. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1673. cdef int _func_it2j0y0_wrap "it2j0y0_wrap"(double, double *, double *) nogil
  1674. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1675. cdef double _func_it2struve0_wrap "it2struve0_wrap"(double) nogil
  1676. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1677. cdef int _func_itairy_wrap "itairy_wrap"(double, double *, double *, double *, double *) nogil
  1678. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1679. cdef int _func_it1i0k0_wrap "it1i0k0_wrap"(double, double *, double *) nogil
  1680. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1681. cdef int _func_it1j0y0_wrap "it1j0y0_wrap"(double, double *, double *) nogil
  1682. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1683. cdef double _func_itmodstruve0_wrap "itmodstruve0_wrap"(double) nogil
  1684. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1685. cdef double _func_itstruve0_wrap "itstruve0_wrap"(double) nogil
  1686. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1687. cdef double complex _func_cbesi_wrap "cbesi_wrap"(double, double complex) nogil
  1688. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1689. cdef double _func_iv "iv"(double, double) nogil
  1690. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1691. cdef double complex _func_cbesi_wrap_e "cbesi_wrap_e"(double, double complex) nogil
  1692. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1693. cdef double _func_cbesi_wrap_e_real "cbesi_wrap_e_real"(double, double) nogil
  1694. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1695. cdef double _func_j0 "j0"(double) nogil
  1696. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1697. cdef double _func_j1 "j1"(double) nogil
  1698. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1699. cdef double complex _func_cbesj_wrap "cbesj_wrap"(double, double complex) nogil
  1700. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1701. cdef double _func_cbesj_wrap_real "cbesj_wrap_real"(double, double) nogil
  1702. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1703. cdef double complex _func_cbesj_wrap_e "cbesj_wrap_e"(double, double complex) nogil
  1704. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1705. cdef double _func_cbesj_wrap_e_real "cbesj_wrap_e_real"(double, double) nogil
  1706. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1707. cdef double _func_k0 "k0"(double) nogil
  1708. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1709. cdef double _func_k0e "k0e"(double) nogil
  1710. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1711. cdef double _func_k1 "k1"(double) nogil
  1712. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1713. cdef double _func_k1e "k1e"(double) nogil
  1714. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1715. cdef double _func_kei_wrap "kei_wrap"(double) nogil
  1716. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1717. cdef double _func_keip_wrap "keip_wrap"(double) nogil
  1718. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1719. cdef int _func_kelvin_wrap "kelvin_wrap"(double, double complex *, double complex *, double complex *, double complex *) nogil
  1720. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1721. cdef double _func_ker_wrap "ker_wrap"(double) nogil
  1722. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1723. cdef double _func_kerp_wrap "kerp_wrap"(double) nogil
  1724. from ._convex_analysis cimport kl_div as _func_kl_div
  1725. ctypedef double _proto_kl_div_t(double, double) nogil
  1726. cdef _proto_kl_div_t *_proto_kl_div_t_var = &_func_kl_div
  1727. from ._legacy cimport kn_unsafe as _func_kn_unsafe
  1728. ctypedef double _proto_kn_unsafe_t(double, double) nogil
  1729. cdef _proto_kn_unsafe_t *_proto_kn_unsafe_t_var = &_func_kn_unsafe
  1730. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1731. cdef double _func_cbesk_wrap_real_int "cbesk_wrap_real_int"(int, double) nogil
  1732. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1733. cdef double _func_kolmogi "kolmogi"(double) nogil
  1734. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1735. cdef double _func_kolmogorov "kolmogorov"(double) nogil
  1736. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1737. cdef double complex _func_cbesk_wrap "cbesk_wrap"(double, double complex) nogil
  1738. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1739. cdef double _func_cbesk_wrap_real "cbesk_wrap_real"(double, double) nogil
  1740. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1741. cdef double complex _func_cbesk_wrap_e "cbesk_wrap_e"(double, double complex) nogil
  1742. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1743. cdef double _func_cbesk_wrap_e_real "cbesk_wrap_e_real"(double, double) nogil
  1744. from ._cunity cimport clog1p as _func_clog1p
  1745. ctypedef double complex _proto_clog1p_t(double complex) nogil
  1746. cdef _proto_clog1p_t *_proto_clog1p_t_var = &_func_clog1p
  1747. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1748. cdef double _func_log1p "log1p"(double) nogil
  1749. from ._loggamma cimport loggamma_real as _func_loggamma_real
  1750. ctypedef double _proto_loggamma_real_t(double) nogil
  1751. cdef _proto_loggamma_real_t *_proto_loggamma_real_t_var = &_func_loggamma_real
  1752. from ._loggamma cimport loggamma as _func_loggamma
  1753. ctypedef double complex _proto_loggamma_t(double complex) nogil
  1754. cdef _proto_loggamma_t *_proto_loggamma_t_var = &_func_loggamma
  1755. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1756. cdef double _func_pmv_wrap "pmv_wrap"(double, double, double) nogil
  1757. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1758. cdef double _func_cem_cva_wrap "cem_cva_wrap"(double, double) nogil
  1759. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1760. cdef double _func_sem_cva_wrap "sem_cva_wrap"(double, double) nogil
  1761. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1762. cdef int _func_cem_wrap "cem_wrap"(double, double, double, double *, double *) nogil
  1763. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1764. cdef int _func_mcm1_wrap "mcm1_wrap"(double, double, double, double *, double *) nogil
  1765. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1766. cdef int _func_mcm2_wrap "mcm2_wrap"(double, double, double, double *, double *) nogil
  1767. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1768. cdef int _func_msm1_wrap "msm1_wrap"(double, double, double, double *, double *) nogil
  1769. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1770. cdef int _func_msm2_wrap "msm2_wrap"(double, double, double, double *, double *) nogil
  1771. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1772. cdef int _func_sem_wrap "sem_wrap"(double, double, double, double *, double *) nogil
  1773. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1774. cdef int _func_modified_fresnel_minus_wrap "modified_fresnel_minus_wrap"(double, double complex *, double complex *) nogil
  1775. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1776. cdef int _func_modified_fresnel_plus_wrap "modified_fresnel_plus_wrap"(double, double complex *, double complex *) nogil
  1777. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1778. cdef double _func_struve_l "struve_l"(double, double) nogil
  1779. from ._legacy cimport nbdtr_unsafe as _func_nbdtr_unsafe
  1780. ctypedef double _proto_nbdtr_unsafe_t(double, double, double) nogil
  1781. cdef _proto_nbdtr_unsafe_t *_proto_nbdtr_unsafe_t_var = &_func_nbdtr_unsafe
  1782. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1783. cdef double _func_nbdtr "nbdtr"(int, int, double) nogil
  1784. from ._legacy cimport nbdtrc_unsafe as _func_nbdtrc_unsafe
  1785. ctypedef double _proto_nbdtrc_unsafe_t(double, double, double) nogil
  1786. cdef _proto_nbdtrc_unsafe_t *_proto_nbdtrc_unsafe_t_var = &_func_nbdtrc_unsafe
  1787. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1788. cdef double _func_nbdtrc "nbdtrc"(int, int, double) nogil
  1789. from ._legacy cimport nbdtri_unsafe as _func_nbdtri_unsafe
  1790. ctypedef double _proto_nbdtri_unsafe_t(double, double, double) nogil
  1791. cdef _proto_nbdtri_unsafe_t *_proto_nbdtri_unsafe_t_var = &_func_nbdtri_unsafe
  1792. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1793. cdef double _func_nbdtri "nbdtri"(int, int, double) nogil
  1794. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1795. cdef double _func_cdfnbn2_wrap "cdfnbn2_wrap"(double, double, double) nogil
  1796. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1797. cdef double _func_cdfnbn3_wrap "cdfnbn3_wrap"(double, double, double) nogil
  1798. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1799. cdef double _func_cdffnc1_wrap "cdffnc1_wrap"(double, double, double, double) nogil
  1800. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1801. cdef double _func_cdffnc2_wrap "cdffnc2_wrap"(double, double, double, double) nogil
  1802. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1803. cdef double _func_cdffnc4_wrap "cdffnc4_wrap"(double, double, double, double) nogil
  1804. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1805. cdef double _func_cdffnc3_wrap "cdffnc3_wrap"(double, double, double, double) nogil
  1806. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1807. cdef double _func_cdffnc5_wrap "cdffnc5_wrap"(double, double, double, double) nogil
  1808. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1809. cdef double _func_cdftnc1_wrap "cdftnc1_wrap"(double, double, double) nogil
  1810. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1811. cdef double _func_cdftnc3_wrap "cdftnc3_wrap"(double, double, double) nogil
  1812. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1813. cdef double _func_cdftnc4_wrap "cdftnc4_wrap"(double, double, double) nogil
  1814. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1815. cdef double _func_cdftnc2_wrap "cdftnc2_wrap"(double, double, double) nogil
  1816. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1817. cdef double _func_ndtr "ndtr"(double) nogil
  1818. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1819. cdef double _func_ndtri "ndtri"(double) nogil
  1820. from ._ndtri_exp cimport ndtri_exp as _func_ndtri_exp
  1821. ctypedef double _proto_ndtri_exp_t(double) nogil
  1822. cdef _proto_ndtri_exp_t *_proto_ndtri_exp_t_var = &_func_ndtri_exp
  1823. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1824. cdef double _func_cdfnor3_wrap "cdfnor3_wrap"(double, double, double) nogil
  1825. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1826. cdef double _func_cdfnor4_wrap "cdfnor4_wrap"(double, double, double) nogil
  1827. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1828. cdef double _func_oblate_aswfa_nocv_wrap "oblate_aswfa_nocv_wrap"(double, double, double, double, double *) nogil
  1829. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1830. cdef int _func_oblate_aswfa_wrap "oblate_aswfa_wrap"(double, double, double, double, double, double *, double *) nogil
  1831. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1832. cdef double _func_oblate_segv_wrap "oblate_segv_wrap"(double, double, double) nogil
  1833. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1834. cdef double _func_oblate_radial1_nocv_wrap "oblate_radial1_nocv_wrap"(double, double, double, double, double *) nogil
  1835. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1836. cdef int _func_oblate_radial1_wrap "oblate_radial1_wrap"(double, double, double, double, double, double *, double *) nogil
  1837. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1838. cdef double _func_oblate_radial2_nocv_wrap "oblate_radial2_nocv_wrap"(double, double, double, double, double *) nogil
  1839. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1840. cdef int _func_oblate_radial2_wrap "oblate_radial2_wrap"(double, double, double, double, double, double *, double *) nogil
  1841. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1842. cdef double _func_owens_t "owens_t"(double, double) nogil
  1843. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1844. cdef int _func_pbdv_wrap "pbdv_wrap"(double, double, double *, double *) nogil
  1845. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1846. cdef int _func_pbvv_wrap "pbvv_wrap"(double, double, double *, double *) nogil
  1847. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1848. cdef int _func_pbwa_wrap "pbwa_wrap"(double, double, double *, double *) nogil
  1849. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1850. cdef double _func_pdtr "pdtr"(double, double) nogil
  1851. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1852. cdef double _func_pdtrc "pdtrc"(double, double) nogil
  1853. from ._legacy cimport pdtri_unsafe as _func_pdtri_unsafe
  1854. ctypedef double _proto_pdtri_unsafe_t(double, double) nogil
  1855. cdef _proto_pdtri_unsafe_t *_proto_pdtri_unsafe_t_var = &_func_pdtri_unsafe
  1856. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1857. cdef double _func_pdtri "pdtri"(int, double) nogil
  1858. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1859. cdef double _func_cdfpoi2_wrap "cdfpoi2_wrap"(double, double) nogil
  1860. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1861. cdef double _func_poch "poch"(double, double) nogil
  1862. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1863. cdef double _func_prolate_aswfa_nocv_wrap "prolate_aswfa_nocv_wrap"(double, double, double, double, double *) nogil
  1864. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1865. cdef int _func_prolate_aswfa_wrap "prolate_aswfa_wrap"(double, double, double, double, double, double *, double *) nogil
  1866. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1867. cdef double _func_prolate_segv_wrap "prolate_segv_wrap"(double, double, double) nogil
  1868. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1869. cdef double _func_prolate_radial1_nocv_wrap "prolate_radial1_nocv_wrap"(double, double, double, double, double *) nogil
  1870. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1871. cdef int _func_prolate_radial1_wrap "prolate_radial1_wrap"(double, double, double, double, double, double *, double *) nogil
  1872. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1873. cdef double _func_prolate_radial2_nocv_wrap "prolate_radial2_nocv_wrap"(double, double, double, double, double *) nogil
  1874. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1875. cdef int _func_prolate_radial2_wrap "prolate_radial2_wrap"(double, double, double, double, double, double *, double *) nogil
  1876. from ._convex_analysis cimport pseudo_huber as _func_pseudo_huber
  1877. ctypedef double _proto_pseudo_huber_t(double, double) nogil
  1878. cdef _proto_pseudo_huber_t *_proto_pseudo_huber_t_var = &_func_pseudo_huber
  1879. from ._digamma cimport cdigamma as _func_cdigamma
  1880. ctypedef double complex _proto_cdigamma_t(double complex) nogil
  1881. cdef _proto_cdigamma_t *_proto_cdigamma_t_var = &_func_cdigamma
  1882. from ._digamma cimport digamma as _func_digamma
  1883. ctypedef double _proto_digamma_t(double) nogil
  1884. cdef _proto_digamma_t *_proto_digamma_t_var = &_func_digamma
  1885. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1886. cdef double _func_radian "radian"(double, double, double) nogil
  1887. from ._convex_analysis cimport rel_entr as _func_rel_entr
  1888. ctypedef double _proto_rel_entr_t(double, double) nogil
  1889. cdef _proto_rel_entr_t *_proto_rel_entr_t_var = &_func_rel_entr
  1890. from ._loggamma cimport crgamma as _func_crgamma
  1891. ctypedef double complex _proto_crgamma_t(double complex) nogil
  1892. cdef _proto_crgamma_t *_proto_crgamma_t_var = &_func_crgamma
  1893. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1894. cdef double _func_rgamma "rgamma"(double) nogil
  1895. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1896. cdef double _func_round "round"(double) nogil
  1897. from ._sici cimport cshichi as _func_cshichi
  1898. ctypedef int _proto_cshichi_t(double complex, double complex *, double complex *) nogil
  1899. cdef _proto_cshichi_t *_proto_cshichi_t_var = &_func_cshichi
  1900. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1901. cdef int _func_shichi "shichi"(double, double *, double *) nogil
  1902. from ._sici cimport csici as _func_csici
  1903. ctypedef int _proto_csici_t(double complex, double complex *, double complex *) nogil
  1904. cdef _proto_csici_t *_proto_csici_t_var = &_func_csici
  1905. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1906. cdef int _func_sici "sici"(double, double *, double *) nogil
  1907. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1908. cdef double _func_sindg "sindg"(double) nogil
  1909. from ._legacy cimport smirnov_unsafe as _func_smirnov_unsafe
  1910. ctypedef double _proto_smirnov_unsafe_t(double, double) nogil
  1911. cdef _proto_smirnov_unsafe_t *_proto_smirnov_unsafe_t_var = &_func_smirnov_unsafe
  1912. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1913. cdef double _func_smirnov "smirnov"(int, double) nogil
  1914. from ._legacy cimport smirnovi_unsafe as _func_smirnovi_unsafe
  1915. ctypedef double _proto_smirnovi_unsafe_t(double, double) nogil
  1916. cdef _proto_smirnovi_unsafe_t *_proto_smirnovi_unsafe_t_var = &_func_smirnovi_unsafe
  1917. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1918. cdef double _func_smirnovi "smirnovi"(int, double) nogil
  1919. from ._spence cimport cspence as _func_cspence
  1920. ctypedef double complex _proto_cspence_t(double complex) nogil
  1921. cdef _proto_cspence_t *_proto_cspence_t_var = &_func_cspence
  1922. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1923. cdef double _func_spence "spence"(double) nogil
  1924. from ._legacy cimport sph_harmonic_unsafe as _func_sph_harmonic_unsafe
  1925. ctypedef double complex _proto_sph_harmonic_unsafe_t(double, double, double, double) nogil
  1926. cdef _proto_sph_harmonic_unsafe_t *_proto_sph_harmonic_unsafe_t_var = &_func_sph_harmonic_unsafe
  1927. from .sph_harm cimport sph_harmonic as _func_sph_harmonic
  1928. ctypedef double complex _proto_sph_harmonic_t(int, int, double, double) nogil
  1929. cdef _proto_sph_harmonic_t *_proto_sph_harmonic_t_var = &_func_sph_harmonic
  1930. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1931. cdef double _func_cdft1_wrap "cdft1_wrap"(double, double) nogil
  1932. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1933. cdef double _func_cdft3_wrap "cdft3_wrap"(double, double) nogil
  1934. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1935. cdef double _func_cdft2_wrap "cdft2_wrap"(double, double) nogil
  1936. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1937. cdef double _func_struve_h "struve_h"(double, double) nogil
  1938. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1939. cdef double _func_tandg "tandg"(double) nogil
  1940. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1941. cdef double _func_tukeylambdacdf "tukeylambdacdf"(double, double) nogil
  1942. from ._wright_bessel cimport wright_bessel_scalar as _func_wright_bessel_scalar
  1943. ctypedef double _proto_wright_bessel_scalar_t(double, double, double) nogil
  1944. cdef _proto_wright_bessel_scalar_t *_proto_wright_bessel_scalar_t_var = &_func_wright_bessel_scalar
  1945. from ._xlogy cimport xlog1py as _func_xlog1py
  1946. ctypedef double _proto_xlog1py_double__t(double, double) nogil
  1947. cdef _proto_xlog1py_double__t *_proto_xlog1py_double__t_var = &_func_xlog1py[double]
  1948. from ._xlogy cimport xlog1py as _func_xlog1py
  1949. ctypedef double complex _proto_xlog1py_double_complex__t(double complex, double complex) nogil
  1950. cdef _proto_xlog1py_double_complex__t *_proto_xlog1py_double_complex__t_var = &_func_xlog1py[double_complex]
  1951. from ._xlogy cimport xlogy as _func_xlogy
  1952. ctypedef double _proto_xlogy_double__t(double, double) nogil
  1953. cdef _proto_xlogy_double__t *_proto_xlogy_double__t_var = &_func_xlogy[double]
  1954. from ._xlogy cimport xlogy as _func_xlogy
  1955. ctypedef double complex _proto_xlogy_double_complex__t(double complex, double complex) nogil
  1956. cdef _proto_xlogy_double_complex__t *_proto_xlogy_double_complex__t_var = &_func_xlogy[double_complex]
  1957. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1958. cdef double _func_y0 "y0"(double) nogil
  1959. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1960. cdef double _func_y1 "y1"(double) nogil
  1961. from ._legacy cimport yn_unsafe as _func_yn_unsafe
  1962. ctypedef double _proto_yn_unsafe_t(double, double) nogil
  1963. cdef _proto_yn_unsafe_t *_proto_yn_unsafe_t_var = &_func_yn_unsafe
  1964. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1965. cdef double _func_yn "yn"(int, double) nogil
  1966. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1967. cdef double complex _func_cbesy_wrap "cbesy_wrap"(double, double complex) nogil
  1968. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1969. cdef double _func_cbesy_wrap_real "cbesy_wrap_real"(double, double) nogil
  1970. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1971. cdef double complex _func_cbesy_wrap_e "cbesy_wrap_e"(double, double complex) nogil
  1972. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1973. cdef double _func_cbesy_wrap_e_real "cbesy_wrap_e_real"(double, double) nogil
  1974. cdef extern from r"/project/.mesonpy-9bazhw_8/build/scipy/special/_ufuncs_defs.h":
  1975. cdef double _func_zetac "zetac"(double) nogil
  1976. cdef np.PyUFuncGenericFunction ufunc__cosine_cdf_loops[2]
  1977. cdef void *ufunc__cosine_cdf_ptr[4]
  1978. cdef void *ufunc__cosine_cdf_data[2]
  1979. cdef char ufunc__cosine_cdf_types[4]
  1980. cdef char *ufunc__cosine_cdf_doc = (
  1981. "_cosine_cdf(x)\n"
  1982. "\n"
  1983. "Cumulative distribution function (CDF) of the cosine distribution::\n"
  1984. "\n"
  1985. " { 0, x < -pi\n"
  1986. " cdf(x) = { (pi + x + sin(x))/(2*pi), -pi <= x <= pi\n"
  1987. " { 1, x > pi\n"
  1988. "\n"
  1989. "Parameters\n"
  1990. "----------\n"
  1991. "x : array_like\n"
  1992. " `x` must contain real numbers.\n"
  1993. "\n"
  1994. "Returns\n"
  1995. "-------\n"
  1996. "scalar or ndarray\n"
  1997. " The cosine distribution CDF evaluated at `x`.")
  1998. ufunc__cosine_cdf_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  1999. ufunc__cosine_cdf_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2000. ufunc__cosine_cdf_types[0] = <char>NPY_FLOAT
  2001. ufunc__cosine_cdf_types[1] = <char>NPY_FLOAT
  2002. ufunc__cosine_cdf_types[2] = <char>NPY_DOUBLE
  2003. ufunc__cosine_cdf_types[3] = <char>NPY_DOUBLE
  2004. ufunc__cosine_cdf_ptr[2*0] = <void*>_func_cosine_cdf
  2005. ufunc__cosine_cdf_ptr[2*0+1] = <void*>(<char*>"_cosine_cdf")
  2006. ufunc__cosine_cdf_ptr[2*1] = <void*>_func_cosine_cdf
  2007. ufunc__cosine_cdf_ptr[2*1+1] = <void*>(<char*>"_cosine_cdf")
  2008. ufunc__cosine_cdf_data[0] = &ufunc__cosine_cdf_ptr[2*0]
  2009. ufunc__cosine_cdf_data[1] = &ufunc__cosine_cdf_ptr[2*1]
  2010. _cosine_cdf = np.PyUFunc_FromFuncAndData(ufunc__cosine_cdf_loops, ufunc__cosine_cdf_data, ufunc__cosine_cdf_types, 2, 1, 1, 0, "_cosine_cdf", ufunc__cosine_cdf_doc, 0)
  2011. cdef np.PyUFuncGenericFunction ufunc__cosine_invcdf_loops[2]
  2012. cdef void *ufunc__cosine_invcdf_ptr[4]
  2013. cdef void *ufunc__cosine_invcdf_data[2]
  2014. cdef char ufunc__cosine_invcdf_types[4]
  2015. cdef char *ufunc__cosine_invcdf_doc = (
  2016. "_cosine_invcdf(p)\n"
  2017. "\n"
  2018. "Inverse of the cumulative distribution function (CDF) of the cosine\n"
  2019. "distribution.\n"
  2020. "\n"
  2021. "The CDF of the cosine distribution is::\n"
  2022. "\n"
  2023. " cdf(x) = (pi + x + sin(x))/(2*pi)\n"
  2024. "\n"
  2025. "This function computes the inverse of cdf(x).\n"
  2026. "\n"
  2027. "Parameters\n"
  2028. "----------\n"
  2029. "p : array_like\n"
  2030. " `p` must contain real numbers in the interval ``0 <= p <= 1``.\n"
  2031. " `nan` is returned for values of `p` outside the interval [0, 1].\n"
  2032. "\n"
  2033. "Returns\n"
  2034. "-------\n"
  2035. "scalar or ndarray\n"
  2036. " The inverse of the cosine distribution CDF evaluated at `p`.")
  2037. ufunc__cosine_invcdf_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2038. ufunc__cosine_invcdf_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2039. ufunc__cosine_invcdf_types[0] = <char>NPY_FLOAT
  2040. ufunc__cosine_invcdf_types[1] = <char>NPY_FLOAT
  2041. ufunc__cosine_invcdf_types[2] = <char>NPY_DOUBLE
  2042. ufunc__cosine_invcdf_types[3] = <char>NPY_DOUBLE
  2043. ufunc__cosine_invcdf_ptr[2*0] = <void*>_func_cosine_invcdf
  2044. ufunc__cosine_invcdf_ptr[2*0+1] = <void*>(<char*>"_cosine_invcdf")
  2045. ufunc__cosine_invcdf_ptr[2*1] = <void*>_func_cosine_invcdf
  2046. ufunc__cosine_invcdf_ptr[2*1+1] = <void*>(<char*>"_cosine_invcdf")
  2047. ufunc__cosine_invcdf_data[0] = &ufunc__cosine_invcdf_ptr[2*0]
  2048. ufunc__cosine_invcdf_data[1] = &ufunc__cosine_invcdf_ptr[2*1]
  2049. _cosine_invcdf = np.PyUFunc_FromFuncAndData(ufunc__cosine_invcdf_loops, ufunc__cosine_invcdf_data, ufunc__cosine_invcdf_types, 2, 1, 1, 0, "_cosine_invcdf", ufunc__cosine_invcdf_doc, 0)
  2050. cdef np.PyUFuncGenericFunction ufunc__cospi_loops[4]
  2051. cdef void *ufunc__cospi_ptr[8]
  2052. cdef void *ufunc__cospi_data[4]
  2053. cdef char ufunc__cospi_types[8]
  2054. cdef char *ufunc__cospi_doc = (
  2055. "Internal function, do not use.")
  2056. ufunc__cospi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2057. ufunc__cospi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2058. ufunc__cospi_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  2059. ufunc__cospi_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  2060. ufunc__cospi_types[0] = <char>NPY_FLOAT
  2061. ufunc__cospi_types[1] = <char>NPY_FLOAT
  2062. ufunc__cospi_types[2] = <char>NPY_DOUBLE
  2063. ufunc__cospi_types[3] = <char>NPY_DOUBLE
  2064. ufunc__cospi_types[4] = <char>NPY_CFLOAT
  2065. ufunc__cospi_types[5] = <char>NPY_CFLOAT
  2066. ufunc__cospi_types[6] = <char>NPY_CDOUBLE
  2067. ufunc__cospi_types[7] = <char>NPY_CDOUBLE
  2068. ufunc__cospi_ptr[2*0] = <void*>_func_cospi
  2069. ufunc__cospi_ptr[2*0+1] = <void*>(<char*>"_cospi")
  2070. ufunc__cospi_ptr[2*1] = <void*>_func_cospi
  2071. ufunc__cospi_ptr[2*1+1] = <void*>(<char*>"_cospi")
  2072. ufunc__cospi_ptr[2*2] = <void*>_func_ccospi
  2073. ufunc__cospi_ptr[2*2+1] = <void*>(<char*>"_cospi")
  2074. ufunc__cospi_ptr[2*3] = <void*>_func_ccospi
  2075. ufunc__cospi_ptr[2*3+1] = <void*>(<char*>"_cospi")
  2076. ufunc__cospi_data[0] = &ufunc__cospi_ptr[2*0]
  2077. ufunc__cospi_data[1] = &ufunc__cospi_ptr[2*1]
  2078. ufunc__cospi_data[2] = &ufunc__cospi_ptr[2*2]
  2079. ufunc__cospi_data[3] = &ufunc__cospi_ptr[2*3]
  2080. _cospi = np.PyUFunc_FromFuncAndData(ufunc__cospi_loops, ufunc__cospi_data, ufunc__cospi_types, 4, 1, 1, 0, "_cospi", ufunc__cospi_doc, 0)
  2081. cdef np.PyUFuncGenericFunction ufunc__ellip_harm_loops[3]
  2082. cdef void *ufunc__ellip_harm_ptr[6]
  2083. cdef void *ufunc__ellip_harm_data[3]
  2084. cdef char ufunc__ellip_harm_types[24]
  2085. cdef char *ufunc__ellip_harm_doc = (
  2086. "Internal function, use `ellip_harm` instead.")
  2087. ufunc__ellip_harm_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddddddd__As_fffffff_f
  2088. ufunc__ellip_harm_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddiiddd__As_ddllddd_d
  2089. ufunc__ellip_harm_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddddddd__As_ddddddd_d
  2090. ufunc__ellip_harm_types[0] = <char>NPY_FLOAT
  2091. ufunc__ellip_harm_types[1] = <char>NPY_FLOAT
  2092. ufunc__ellip_harm_types[2] = <char>NPY_FLOAT
  2093. ufunc__ellip_harm_types[3] = <char>NPY_FLOAT
  2094. ufunc__ellip_harm_types[4] = <char>NPY_FLOAT
  2095. ufunc__ellip_harm_types[5] = <char>NPY_FLOAT
  2096. ufunc__ellip_harm_types[6] = <char>NPY_FLOAT
  2097. ufunc__ellip_harm_types[7] = <char>NPY_FLOAT
  2098. ufunc__ellip_harm_types[8] = <char>NPY_DOUBLE
  2099. ufunc__ellip_harm_types[9] = <char>NPY_DOUBLE
  2100. ufunc__ellip_harm_types[10] = <char>NPY_LONG
  2101. ufunc__ellip_harm_types[11] = <char>NPY_LONG
  2102. ufunc__ellip_harm_types[12] = <char>NPY_DOUBLE
  2103. ufunc__ellip_harm_types[13] = <char>NPY_DOUBLE
  2104. ufunc__ellip_harm_types[14] = <char>NPY_DOUBLE
  2105. ufunc__ellip_harm_types[15] = <char>NPY_DOUBLE
  2106. ufunc__ellip_harm_types[16] = <char>NPY_DOUBLE
  2107. ufunc__ellip_harm_types[17] = <char>NPY_DOUBLE
  2108. ufunc__ellip_harm_types[18] = <char>NPY_DOUBLE
  2109. ufunc__ellip_harm_types[19] = <char>NPY_DOUBLE
  2110. ufunc__ellip_harm_types[20] = <char>NPY_DOUBLE
  2111. ufunc__ellip_harm_types[21] = <char>NPY_DOUBLE
  2112. ufunc__ellip_harm_types[22] = <char>NPY_DOUBLE
  2113. ufunc__ellip_harm_types[23] = <char>NPY_DOUBLE
  2114. ufunc__ellip_harm_ptr[2*0] = <void*>_func_ellip_harmonic_unsafe
  2115. ufunc__ellip_harm_ptr[2*0+1] = <void*>(<char*>"_ellip_harm")
  2116. ufunc__ellip_harm_ptr[2*1] = <void*>_func_ellip_harmonic
  2117. ufunc__ellip_harm_ptr[2*1+1] = <void*>(<char*>"_ellip_harm")
  2118. ufunc__ellip_harm_ptr[2*2] = <void*>_func_ellip_harmonic_unsafe
  2119. ufunc__ellip_harm_ptr[2*2+1] = <void*>(<char*>"_ellip_harm")
  2120. ufunc__ellip_harm_data[0] = &ufunc__ellip_harm_ptr[2*0]
  2121. ufunc__ellip_harm_data[1] = &ufunc__ellip_harm_ptr[2*1]
  2122. ufunc__ellip_harm_data[2] = &ufunc__ellip_harm_ptr[2*2]
  2123. _ellip_harm = np.PyUFunc_FromFuncAndData(ufunc__ellip_harm_loops, ufunc__ellip_harm_data, ufunc__ellip_harm_types, 3, 7, 1, 0, "_ellip_harm", ufunc__ellip_harm_doc, 0)
  2124. cdef np.PyUFuncGenericFunction ufunc__factorial_loops[2]
  2125. cdef void *ufunc__factorial_ptr[4]
  2126. cdef void *ufunc__factorial_data[2]
  2127. cdef char ufunc__factorial_types[4]
  2128. cdef char *ufunc__factorial_doc = (
  2129. "Internal function, do not use.")
  2130. ufunc__factorial_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2131. ufunc__factorial_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2132. ufunc__factorial_types[0] = <char>NPY_FLOAT
  2133. ufunc__factorial_types[1] = <char>NPY_FLOAT
  2134. ufunc__factorial_types[2] = <char>NPY_DOUBLE
  2135. ufunc__factorial_types[3] = <char>NPY_DOUBLE
  2136. ufunc__factorial_ptr[2*0] = <void*>_func__factorial
  2137. ufunc__factorial_ptr[2*0+1] = <void*>(<char*>"_factorial")
  2138. ufunc__factorial_ptr[2*1] = <void*>_func__factorial
  2139. ufunc__factorial_ptr[2*1+1] = <void*>(<char*>"_factorial")
  2140. ufunc__factorial_data[0] = &ufunc__factorial_ptr[2*0]
  2141. ufunc__factorial_data[1] = &ufunc__factorial_ptr[2*1]
  2142. _factorial = np.PyUFunc_FromFuncAndData(ufunc__factorial_loops, ufunc__factorial_data, ufunc__factorial_types, 2, 1, 1, 0, "_factorial", ufunc__factorial_doc, 0)
  2143. cdef np.PyUFuncGenericFunction ufunc__igam_fac_loops[2]
  2144. cdef void *ufunc__igam_fac_ptr[4]
  2145. cdef void *ufunc__igam_fac_data[2]
  2146. cdef char ufunc__igam_fac_types[6]
  2147. cdef char *ufunc__igam_fac_doc = (
  2148. "Internal function, do not use.")
  2149. ufunc__igam_fac_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2150. ufunc__igam_fac_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2151. ufunc__igam_fac_types[0] = <char>NPY_FLOAT
  2152. ufunc__igam_fac_types[1] = <char>NPY_FLOAT
  2153. ufunc__igam_fac_types[2] = <char>NPY_FLOAT
  2154. ufunc__igam_fac_types[3] = <char>NPY_DOUBLE
  2155. ufunc__igam_fac_types[4] = <char>NPY_DOUBLE
  2156. ufunc__igam_fac_types[5] = <char>NPY_DOUBLE
  2157. ufunc__igam_fac_ptr[2*0] = <void*>_func_igam_fac
  2158. ufunc__igam_fac_ptr[2*0+1] = <void*>(<char*>"_igam_fac")
  2159. ufunc__igam_fac_ptr[2*1] = <void*>_func_igam_fac
  2160. ufunc__igam_fac_ptr[2*1+1] = <void*>(<char*>"_igam_fac")
  2161. ufunc__igam_fac_data[0] = &ufunc__igam_fac_ptr[2*0]
  2162. ufunc__igam_fac_data[1] = &ufunc__igam_fac_ptr[2*1]
  2163. _igam_fac = np.PyUFunc_FromFuncAndData(ufunc__igam_fac_loops, ufunc__igam_fac_data, ufunc__igam_fac_types, 2, 2, 1, 0, "_igam_fac", ufunc__igam_fac_doc, 0)
  2164. cdef np.PyUFuncGenericFunction ufunc__kolmogc_loops[2]
  2165. cdef void *ufunc__kolmogc_ptr[4]
  2166. cdef void *ufunc__kolmogc_data[2]
  2167. cdef char ufunc__kolmogc_types[4]
  2168. cdef char *ufunc__kolmogc_doc = (
  2169. "Internal function, do not use.")
  2170. ufunc__kolmogc_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2171. ufunc__kolmogc_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2172. ufunc__kolmogc_types[0] = <char>NPY_FLOAT
  2173. ufunc__kolmogc_types[1] = <char>NPY_FLOAT
  2174. ufunc__kolmogc_types[2] = <char>NPY_DOUBLE
  2175. ufunc__kolmogc_types[3] = <char>NPY_DOUBLE
  2176. ufunc__kolmogc_ptr[2*0] = <void*>_func_kolmogc
  2177. ufunc__kolmogc_ptr[2*0+1] = <void*>(<char*>"_kolmogc")
  2178. ufunc__kolmogc_ptr[2*1] = <void*>_func_kolmogc
  2179. ufunc__kolmogc_ptr[2*1+1] = <void*>(<char*>"_kolmogc")
  2180. ufunc__kolmogc_data[0] = &ufunc__kolmogc_ptr[2*0]
  2181. ufunc__kolmogc_data[1] = &ufunc__kolmogc_ptr[2*1]
  2182. _kolmogc = np.PyUFunc_FromFuncAndData(ufunc__kolmogc_loops, ufunc__kolmogc_data, ufunc__kolmogc_types, 2, 1, 1, 0, "_kolmogc", ufunc__kolmogc_doc, 0)
  2183. cdef np.PyUFuncGenericFunction ufunc__kolmogci_loops[2]
  2184. cdef void *ufunc__kolmogci_ptr[4]
  2185. cdef void *ufunc__kolmogci_data[2]
  2186. cdef char ufunc__kolmogci_types[4]
  2187. cdef char *ufunc__kolmogci_doc = (
  2188. "Internal function, do not use.")
  2189. ufunc__kolmogci_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2190. ufunc__kolmogci_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2191. ufunc__kolmogci_types[0] = <char>NPY_FLOAT
  2192. ufunc__kolmogci_types[1] = <char>NPY_FLOAT
  2193. ufunc__kolmogci_types[2] = <char>NPY_DOUBLE
  2194. ufunc__kolmogci_types[3] = <char>NPY_DOUBLE
  2195. ufunc__kolmogci_ptr[2*0] = <void*>_func_kolmogci
  2196. ufunc__kolmogci_ptr[2*0+1] = <void*>(<char*>"_kolmogci")
  2197. ufunc__kolmogci_ptr[2*1] = <void*>_func_kolmogci
  2198. ufunc__kolmogci_ptr[2*1+1] = <void*>(<char*>"_kolmogci")
  2199. ufunc__kolmogci_data[0] = &ufunc__kolmogci_ptr[2*0]
  2200. ufunc__kolmogci_data[1] = &ufunc__kolmogci_ptr[2*1]
  2201. _kolmogci = np.PyUFunc_FromFuncAndData(ufunc__kolmogci_loops, ufunc__kolmogci_data, ufunc__kolmogci_types, 2, 1, 1, 0, "_kolmogci", ufunc__kolmogci_doc, 0)
  2202. cdef np.PyUFuncGenericFunction ufunc__kolmogp_loops[2]
  2203. cdef void *ufunc__kolmogp_ptr[4]
  2204. cdef void *ufunc__kolmogp_data[2]
  2205. cdef char ufunc__kolmogp_types[4]
  2206. cdef char *ufunc__kolmogp_doc = (
  2207. "Internal function, do not use.")
  2208. ufunc__kolmogp_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2209. ufunc__kolmogp_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2210. ufunc__kolmogp_types[0] = <char>NPY_FLOAT
  2211. ufunc__kolmogp_types[1] = <char>NPY_FLOAT
  2212. ufunc__kolmogp_types[2] = <char>NPY_DOUBLE
  2213. ufunc__kolmogp_types[3] = <char>NPY_DOUBLE
  2214. ufunc__kolmogp_ptr[2*0] = <void*>_func_kolmogp
  2215. ufunc__kolmogp_ptr[2*0+1] = <void*>(<char*>"_kolmogp")
  2216. ufunc__kolmogp_ptr[2*1] = <void*>_func_kolmogp
  2217. ufunc__kolmogp_ptr[2*1+1] = <void*>(<char*>"_kolmogp")
  2218. ufunc__kolmogp_data[0] = &ufunc__kolmogp_ptr[2*0]
  2219. ufunc__kolmogp_data[1] = &ufunc__kolmogp_ptr[2*1]
  2220. _kolmogp = np.PyUFunc_FromFuncAndData(ufunc__kolmogp_loops, ufunc__kolmogp_data, ufunc__kolmogp_types, 2, 1, 1, 0, "_kolmogp", ufunc__kolmogp_doc, 0)
  2221. cdef np.PyUFuncGenericFunction ufunc__lambertw_loops[1]
  2222. cdef void *ufunc__lambertw_ptr[2]
  2223. cdef void *ufunc__lambertw_data[1]
  2224. cdef char ufunc__lambertw_types[4]
  2225. cdef char *ufunc__lambertw_doc = (
  2226. "Internal function, use `lambertw` instead.")
  2227. ufunc__lambertw_loops[0] = <np.PyUFuncGenericFunction>loop_D_Dld__As_Dld_D
  2228. ufunc__lambertw_types[0] = <char>NPY_CDOUBLE
  2229. ufunc__lambertw_types[1] = <char>NPY_LONG
  2230. ufunc__lambertw_types[2] = <char>NPY_DOUBLE
  2231. ufunc__lambertw_types[3] = <char>NPY_CDOUBLE
  2232. ufunc__lambertw_ptr[2*0] = <void*>_func_lambertw_scalar
  2233. ufunc__lambertw_ptr[2*0+1] = <void*>(<char*>"_lambertw")
  2234. ufunc__lambertw_data[0] = &ufunc__lambertw_ptr[2*0]
  2235. _lambertw = np.PyUFunc_FromFuncAndData(ufunc__lambertw_loops, ufunc__lambertw_data, ufunc__lambertw_types, 1, 3, 1, 0, "_lambertw", ufunc__lambertw_doc, 0)
  2236. cdef np.PyUFuncGenericFunction ufunc__lanczos_sum_expg_scaled_loops[2]
  2237. cdef void *ufunc__lanczos_sum_expg_scaled_ptr[4]
  2238. cdef void *ufunc__lanczos_sum_expg_scaled_data[2]
  2239. cdef char ufunc__lanczos_sum_expg_scaled_types[4]
  2240. cdef char *ufunc__lanczos_sum_expg_scaled_doc = (
  2241. "Internal function, do not use.")
  2242. ufunc__lanczos_sum_expg_scaled_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2243. ufunc__lanczos_sum_expg_scaled_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2244. ufunc__lanczos_sum_expg_scaled_types[0] = <char>NPY_FLOAT
  2245. ufunc__lanczos_sum_expg_scaled_types[1] = <char>NPY_FLOAT
  2246. ufunc__lanczos_sum_expg_scaled_types[2] = <char>NPY_DOUBLE
  2247. ufunc__lanczos_sum_expg_scaled_types[3] = <char>NPY_DOUBLE
  2248. ufunc__lanczos_sum_expg_scaled_ptr[2*0] = <void*>_func_lanczos_sum_expg_scaled
  2249. ufunc__lanczos_sum_expg_scaled_ptr[2*0+1] = <void*>(<char*>"_lanczos_sum_expg_scaled")
  2250. ufunc__lanczos_sum_expg_scaled_ptr[2*1] = <void*>_func_lanczos_sum_expg_scaled
  2251. ufunc__lanczos_sum_expg_scaled_ptr[2*1+1] = <void*>(<char*>"_lanczos_sum_expg_scaled")
  2252. ufunc__lanczos_sum_expg_scaled_data[0] = &ufunc__lanczos_sum_expg_scaled_ptr[2*0]
  2253. ufunc__lanczos_sum_expg_scaled_data[1] = &ufunc__lanczos_sum_expg_scaled_ptr[2*1]
  2254. _lanczos_sum_expg_scaled = np.PyUFunc_FromFuncAndData(ufunc__lanczos_sum_expg_scaled_loops, ufunc__lanczos_sum_expg_scaled_data, ufunc__lanczos_sum_expg_scaled_types, 2, 1, 1, 0, "_lanczos_sum_expg_scaled", ufunc__lanczos_sum_expg_scaled_doc, 0)
  2255. cdef np.PyUFuncGenericFunction ufunc__lgam1p_loops[2]
  2256. cdef void *ufunc__lgam1p_ptr[4]
  2257. cdef void *ufunc__lgam1p_data[2]
  2258. cdef char ufunc__lgam1p_types[4]
  2259. cdef char *ufunc__lgam1p_doc = (
  2260. "Internal function, do not use.")
  2261. ufunc__lgam1p_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2262. ufunc__lgam1p_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2263. ufunc__lgam1p_types[0] = <char>NPY_FLOAT
  2264. ufunc__lgam1p_types[1] = <char>NPY_FLOAT
  2265. ufunc__lgam1p_types[2] = <char>NPY_DOUBLE
  2266. ufunc__lgam1p_types[3] = <char>NPY_DOUBLE
  2267. ufunc__lgam1p_ptr[2*0] = <void*>_func_lgam1p
  2268. ufunc__lgam1p_ptr[2*0+1] = <void*>(<char*>"_lgam1p")
  2269. ufunc__lgam1p_ptr[2*1] = <void*>_func_lgam1p
  2270. ufunc__lgam1p_ptr[2*1+1] = <void*>(<char*>"_lgam1p")
  2271. ufunc__lgam1p_data[0] = &ufunc__lgam1p_ptr[2*0]
  2272. ufunc__lgam1p_data[1] = &ufunc__lgam1p_ptr[2*1]
  2273. _lgam1p = np.PyUFunc_FromFuncAndData(ufunc__lgam1p_loops, ufunc__lgam1p_data, ufunc__lgam1p_types, 2, 1, 1, 0, "_lgam1p", ufunc__lgam1p_doc, 0)
  2274. cdef np.PyUFuncGenericFunction ufunc__log1pmx_loops[2]
  2275. cdef void *ufunc__log1pmx_ptr[4]
  2276. cdef void *ufunc__log1pmx_data[2]
  2277. cdef char ufunc__log1pmx_types[4]
  2278. cdef char *ufunc__log1pmx_doc = (
  2279. "Internal function, do not use.")
  2280. ufunc__log1pmx_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2281. ufunc__log1pmx_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2282. ufunc__log1pmx_types[0] = <char>NPY_FLOAT
  2283. ufunc__log1pmx_types[1] = <char>NPY_FLOAT
  2284. ufunc__log1pmx_types[2] = <char>NPY_DOUBLE
  2285. ufunc__log1pmx_types[3] = <char>NPY_DOUBLE
  2286. ufunc__log1pmx_ptr[2*0] = <void*>_func_log1pmx
  2287. ufunc__log1pmx_ptr[2*0+1] = <void*>(<char*>"_log1pmx")
  2288. ufunc__log1pmx_ptr[2*1] = <void*>_func_log1pmx
  2289. ufunc__log1pmx_ptr[2*1+1] = <void*>(<char*>"_log1pmx")
  2290. ufunc__log1pmx_data[0] = &ufunc__log1pmx_ptr[2*0]
  2291. ufunc__log1pmx_data[1] = &ufunc__log1pmx_ptr[2*1]
  2292. _log1pmx = np.PyUFunc_FromFuncAndData(ufunc__log1pmx_loops, ufunc__log1pmx_data, ufunc__log1pmx_types, 2, 1, 1, 0, "_log1pmx", ufunc__log1pmx_doc, 0)
  2293. cdef np.PyUFuncGenericFunction ufunc__riemann_zeta_loops[2]
  2294. cdef void *ufunc__riemann_zeta_ptr[4]
  2295. cdef void *ufunc__riemann_zeta_data[2]
  2296. cdef char ufunc__riemann_zeta_types[4]
  2297. cdef char *ufunc__riemann_zeta_doc = (
  2298. "Internal function, use `zeta` instead.")
  2299. ufunc__riemann_zeta_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2300. ufunc__riemann_zeta_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2301. ufunc__riemann_zeta_types[0] = <char>NPY_FLOAT
  2302. ufunc__riemann_zeta_types[1] = <char>NPY_FLOAT
  2303. ufunc__riemann_zeta_types[2] = <char>NPY_DOUBLE
  2304. ufunc__riemann_zeta_types[3] = <char>NPY_DOUBLE
  2305. ufunc__riemann_zeta_ptr[2*0] = <void*>_func_riemann_zeta
  2306. ufunc__riemann_zeta_ptr[2*0+1] = <void*>(<char*>"_riemann_zeta")
  2307. ufunc__riemann_zeta_ptr[2*1] = <void*>_func_riemann_zeta
  2308. ufunc__riemann_zeta_ptr[2*1+1] = <void*>(<char*>"_riemann_zeta")
  2309. ufunc__riemann_zeta_data[0] = &ufunc__riemann_zeta_ptr[2*0]
  2310. ufunc__riemann_zeta_data[1] = &ufunc__riemann_zeta_ptr[2*1]
  2311. _riemann_zeta = np.PyUFunc_FromFuncAndData(ufunc__riemann_zeta_loops, ufunc__riemann_zeta_data, ufunc__riemann_zeta_types, 2, 1, 1, 0, "_riemann_zeta", ufunc__riemann_zeta_doc, 0)
  2312. cdef np.PyUFuncGenericFunction ufunc__sf_error_test_function_loops[1]
  2313. cdef void *ufunc__sf_error_test_function_ptr[2]
  2314. cdef void *ufunc__sf_error_test_function_data[1]
  2315. cdef char ufunc__sf_error_test_function_types[2]
  2316. cdef char *ufunc__sf_error_test_function_doc = (
  2317. "Private function; do not use.")
  2318. ufunc__sf_error_test_function_loops[0] = <np.PyUFuncGenericFunction>loop_i_i__As_l_l
  2319. ufunc__sf_error_test_function_types[0] = <char>NPY_LONG
  2320. ufunc__sf_error_test_function_types[1] = <char>NPY_LONG
  2321. ufunc__sf_error_test_function_ptr[2*0] = <void*>_func__sf_error_test_function
  2322. ufunc__sf_error_test_function_ptr[2*0+1] = <void*>(<char*>"_sf_error_test_function")
  2323. ufunc__sf_error_test_function_data[0] = &ufunc__sf_error_test_function_ptr[2*0]
  2324. _sf_error_test_function = np.PyUFunc_FromFuncAndData(ufunc__sf_error_test_function_loops, ufunc__sf_error_test_function_data, ufunc__sf_error_test_function_types, 1, 1, 1, 0, "_sf_error_test_function", ufunc__sf_error_test_function_doc, 0)
  2325. cdef np.PyUFuncGenericFunction ufunc__sinpi_loops[4]
  2326. cdef void *ufunc__sinpi_ptr[8]
  2327. cdef void *ufunc__sinpi_data[4]
  2328. cdef char ufunc__sinpi_types[8]
  2329. cdef char *ufunc__sinpi_doc = (
  2330. "Internal function, do not use.")
  2331. ufunc__sinpi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  2332. ufunc__sinpi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  2333. ufunc__sinpi_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  2334. ufunc__sinpi_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  2335. ufunc__sinpi_types[0] = <char>NPY_FLOAT
  2336. ufunc__sinpi_types[1] = <char>NPY_FLOAT
  2337. ufunc__sinpi_types[2] = <char>NPY_DOUBLE
  2338. ufunc__sinpi_types[3] = <char>NPY_DOUBLE
  2339. ufunc__sinpi_types[4] = <char>NPY_CFLOAT
  2340. ufunc__sinpi_types[5] = <char>NPY_CFLOAT
  2341. ufunc__sinpi_types[6] = <char>NPY_CDOUBLE
  2342. ufunc__sinpi_types[7] = <char>NPY_CDOUBLE
  2343. ufunc__sinpi_ptr[2*0] = <void*>_func_sinpi
  2344. ufunc__sinpi_ptr[2*0+1] = <void*>(<char*>"_sinpi")
  2345. ufunc__sinpi_ptr[2*1] = <void*>_func_sinpi
  2346. ufunc__sinpi_ptr[2*1+1] = <void*>(<char*>"_sinpi")
  2347. ufunc__sinpi_ptr[2*2] = <void*>_func_csinpi
  2348. ufunc__sinpi_ptr[2*2+1] = <void*>(<char*>"_sinpi")
  2349. ufunc__sinpi_ptr[2*3] = <void*>_func_csinpi
  2350. ufunc__sinpi_ptr[2*3+1] = <void*>(<char*>"_sinpi")
  2351. ufunc__sinpi_data[0] = &ufunc__sinpi_ptr[2*0]
  2352. ufunc__sinpi_data[1] = &ufunc__sinpi_ptr[2*1]
  2353. ufunc__sinpi_data[2] = &ufunc__sinpi_ptr[2*2]
  2354. ufunc__sinpi_data[3] = &ufunc__sinpi_ptr[2*3]
  2355. _sinpi = np.PyUFunc_FromFuncAndData(ufunc__sinpi_loops, ufunc__sinpi_data, ufunc__sinpi_types, 4, 1, 1, 0, "_sinpi", ufunc__sinpi_doc, 0)
  2356. cdef np.PyUFuncGenericFunction ufunc__smirnovc_loops[3]
  2357. cdef void *ufunc__smirnovc_ptr[6]
  2358. cdef void *ufunc__smirnovc_data[3]
  2359. cdef char ufunc__smirnovc_types[9]
  2360. cdef char *ufunc__smirnovc_doc = (
  2361. "_smirnovc(n, d)\n"
  2362. " Internal function, do not use.")
  2363. ufunc__smirnovc_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  2364. ufunc__smirnovc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2365. ufunc__smirnovc_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2366. ufunc__smirnovc_types[0] = <char>NPY_LONG
  2367. ufunc__smirnovc_types[1] = <char>NPY_DOUBLE
  2368. ufunc__smirnovc_types[2] = <char>NPY_DOUBLE
  2369. ufunc__smirnovc_types[3] = <char>NPY_FLOAT
  2370. ufunc__smirnovc_types[4] = <char>NPY_FLOAT
  2371. ufunc__smirnovc_types[5] = <char>NPY_FLOAT
  2372. ufunc__smirnovc_types[6] = <char>NPY_DOUBLE
  2373. ufunc__smirnovc_types[7] = <char>NPY_DOUBLE
  2374. ufunc__smirnovc_types[8] = <char>NPY_DOUBLE
  2375. ufunc__smirnovc_ptr[2*0] = <void*>_func_smirnovc
  2376. ufunc__smirnovc_ptr[2*0+1] = <void*>(<char*>"_smirnovc")
  2377. ufunc__smirnovc_ptr[2*1] = <void*>_func_smirnovc_unsafe
  2378. ufunc__smirnovc_ptr[2*1+1] = <void*>(<char*>"_smirnovc")
  2379. ufunc__smirnovc_ptr[2*2] = <void*>_func_smirnovc_unsafe
  2380. ufunc__smirnovc_ptr[2*2+1] = <void*>(<char*>"_smirnovc")
  2381. ufunc__smirnovc_data[0] = &ufunc__smirnovc_ptr[2*0]
  2382. ufunc__smirnovc_data[1] = &ufunc__smirnovc_ptr[2*1]
  2383. ufunc__smirnovc_data[2] = &ufunc__smirnovc_ptr[2*2]
  2384. _smirnovc = np.PyUFunc_FromFuncAndData(ufunc__smirnovc_loops, ufunc__smirnovc_data, ufunc__smirnovc_types, 3, 2, 1, 0, "_smirnovc", ufunc__smirnovc_doc, 0)
  2385. cdef np.PyUFuncGenericFunction ufunc__smirnovci_loops[3]
  2386. cdef void *ufunc__smirnovci_ptr[6]
  2387. cdef void *ufunc__smirnovci_data[3]
  2388. cdef char ufunc__smirnovci_types[9]
  2389. cdef char *ufunc__smirnovci_doc = (
  2390. "Internal function, do not use.")
  2391. ufunc__smirnovci_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  2392. ufunc__smirnovci_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2393. ufunc__smirnovci_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2394. ufunc__smirnovci_types[0] = <char>NPY_LONG
  2395. ufunc__smirnovci_types[1] = <char>NPY_DOUBLE
  2396. ufunc__smirnovci_types[2] = <char>NPY_DOUBLE
  2397. ufunc__smirnovci_types[3] = <char>NPY_FLOAT
  2398. ufunc__smirnovci_types[4] = <char>NPY_FLOAT
  2399. ufunc__smirnovci_types[5] = <char>NPY_FLOAT
  2400. ufunc__smirnovci_types[6] = <char>NPY_DOUBLE
  2401. ufunc__smirnovci_types[7] = <char>NPY_DOUBLE
  2402. ufunc__smirnovci_types[8] = <char>NPY_DOUBLE
  2403. ufunc__smirnovci_ptr[2*0] = <void*>_func_smirnovci
  2404. ufunc__smirnovci_ptr[2*0+1] = <void*>(<char*>"_smirnovci")
  2405. ufunc__smirnovci_ptr[2*1] = <void*>_func_smirnovci_unsafe
  2406. ufunc__smirnovci_ptr[2*1+1] = <void*>(<char*>"_smirnovci")
  2407. ufunc__smirnovci_ptr[2*2] = <void*>_func_smirnovci_unsafe
  2408. ufunc__smirnovci_ptr[2*2+1] = <void*>(<char*>"_smirnovci")
  2409. ufunc__smirnovci_data[0] = &ufunc__smirnovci_ptr[2*0]
  2410. ufunc__smirnovci_data[1] = &ufunc__smirnovci_ptr[2*1]
  2411. ufunc__smirnovci_data[2] = &ufunc__smirnovci_ptr[2*2]
  2412. _smirnovci = np.PyUFunc_FromFuncAndData(ufunc__smirnovci_loops, ufunc__smirnovci_data, ufunc__smirnovci_types, 3, 2, 1, 0, "_smirnovci", ufunc__smirnovci_doc, 0)
  2413. cdef np.PyUFuncGenericFunction ufunc__smirnovp_loops[3]
  2414. cdef void *ufunc__smirnovp_ptr[6]
  2415. cdef void *ufunc__smirnovp_data[3]
  2416. cdef char ufunc__smirnovp_types[9]
  2417. cdef char *ufunc__smirnovp_doc = (
  2418. "_smirnovp(n, p)\n"
  2419. " Internal function, do not use.")
  2420. ufunc__smirnovp_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  2421. ufunc__smirnovp_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2422. ufunc__smirnovp_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2423. ufunc__smirnovp_types[0] = <char>NPY_LONG
  2424. ufunc__smirnovp_types[1] = <char>NPY_DOUBLE
  2425. ufunc__smirnovp_types[2] = <char>NPY_DOUBLE
  2426. ufunc__smirnovp_types[3] = <char>NPY_FLOAT
  2427. ufunc__smirnovp_types[4] = <char>NPY_FLOAT
  2428. ufunc__smirnovp_types[5] = <char>NPY_FLOAT
  2429. ufunc__smirnovp_types[6] = <char>NPY_DOUBLE
  2430. ufunc__smirnovp_types[7] = <char>NPY_DOUBLE
  2431. ufunc__smirnovp_types[8] = <char>NPY_DOUBLE
  2432. ufunc__smirnovp_ptr[2*0] = <void*>_func_smirnovp
  2433. ufunc__smirnovp_ptr[2*0+1] = <void*>(<char*>"_smirnovp")
  2434. ufunc__smirnovp_ptr[2*1] = <void*>_func_smirnovp_unsafe
  2435. ufunc__smirnovp_ptr[2*1+1] = <void*>(<char*>"_smirnovp")
  2436. ufunc__smirnovp_ptr[2*2] = <void*>_func_smirnovp_unsafe
  2437. ufunc__smirnovp_ptr[2*2+1] = <void*>(<char*>"_smirnovp")
  2438. ufunc__smirnovp_data[0] = &ufunc__smirnovp_ptr[2*0]
  2439. ufunc__smirnovp_data[1] = &ufunc__smirnovp_ptr[2*1]
  2440. ufunc__smirnovp_data[2] = &ufunc__smirnovp_ptr[2*2]
  2441. _smirnovp = np.PyUFunc_FromFuncAndData(ufunc__smirnovp_loops, ufunc__smirnovp_data, ufunc__smirnovp_types, 3, 2, 1, 0, "_smirnovp", ufunc__smirnovp_doc, 0)
  2442. cdef np.PyUFuncGenericFunction ufunc__spherical_in_loops[2]
  2443. cdef void *ufunc__spherical_in_ptr[4]
  2444. cdef void *ufunc__spherical_in_data[2]
  2445. cdef char ufunc__spherical_in_types[6]
  2446. cdef char *ufunc__spherical_in_doc = (
  2447. "Internal function, use `spherical_in` instead.")
  2448. ufunc__spherical_in_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2449. ufunc__spherical_in_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2450. ufunc__spherical_in_types[0] = <char>NPY_LONG
  2451. ufunc__spherical_in_types[1] = <char>NPY_DOUBLE
  2452. ufunc__spherical_in_types[2] = <char>NPY_DOUBLE
  2453. ufunc__spherical_in_types[3] = <char>NPY_LONG
  2454. ufunc__spherical_in_types[4] = <char>NPY_CDOUBLE
  2455. ufunc__spherical_in_types[5] = <char>NPY_CDOUBLE
  2456. ufunc__spherical_in_ptr[2*0] = <void*>_func_spherical_in_real
  2457. ufunc__spherical_in_ptr[2*0+1] = <void*>(<char*>"_spherical_in")
  2458. ufunc__spherical_in_ptr[2*1] = <void*>_func_spherical_in_complex
  2459. ufunc__spherical_in_ptr[2*1+1] = <void*>(<char*>"_spherical_in")
  2460. ufunc__spherical_in_data[0] = &ufunc__spherical_in_ptr[2*0]
  2461. ufunc__spherical_in_data[1] = &ufunc__spherical_in_ptr[2*1]
  2462. _spherical_in = np.PyUFunc_FromFuncAndData(ufunc__spherical_in_loops, ufunc__spherical_in_data, ufunc__spherical_in_types, 2, 2, 1, 0, "_spherical_in", ufunc__spherical_in_doc, 0)
  2463. cdef np.PyUFuncGenericFunction ufunc__spherical_in_d_loops[2]
  2464. cdef void *ufunc__spherical_in_d_ptr[4]
  2465. cdef void *ufunc__spherical_in_d_data[2]
  2466. cdef char ufunc__spherical_in_d_types[6]
  2467. cdef char *ufunc__spherical_in_d_doc = (
  2468. "Internal function, use `spherical_in` instead.")
  2469. ufunc__spherical_in_d_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2470. ufunc__spherical_in_d_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2471. ufunc__spherical_in_d_types[0] = <char>NPY_LONG
  2472. ufunc__spherical_in_d_types[1] = <char>NPY_DOUBLE
  2473. ufunc__spherical_in_d_types[2] = <char>NPY_DOUBLE
  2474. ufunc__spherical_in_d_types[3] = <char>NPY_LONG
  2475. ufunc__spherical_in_d_types[4] = <char>NPY_CDOUBLE
  2476. ufunc__spherical_in_d_types[5] = <char>NPY_CDOUBLE
  2477. ufunc__spherical_in_d_ptr[2*0] = <void*>_func_spherical_in_d_real
  2478. ufunc__spherical_in_d_ptr[2*0+1] = <void*>(<char*>"_spherical_in_d")
  2479. ufunc__spherical_in_d_ptr[2*1] = <void*>_func_spherical_in_d_complex
  2480. ufunc__spherical_in_d_ptr[2*1+1] = <void*>(<char*>"_spherical_in_d")
  2481. ufunc__spherical_in_d_data[0] = &ufunc__spherical_in_d_ptr[2*0]
  2482. ufunc__spherical_in_d_data[1] = &ufunc__spherical_in_d_ptr[2*1]
  2483. _spherical_in_d = np.PyUFunc_FromFuncAndData(ufunc__spherical_in_d_loops, ufunc__spherical_in_d_data, ufunc__spherical_in_d_types, 2, 2, 1, 0, "_spherical_in_d", ufunc__spherical_in_d_doc, 0)
  2484. cdef np.PyUFuncGenericFunction ufunc__spherical_jn_loops[2]
  2485. cdef void *ufunc__spherical_jn_ptr[4]
  2486. cdef void *ufunc__spherical_jn_data[2]
  2487. cdef char ufunc__spherical_jn_types[6]
  2488. cdef char *ufunc__spherical_jn_doc = (
  2489. "Internal function, use `spherical_jn` instead.")
  2490. ufunc__spherical_jn_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2491. ufunc__spherical_jn_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2492. ufunc__spherical_jn_types[0] = <char>NPY_LONG
  2493. ufunc__spherical_jn_types[1] = <char>NPY_DOUBLE
  2494. ufunc__spherical_jn_types[2] = <char>NPY_DOUBLE
  2495. ufunc__spherical_jn_types[3] = <char>NPY_LONG
  2496. ufunc__spherical_jn_types[4] = <char>NPY_CDOUBLE
  2497. ufunc__spherical_jn_types[5] = <char>NPY_CDOUBLE
  2498. ufunc__spherical_jn_ptr[2*0] = <void*>_func_spherical_jn_real
  2499. ufunc__spherical_jn_ptr[2*0+1] = <void*>(<char*>"_spherical_jn")
  2500. ufunc__spherical_jn_ptr[2*1] = <void*>_func_spherical_jn_complex
  2501. ufunc__spherical_jn_ptr[2*1+1] = <void*>(<char*>"_spherical_jn")
  2502. ufunc__spherical_jn_data[0] = &ufunc__spherical_jn_ptr[2*0]
  2503. ufunc__spherical_jn_data[1] = &ufunc__spherical_jn_ptr[2*1]
  2504. _spherical_jn = np.PyUFunc_FromFuncAndData(ufunc__spherical_jn_loops, ufunc__spherical_jn_data, ufunc__spherical_jn_types, 2, 2, 1, 0, "_spherical_jn", ufunc__spherical_jn_doc, 0)
  2505. cdef np.PyUFuncGenericFunction ufunc__spherical_jn_d_loops[2]
  2506. cdef void *ufunc__spherical_jn_d_ptr[4]
  2507. cdef void *ufunc__spherical_jn_d_data[2]
  2508. cdef char ufunc__spherical_jn_d_types[6]
  2509. cdef char *ufunc__spherical_jn_d_doc = (
  2510. "Internal function, use `spherical_jn` instead.")
  2511. ufunc__spherical_jn_d_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2512. ufunc__spherical_jn_d_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2513. ufunc__spherical_jn_d_types[0] = <char>NPY_LONG
  2514. ufunc__spherical_jn_d_types[1] = <char>NPY_DOUBLE
  2515. ufunc__spherical_jn_d_types[2] = <char>NPY_DOUBLE
  2516. ufunc__spherical_jn_d_types[3] = <char>NPY_LONG
  2517. ufunc__spherical_jn_d_types[4] = <char>NPY_CDOUBLE
  2518. ufunc__spherical_jn_d_types[5] = <char>NPY_CDOUBLE
  2519. ufunc__spherical_jn_d_ptr[2*0] = <void*>_func_spherical_jn_d_real
  2520. ufunc__spherical_jn_d_ptr[2*0+1] = <void*>(<char*>"_spherical_jn_d")
  2521. ufunc__spherical_jn_d_ptr[2*1] = <void*>_func_spherical_jn_d_complex
  2522. ufunc__spherical_jn_d_ptr[2*1+1] = <void*>(<char*>"_spherical_jn_d")
  2523. ufunc__spherical_jn_d_data[0] = &ufunc__spherical_jn_d_ptr[2*0]
  2524. ufunc__spherical_jn_d_data[1] = &ufunc__spherical_jn_d_ptr[2*1]
  2525. _spherical_jn_d = np.PyUFunc_FromFuncAndData(ufunc__spherical_jn_d_loops, ufunc__spherical_jn_d_data, ufunc__spherical_jn_d_types, 2, 2, 1, 0, "_spherical_jn_d", ufunc__spherical_jn_d_doc, 0)
  2526. cdef np.PyUFuncGenericFunction ufunc__spherical_kn_loops[2]
  2527. cdef void *ufunc__spherical_kn_ptr[4]
  2528. cdef void *ufunc__spherical_kn_data[2]
  2529. cdef char ufunc__spherical_kn_types[6]
  2530. cdef char *ufunc__spherical_kn_doc = (
  2531. "Internal function, use `spherical_kn` instead.")
  2532. ufunc__spherical_kn_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2533. ufunc__spherical_kn_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2534. ufunc__spherical_kn_types[0] = <char>NPY_LONG
  2535. ufunc__spherical_kn_types[1] = <char>NPY_DOUBLE
  2536. ufunc__spherical_kn_types[2] = <char>NPY_DOUBLE
  2537. ufunc__spherical_kn_types[3] = <char>NPY_LONG
  2538. ufunc__spherical_kn_types[4] = <char>NPY_CDOUBLE
  2539. ufunc__spherical_kn_types[5] = <char>NPY_CDOUBLE
  2540. ufunc__spherical_kn_ptr[2*0] = <void*>_func_spherical_kn_real
  2541. ufunc__spherical_kn_ptr[2*0+1] = <void*>(<char*>"_spherical_kn")
  2542. ufunc__spherical_kn_ptr[2*1] = <void*>_func_spherical_kn_complex
  2543. ufunc__spherical_kn_ptr[2*1+1] = <void*>(<char*>"_spherical_kn")
  2544. ufunc__spherical_kn_data[0] = &ufunc__spherical_kn_ptr[2*0]
  2545. ufunc__spherical_kn_data[1] = &ufunc__spherical_kn_ptr[2*1]
  2546. _spherical_kn = np.PyUFunc_FromFuncAndData(ufunc__spherical_kn_loops, ufunc__spherical_kn_data, ufunc__spherical_kn_types, 2, 2, 1, 0, "_spherical_kn", ufunc__spherical_kn_doc, 0)
  2547. cdef np.PyUFuncGenericFunction ufunc__spherical_kn_d_loops[2]
  2548. cdef void *ufunc__spherical_kn_d_ptr[4]
  2549. cdef void *ufunc__spherical_kn_d_data[2]
  2550. cdef char ufunc__spherical_kn_d_types[6]
  2551. cdef char *ufunc__spherical_kn_d_doc = (
  2552. "Internal function, use `spherical_kn` instead.")
  2553. ufunc__spherical_kn_d_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2554. ufunc__spherical_kn_d_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2555. ufunc__spherical_kn_d_types[0] = <char>NPY_LONG
  2556. ufunc__spherical_kn_d_types[1] = <char>NPY_DOUBLE
  2557. ufunc__spherical_kn_d_types[2] = <char>NPY_DOUBLE
  2558. ufunc__spherical_kn_d_types[3] = <char>NPY_LONG
  2559. ufunc__spherical_kn_d_types[4] = <char>NPY_CDOUBLE
  2560. ufunc__spherical_kn_d_types[5] = <char>NPY_CDOUBLE
  2561. ufunc__spherical_kn_d_ptr[2*0] = <void*>_func_spherical_kn_d_real
  2562. ufunc__spherical_kn_d_ptr[2*0+1] = <void*>(<char*>"_spherical_kn_d")
  2563. ufunc__spherical_kn_d_ptr[2*1] = <void*>_func_spherical_kn_d_complex
  2564. ufunc__spherical_kn_d_ptr[2*1+1] = <void*>(<char*>"_spherical_kn_d")
  2565. ufunc__spherical_kn_d_data[0] = &ufunc__spherical_kn_d_ptr[2*0]
  2566. ufunc__spherical_kn_d_data[1] = &ufunc__spherical_kn_d_ptr[2*1]
  2567. _spherical_kn_d = np.PyUFunc_FromFuncAndData(ufunc__spherical_kn_d_loops, ufunc__spherical_kn_d_data, ufunc__spherical_kn_d_types, 2, 2, 1, 0, "_spherical_kn_d", ufunc__spherical_kn_d_doc, 0)
  2568. cdef np.PyUFuncGenericFunction ufunc__spherical_yn_loops[2]
  2569. cdef void *ufunc__spherical_yn_ptr[4]
  2570. cdef void *ufunc__spherical_yn_data[2]
  2571. cdef char ufunc__spherical_yn_types[6]
  2572. cdef char *ufunc__spherical_yn_doc = (
  2573. "Internal function, use `spherical_yn` instead.")
  2574. ufunc__spherical_yn_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2575. ufunc__spherical_yn_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2576. ufunc__spherical_yn_types[0] = <char>NPY_LONG
  2577. ufunc__spherical_yn_types[1] = <char>NPY_DOUBLE
  2578. ufunc__spherical_yn_types[2] = <char>NPY_DOUBLE
  2579. ufunc__spherical_yn_types[3] = <char>NPY_LONG
  2580. ufunc__spherical_yn_types[4] = <char>NPY_CDOUBLE
  2581. ufunc__spherical_yn_types[5] = <char>NPY_CDOUBLE
  2582. ufunc__spherical_yn_ptr[2*0] = <void*>_func_spherical_yn_real
  2583. ufunc__spherical_yn_ptr[2*0+1] = <void*>(<char*>"_spherical_yn")
  2584. ufunc__spherical_yn_ptr[2*1] = <void*>_func_spherical_yn_complex
  2585. ufunc__spherical_yn_ptr[2*1+1] = <void*>(<char*>"_spherical_yn")
  2586. ufunc__spherical_yn_data[0] = &ufunc__spherical_yn_ptr[2*0]
  2587. ufunc__spherical_yn_data[1] = &ufunc__spherical_yn_ptr[2*1]
  2588. _spherical_yn = np.PyUFunc_FromFuncAndData(ufunc__spherical_yn_loops, ufunc__spherical_yn_data, ufunc__spherical_yn_types, 2, 2, 1, 0, "_spherical_yn", ufunc__spherical_yn_doc, 0)
  2589. cdef np.PyUFuncGenericFunction ufunc__spherical_yn_d_loops[2]
  2590. cdef void *ufunc__spherical_yn_d_ptr[4]
  2591. cdef void *ufunc__spherical_yn_d_data[2]
  2592. cdef char ufunc__spherical_yn_d_types[6]
  2593. cdef char *ufunc__spherical_yn_d_doc = (
  2594. "Internal function, use `spherical_yn` instead.")
  2595. ufunc__spherical_yn_d_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  2596. ufunc__spherical_yn_d_loops[1] = <np.PyUFuncGenericFunction>loop_D_lD__As_lD_D
  2597. ufunc__spherical_yn_d_types[0] = <char>NPY_LONG
  2598. ufunc__spherical_yn_d_types[1] = <char>NPY_DOUBLE
  2599. ufunc__spherical_yn_d_types[2] = <char>NPY_DOUBLE
  2600. ufunc__spherical_yn_d_types[3] = <char>NPY_LONG
  2601. ufunc__spherical_yn_d_types[4] = <char>NPY_CDOUBLE
  2602. ufunc__spherical_yn_d_types[5] = <char>NPY_CDOUBLE
  2603. ufunc__spherical_yn_d_ptr[2*0] = <void*>_func_spherical_yn_d_real
  2604. ufunc__spherical_yn_d_ptr[2*0+1] = <void*>(<char*>"_spherical_yn_d")
  2605. ufunc__spherical_yn_d_ptr[2*1] = <void*>_func_spherical_yn_d_complex
  2606. ufunc__spherical_yn_d_ptr[2*1+1] = <void*>(<char*>"_spherical_yn_d")
  2607. ufunc__spherical_yn_d_data[0] = &ufunc__spherical_yn_d_ptr[2*0]
  2608. ufunc__spherical_yn_d_data[1] = &ufunc__spherical_yn_d_ptr[2*1]
  2609. _spherical_yn_d = np.PyUFunc_FromFuncAndData(ufunc__spherical_yn_d_loops, ufunc__spherical_yn_d_data, ufunc__spherical_yn_d_types, 2, 2, 1, 0, "_spherical_yn_d", ufunc__spherical_yn_d_doc, 0)
  2610. cdef np.PyUFuncGenericFunction ufunc__struve_asymp_large_z_loops[1]
  2611. cdef void *ufunc__struve_asymp_large_z_ptr[2]
  2612. cdef void *ufunc__struve_asymp_large_z_data[1]
  2613. cdef char ufunc__struve_asymp_large_z_types[5]
  2614. cdef char *ufunc__struve_asymp_large_z_doc = (
  2615. "_struve_asymp_large_z(v, z, is_h)\n"
  2616. "\n"
  2617. "Internal function for testing `struve` & `modstruve`\n"
  2618. "\n"
  2619. "Evaluates using asymptotic expansion\n"
  2620. "\n"
  2621. "Returns\n"
  2622. "-------\n"
  2623. "v, err")
  2624. ufunc__struve_asymp_large_z_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddi_d_As_ddl_dd
  2625. ufunc__struve_asymp_large_z_types[0] = <char>NPY_DOUBLE
  2626. ufunc__struve_asymp_large_z_types[1] = <char>NPY_DOUBLE
  2627. ufunc__struve_asymp_large_z_types[2] = <char>NPY_LONG
  2628. ufunc__struve_asymp_large_z_types[3] = <char>NPY_DOUBLE
  2629. ufunc__struve_asymp_large_z_types[4] = <char>NPY_DOUBLE
  2630. ufunc__struve_asymp_large_z_ptr[2*0] = <void*>_func_struve_asymp_large_z
  2631. ufunc__struve_asymp_large_z_ptr[2*0+1] = <void*>(<char*>"_struve_asymp_large_z")
  2632. ufunc__struve_asymp_large_z_data[0] = &ufunc__struve_asymp_large_z_ptr[2*0]
  2633. _struve_asymp_large_z = np.PyUFunc_FromFuncAndData(ufunc__struve_asymp_large_z_loops, ufunc__struve_asymp_large_z_data, ufunc__struve_asymp_large_z_types, 1, 3, 2, 0, "_struve_asymp_large_z", ufunc__struve_asymp_large_z_doc, 0)
  2634. cdef np.PyUFuncGenericFunction ufunc__struve_bessel_series_loops[1]
  2635. cdef void *ufunc__struve_bessel_series_ptr[2]
  2636. cdef void *ufunc__struve_bessel_series_data[1]
  2637. cdef char ufunc__struve_bessel_series_types[5]
  2638. cdef char *ufunc__struve_bessel_series_doc = (
  2639. "_struve_bessel_series(v, z, is_h)\n"
  2640. "\n"
  2641. "Internal function for testing `struve` & `modstruve`\n"
  2642. "\n"
  2643. "Evaluates using Bessel function series\n"
  2644. "\n"
  2645. "Returns\n"
  2646. "-------\n"
  2647. "v, err")
  2648. ufunc__struve_bessel_series_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddi_d_As_ddl_dd
  2649. ufunc__struve_bessel_series_types[0] = <char>NPY_DOUBLE
  2650. ufunc__struve_bessel_series_types[1] = <char>NPY_DOUBLE
  2651. ufunc__struve_bessel_series_types[2] = <char>NPY_LONG
  2652. ufunc__struve_bessel_series_types[3] = <char>NPY_DOUBLE
  2653. ufunc__struve_bessel_series_types[4] = <char>NPY_DOUBLE
  2654. ufunc__struve_bessel_series_ptr[2*0] = <void*>_func_struve_bessel_series
  2655. ufunc__struve_bessel_series_ptr[2*0+1] = <void*>(<char*>"_struve_bessel_series")
  2656. ufunc__struve_bessel_series_data[0] = &ufunc__struve_bessel_series_ptr[2*0]
  2657. _struve_bessel_series = np.PyUFunc_FromFuncAndData(ufunc__struve_bessel_series_loops, ufunc__struve_bessel_series_data, ufunc__struve_bessel_series_types, 1, 3, 2, 0, "_struve_bessel_series", ufunc__struve_bessel_series_doc, 0)
  2658. cdef np.PyUFuncGenericFunction ufunc__struve_power_series_loops[1]
  2659. cdef void *ufunc__struve_power_series_ptr[2]
  2660. cdef void *ufunc__struve_power_series_data[1]
  2661. cdef char ufunc__struve_power_series_types[5]
  2662. cdef char *ufunc__struve_power_series_doc = (
  2663. "_struve_power_series(v, z, is_h)\n"
  2664. "\n"
  2665. "Internal function for testing `struve` & `modstruve`\n"
  2666. "\n"
  2667. "Evaluates using power series\n"
  2668. "\n"
  2669. "Returns\n"
  2670. "-------\n"
  2671. "v, err")
  2672. ufunc__struve_power_series_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddi_d_As_ddl_dd
  2673. ufunc__struve_power_series_types[0] = <char>NPY_DOUBLE
  2674. ufunc__struve_power_series_types[1] = <char>NPY_DOUBLE
  2675. ufunc__struve_power_series_types[2] = <char>NPY_LONG
  2676. ufunc__struve_power_series_types[3] = <char>NPY_DOUBLE
  2677. ufunc__struve_power_series_types[4] = <char>NPY_DOUBLE
  2678. ufunc__struve_power_series_ptr[2*0] = <void*>_func_struve_power_series
  2679. ufunc__struve_power_series_ptr[2*0+1] = <void*>(<char*>"_struve_power_series")
  2680. ufunc__struve_power_series_data[0] = &ufunc__struve_power_series_ptr[2*0]
  2681. _struve_power_series = np.PyUFunc_FromFuncAndData(ufunc__struve_power_series_loops, ufunc__struve_power_series_data, ufunc__struve_power_series_types, 1, 3, 2, 0, "_struve_power_series", ufunc__struve_power_series_doc, 0)
  2682. cdef np.PyUFuncGenericFunction ufunc__zeta_loops[2]
  2683. cdef void *ufunc__zeta_ptr[4]
  2684. cdef void *ufunc__zeta_data[2]
  2685. cdef char ufunc__zeta_types[6]
  2686. cdef char *ufunc__zeta_doc = (
  2687. "_zeta(x, q)\n"
  2688. "\n"
  2689. "Internal function, Hurwitz zeta.")
  2690. ufunc__zeta_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2691. ufunc__zeta_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2692. ufunc__zeta_types[0] = <char>NPY_FLOAT
  2693. ufunc__zeta_types[1] = <char>NPY_FLOAT
  2694. ufunc__zeta_types[2] = <char>NPY_FLOAT
  2695. ufunc__zeta_types[3] = <char>NPY_DOUBLE
  2696. ufunc__zeta_types[4] = <char>NPY_DOUBLE
  2697. ufunc__zeta_types[5] = <char>NPY_DOUBLE
  2698. ufunc__zeta_ptr[2*0] = <void*>_func_zeta
  2699. ufunc__zeta_ptr[2*0+1] = <void*>(<char*>"_zeta")
  2700. ufunc__zeta_ptr[2*1] = <void*>_func_zeta
  2701. ufunc__zeta_ptr[2*1+1] = <void*>(<char*>"_zeta")
  2702. ufunc__zeta_data[0] = &ufunc__zeta_ptr[2*0]
  2703. ufunc__zeta_data[1] = &ufunc__zeta_ptr[2*1]
  2704. _zeta = np.PyUFunc_FromFuncAndData(ufunc__zeta_loops, ufunc__zeta_data, ufunc__zeta_types, 2, 2, 1, 0, "_zeta", ufunc__zeta_doc, 0)
  2705. cdef np.PyUFuncGenericFunction ufunc_agm_loops[2]
  2706. cdef void *ufunc_agm_ptr[4]
  2707. cdef void *ufunc_agm_data[2]
  2708. cdef char ufunc_agm_types[6]
  2709. cdef char *ufunc_agm_doc = (
  2710. "agm(a, b, out=None)\n"
  2711. "\n"
  2712. "Compute the arithmetic-geometric mean of `a` and `b`.\n"
  2713. "\n"
  2714. "Start with a_0 = a and b_0 = b and iteratively compute::\n"
  2715. "\n"
  2716. " a_{n+1} = (a_n + b_n)/2\n"
  2717. " b_{n+1} = sqrt(a_n*b_n)\n"
  2718. "\n"
  2719. "a_n and b_n converge to the same limit as n increases; their common\n"
  2720. "limit is agm(a, b).\n"
  2721. "\n"
  2722. "Parameters\n"
  2723. "----------\n"
  2724. "a, b : array_like\n"
  2725. " Real values only. If the values are both negative, the result\n"
  2726. " is negative. If one value is negative and the other is positive,\n"
  2727. " `nan` is returned.\n"
  2728. "out : ndarray, optional\n"
  2729. " Optional output array for the function values\n"
  2730. "\n"
  2731. "Returns\n"
  2732. "-------\n"
  2733. "scalar or ndarray\n"
  2734. " The arithmetic-geometric mean of `a` and `b`.\n"
  2735. "\n"
  2736. "Examples\n"
  2737. "--------\n"
  2738. ">>> import numpy as np\n"
  2739. ">>> from scipy.special import agm\n"
  2740. ">>> a, b = 24.0, 6.0\n"
  2741. ">>> agm(a, b)\n"
  2742. "13.458171481725614\n"
  2743. "\n"
  2744. "Compare that result to the iteration:\n"
  2745. "\n"
  2746. ">>> while a != b:\n"
  2747. "... a, b = (a + b)/2, np.sqrt(a*b)\n"
  2748. "... print(\"a = %19.16f b=%19.16f\" % (a, b))\n"
  2749. "...\n"
  2750. "a = 15.0000000000000000 b=12.0000000000000000\n"
  2751. "a = 13.5000000000000000 b=13.4164078649987388\n"
  2752. "a = 13.4582039324993694 b=13.4581390309909850\n"
  2753. "a = 13.4581714817451772 b=13.4581714817060547\n"
  2754. "a = 13.4581714817256159 b=13.4581714817256159\n"
  2755. "\n"
  2756. "When array-like arguments are given, broadcasting applies:\n"
  2757. "\n"
  2758. ">>> a = np.array([[1.5], [3], [6]]) # a has shape (3, 1).\n"
  2759. ">>> b = np.array([6, 12, 24, 48]) # b has shape (4,).\n"
  2760. ">>> agm(a, b)\n"
  2761. "array([[ 3.36454287, 5.42363427, 9.05798751, 15.53650756],\n"
  2762. " [ 4.37037309, 6.72908574, 10.84726853, 18.11597502],\n"
  2763. " [ 6. , 8.74074619, 13.45817148, 21.69453707]])")
  2764. ufunc_agm_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  2765. ufunc_agm_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  2766. ufunc_agm_types[0] = <char>NPY_FLOAT
  2767. ufunc_agm_types[1] = <char>NPY_FLOAT
  2768. ufunc_agm_types[2] = <char>NPY_FLOAT
  2769. ufunc_agm_types[3] = <char>NPY_DOUBLE
  2770. ufunc_agm_types[4] = <char>NPY_DOUBLE
  2771. ufunc_agm_types[5] = <char>NPY_DOUBLE
  2772. ufunc_agm_ptr[2*0] = <void*>_func_agm
  2773. ufunc_agm_ptr[2*0+1] = <void*>(<char*>"agm")
  2774. ufunc_agm_ptr[2*1] = <void*>_func_agm
  2775. ufunc_agm_ptr[2*1+1] = <void*>(<char*>"agm")
  2776. ufunc_agm_data[0] = &ufunc_agm_ptr[2*0]
  2777. ufunc_agm_data[1] = &ufunc_agm_ptr[2*1]
  2778. agm = np.PyUFunc_FromFuncAndData(ufunc_agm_loops, ufunc_agm_data, ufunc_agm_types, 2, 2, 1, 0, "agm", ufunc_agm_doc, 0)
  2779. cdef np.PyUFuncGenericFunction ufunc_airy_loops[4]
  2780. cdef void *ufunc_airy_ptr[8]
  2781. cdef void *ufunc_airy_data[4]
  2782. cdef char ufunc_airy_types[20]
  2783. cdef char *ufunc_airy_doc = (
  2784. "airy(z, out=None)\n"
  2785. "\n"
  2786. "Airy functions and their derivatives.\n"
  2787. "\n"
  2788. "Parameters\n"
  2789. "----------\n"
  2790. "z : array_like\n"
  2791. " Real or complex argument.\n"
  2792. "out : tuple of ndarray, optional\n"
  2793. " Optional output arrays for the function values\n"
  2794. "\n"
  2795. "Returns\n"
  2796. "-------\n"
  2797. "Ai, Aip, Bi, Bip : 4-tuple of scalar or ndarray\n"
  2798. " Airy functions Ai and Bi, and their derivatives Aip and Bip.\n"
  2799. "\n"
  2800. "Notes\n"
  2801. "-----\n"
  2802. "The Airy functions Ai and Bi are two independent solutions of\n"
  2803. "\n"
  2804. ".. math:: y''(x) = x y(x).\n"
  2805. "\n"
  2806. "For real `z` in [-10, 10], the computation is carried out by calling\n"
  2807. "the Cephes [1]_ `airy` routine, which uses power series summation\n"
  2808. "for small `z` and rational minimax approximations for large `z`.\n"
  2809. "\n"
  2810. "Outside this range, the AMOS [2]_ `zairy` and `zbiry` routines are\n"
  2811. "employed. They are computed using power series for :math:`|z| < 1` and\n"
  2812. "the following relations to modified Bessel functions for larger `z`\n"
  2813. "(where :math:`t \\equiv 2 z^{3/2}/3`):\n"
  2814. "\n"
  2815. ".. math::\n"
  2816. "\n"
  2817. " Ai(z) = \\frac{1}{\\pi \\sqrt{3}} K_{1/3}(t)\n"
  2818. "\n"
  2819. " Ai'(z) = -\\frac{z}{\\pi \\sqrt{3}} K_{2/3}(t)\n"
  2820. "\n"
  2821. " Bi(z) = \\sqrt{\\frac{z}{3}} \\left(I_{-1/3}(t) + I_{1/3}(t) \\right)\n"
  2822. "\n"
  2823. " Bi'(z) = \\frac{z}{\\sqrt{3}} \\left(I_{-2/3}(t) + I_{2/3}(t)\\right)\n"
  2824. "\n"
  2825. "See also\n"
  2826. "--------\n"
  2827. "airye : exponentially scaled Airy functions.\n"
  2828. "\n"
  2829. "References\n"
  2830. "----------\n"
  2831. ".. [1] Cephes Mathematical Functions Library,\n"
  2832. " http://www.netlib.org/cephes/\n"
  2833. ".. [2] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  2834. " of a Complex Argument and Nonnegative Order\",\n"
  2835. " http://netlib.org/amos/\n"
  2836. "\n"
  2837. "Examples\n"
  2838. "--------\n"
  2839. "Compute the Airy functions on the interval [-15, 5].\n"
  2840. "\n"
  2841. ">>> import numpy as np\n"
  2842. ">>> from scipy import special\n"
  2843. ">>> x = np.linspace(-15, 5, 201)\n"
  2844. ">>> ai, aip, bi, bip = special.airy(x)\n"
  2845. "\n"
  2846. "Plot Ai(x) and Bi(x).\n"
  2847. "\n"
  2848. ">>> import matplotlib.pyplot as plt\n"
  2849. ">>> plt.plot(x, ai, 'r', label='Ai(x)')\n"
  2850. ">>> plt.plot(x, bi, 'b--', label='Bi(x)')\n"
  2851. ">>> plt.ylim(-0.5, 1.0)\n"
  2852. ">>> plt.grid()\n"
  2853. ">>> plt.legend(loc='upper left')\n"
  2854. ">>> plt.show()")
  2855. ufunc_airy_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_f_ffff
  2856. ufunc_airy_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_d_dddd
  2857. ufunc_airy_loops[2] = <np.PyUFuncGenericFunction>loop_i_D_DDDD_As_F_FFFF
  2858. ufunc_airy_loops[3] = <np.PyUFuncGenericFunction>loop_i_D_DDDD_As_D_DDDD
  2859. ufunc_airy_types[0] = <char>NPY_FLOAT
  2860. ufunc_airy_types[1] = <char>NPY_FLOAT
  2861. ufunc_airy_types[2] = <char>NPY_FLOAT
  2862. ufunc_airy_types[3] = <char>NPY_FLOAT
  2863. ufunc_airy_types[4] = <char>NPY_FLOAT
  2864. ufunc_airy_types[5] = <char>NPY_DOUBLE
  2865. ufunc_airy_types[6] = <char>NPY_DOUBLE
  2866. ufunc_airy_types[7] = <char>NPY_DOUBLE
  2867. ufunc_airy_types[8] = <char>NPY_DOUBLE
  2868. ufunc_airy_types[9] = <char>NPY_DOUBLE
  2869. ufunc_airy_types[10] = <char>NPY_CFLOAT
  2870. ufunc_airy_types[11] = <char>NPY_CFLOAT
  2871. ufunc_airy_types[12] = <char>NPY_CFLOAT
  2872. ufunc_airy_types[13] = <char>NPY_CFLOAT
  2873. ufunc_airy_types[14] = <char>NPY_CFLOAT
  2874. ufunc_airy_types[15] = <char>NPY_CDOUBLE
  2875. ufunc_airy_types[16] = <char>NPY_CDOUBLE
  2876. ufunc_airy_types[17] = <char>NPY_CDOUBLE
  2877. ufunc_airy_types[18] = <char>NPY_CDOUBLE
  2878. ufunc_airy_types[19] = <char>NPY_CDOUBLE
  2879. ufunc_airy_ptr[2*0] = <void*>_func_airy_wrap
  2880. ufunc_airy_ptr[2*0+1] = <void*>(<char*>"airy")
  2881. ufunc_airy_ptr[2*1] = <void*>_func_airy_wrap
  2882. ufunc_airy_ptr[2*1+1] = <void*>(<char*>"airy")
  2883. ufunc_airy_ptr[2*2] = <void*>_func_cairy_wrap
  2884. ufunc_airy_ptr[2*2+1] = <void*>(<char*>"airy")
  2885. ufunc_airy_ptr[2*3] = <void*>_func_cairy_wrap
  2886. ufunc_airy_ptr[2*3+1] = <void*>(<char*>"airy")
  2887. ufunc_airy_data[0] = &ufunc_airy_ptr[2*0]
  2888. ufunc_airy_data[1] = &ufunc_airy_ptr[2*1]
  2889. ufunc_airy_data[2] = &ufunc_airy_ptr[2*2]
  2890. ufunc_airy_data[3] = &ufunc_airy_ptr[2*3]
  2891. airy = np.PyUFunc_FromFuncAndData(ufunc_airy_loops, ufunc_airy_data, ufunc_airy_types, 4, 1, 4, 0, "airy", ufunc_airy_doc, 0)
  2892. cdef np.PyUFuncGenericFunction ufunc_airye_loops[4]
  2893. cdef void *ufunc_airye_ptr[8]
  2894. cdef void *ufunc_airye_data[4]
  2895. cdef char ufunc_airye_types[20]
  2896. cdef char *ufunc_airye_doc = (
  2897. "airye(z, out=None)\n"
  2898. "\n"
  2899. "Exponentially scaled Airy functions and their derivatives.\n"
  2900. "\n"
  2901. "Scaling::\n"
  2902. "\n"
  2903. " eAi = Ai * exp(2.0/3.0*z*sqrt(z))\n"
  2904. " eAip = Aip * exp(2.0/3.0*z*sqrt(z))\n"
  2905. " eBi = Bi * exp(-abs(2.0/3.0*(z*sqrt(z)).real))\n"
  2906. " eBip = Bip * exp(-abs(2.0/3.0*(z*sqrt(z)).real))\n"
  2907. "\n"
  2908. "Parameters\n"
  2909. "----------\n"
  2910. "z : array_like\n"
  2911. " Real or complex argument.\n"
  2912. "out : tuple of ndarray, optional\n"
  2913. " Optional output arrays for the function values\n"
  2914. "\n"
  2915. "Returns\n"
  2916. "-------\n"
  2917. "eAi, eAip, eBi, eBip : 4-tuple of scalar or ndarray\n"
  2918. " Exponentially scaled Airy functions eAi and eBi, and their derivatives\n"
  2919. " eAip and eBip\n"
  2920. "\n"
  2921. "Notes\n"
  2922. "-----\n"
  2923. "Wrapper for the AMOS [1]_ routines `zairy` and `zbiry`.\n"
  2924. "\n"
  2925. "See also\n"
  2926. "--------\n"
  2927. "airy\n"
  2928. "\n"
  2929. "References\n"
  2930. "----------\n"
  2931. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  2932. " of a Complex Argument and Nonnegative Order\",\n"
  2933. " http://netlib.org/amos/\n"
  2934. "\n"
  2935. "Examples\n"
  2936. "--------\n"
  2937. "We can compute exponentially scaled Airy functions and their derivatives:\n"
  2938. "\n"
  2939. ">>> import numpy as np\n"
  2940. ">>> from scipy.special import airye\n"
  2941. ">>> import matplotlib.pyplot as plt\n"
  2942. ">>> z = np.linspace(0, 50, 500)\n"
  2943. ">>> eAi, eAip, eBi, eBip = airye(z)\n"
  2944. ">>> f, ax = plt.subplots(2, 1, sharex=True)\n"
  2945. ">>> for ind, data in enumerate([[eAi, eAip, [\"eAi\", \"eAip\"]],\n"
  2946. "... [eBi, eBip, [\"eBi\", \"eBip\"]]]):\n"
  2947. "... ax[ind].plot(z, data[0], \"-r\", z, data[1], \"-b\")\n"
  2948. "... ax[ind].legend(data[2])\n"
  2949. "... ax[ind].grid(True)\n"
  2950. ">>> plt.show()\n"
  2951. "\n"
  2952. "We can compute these using usual non-scaled Airy functions by:\n"
  2953. "\n"
  2954. ">>> from scipy.special import airy\n"
  2955. ">>> Ai, Aip, Bi, Bip = airy(z)\n"
  2956. ">>> np.allclose(eAi, Ai * np.exp(2.0 / 3.0 * z * np.sqrt(z)))\n"
  2957. "True\n"
  2958. ">>> np.allclose(eAip, Aip * np.exp(2.0 / 3.0 * z * np.sqrt(z)))\n"
  2959. "True\n"
  2960. ">>> np.allclose(eBi, Bi * np.exp(-abs(np.real(2.0 / 3.0 * z * np.sqrt(z)))))\n"
  2961. "True\n"
  2962. ">>> np.allclose(eBip, Bip * np.exp(-abs(np.real(2.0 / 3.0 * z * np.sqrt(z)))))\n"
  2963. "True\n"
  2964. "\n"
  2965. "Comparing non-scaled and exponentially scaled ones, the usual non-scaled\n"
  2966. "function quickly underflows for large values, whereas the exponentially\n"
  2967. "scaled function does not.\n"
  2968. "\n"
  2969. ">>> airy(200)\n"
  2970. "(0.0, 0.0, nan, nan)\n"
  2971. ">>> airye(200)\n"
  2972. "(0.07501041684381093, -1.0609012305109042, 0.15003188417418148, 2.1215836725571093)")
  2973. ufunc_airye_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_f_ffff
  2974. ufunc_airye_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_d_dddd
  2975. ufunc_airye_loops[2] = <np.PyUFuncGenericFunction>loop_i_D_DDDD_As_F_FFFF
  2976. ufunc_airye_loops[3] = <np.PyUFuncGenericFunction>loop_i_D_DDDD_As_D_DDDD
  2977. ufunc_airye_types[0] = <char>NPY_FLOAT
  2978. ufunc_airye_types[1] = <char>NPY_FLOAT
  2979. ufunc_airye_types[2] = <char>NPY_FLOAT
  2980. ufunc_airye_types[3] = <char>NPY_FLOAT
  2981. ufunc_airye_types[4] = <char>NPY_FLOAT
  2982. ufunc_airye_types[5] = <char>NPY_DOUBLE
  2983. ufunc_airye_types[6] = <char>NPY_DOUBLE
  2984. ufunc_airye_types[7] = <char>NPY_DOUBLE
  2985. ufunc_airye_types[8] = <char>NPY_DOUBLE
  2986. ufunc_airye_types[9] = <char>NPY_DOUBLE
  2987. ufunc_airye_types[10] = <char>NPY_CFLOAT
  2988. ufunc_airye_types[11] = <char>NPY_CFLOAT
  2989. ufunc_airye_types[12] = <char>NPY_CFLOAT
  2990. ufunc_airye_types[13] = <char>NPY_CFLOAT
  2991. ufunc_airye_types[14] = <char>NPY_CFLOAT
  2992. ufunc_airye_types[15] = <char>NPY_CDOUBLE
  2993. ufunc_airye_types[16] = <char>NPY_CDOUBLE
  2994. ufunc_airye_types[17] = <char>NPY_CDOUBLE
  2995. ufunc_airye_types[18] = <char>NPY_CDOUBLE
  2996. ufunc_airye_types[19] = <char>NPY_CDOUBLE
  2997. ufunc_airye_ptr[2*0] = <void*>_func_cairy_wrap_e_real
  2998. ufunc_airye_ptr[2*0+1] = <void*>(<char*>"airye")
  2999. ufunc_airye_ptr[2*1] = <void*>_func_cairy_wrap_e_real
  3000. ufunc_airye_ptr[2*1+1] = <void*>(<char*>"airye")
  3001. ufunc_airye_ptr[2*2] = <void*>_func_cairy_wrap_e
  3002. ufunc_airye_ptr[2*2+1] = <void*>(<char*>"airye")
  3003. ufunc_airye_ptr[2*3] = <void*>_func_cairy_wrap_e
  3004. ufunc_airye_ptr[2*3+1] = <void*>(<char*>"airye")
  3005. ufunc_airye_data[0] = &ufunc_airye_ptr[2*0]
  3006. ufunc_airye_data[1] = &ufunc_airye_ptr[2*1]
  3007. ufunc_airye_data[2] = &ufunc_airye_ptr[2*2]
  3008. ufunc_airye_data[3] = &ufunc_airye_ptr[2*3]
  3009. airye = np.PyUFunc_FromFuncAndData(ufunc_airye_loops, ufunc_airye_data, ufunc_airye_types, 4, 1, 4, 0, "airye", ufunc_airye_doc, 0)
  3010. cdef np.PyUFuncGenericFunction ufunc_bdtr_loops[3]
  3011. cdef void *ufunc_bdtr_ptr[6]
  3012. cdef void *ufunc_bdtr_data[3]
  3013. cdef char ufunc_bdtr_types[12]
  3014. cdef char *ufunc_bdtr_doc = (
  3015. "bdtr(k, n, p, out=None)\n"
  3016. "\n"
  3017. "Binomial distribution cumulative distribution function.\n"
  3018. "\n"
  3019. "Sum of the terms 0 through `floor(k)` of the Binomial probability density.\n"
  3020. "\n"
  3021. ".. math::\n"
  3022. " \\mathrm{bdtr}(k, n, p) = \\sum_{j=0}^{\\lfloor k \\rfloor} {{n}\\choose{j}} p^j (1-p)^{n-j}\n"
  3023. "\n"
  3024. "Parameters\n"
  3025. "----------\n"
  3026. "k : array_like\n"
  3027. " Number of successes (double), rounded down to the nearest integer.\n"
  3028. "n : array_like\n"
  3029. " Number of events (int).\n"
  3030. "p : array_like\n"
  3031. " Probability of success in a single event (float).\n"
  3032. "out : ndarray, optional\n"
  3033. " Optional output array for the function values\n"
  3034. "\n"
  3035. "Returns\n"
  3036. "-------\n"
  3037. "y : scalar or ndarray\n"
  3038. " Probability of `floor(k)` or fewer successes in `n` independent events with\n"
  3039. " success probabilities of `p`.\n"
  3040. "\n"
  3041. "Notes\n"
  3042. "-----\n"
  3043. "The terms are not summed directly; instead the regularized incomplete beta\n"
  3044. "function is employed, according to the formula,\n"
  3045. "\n"
  3046. ".. math::\n"
  3047. " \\mathrm{bdtr}(k, n, p) = I_{1 - p}(n - \\lfloor k \\rfloor, \\lfloor k \\rfloor + 1).\n"
  3048. "\n"
  3049. "Wrapper for the Cephes [1]_ routine `bdtr`.\n"
  3050. "\n"
  3051. "References\n"
  3052. "----------\n"
  3053. ".. [1] Cephes Mathematical Functions Library,\n"
  3054. " http://www.netlib.org/cephes/")
  3055. ufunc_bdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3056. ufunc_bdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_did__As_dld_d
  3057. ufunc_bdtr_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3058. ufunc_bdtr_types[0] = <char>NPY_FLOAT
  3059. ufunc_bdtr_types[1] = <char>NPY_FLOAT
  3060. ufunc_bdtr_types[2] = <char>NPY_FLOAT
  3061. ufunc_bdtr_types[3] = <char>NPY_FLOAT
  3062. ufunc_bdtr_types[4] = <char>NPY_DOUBLE
  3063. ufunc_bdtr_types[5] = <char>NPY_LONG
  3064. ufunc_bdtr_types[6] = <char>NPY_DOUBLE
  3065. ufunc_bdtr_types[7] = <char>NPY_DOUBLE
  3066. ufunc_bdtr_types[8] = <char>NPY_DOUBLE
  3067. ufunc_bdtr_types[9] = <char>NPY_DOUBLE
  3068. ufunc_bdtr_types[10] = <char>NPY_DOUBLE
  3069. ufunc_bdtr_types[11] = <char>NPY_DOUBLE
  3070. ufunc_bdtr_ptr[2*0] = <void*>_func_bdtr_unsafe
  3071. ufunc_bdtr_ptr[2*0+1] = <void*>(<char*>"bdtr")
  3072. ufunc_bdtr_ptr[2*1] = <void*>_func_bdtr
  3073. ufunc_bdtr_ptr[2*1+1] = <void*>(<char*>"bdtr")
  3074. ufunc_bdtr_ptr[2*2] = <void*>_func_bdtr_unsafe
  3075. ufunc_bdtr_ptr[2*2+1] = <void*>(<char*>"bdtr")
  3076. ufunc_bdtr_data[0] = &ufunc_bdtr_ptr[2*0]
  3077. ufunc_bdtr_data[1] = &ufunc_bdtr_ptr[2*1]
  3078. ufunc_bdtr_data[2] = &ufunc_bdtr_ptr[2*2]
  3079. bdtr = np.PyUFunc_FromFuncAndData(ufunc_bdtr_loops, ufunc_bdtr_data, ufunc_bdtr_types, 3, 3, 1, 0, "bdtr", ufunc_bdtr_doc, 0)
  3080. cdef np.PyUFuncGenericFunction ufunc_bdtrc_loops[3]
  3081. cdef void *ufunc_bdtrc_ptr[6]
  3082. cdef void *ufunc_bdtrc_data[3]
  3083. cdef char ufunc_bdtrc_types[12]
  3084. cdef char *ufunc_bdtrc_doc = (
  3085. "bdtrc(k, n, p, out=None)\n"
  3086. "\n"
  3087. "Binomial distribution survival function.\n"
  3088. "\n"
  3089. "Sum of the terms `floor(k) + 1` through `n` of the binomial probability\n"
  3090. "density,\n"
  3091. "\n"
  3092. ".. math::\n"
  3093. " \\mathrm{bdtrc}(k, n, p) = \\sum_{j=\\lfloor k \\rfloor +1}^n {{n}\\choose{j}} p^j (1-p)^{n-j}\n"
  3094. "\n"
  3095. "Parameters\n"
  3096. "----------\n"
  3097. "k : array_like\n"
  3098. " Number of successes (double), rounded down to nearest integer.\n"
  3099. "n : array_like\n"
  3100. " Number of events (int)\n"
  3101. "p : array_like\n"
  3102. " Probability of success in a single event.\n"
  3103. "out : ndarray, optional\n"
  3104. " Optional output array for the function values\n"
  3105. "\n"
  3106. "Returns\n"
  3107. "-------\n"
  3108. "y : scalar or ndarray\n"
  3109. " Probability of `floor(k) + 1` or more successes in `n` independent\n"
  3110. " events with success probabilities of `p`.\n"
  3111. "\n"
  3112. "See also\n"
  3113. "--------\n"
  3114. "bdtr\n"
  3115. "betainc\n"
  3116. "\n"
  3117. "Notes\n"
  3118. "-----\n"
  3119. "The terms are not summed directly; instead the regularized incomplete beta\n"
  3120. "function is employed, according to the formula,\n"
  3121. "\n"
  3122. ".. math::\n"
  3123. " \\mathrm{bdtrc}(k, n, p) = I_{p}(\\lfloor k \\rfloor + 1, n - \\lfloor k \\rfloor).\n"
  3124. "\n"
  3125. "Wrapper for the Cephes [1]_ routine `bdtrc`.\n"
  3126. "\n"
  3127. "References\n"
  3128. "----------\n"
  3129. ".. [1] Cephes Mathematical Functions Library,\n"
  3130. " http://www.netlib.org/cephes/")
  3131. ufunc_bdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3132. ufunc_bdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_did__As_dld_d
  3133. ufunc_bdtrc_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3134. ufunc_bdtrc_types[0] = <char>NPY_FLOAT
  3135. ufunc_bdtrc_types[1] = <char>NPY_FLOAT
  3136. ufunc_bdtrc_types[2] = <char>NPY_FLOAT
  3137. ufunc_bdtrc_types[3] = <char>NPY_FLOAT
  3138. ufunc_bdtrc_types[4] = <char>NPY_DOUBLE
  3139. ufunc_bdtrc_types[5] = <char>NPY_LONG
  3140. ufunc_bdtrc_types[6] = <char>NPY_DOUBLE
  3141. ufunc_bdtrc_types[7] = <char>NPY_DOUBLE
  3142. ufunc_bdtrc_types[8] = <char>NPY_DOUBLE
  3143. ufunc_bdtrc_types[9] = <char>NPY_DOUBLE
  3144. ufunc_bdtrc_types[10] = <char>NPY_DOUBLE
  3145. ufunc_bdtrc_types[11] = <char>NPY_DOUBLE
  3146. ufunc_bdtrc_ptr[2*0] = <void*>_func_bdtrc_unsafe
  3147. ufunc_bdtrc_ptr[2*0+1] = <void*>(<char*>"bdtrc")
  3148. ufunc_bdtrc_ptr[2*1] = <void*>_func_bdtrc
  3149. ufunc_bdtrc_ptr[2*1+1] = <void*>(<char*>"bdtrc")
  3150. ufunc_bdtrc_ptr[2*2] = <void*>_func_bdtrc_unsafe
  3151. ufunc_bdtrc_ptr[2*2+1] = <void*>(<char*>"bdtrc")
  3152. ufunc_bdtrc_data[0] = &ufunc_bdtrc_ptr[2*0]
  3153. ufunc_bdtrc_data[1] = &ufunc_bdtrc_ptr[2*1]
  3154. ufunc_bdtrc_data[2] = &ufunc_bdtrc_ptr[2*2]
  3155. bdtrc = np.PyUFunc_FromFuncAndData(ufunc_bdtrc_loops, ufunc_bdtrc_data, ufunc_bdtrc_types, 3, 3, 1, 0, "bdtrc", ufunc_bdtrc_doc, 0)
  3156. cdef np.PyUFuncGenericFunction ufunc_bdtri_loops[3]
  3157. cdef void *ufunc_bdtri_ptr[6]
  3158. cdef void *ufunc_bdtri_data[3]
  3159. cdef char ufunc_bdtri_types[12]
  3160. cdef char *ufunc_bdtri_doc = (
  3161. "bdtri(k, n, y, out=None)\n"
  3162. "\n"
  3163. "Inverse function to `bdtr` with respect to `p`.\n"
  3164. "\n"
  3165. "Finds the event probability `p` such that the sum of the terms 0 through\n"
  3166. "`k` of the binomial probability density is equal to the given cumulative\n"
  3167. "probability `y`.\n"
  3168. "\n"
  3169. "Parameters\n"
  3170. "----------\n"
  3171. "k : array_like\n"
  3172. " Number of successes (float), rounded down to the nearest integer.\n"
  3173. "n : array_like\n"
  3174. " Number of events (float)\n"
  3175. "y : array_like\n"
  3176. " Cumulative probability (probability of `k` or fewer successes in `n`\n"
  3177. " events).\n"
  3178. "out : ndarray, optional\n"
  3179. " Optional output array for the function values\n"
  3180. "\n"
  3181. "Returns\n"
  3182. "-------\n"
  3183. "p : scalar or ndarray\n"
  3184. " The event probability such that `bdtr(\\lfloor k \\rfloor, n, p) = y`.\n"
  3185. "\n"
  3186. "See also\n"
  3187. "--------\n"
  3188. "bdtr\n"
  3189. "betaincinv\n"
  3190. "\n"
  3191. "Notes\n"
  3192. "-----\n"
  3193. "The computation is carried out using the inverse beta integral function\n"
  3194. "and the relation,::\n"
  3195. "\n"
  3196. " 1 - p = betaincinv(n - k, k + 1, y).\n"
  3197. "\n"
  3198. "Wrapper for the Cephes [1]_ routine `bdtri`.\n"
  3199. "\n"
  3200. "References\n"
  3201. "----------\n"
  3202. ".. [1] Cephes Mathematical Functions Library,\n"
  3203. " http://www.netlib.org/cephes/")
  3204. ufunc_bdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3205. ufunc_bdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_did__As_dld_d
  3206. ufunc_bdtri_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3207. ufunc_bdtri_types[0] = <char>NPY_FLOAT
  3208. ufunc_bdtri_types[1] = <char>NPY_FLOAT
  3209. ufunc_bdtri_types[2] = <char>NPY_FLOAT
  3210. ufunc_bdtri_types[3] = <char>NPY_FLOAT
  3211. ufunc_bdtri_types[4] = <char>NPY_DOUBLE
  3212. ufunc_bdtri_types[5] = <char>NPY_LONG
  3213. ufunc_bdtri_types[6] = <char>NPY_DOUBLE
  3214. ufunc_bdtri_types[7] = <char>NPY_DOUBLE
  3215. ufunc_bdtri_types[8] = <char>NPY_DOUBLE
  3216. ufunc_bdtri_types[9] = <char>NPY_DOUBLE
  3217. ufunc_bdtri_types[10] = <char>NPY_DOUBLE
  3218. ufunc_bdtri_types[11] = <char>NPY_DOUBLE
  3219. ufunc_bdtri_ptr[2*0] = <void*>_func_bdtri_unsafe
  3220. ufunc_bdtri_ptr[2*0+1] = <void*>(<char*>"bdtri")
  3221. ufunc_bdtri_ptr[2*1] = <void*>_func_bdtri
  3222. ufunc_bdtri_ptr[2*1+1] = <void*>(<char*>"bdtri")
  3223. ufunc_bdtri_ptr[2*2] = <void*>_func_bdtri_unsafe
  3224. ufunc_bdtri_ptr[2*2+1] = <void*>(<char*>"bdtri")
  3225. ufunc_bdtri_data[0] = &ufunc_bdtri_ptr[2*0]
  3226. ufunc_bdtri_data[1] = &ufunc_bdtri_ptr[2*1]
  3227. ufunc_bdtri_data[2] = &ufunc_bdtri_ptr[2*2]
  3228. bdtri = np.PyUFunc_FromFuncAndData(ufunc_bdtri_loops, ufunc_bdtri_data, ufunc_bdtri_types, 3, 3, 1, 0, "bdtri", ufunc_bdtri_doc, 0)
  3229. cdef np.PyUFuncGenericFunction ufunc_bdtrik_loops[2]
  3230. cdef void *ufunc_bdtrik_ptr[4]
  3231. cdef void *ufunc_bdtrik_data[2]
  3232. cdef char ufunc_bdtrik_types[8]
  3233. cdef char *ufunc_bdtrik_doc = (
  3234. "bdtrik(y, n, p, out=None)\n"
  3235. "\n"
  3236. "Inverse function to `bdtr` with respect to `k`.\n"
  3237. "\n"
  3238. "Finds the number of successes `k` such that the sum of the terms 0 through\n"
  3239. "`k` of the Binomial probability density for `n` events with probability\n"
  3240. "`p` is equal to the given cumulative probability `y`.\n"
  3241. "\n"
  3242. "Parameters\n"
  3243. "----------\n"
  3244. "y : array_like\n"
  3245. " Cumulative probability (probability of `k` or fewer successes in `n`\n"
  3246. " events).\n"
  3247. "n : array_like\n"
  3248. " Number of events (float).\n"
  3249. "p : array_like\n"
  3250. " Success probability (float).\n"
  3251. "out : ndarray, optional\n"
  3252. " Optional output array for the function values\n"
  3253. "\n"
  3254. "Returns\n"
  3255. "-------\n"
  3256. "k : scalar or ndarray\n"
  3257. " The number of successes `k` such that `bdtr(k, n, p) = y`.\n"
  3258. "\n"
  3259. "See also\n"
  3260. "--------\n"
  3261. "bdtr\n"
  3262. "\n"
  3263. "Notes\n"
  3264. "-----\n"
  3265. "Formula 26.5.24 of [1]_ is used to reduce the binomial distribution to the\n"
  3266. "cumulative incomplete beta distribution.\n"
  3267. "\n"
  3268. "Computation of `k` involves a search for a value that produces the desired\n"
  3269. "value of `y`. The search relies on the monotonicity of `y` with `k`.\n"
  3270. "\n"
  3271. "Wrapper for the CDFLIB [2]_ Fortran routine `cdfbin`.\n"
  3272. "\n"
  3273. "References\n"
  3274. "----------\n"
  3275. ".. [1] Milton Abramowitz and Irene A. Stegun, eds.\n"
  3276. " Handbook of Mathematical Functions with Formulas,\n"
  3277. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  3278. ".. [2] Barry Brown, James Lovato, and Kathy Russell,\n"
  3279. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  3280. " Functions, Inverses, and Other Parameters.")
  3281. ufunc_bdtrik_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3282. ufunc_bdtrik_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3283. ufunc_bdtrik_types[0] = <char>NPY_FLOAT
  3284. ufunc_bdtrik_types[1] = <char>NPY_FLOAT
  3285. ufunc_bdtrik_types[2] = <char>NPY_FLOAT
  3286. ufunc_bdtrik_types[3] = <char>NPY_FLOAT
  3287. ufunc_bdtrik_types[4] = <char>NPY_DOUBLE
  3288. ufunc_bdtrik_types[5] = <char>NPY_DOUBLE
  3289. ufunc_bdtrik_types[6] = <char>NPY_DOUBLE
  3290. ufunc_bdtrik_types[7] = <char>NPY_DOUBLE
  3291. ufunc_bdtrik_ptr[2*0] = <void*>_func_cdfbin2_wrap
  3292. ufunc_bdtrik_ptr[2*0+1] = <void*>(<char*>"bdtrik")
  3293. ufunc_bdtrik_ptr[2*1] = <void*>_func_cdfbin2_wrap
  3294. ufunc_bdtrik_ptr[2*1+1] = <void*>(<char*>"bdtrik")
  3295. ufunc_bdtrik_data[0] = &ufunc_bdtrik_ptr[2*0]
  3296. ufunc_bdtrik_data[1] = &ufunc_bdtrik_ptr[2*1]
  3297. bdtrik = np.PyUFunc_FromFuncAndData(ufunc_bdtrik_loops, ufunc_bdtrik_data, ufunc_bdtrik_types, 2, 3, 1, 0, "bdtrik", ufunc_bdtrik_doc, 0)
  3298. cdef np.PyUFuncGenericFunction ufunc_bdtrin_loops[2]
  3299. cdef void *ufunc_bdtrin_ptr[4]
  3300. cdef void *ufunc_bdtrin_data[2]
  3301. cdef char ufunc_bdtrin_types[8]
  3302. cdef char *ufunc_bdtrin_doc = (
  3303. "bdtrin(k, y, p, out=None)\n"
  3304. "\n"
  3305. "Inverse function to `bdtr` with respect to `n`.\n"
  3306. "\n"
  3307. "Finds the number of events `n` such that the sum of the terms 0 through\n"
  3308. "`k` of the Binomial probability density for events with probability `p` is\n"
  3309. "equal to the given cumulative probability `y`.\n"
  3310. "\n"
  3311. "Parameters\n"
  3312. "----------\n"
  3313. "k : array_like\n"
  3314. " Number of successes (float).\n"
  3315. "y : array_like\n"
  3316. " Cumulative probability (probability of `k` or fewer successes in `n`\n"
  3317. " events).\n"
  3318. "p : array_like\n"
  3319. " Success probability (float).\n"
  3320. "out : ndarray, optional\n"
  3321. " Optional output array for the function values\n"
  3322. "\n"
  3323. "Returns\n"
  3324. "-------\n"
  3325. "n : scalar or ndarray\n"
  3326. " The number of events `n` such that `bdtr(k, n, p) = y`.\n"
  3327. "\n"
  3328. "See also\n"
  3329. "--------\n"
  3330. "bdtr\n"
  3331. "\n"
  3332. "Notes\n"
  3333. "-----\n"
  3334. "Formula 26.5.24 of [1]_ is used to reduce the binomial distribution to the\n"
  3335. "cumulative incomplete beta distribution.\n"
  3336. "\n"
  3337. "Computation of `n` involves a search for a value that produces the desired\n"
  3338. "value of `y`. The search relies on the monotonicity of `y` with `n`.\n"
  3339. "\n"
  3340. "Wrapper for the CDFLIB [2]_ Fortran routine `cdfbin`.\n"
  3341. "\n"
  3342. "References\n"
  3343. "----------\n"
  3344. ".. [1] Milton Abramowitz and Irene A. Stegun, eds.\n"
  3345. " Handbook of Mathematical Functions with Formulas,\n"
  3346. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  3347. ".. [2] Barry Brown, James Lovato, and Kathy Russell,\n"
  3348. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  3349. " Functions, Inverses, and Other Parameters.")
  3350. ufunc_bdtrin_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3351. ufunc_bdtrin_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3352. ufunc_bdtrin_types[0] = <char>NPY_FLOAT
  3353. ufunc_bdtrin_types[1] = <char>NPY_FLOAT
  3354. ufunc_bdtrin_types[2] = <char>NPY_FLOAT
  3355. ufunc_bdtrin_types[3] = <char>NPY_FLOAT
  3356. ufunc_bdtrin_types[4] = <char>NPY_DOUBLE
  3357. ufunc_bdtrin_types[5] = <char>NPY_DOUBLE
  3358. ufunc_bdtrin_types[6] = <char>NPY_DOUBLE
  3359. ufunc_bdtrin_types[7] = <char>NPY_DOUBLE
  3360. ufunc_bdtrin_ptr[2*0] = <void*>_func_cdfbin3_wrap
  3361. ufunc_bdtrin_ptr[2*0+1] = <void*>(<char*>"bdtrin")
  3362. ufunc_bdtrin_ptr[2*1] = <void*>_func_cdfbin3_wrap
  3363. ufunc_bdtrin_ptr[2*1+1] = <void*>(<char*>"bdtrin")
  3364. ufunc_bdtrin_data[0] = &ufunc_bdtrin_ptr[2*0]
  3365. ufunc_bdtrin_data[1] = &ufunc_bdtrin_ptr[2*1]
  3366. bdtrin = np.PyUFunc_FromFuncAndData(ufunc_bdtrin_loops, ufunc_bdtrin_data, ufunc_bdtrin_types, 2, 3, 1, 0, "bdtrin", ufunc_bdtrin_doc, 0)
  3367. cdef np.PyUFuncGenericFunction ufunc_bei_loops[2]
  3368. cdef void *ufunc_bei_ptr[4]
  3369. cdef void *ufunc_bei_data[2]
  3370. cdef char ufunc_bei_types[4]
  3371. cdef char *ufunc_bei_doc = (
  3372. "bei(x, out=None)\n"
  3373. "\n"
  3374. "Kelvin function bei.\n"
  3375. "\n"
  3376. "Defined as\n"
  3377. "\n"
  3378. ".. math::\n"
  3379. "\n"
  3380. " \\mathrm{bei}(x) = \\Im[J_0(x e^{3 \\pi i / 4})]\n"
  3381. "\n"
  3382. "where :math:`J_0` is the Bessel function of the first kind of\n"
  3383. "order zero (see `jv`). See [dlmf]_ for more details.\n"
  3384. "\n"
  3385. "Parameters\n"
  3386. "----------\n"
  3387. "x : array_like\n"
  3388. " Real argument.\n"
  3389. "out : ndarray, optional\n"
  3390. " Optional output array for the function results.\n"
  3391. "\n"
  3392. "Returns\n"
  3393. "-------\n"
  3394. "scalar or ndarray\n"
  3395. " Values of the Kelvin function.\n"
  3396. "\n"
  3397. "See Also\n"
  3398. "--------\n"
  3399. "ber : the corresponding real part\n"
  3400. "beip : the derivative of bei\n"
  3401. "jv : Bessel function of the first kind\n"
  3402. "\n"
  3403. "References\n"
  3404. "----------\n"
  3405. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  3406. " https://dlmf.nist.gov/10.61\n"
  3407. "\n"
  3408. "Examples\n"
  3409. "--------\n"
  3410. "It can be expressed using Bessel functions.\n"
  3411. "\n"
  3412. ">>> import numpy as np\n"
  3413. ">>> import scipy.special as sc\n"
  3414. ">>> x = np.array([1.0, 2.0, 3.0, 4.0])\n"
  3415. ">>> sc.jv(0, x * np.exp(3 * np.pi * 1j / 4)).imag\n"
  3416. "array([0.24956604, 0.97229163, 1.93758679, 2.29269032])\n"
  3417. ">>> sc.bei(x)\n"
  3418. "array([0.24956604, 0.97229163, 1.93758679, 2.29269032])")
  3419. ufunc_bei_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  3420. ufunc_bei_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  3421. ufunc_bei_types[0] = <char>NPY_FLOAT
  3422. ufunc_bei_types[1] = <char>NPY_FLOAT
  3423. ufunc_bei_types[2] = <char>NPY_DOUBLE
  3424. ufunc_bei_types[3] = <char>NPY_DOUBLE
  3425. ufunc_bei_ptr[2*0] = <void*>_func_bei_wrap
  3426. ufunc_bei_ptr[2*0+1] = <void*>(<char*>"bei")
  3427. ufunc_bei_ptr[2*1] = <void*>_func_bei_wrap
  3428. ufunc_bei_ptr[2*1+1] = <void*>(<char*>"bei")
  3429. ufunc_bei_data[0] = &ufunc_bei_ptr[2*0]
  3430. ufunc_bei_data[1] = &ufunc_bei_ptr[2*1]
  3431. bei = np.PyUFunc_FromFuncAndData(ufunc_bei_loops, ufunc_bei_data, ufunc_bei_types, 2, 1, 1, 0, "bei", ufunc_bei_doc, 0)
  3432. cdef np.PyUFuncGenericFunction ufunc_beip_loops[2]
  3433. cdef void *ufunc_beip_ptr[4]
  3434. cdef void *ufunc_beip_data[2]
  3435. cdef char ufunc_beip_types[4]
  3436. cdef char *ufunc_beip_doc = (
  3437. "beip(x, out=None)\n"
  3438. "\n"
  3439. "Derivative of the Kelvin function bei.\n"
  3440. "\n"
  3441. "Parameters\n"
  3442. "----------\n"
  3443. "x : array_like\n"
  3444. " Real argument.\n"
  3445. "out : ndarray, optional\n"
  3446. " Optional output array for the function results.\n"
  3447. "\n"
  3448. "Returns\n"
  3449. "-------\n"
  3450. "scalar or ndarray\n"
  3451. " The values of the derivative of bei.\n"
  3452. "\n"
  3453. "See Also\n"
  3454. "--------\n"
  3455. "bei\n"
  3456. "\n"
  3457. "References\n"
  3458. "----------\n"
  3459. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  3460. " https://dlmf.nist.gov/10#PT5")
  3461. ufunc_beip_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  3462. ufunc_beip_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  3463. ufunc_beip_types[0] = <char>NPY_FLOAT
  3464. ufunc_beip_types[1] = <char>NPY_FLOAT
  3465. ufunc_beip_types[2] = <char>NPY_DOUBLE
  3466. ufunc_beip_types[3] = <char>NPY_DOUBLE
  3467. ufunc_beip_ptr[2*0] = <void*>_func_beip_wrap
  3468. ufunc_beip_ptr[2*0+1] = <void*>(<char*>"beip")
  3469. ufunc_beip_ptr[2*1] = <void*>_func_beip_wrap
  3470. ufunc_beip_ptr[2*1+1] = <void*>(<char*>"beip")
  3471. ufunc_beip_data[0] = &ufunc_beip_ptr[2*0]
  3472. ufunc_beip_data[1] = &ufunc_beip_ptr[2*1]
  3473. beip = np.PyUFunc_FromFuncAndData(ufunc_beip_loops, ufunc_beip_data, ufunc_beip_types, 2, 1, 1, 0, "beip", ufunc_beip_doc, 0)
  3474. cdef np.PyUFuncGenericFunction ufunc_ber_loops[2]
  3475. cdef void *ufunc_ber_ptr[4]
  3476. cdef void *ufunc_ber_data[2]
  3477. cdef char ufunc_ber_types[4]
  3478. cdef char *ufunc_ber_doc = (
  3479. "ber(x, out=None)\n"
  3480. "\n"
  3481. "Kelvin function ber.\n"
  3482. "\n"
  3483. "Defined as\n"
  3484. "\n"
  3485. ".. math::\n"
  3486. "\n"
  3487. " \\mathrm{ber}(x) = \\Re[J_0(x e^{3 \\pi i / 4})]\n"
  3488. "\n"
  3489. "where :math:`J_0` is the Bessel function of the first kind of\n"
  3490. "order zero (see `jv`). See [dlmf]_ for more details.\n"
  3491. "\n"
  3492. "Parameters\n"
  3493. "----------\n"
  3494. "x : array_like\n"
  3495. " Real argument.\n"
  3496. "out : ndarray, optional\n"
  3497. " Optional output array for the function results.\n"
  3498. "\n"
  3499. "Returns\n"
  3500. "-------\n"
  3501. "scalar or ndarray\n"
  3502. " Values of the Kelvin function.\n"
  3503. "\n"
  3504. "See Also\n"
  3505. "--------\n"
  3506. "bei : the corresponding real part\n"
  3507. "berp : the derivative of bei\n"
  3508. "jv : Bessel function of the first kind\n"
  3509. "\n"
  3510. "References\n"
  3511. "----------\n"
  3512. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  3513. " https://dlmf.nist.gov/10.61\n"
  3514. "\n"
  3515. "Examples\n"
  3516. "--------\n"
  3517. "It can be expressed using Bessel functions.\n"
  3518. "\n"
  3519. ">>> import numpy as np\n"
  3520. ">>> import scipy.special as sc\n"
  3521. ">>> x = np.array([1.0, 2.0, 3.0, 4.0])\n"
  3522. ">>> sc.jv(0, x * np.exp(3 * np.pi * 1j / 4)).real\n"
  3523. "array([ 0.98438178, 0.75173418, -0.22138025, -2.56341656])\n"
  3524. ">>> sc.ber(x)\n"
  3525. "array([ 0.98438178, 0.75173418, -0.22138025, -2.56341656])")
  3526. ufunc_ber_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  3527. ufunc_ber_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  3528. ufunc_ber_types[0] = <char>NPY_FLOAT
  3529. ufunc_ber_types[1] = <char>NPY_FLOAT
  3530. ufunc_ber_types[2] = <char>NPY_DOUBLE
  3531. ufunc_ber_types[3] = <char>NPY_DOUBLE
  3532. ufunc_ber_ptr[2*0] = <void*>_func_ber_wrap
  3533. ufunc_ber_ptr[2*0+1] = <void*>(<char*>"ber")
  3534. ufunc_ber_ptr[2*1] = <void*>_func_ber_wrap
  3535. ufunc_ber_ptr[2*1+1] = <void*>(<char*>"ber")
  3536. ufunc_ber_data[0] = &ufunc_ber_ptr[2*0]
  3537. ufunc_ber_data[1] = &ufunc_ber_ptr[2*1]
  3538. ber = np.PyUFunc_FromFuncAndData(ufunc_ber_loops, ufunc_ber_data, ufunc_ber_types, 2, 1, 1, 0, "ber", ufunc_ber_doc, 0)
  3539. cdef np.PyUFuncGenericFunction ufunc_berp_loops[2]
  3540. cdef void *ufunc_berp_ptr[4]
  3541. cdef void *ufunc_berp_data[2]
  3542. cdef char ufunc_berp_types[4]
  3543. cdef char *ufunc_berp_doc = (
  3544. "berp(x, out=None)\n"
  3545. "\n"
  3546. "Derivative of the Kelvin function ber.\n"
  3547. "\n"
  3548. "Parameters\n"
  3549. "----------\n"
  3550. "x : array_like\n"
  3551. " Real argument.\n"
  3552. "out : ndarray, optional\n"
  3553. " Optional output array for the function results.\n"
  3554. "\n"
  3555. "Returns\n"
  3556. "-------\n"
  3557. "scalar or ndarray\n"
  3558. " The values of the derivative of ber.\n"
  3559. "\n"
  3560. "See Also\n"
  3561. "--------\n"
  3562. "ber\n"
  3563. "\n"
  3564. "References\n"
  3565. "----------\n"
  3566. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  3567. " https://dlmf.nist.gov/10#PT5")
  3568. ufunc_berp_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  3569. ufunc_berp_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  3570. ufunc_berp_types[0] = <char>NPY_FLOAT
  3571. ufunc_berp_types[1] = <char>NPY_FLOAT
  3572. ufunc_berp_types[2] = <char>NPY_DOUBLE
  3573. ufunc_berp_types[3] = <char>NPY_DOUBLE
  3574. ufunc_berp_ptr[2*0] = <void*>_func_berp_wrap
  3575. ufunc_berp_ptr[2*0+1] = <void*>(<char*>"berp")
  3576. ufunc_berp_ptr[2*1] = <void*>_func_berp_wrap
  3577. ufunc_berp_ptr[2*1+1] = <void*>(<char*>"berp")
  3578. ufunc_berp_data[0] = &ufunc_berp_ptr[2*0]
  3579. ufunc_berp_data[1] = &ufunc_berp_ptr[2*1]
  3580. berp = np.PyUFunc_FromFuncAndData(ufunc_berp_loops, ufunc_berp_data, ufunc_berp_types, 2, 1, 1, 0, "berp", ufunc_berp_doc, 0)
  3581. cdef np.PyUFuncGenericFunction ufunc_besselpoly_loops[2]
  3582. cdef void *ufunc_besselpoly_ptr[4]
  3583. cdef void *ufunc_besselpoly_data[2]
  3584. cdef char ufunc_besselpoly_types[8]
  3585. cdef char *ufunc_besselpoly_doc = (
  3586. "besselpoly(a, lmb, nu, out=None)\n"
  3587. "\n"
  3588. "Weighted integral of the Bessel function of the first kind.\n"
  3589. "\n"
  3590. "Computes\n"
  3591. "\n"
  3592. ".. math::\n"
  3593. "\n"
  3594. " \\int_0^1 x^\\lambda J_\\nu(2 a x) \\, dx\n"
  3595. "\n"
  3596. "where :math:`J_\\nu` is a Bessel function and :math:`\\lambda=lmb`,\n"
  3597. ":math:`\\nu=nu`.\n"
  3598. "\n"
  3599. "Parameters\n"
  3600. "----------\n"
  3601. "a : array_like\n"
  3602. " Scale factor inside the Bessel function.\n"
  3603. "lmb : array_like\n"
  3604. " Power of `x`\n"
  3605. "nu : array_like\n"
  3606. " Order of the Bessel function.\n"
  3607. "out : ndarray, optional\n"
  3608. " Optional output array for the function results.\n"
  3609. "\n"
  3610. "Returns\n"
  3611. "-------\n"
  3612. "scalar or ndarray\n"
  3613. " Value of the integral.\n"
  3614. "\n"
  3615. "References\n"
  3616. "----------\n"
  3617. ".. [1] Cephes Mathematical Functions Library,\n"
  3618. " http://www.netlib.org/cephes/\n"
  3619. "\n"
  3620. "Examples\n"
  3621. "--------\n"
  3622. "Evaluate the function for one parameter set.\n"
  3623. "\n"
  3624. ">>> from scipy.special import besselpoly\n"
  3625. ">>> besselpoly(1, 1, 1)\n"
  3626. "0.24449718372863877\n"
  3627. "\n"
  3628. "Evaluate the function for different scale factors.\n"
  3629. "\n"
  3630. ">>> import numpy as np\n"
  3631. ">>> factors = np.array([0., 3., 6.])\n"
  3632. ">>> besselpoly(factors, 1, 1)\n"
  3633. "array([ 0. , -0.00549029, 0.00140174])\n"
  3634. "\n"
  3635. "Plot the function for varying powers, orders and scales.\n"
  3636. "\n"
  3637. ">>> import matplotlib.pyplot as plt\n"
  3638. ">>> fig, ax = plt.subplots()\n"
  3639. ">>> powers = np.linspace(0, 10, 100)\n"
  3640. ">>> orders = [1, 2, 3]\n"
  3641. ">>> scales = [1, 2]\n"
  3642. ">>> all_combinations = [(order, scale) for order in orders\n"
  3643. "... for scale in scales]\n"
  3644. ">>> for order, scale in all_combinations:\n"
  3645. "... ax.plot(powers, besselpoly(scale, powers, order),\n"
  3646. "... label=rf\"$\\nu={order}, a={scale}$\")\n"
  3647. ">>> ax.legend()\n"
  3648. ">>> ax.set_xlabel(r\"$\\lambda$\")\n"
  3649. ">>> ax.set_ylabel(r\"$\\int_0^1 x^{\\lambda} J_{\\nu}(2ax)\\,dx$\")\n"
  3650. ">>> plt.show()")
  3651. ufunc_besselpoly_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3652. ufunc_besselpoly_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3653. ufunc_besselpoly_types[0] = <char>NPY_FLOAT
  3654. ufunc_besselpoly_types[1] = <char>NPY_FLOAT
  3655. ufunc_besselpoly_types[2] = <char>NPY_FLOAT
  3656. ufunc_besselpoly_types[3] = <char>NPY_FLOAT
  3657. ufunc_besselpoly_types[4] = <char>NPY_DOUBLE
  3658. ufunc_besselpoly_types[5] = <char>NPY_DOUBLE
  3659. ufunc_besselpoly_types[6] = <char>NPY_DOUBLE
  3660. ufunc_besselpoly_types[7] = <char>NPY_DOUBLE
  3661. ufunc_besselpoly_ptr[2*0] = <void*>_func_besselpoly
  3662. ufunc_besselpoly_ptr[2*0+1] = <void*>(<char*>"besselpoly")
  3663. ufunc_besselpoly_ptr[2*1] = <void*>_func_besselpoly
  3664. ufunc_besselpoly_ptr[2*1+1] = <void*>(<char*>"besselpoly")
  3665. ufunc_besselpoly_data[0] = &ufunc_besselpoly_ptr[2*0]
  3666. ufunc_besselpoly_data[1] = &ufunc_besselpoly_ptr[2*1]
  3667. besselpoly = np.PyUFunc_FromFuncAndData(ufunc_besselpoly_loops, ufunc_besselpoly_data, ufunc_besselpoly_types, 2, 3, 1, 0, "besselpoly", ufunc_besselpoly_doc, 0)
  3668. cdef np.PyUFuncGenericFunction ufunc_beta_loops[2]
  3669. cdef void *ufunc_beta_ptr[4]
  3670. cdef void *ufunc_beta_data[2]
  3671. cdef char ufunc_beta_types[6]
  3672. cdef char *ufunc_beta_doc = (
  3673. "beta(a, b, out=None)\n"
  3674. "\n"
  3675. "Beta function.\n"
  3676. "\n"
  3677. "This function is defined in [1]_ as\n"
  3678. "\n"
  3679. ".. math::\n"
  3680. "\n"
  3681. " B(a, b) = \\int_0^1 t^{a-1}(1-t)^{b-1}dt\n"
  3682. " = \\frac{\\Gamma(a)\\Gamma(b)}{\\Gamma(a+b)},\n"
  3683. "\n"
  3684. "where :math:`\\Gamma` is the gamma function.\n"
  3685. "\n"
  3686. "Parameters\n"
  3687. "----------\n"
  3688. "a, b : array_like\n"
  3689. " Real-valued arguments\n"
  3690. "out : ndarray, optional\n"
  3691. " Optional output array for the function result\n"
  3692. "\n"
  3693. "Returns\n"
  3694. "-------\n"
  3695. "scalar or ndarray\n"
  3696. " Value of the beta function\n"
  3697. "\n"
  3698. "See Also\n"
  3699. "--------\n"
  3700. "gamma : the gamma function\n"
  3701. "betainc : the regularized incomplete beta function\n"
  3702. "betaln : the natural logarithm of the absolute\n"
  3703. " value of the beta function\n"
  3704. "\n"
  3705. "References\n"
  3706. "----------\n"
  3707. ".. [1] NIST Digital Library of Mathematical Functions,\n"
  3708. " Eq. 5.12.1. https://dlmf.nist.gov/5.12\n"
  3709. "\n"
  3710. "Examples\n"
  3711. "--------\n"
  3712. ">>> import scipy.special as sc\n"
  3713. "\n"
  3714. "The beta function relates to the gamma function by the\n"
  3715. "definition given above:\n"
  3716. "\n"
  3717. ">>> sc.beta(2, 3)\n"
  3718. "0.08333333333333333\n"
  3719. ">>> sc.gamma(2)*sc.gamma(3)/sc.gamma(2 + 3)\n"
  3720. "0.08333333333333333\n"
  3721. "\n"
  3722. "As this relationship demonstrates, the beta function\n"
  3723. "is symmetric:\n"
  3724. "\n"
  3725. ">>> sc.beta(1.7, 2.4)\n"
  3726. "0.16567527689031739\n"
  3727. ">>> sc.beta(2.4, 1.7)\n"
  3728. "0.16567527689031739\n"
  3729. "\n"
  3730. "This function satisfies :math:`B(1, b) = 1/b`:\n"
  3731. "\n"
  3732. ">>> sc.beta(1, 4)\n"
  3733. "0.25")
  3734. ufunc_beta_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  3735. ufunc_beta_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  3736. ufunc_beta_types[0] = <char>NPY_FLOAT
  3737. ufunc_beta_types[1] = <char>NPY_FLOAT
  3738. ufunc_beta_types[2] = <char>NPY_FLOAT
  3739. ufunc_beta_types[3] = <char>NPY_DOUBLE
  3740. ufunc_beta_types[4] = <char>NPY_DOUBLE
  3741. ufunc_beta_types[5] = <char>NPY_DOUBLE
  3742. ufunc_beta_ptr[2*0] = <void*>_func_beta
  3743. ufunc_beta_ptr[2*0+1] = <void*>(<char*>"beta")
  3744. ufunc_beta_ptr[2*1] = <void*>_func_beta
  3745. ufunc_beta_ptr[2*1+1] = <void*>(<char*>"beta")
  3746. ufunc_beta_data[0] = &ufunc_beta_ptr[2*0]
  3747. ufunc_beta_data[1] = &ufunc_beta_ptr[2*1]
  3748. beta = np.PyUFunc_FromFuncAndData(ufunc_beta_loops, ufunc_beta_data, ufunc_beta_types, 2, 2, 1, 0, "beta", ufunc_beta_doc, 0)
  3749. cdef np.PyUFuncGenericFunction ufunc_betainc_loops[2]
  3750. cdef void *ufunc_betainc_ptr[4]
  3751. cdef void *ufunc_betainc_data[2]
  3752. cdef char ufunc_betainc_types[8]
  3753. cdef char *ufunc_betainc_doc = (
  3754. "betainc(a, b, x, out=None)\n"
  3755. "\n"
  3756. "Regularized incomplete beta function.\n"
  3757. "\n"
  3758. "Computes the regularized incomplete beta function, defined as [1]_:\n"
  3759. "\n"
  3760. ".. math::\n"
  3761. "\n"
  3762. " I_x(a, b) = \\frac{\\Gamma(a+b)}{\\Gamma(a)\\Gamma(b)} \\int_0^x\n"
  3763. " t^{a-1}(1-t)^{b-1}dt,\n"
  3764. "\n"
  3765. "for :math:`0 \\leq x \\leq 1`.\n"
  3766. "\n"
  3767. "Parameters\n"
  3768. "----------\n"
  3769. "a, b : array_like\n"
  3770. " Positive, real-valued parameters\n"
  3771. "x : array_like\n"
  3772. " Real-valued such that :math:`0 \\leq x \\leq 1`,\n"
  3773. " the upper limit of integration\n"
  3774. "out : ndarray, optional\n"
  3775. " Optional output array for the function values\n"
  3776. "\n"
  3777. "Returns\n"
  3778. "-------\n"
  3779. "scalar or ndarray\n"
  3780. " Value of the regularized incomplete beta function\n"
  3781. "\n"
  3782. "See Also\n"
  3783. "--------\n"
  3784. "beta : beta function\n"
  3785. "betaincinv : inverse of the regularized incomplete beta function\n"
  3786. "\n"
  3787. "Notes\n"
  3788. "-----\n"
  3789. "The term *regularized* in the name of this function refers to the\n"
  3790. "scaling of the function by the gamma function terms shown in the\n"
  3791. "formula. When not qualified as *regularized*, the name *incomplete\n"
  3792. "beta function* often refers to just the integral expression,\n"
  3793. "without the gamma terms. One can use the function `beta` from\n"
  3794. "`scipy.special` to get this \"nonregularized\" incomplete beta\n"
  3795. "function by multiplying the result of ``betainc(a, b, x)`` by\n"
  3796. "``beta(a, b)``.\n"
  3797. "\n"
  3798. "References\n"
  3799. "----------\n"
  3800. ".. [1] NIST Digital Library of Mathematical Functions\n"
  3801. " https://dlmf.nist.gov/8.17\n"
  3802. "\n"
  3803. "Examples\n"
  3804. "--------\n"
  3805. "\n"
  3806. "Let :math:`B(a, b)` be the `beta` function.\n"
  3807. "\n"
  3808. ">>> import scipy.special as sc\n"
  3809. "\n"
  3810. "The coefficient in terms of `gamma` is equal to\n"
  3811. ":math:`1/B(a, b)`. Also, when :math:`x=1`\n"
  3812. "the integral is equal to :math:`B(a, b)`.\n"
  3813. "Therefore, :math:`I_{x=1}(a, b) = 1` for any :math:`a, b`.\n"
  3814. "\n"
  3815. ">>> sc.betainc(0.2, 3.5, 1.0)\n"
  3816. "1.0\n"
  3817. "\n"
  3818. "It satisfies\n"
  3819. ":math:`I_x(a, b) = x^a F(a, 1-b, a+1, x)/ (aB(a, b))`,\n"
  3820. "where :math:`F` is the hypergeometric function `hyp2f1`:\n"
  3821. "\n"
  3822. ">>> a, b, x = 1.4, 3.1, 0.5\n"
  3823. ">>> x**a * sc.hyp2f1(a, 1 - b, a + 1, x)/(a * sc.beta(a, b))\n"
  3824. "0.8148904036225295\n"
  3825. ">>> sc.betainc(a, b, x)\n"
  3826. "0.8148904036225296\n"
  3827. "\n"
  3828. "This functions satisfies the relationship\n"
  3829. ":math:`I_x(a, b) = 1 - I_{1-x}(b, a)`:\n"
  3830. "\n"
  3831. ">>> sc.betainc(2.2, 3.1, 0.4)\n"
  3832. "0.49339638807619446\n"
  3833. ">>> 1 - sc.betainc(3.1, 2.2, 1 - 0.4)\n"
  3834. "0.49339638807619446")
  3835. ufunc_betainc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3836. ufunc_betainc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3837. ufunc_betainc_types[0] = <char>NPY_FLOAT
  3838. ufunc_betainc_types[1] = <char>NPY_FLOAT
  3839. ufunc_betainc_types[2] = <char>NPY_FLOAT
  3840. ufunc_betainc_types[3] = <char>NPY_FLOAT
  3841. ufunc_betainc_types[4] = <char>NPY_DOUBLE
  3842. ufunc_betainc_types[5] = <char>NPY_DOUBLE
  3843. ufunc_betainc_types[6] = <char>NPY_DOUBLE
  3844. ufunc_betainc_types[7] = <char>NPY_DOUBLE
  3845. ufunc_betainc_ptr[2*0] = <void*>_func_incbet
  3846. ufunc_betainc_ptr[2*0+1] = <void*>(<char*>"betainc")
  3847. ufunc_betainc_ptr[2*1] = <void*>_func_incbet
  3848. ufunc_betainc_ptr[2*1+1] = <void*>(<char*>"betainc")
  3849. ufunc_betainc_data[0] = &ufunc_betainc_ptr[2*0]
  3850. ufunc_betainc_data[1] = &ufunc_betainc_ptr[2*1]
  3851. betainc = np.PyUFunc_FromFuncAndData(ufunc_betainc_loops, ufunc_betainc_data, ufunc_betainc_types, 2, 3, 1, 0, "betainc", ufunc_betainc_doc, 0)
  3852. cdef np.PyUFuncGenericFunction ufunc_betaincinv_loops[2]
  3853. cdef void *ufunc_betaincinv_ptr[4]
  3854. cdef void *ufunc_betaincinv_data[2]
  3855. cdef char ufunc_betaincinv_types[8]
  3856. cdef char *ufunc_betaincinv_doc = (
  3857. "betaincinv(a, b, y, out=None)\n"
  3858. "\n"
  3859. "Inverse of the regularized incomplete beta function.\n"
  3860. "\n"
  3861. "Computes :math:`x` such that:\n"
  3862. "\n"
  3863. ".. math::\n"
  3864. "\n"
  3865. " y = I_x(a, b) = \\frac{\\Gamma(a+b)}{\\Gamma(a)\\Gamma(b)}\n"
  3866. " \\int_0^x t^{a-1}(1-t)^{b-1}dt,\n"
  3867. "\n"
  3868. "where :math:`I_x` is the normalized incomplete beta\n"
  3869. "function `betainc` and\n"
  3870. ":math:`\\Gamma` is the `gamma` function [1]_.\n"
  3871. "\n"
  3872. "Parameters\n"
  3873. "----------\n"
  3874. "a, b : array_like\n"
  3875. " Positive, real-valued parameters\n"
  3876. "y : array_like\n"
  3877. " Real-valued input\n"
  3878. "out : ndarray, optional\n"
  3879. " Optional output array for function values\n"
  3880. "\n"
  3881. "Returns\n"
  3882. "-------\n"
  3883. "scalar or ndarray\n"
  3884. " Value of the inverse of the regularized incomplete beta function\n"
  3885. "\n"
  3886. "See Also\n"
  3887. "--------\n"
  3888. "betainc : regularized incomplete beta function\n"
  3889. "gamma : gamma function\n"
  3890. "\n"
  3891. "References\n"
  3892. "----------\n"
  3893. ".. [1] NIST Digital Library of Mathematical Functions\n"
  3894. " https://dlmf.nist.gov/8.17\n"
  3895. "\n"
  3896. "Examples\n"
  3897. "--------\n"
  3898. ">>> import scipy.special as sc\n"
  3899. "\n"
  3900. "This function is the inverse of `betainc` for fixed\n"
  3901. "values of :math:`a` and :math:`b`.\n"
  3902. "\n"
  3903. ">>> a, b = 1.2, 3.1\n"
  3904. ">>> y = sc.betainc(a, b, 0.2)\n"
  3905. ">>> sc.betaincinv(a, b, y)\n"
  3906. "0.2\n"
  3907. ">>>\n"
  3908. ">>> a, b = 7.5, 0.4\n"
  3909. ">>> x = sc.betaincinv(a, b, 0.5)\n"
  3910. ">>> sc.betainc(a, b, x)\n"
  3911. "0.5")
  3912. ufunc_betaincinv_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  3913. ufunc_betaincinv_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  3914. ufunc_betaincinv_types[0] = <char>NPY_FLOAT
  3915. ufunc_betaincinv_types[1] = <char>NPY_FLOAT
  3916. ufunc_betaincinv_types[2] = <char>NPY_FLOAT
  3917. ufunc_betaincinv_types[3] = <char>NPY_FLOAT
  3918. ufunc_betaincinv_types[4] = <char>NPY_DOUBLE
  3919. ufunc_betaincinv_types[5] = <char>NPY_DOUBLE
  3920. ufunc_betaincinv_types[6] = <char>NPY_DOUBLE
  3921. ufunc_betaincinv_types[7] = <char>NPY_DOUBLE
  3922. ufunc_betaincinv_ptr[2*0] = <void*>_func_incbi
  3923. ufunc_betaincinv_ptr[2*0+1] = <void*>(<char*>"betaincinv")
  3924. ufunc_betaincinv_ptr[2*1] = <void*>_func_incbi
  3925. ufunc_betaincinv_ptr[2*1+1] = <void*>(<char*>"betaincinv")
  3926. ufunc_betaincinv_data[0] = &ufunc_betaincinv_ptr[2*0]
  3927. ufunc_betaincinv_data[1] = &ufunc_betaincinv_ptr[2*1]
  3928. betaincinv = np.PyUFunc_FromFuncAndData(ufunc_betaincinv_loops, ufunc_betaincinv_data, ufunc_betaincinv_types, 2, 3, 1, 0, "betaincinv", ufunc_betaincinv_doc, 0)
  3929. cdef np.PyUFuncGenericFunction ufunc_betaln_loops[2]
  3930. cdef void *ufunc_betaln_ptr[4]
  3931. cdef void *ufunc_betaln_data[2]
  3932. cdef char ufunc_betaln_types[6]
  3933. cdef char *ufunc_betaln_doc = (
  3934. "betaln(a, b, out=None)\n"
  3935. "\n"
  3936. "Natural logarithm of absolute value of beta function.\n"
  3937. "\n"
  3938. "Computes ``ln(abs(beta(a, b)))``.\n"
  3939. "\n"
  3940. "Parameters\n"
  3941. "----------\n"
  3942. "a, b : array_like\n"
  3943. " Positive, real-valued parameters\n"
  3944. "out : ndarray, optional\n"
  3945. " Optional output array for function values\n"
  3946. "\n"
  3947. "Returns\n"
  3948. "-------\n"
  3949. "scalar or ndarray\n"
  3950. " Value of the betaln function\n"
  3951. "\n"
  3952. "See Also\n"
  3953. "--------\n"
  3954. "gamma : the gamma function\n"
  3955. "betainc : the regularized incomplete beta function\n"
  3956. "beta : the beta function\n"
  3957. "\n"
  3958. "Examples\n"
  3959. "--------\n"
  3960. ">>> import numpy as np\n"
  3961. ">>> from scipy.special import betaln, beta\n"
  3962. "\n"
  3963. "Verify that, for moderate values of ``a`` and ``b``, ``betaln(a, b)``\n"
  3964. "is the same as ``log(beta(a, b))``:\n"
  3965. "\n"
  3966. ">>> betaln(3, 4)\n"
  3967. "-4.0943445622221\n"
  3968. "\n"
  3969. ">>> np.log(beta(3, 4))\n"
  3970. "-4.0943445622221\n"
  3971. "\n"
  3972. "In the following ``beta(a, b)`` underflows to 0, so we can't compute\n"
  3973. "the logarithm of the actual value.\n"
  3974. "\n"
  3975. ">>> a = 400\n"
  3976. ">>> b = 900\n"
  3977. ">>> beta(a, b)\n"
  3978. "0.0\n"
  3979. "\n"
  3980. "We can compute the logarithm of ``beta(a, b)`` by using `betaln`:\n"
  3981. "\n"
  3982. ">>> betaln(a, b)\n"
  3983. "-804.3069951764146")
  3984. ufunc_betaln_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  3985. ufunc_betaln_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  3986. ufunc_betaln_types[0] = <char>NPY_FLOAT
  3987. ufunc_betaln_types[1] = <char>NPY_FLOAT
  3988. ufunc_betaln_types[2] = <char>NPY_FLOAT
  3989. ufunc_betaln_types[3] = <char>NPY_DOUBLE
  3990. ufunc_betaln_types[4] = <char>NPY_DOUBLE
  3991. ufunc_betaln_types[5] = <char>NPY_DOUBLE
  3992. ufunc_betaln_ptr[2*0] = <void*>_func_lbeta
  3993. ufunc_betaln_ptr[2*0+1] = <void*>(<char*>"betaln")
  3994. ufunc_betaln_ptr[2*1] = <void*>_func_lbeta
  3995. ufunc_betaln_ptr[2*1+1] = <void*>(<char*>"betaln")
  3996. ufunc_betaln_data[0] = &ufunc_betaln_ptr[2*0]
  3997. ufunc_betaln_data[1] = &ufunc_betaln_ptr[2*1]
  3998. betaln = np.PyUFunc_FromFuncAndData(ufunc_betaln_loops, ufunc_betaln_data, ufunc_betaln_types, 2, 2, 1, 0, "betaln", ufunc_betaln_doc, 0)
  3999. cdef np.PyUFuncGenericFunction ufunc_binom_loops[2]
  4000. cdef void *ufunc_binom_ptr[4]
  4001. cdef void *ufunc_binom_data[2]
  4002. cdef char ufunc_binom_types[6]
  4003. cdef char *ufunc_binom_doc = (
  4004. "binom(x, y, out=None)\n"
  4005. "\n"
  4006. "Binomial coefficient considered as a function of two real variables.\n"
  4007. "\n"
  4008. "For real arguments, the binomial coefficient is defined as\n"
  4009. "\n"
  4010. ".. math::\n"
  4011. "\n"
  4012. " \\binom{x}{y} = \\frac{\\Gamma(x + 1)}{\\Gamma(y + 1)\\Gamma(x - y + 1)} =\n"
  4013. " \\frac{1}{(x + 1)\\mathrm{B}(x - y + 1, y + 1)}\n"
  4014. "\n"
  4015. "Where :math:`\\Gamma` is the Gamma function (`gamma`) and :math:`\\mathrm{B}`\n"
  4016. "is the Beta function (`beta`) [1]_.\n"
  4017. "\n"
  4018. "Parameters\n"
  4019. "----------\n"
  4020. "x, y: array_like\n"
  4021. " Real arguments to :math:`\\binom{x}{y}`.\n"
  4022. "out : ndarray, optional\n"
  4023. " Optional output array for the function values\n"
  4024. "\n"
  4025. "Returns\n"
  4026. "-------\n"
  4027. "scalar or ndarray\n"
  4028. " Value of binomial coefficient.\n"
  4029. "\n"
  4030. "See Also\n"
  4031. "--------\n"
  4032. "comb : The number of combinations of N things taken k at a time.\n"
  4033. "\n"
  4034. "Notes\n"
  4035. "-----\n"
  4036. "The Gamma function has poles at non-positive integers and tends to either\n"
  4037. "positive or negative infinity depending on the direction on the real line\n"
  4038. "from which a pole is approached. When considered as a function of two real\n"
  4039. "variables, :math:`\\binom{x}{y}` is thus undefined when `x` is a negative\n"
  4040. "integer. `binom` returns ``nan`` when ``x`` is a negative integer. This\n"
  4041. "is the case even when ``x`` is a negative integer and ``y`` an integer,\n"
  4042. "contrary to the usual convention for defining :math:`\\binom{n}{k}` when it\n"
  4043. "is considered as a function of two integer variables.\n"
  4044. "\n"
  4045. "References\n"
  4046. "----------\n"
  4047. ".. [1] https://en.wikipedia.org/wiki/Binomial_coefficient\n"
  4048. "\n"
  4049. "Examples\n"
  4050. "--------\n"
  4051. "The following examples illustrate the ways in which `binom` differs from\n"
  4052. "the function `comb`.\n"
  4053. "\n"
  4054. ">>> from scipy.special import binom, comb\n"
  4055. "\n"
  4056. "When ``exact=False`` and ``x`` and ``y`` are both positive, `comb` calls\n"
  4057. "`binom` internally.\n"
  4058. "\n"
  4059. ">>> x, y = 3, 2\n"
  4060. ">>> (binom(x, y), comb(x, y), comb(x, y, exact=True))\n"
  4061. "(3.0, 3.0, 3)\n"
  4062. "\n"
  4063. "For larger values, `comb` with ``exact=True`` no longer agrees\n"
  4064. "with `binom`.\n"
  4065. "\n"
  4066. ">>> x, y = 43, 23\n"
  4067. ">>> (binom(x, y), comb(x, y), comb(x, y, exact=True))\n"
  4068. "(960566918219.9999, 960566918219.9999, 960566918220)\n"
  4069. "\n"
  4070. "`binom` returns ``nan`` when ``x`` is a negative integer, but is otherwise\n"
  4071. "defined for negative arguments. `comb` returns 0 whenever one of ``x`` or\n"
  4072. "``y`` is negative or ``x`` is less than ``y``.\n"
  4073. "\n"
  4074. ">>> x, y = -3, 2\n"
  4075. ">>> (binom(x, y), comb(x, y), comb(x, y, exact=True))\n"
  4076. "(nan, 0.0, 0)\n"
  4077. "\n"
  4078. ">>> x, y = -3.1, 2.2\n"
  4079. ">>> (binom(x, y), comb(x, y), comb(x, y, exact=True))\n"
  4080. "(18.714147876804432, 0.0, 0)\n"
  4081. "\n"
  4082. ">>> x, y = 2.2, 3.1\n"
  4083. ">>> (binom(x, y), comb(x, y), comb(x, y, exact=True))\n"
  4084. "(0.037399983365134115, 0.0, 0)")
  4085. ufunc_binom_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4086. ufunc_binom_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4087. ufunc_binom_types[0] = <char>NPY_FLOAT
  4088. ufunc_binom_types[1] = <char>NPY_FLOAT
  4089. ufunc_binom_types[2] = <char>NPY_FLOAT
  4090. ufunc_binom_types[3] = <char>NPY_DOUBLE
  4091. ufunc_binom_types[4] = <char>NPY_DOUBLE
  4092. ufunc_binom_types[5] = <char>NPY_DOUBLE
  4093. ufunc_binom_ptr[2*0] = <void*>_func_binom
  4094. ufunc_binom_ptr[2*0+1] = <void*>(<char*>"binom")
  4095. ufunc_binom_ptr[2*1] = <void*>_func_binom
  4096. ufunc_binom_ptr[2*1+1] = <void*>(<char*>"binom")
  4097. ufunc_binom_data[0] = &ufunc_binom_ptr[2*0]
  4098. ufunc_binom_data[1] = &ufunc_binom_ptr[2*1]
  4099. binom = np.PyUFunc_FromFuncAndData(ufunc_binom_loops, ufunc_binom_data, ufunc_binom_types, 2, 2, 1, 0, "binom", ufunc_binom_doc, 0)
  4100. cdef np.PyUFuncGenericFunction ufunc_boxcox_loops[2]
  4101. cdef void *ufunc_boxcox_ptr[4]
  4102. cdef void *ufunc_boxcox_data[2]
  4103. cdef char ufunc_boxcox_types[6]
  4104. cdef char *ufunc_boxcox_doc = (
  4105. "boxcox(x, lmbda, out=None)\n"
  4106. "\n"
  4107. "Compute the Box-Cox transformation.\n"
  4108. "\n"
  4109. "The Box-Cox transformation is::\n"
  4110. "\n"
  4111. " y = (x**lmbda - 1) / lmbda if lmbda != 0\n"
  4112. " log(x) if lmbda == 0\n"
  4113. "\n"
  4114. "Returns `nan` if ``x < 0``.\n"
  4115. "Returns `-inf` if ``x == 0`` and ``lmbda < 0``.\n"
  4116. "\n"
  4117. "Parameters\n"
  4118. "----------\n"
  4119. "x : array_like\n"
  4120. " Data to be transformed.\n"
  4121. "lmbda : array_like\n"
  4122. " Power parameter of the Box-Cox transform.\n"
  4123. "out : ndarray, optional\n"
  4124. " Optional output array for the function values\n"
  4125. "\n"
  4126. "Returns\n"
  4127. "-------\n"
  4128. "y : scalar or ndarray\n"
  4129. " Transformed data.\n"
  4130. "\n"
  4131. "Notes\n"
  4132. "-----\n"
  4133. "\n"
  4134. ".. versionadded:: 0.14.0\n"
  4135. "\n"
  4136. "Examples\n"
  4137. "--------\n"
  4138. ">>> from scipy.special import boxcox\n"
  4139. ">>> boxcox([1, 4, 10], 2.5)\n"
  4140. "array([ 0. , 12.4 , 126.09110641])\n"
  4141. ">>> boxcox(2, [0, 1, 2])\n"
  4142. "array([ 0.69314718, 1. , 1.5 ])")
  4143. ufunc_boxcox_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4144. ufunc_boxcox_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4145. ufunc_boxcox_types[0] = <char>NPY_FLOAT
  4146. ufunc_boxcox_types[1] = <char>NPY_FLOAT
  4147. ufunc_boxcox_types[2] = <char>NPY_FLOAT
  4148. ufunc_boxcox_types[3] = <char>NPY_DOUBLE
  4149. ufunc_boxcox_types[4] = <char>NPY_DOUBLE
  4150. ufunc_boxcox_types[5] = <char>NPY_DOUBLE
  4151. ufunc_boxcox_ptr[2*0] = <void*>_func_boxcox
  4152. ufunc_boxcox_ptr[2*0+1] = <void*>(<char*>"boxcox")
  4153. ufunc_boxcox_ptr[2*1] = <void*>_func_boxcox
  4154. ufunc_boxcox_ptr[2*1+1] = <void*>(<char*>"boxcox")
  4155. ufunc_boxcox_data[0] = &ufunc_boxcox_ptr[2*0]
  4156. ufunc_boxcox_data[1] = &ufunc_boxcox_ptr[2*1]
  4157. boxcox = np.PyUFunc_FromFuncAndData(ufunc_boxcox_loops, ufunc_boxcox_data, ufunc_boxcox_types, 2, 2, 1, 0, "boxcox", ufunc_boxcox_doc, 0)
  4158. cdef np.PyUFuncGenericFunction ufunc_boxcox1p_loops[2]
  4159. cdef void *ufunc_boxcox1p_ptr[4]
  4160. cdef void *ufunc_boxcox1p_data[2]
  4161. cdef char ufunc_boxcox1p_types[6]
  4162. cdef char *ufunc_boxcox1p_doc = (
  4163. "boxcox1p(x, lmbda, out=None)\n"
  4164. "\n"
  4165. "Compute the Box-Cox transformation of 1 + `x`.\n"
  4166. "\n"
  4167. "The Box-Cox transformation computed by `boxcox1p` is::\n"
  4168. "\n"
  4169. " y = ((1+x)**lmbda - 1) / lmbda if lmbda != 0\n"
  4170. " log(1+x) if lmbda == 0\n"
  4171. "\n"
  4172. "Returns `nan` if ``x < -1``.\n"
  4173. "Returns `-inf` if ``x == -1`` and ``lmbda < 0``.\n"
  4174. "\n"
  4175. "Parameters\n"
  4176. "----------\n"
  4177. "x : array_like\n"
  4178. " Data to be transformed.\n"
  4179. "lmbda : array_like\n"
  4180. " Power parameter of the Box-Cox transform.\n"
  4181. "out : ndarray, optional\n"
  4182. " Optional output array for the function values\n"
  4183. "\n"
  4184. "Returns\n"
  4185. "-------\n"
  4186. "y : scalar or ndarray\n"
  4187. " Transformed data.\n"
  4188. "\n"
  4189. "Notes\n"
  4190. "-----\n"
  4191. "\n"
  4192. ".. versionadded:: 0.14.0\n"
  4193. "\n"
  4194. "Examples\n"
  4195. "--------\n"
  4196. ">>> from scipy.special import boxcox1p\n"
  4197. ">>> boxcox1p(1e-4, [0, 0.5, 1])\n"
  4198. "array([ 9.99950003e-05, 9.99975001e-05, 1.00000000e-04])\n"
  4199. ">>> boxcox1p([0.01, 0.1], 0.25)\n"
  4200. "array([ 0.00996272, 0.09645476])")
  4201. ufunc_boxcox1p_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4202. ufunc_boxcox1p_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4203. ufunc_boxcox1p_types[0] = <char>NPY_FLOAT
  4204. ufunc_boxcox1p_types[1] = <char>NPY_FLOAT
  4205. ufunc_boxcox1p_types[2] = <char>NPY_FLOAT
  4206. ufunc_boxcox1p_types[3] = <char>NPY_DOUBLE
  4207. ufunc_boxcox1p_types[4] = <char>NPY_DOUBLE
  4208. ufunc_boxcox1p_types[5] = <char>NPY_DOUBLE
  4209. ufunc_boxcox1p_ptr[2*0] = <void*>_func_boxcox1p
  4210. ufunc_boxcox1p_ptr[2*0+1] = <void*>(<char*>"boxcox1p")
  4211. ufunc_boxcox1p_ptr[2*1] = <void*>_func_boxcox1p
  4212. ufunc_boxcox1p_ptr[2*1+1] = <void*>(<char*>"boxcox1p")
  4213. ufunc_boxcox1p_data[0] = &ufunc_boxcox1p_ptr[2*0]
  4214. ufunc_boxcox1p_data[1] = &ufunc_boxcox1p_ptr[2*1]
  4215. boxcox1p = np.PyUFunc_FromFuncAndData(ufunc_boxcox1p_loops, ufunc_boxcox1p_data, ufunc_boxcox1p_types, 2, 2, 1, 0, "boxcox1p", ufunc_boxcox1p_doc, 0)
  4216. cdef np.PyUFuncGenericFunction ufunc_btdtr_loops[2]
  4217. cdef void *ufunc_btdtr_ptr[4]
  4218. cdef void *ufunc_btdtr_data[2]
  4219. cdef char ufunc_btdtr_types[8]
  4220. cdef char *ufunc_btdtr_doc = (
  4221. "btdtr(a, b, x, out=None)\n"
  4222. "\n"
  4223. "Cumulative distribution function of the beta distribution.\n"
  4224. "\n"
  4225. "Returns the integral from zero to `x` of the beta probability density\n"
  4226. "function,\n"
  4227. "\n"
  4228. ".. math::\n"
  4229. " I = \\int_0^x \\frac{\\Gamma(a + b)}{\\Gamma(a)\\Gamma(b)} t^{a-1} (1-t)^{b-1}\\,dt\n"
  4230. "\n"
  4231. "where :math:`\\Gamma` is the gamma function.\n"
  4232. "\n"
  4233. "Parameters\n"
  4234. "----------\n"
  4235. "a : array_like\n"
  4236. " Shape parameter (a > 0).\n"
  4237. "b : array_like\n"
  4238. " Shape parameter (b > 0).\n"
  4239. "x : array_like\n"
  4240. " Upper limit of integration, in [0, 1].\n"
  4241. "out : ndarray, optional\n"
  4242. " Optional output array for the function values\n"
  4243. "\n"
  4244. "Returns\n"
  4245. "-------\n"
  4246. "I : scalar or ndarray\n"
  4247. " Cumulative distribution function of the beta distribution with\n"
  4248. " parameters `a` and `b` at `x`.\n"
  4249. "\n"
  4250. "See Also\n"
  4251. "--------\n"
  4252. "betainc\n"
  4253. "\n"
  4254. "Notes\n"
  4255. "-----\n"
  4256. "This function is identical to the incomplete beta integral function\n"
  4257. "`betainc`.\n"
  4258. "\n"
  4259. "Wrapper for the Cephes [1]_ routine `btdtr`.\n"
  4260. "\n"
  4261. "References\n"
  4262. "----------\n"
  4263. ".. [1] Cephes Mathematical Functions Library,\n"
  4264. " http://www.netlib.org/cephes/")
  4265. ufunc_btdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4266. ufunc_btdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4267. ufunc_btdtr_types[0] = <char>NPY_FLOAT
  4268. ufunc_btdtr_types[1] = <char>NPY_FLOAT
  4269. ufunc_btdtr_types[2] = <char>NPY_FLOAT
  4270. ufunc_btdtr_types[3] = <char>NPY_FLOAT
  4271. ufunc_btdtr_types[4] = <char>NPY_DOUBLE
  4272. ufunc_btdtr_types[5] = <char>NPY_DOUBLE
  4273. ufunc_btdtr_types[6] = <char>NPY_DOUBLE
  4274. ufunc_btdtr_types[7] = <char>NPY_DOUBLE
  4275. ufunc_btdtr_ptr[2*0] = <void*>_func_btdtr
  4276. ufunc_btdtr_ptr[2*0+1] = <void*>(<char*>"btdtr")
  4277. ufunc_btdtr_ptr[2*1] = <void*>_func_btdtr
  4278. ufunc_btdtr_ptr[2*1+1] = <void*>(<char*>"btdtr")
  4279. ufunc_btdtr_data[0] = &ufunc_btdtr_ptr[2*0]
  4280. ufunc_btdtr_data[1] = &ufunc_btdtr_ptr[2*1]
  4281. btdtr = np.PyUFunc_FromFuncAndData(ufunc_btdtr_loops, ufunc_btdtr_data, ufunc_btdtr_types, 2, 3, 1, 0, "btdtr", ufunc_btdtr_doc, 0)
  4282. cdef np.PyUFuncGenericFunction ufunc_btdtri_loops[2]
  4283. cdef void *ufunc_btdtri_ptr[4]
  4284. cdef void *ufunc_btdtri_data[2]
  4285. cdef char ufunc_btdtri_types[8]
  4286. cdef char *ufunc_btdtri_doc = (
  4287. "btdtri(a, b, p, out=None)\n"
  4288. "\n"
  4289. "The `p`-th quantile of the beta distribution.\n"
  4290. "\n"
  4291. "This function is the inverse of the beta cumulative distribution function,\n"
  4292. "`btdtr`, returning the value of `x` for which `btdtr(a, b, x) = p`, or\n"
  4293. "\n"
  4294. ".. math::\n"
  4295. " p = \\int_0^x \\frac{\\Gamma(a + b)}{\\Gamma(a)\\Gamma(b)} t^{a-1} (1-t)^{b-1}\\,dt\n"
  4296. "\n"
  4297. "Parameters\n"
  4298. "----------\n"
  4299. "a : array_like\n"
  4300. " Shape parameter (`a` > 0).\n"
  4301. "b : array_like\n"
  4302. " Shape parameter (`b` > 0).\n"
  4303. "p : array_like\n"
  4304. " Cumulative probability, in [0, 1].\n"
  4305. "out : ndarray, optional\n"
  4306. " Optional output array for the function values\n"
  4307. "\n"
  4308. "Returns\n"
  4309. "-------\n"
  4310. "x : scalar or ndarray\n"
  4311. " The quantile corresponding to `p`.\n"
  4312. "\n"
  4313. "See Also\n"
  4314. "--------\n"
  4315. "betaincinv\n"
  4316. "btdtr\n"
  4317. "\n"
  4318. "Notes\n"
  4319. "-----\n"
  4320. "The value of `x` is found by interval halving or Newton iterations.\n"
  4321. "\n"
  4322. "Wrapper for the Cephes [1]_ routine `incbi`, which solves the equivalent\n"
  4323. "problem of finding the inverse of the incomplete beta integral.\n"
  4324. "\n"
  4325. "References\n"
  4326. "----------\n"
  4327. ".. [1] Cephes Mathematical Functions Library,\n"
  4328. " http://www.netlib.org/cephes/")
  4329. ufunc_btdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4330. ufunc_btdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4331. ufunc_btdtri_types[0] = <char>NPY_FLOAT
  4332. ufunc_btdtri_types[1] = <char>NPY_FLOAT
  4333. ufunc_btdtri_types[2] = <char>NPY_FLOAT
  4334. ufunc_btdtri_types[3] = <char>NPY_FLOAT
  4335. ufunc_btdtri_types[4] = <char>NPY_DOUBLE
  4336. ufunc_btdtri_types[5] = <char>NPY_DOUBLE
  4337. ufunc_btdtri_types[6] = <char>NPY_DOUBLE
  4338. ufunc_btdtri_types[7] = <char>NPY_DOUBLE
  4339. ufunc_btdtri_ptr[2*0] = <void*>_func_incbi
  4340. ufunc_btdtri_ptr[2*0+1] = <void*>(<char*>"btdtri")
  4341. ufunc_btdtri_ptr[2*1] = <void*>_func_incbi
  4342. ufunc_btdtri_ptr[2*1+1] = <void*>(<char*>"btdtri")
  4343. ufunc_btdtri_data[0] = &ufunc_btdtri_ptr[2*0]
  4344. ufunc_btdtri_data[1] = &ufunc_btdtri_ptr[2*1]
  4345. btdtri = np.PyUFunc_FromFuncAndData(ufunc_btdtri_loops, ufunc_btdtri_data, ufunc_btdtri_types, 2, 3, 1, 0, "btdtri", ufunc_btdtri_doc, 0)
  4346. cdef np.PyUFuncGenericFunction ufunc_btdtria_loops[2]
  4347. cdef void *ufunc_btdtria_ptr[4]
  4348. cdef void *ufunc_btdtria_data[2]
  4349. cdef char ufunc_btdtria_types[8]
  4350. cdef char *ufunc_btdtria_doc = (
  4351. "btdtria(p, b, x, out=None)\n"
  4352. "\n"
  4353. "Inverse of `btdtr` with respect to `a`.\n"
  4354. "\n"
  4355. "This is the inverse of the beta cumulative distribution function, `btdtr`,\n"
  4356. "considered as a function of `a`, returning the value of `a` for which\n"
  4357. "`btdtr(a, b, x) = p`, or\n"
  4358. "\n"
  4359. ".. math::\n"
  4360. " p = \\int_0^x \\frac{\\Gamma(a + b)}{\\Gamma(a)\\Gamma(b)} t^{a-1} (1-t)^{b-1}\\,dt\n"
  4361. "\n"
  4362. "Parameters\n"
  4363. "----------\n"
  4364. "p : array_like\n"
  4365. " Cumulative probability, in [0, 1].\n"
  4366. "b : array_like\n"
  4367. " Shape parameter (`b` > 0).\n"
  4368. "x : array_like\n"
  4369. " The quantile, in [0, 1].\n"
  4370. "out : ndarray, optional\n"
  4371. " Optional output array for the function values\n"
  4372. "\n"
  4373. "Returns\n"
  4374. "-------\n"
  4375. "a : scalar or ndarray\n"
  4376. " The value of the shape parameter `a` such that `btdtr(a, b, x) = p`.\n"
  4377. "\n"
  4378. "See Also\n"
  4379. "--------\n"
  4380. "btdtr : Cumulative distribution function of the beta distribution.\n"
  4381. "btdtri : Inverse with respect to `x`.\n"
  4382. "btdtrib : Inverse with respect to `b`.\n"
  4383. "\n"
  4384. "Notes\n"
  4385. "-----\n"
  4386. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfbet`.\n"
  4387. "\n"
  4388. "The cumulative distribution function `p` is computed using a routine by\n"
  4389. "DiDinato and Morris [2]_. Computation of `a` involves a search for a value\n"
  4390. "that produces the desired value of `p`. The search relies on the\n"
  4391. "monotonicity of `p` with `a`.\n"
  4392. "\n"
  4393. "References\n"
  4394. "----------\n"
  4395. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  4396. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  4397. " Functions, Inverses, and Other Parameters.\n"
  4398. ".. [2] DiDinato, A. R. and Morris, A. H.,\n"
  4399. " Algorithm 708: Significant Digit Computation of the Incomplete Beta\n"
  4400. " Function Ratios. ACM Trans. Math. Softw. 18 (1993), 360-373.")
  4401. ufunc_btdtria_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4402. ufunc_btdtria_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4403. ufunc_btdtria_types[0] = <char>NPY_FLOAT
  4404. ufunc_btdtria_types[1] = <char>NPY_FLOAT
  4405. ufunc_btdtria_types[2] = <char>NPY_FLOAT
  4406. ufunc_btdtria_types[3] = <char>NPY_FLOAT
  4407. ufunc_btdtria_types[4] = <char>NPY_DOUBLE
  4408. ufunc_btdtria_types[5] = <char>NPY_DOUBLE
  4409. ufunc_btdtria_types[6] = <char>NPY_DOUBLE
  4410. ufunc_btdtria_types[7] = <char>NPY_DOUBLE
  4411. ufunc_btdtria_ptr[2*0] = <void*>_func_cdfbet3_wrap
  4412. ufunc_btdtria_ptr[2*0+1] = <void*>(<char*>"btdtria")
  4413. ufunc_btdtria_ptr[2*1] = <void*>_func_cdfbet3_wrap
  4414. ufunc_btdtria_ptr[2*1+1] = <void*>(<char*>"btdtria")
  4415. ufunc_btdtria_data[0] = &ufunc_btdtria_ptr[2*0]
  4416. ufunc_btdtria_data[1] = &ufunc_btdtria_ptr[2*1]
  4417. btdtria = np.PyUFunc_FromFuncAndData(ufunc_btdtria_loops, ufunc_btdtria_data, ufunc_btdtria_types, 2, 3, 1, 0, "btdtria", ufunc_btdtria_doc, 0)
  4418. cdef np.PyUFuncGenericFunction ufunc_btdtrib_loops[2]
  4419. cdef void *ufunc_btdtrib_ptr[4]
  4420. cdef void *ufunc_btdtrib_data[2]
  4421. cdef char ufunc_btdtrib_types[8]
  4422. cdef char *ufunc_btdtrib_doc = (
  4423. "btdtria(a, p, x, out=None)\n"
  4424. "\n"
  4425. "Inverse of `btdtr` with respect to `b`.\n"
  4426. "\n"
  4427. "This is the inverse of the beta cumulative distribution function, `btdtr`,\n"
  4428. "considered as a function of `b`, returning the value of `b` for which\n"
  4429. "`btdtr(a, b, x) = p`, or\n"
  4430. "\n"
  4431. ".. math::\n"
  4432. " p = \\int_0^x \\frac{\\Gamma(a + b)}{\\Gamma(a)\\Gamma(b)} t^{a-1} (1-t)^{b-1}\\,dt\n"
  4433. "\n"
  4434. "Parameters\n"
  4435. "----------\n"
  4436. "a : array_like\n"
  4437. " Shape parameter (`a` > 0).\n"
  4438. "p : array_like\n"
  4439. " Cumulative probability, in [0, 1].\n"
  4440. "x : array_like\n"
  4441. " The quantile, in [0, 1].\n"
  4442. "out : ndarray, optional\n"
  4443. " Optional output array for the function values\n"
  4444. "\n"
  4445. "Returns\n"
  4446. "-------\n"
  4447. "b : scalar or ndarray\n"
  4448. " The value of the shape parameter `b` such that `btdtr(a, b, x) = p`.\n"
  4449. "\n"
  4450. "See Also\n"
  4451. "--------\n"
  4452. "btdtr : Cumulative distribution function of the beta distribution.\n"
  4453. "btdtri : Inverse with respect to `x`.\n"
  4454. "btdtria : Inverse with respect to `a`.\n"
  4455. "\n"
  4456. "Notes\n"
  4457. "-----\n"
  4458. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfbet`.\n"
  4459. "\n"
  4460. "The cumulative distribution function `p` is computed using a routine by\n"
  4461. "DiDinato and Morris [2]_. Computation of `b` involves a search for a value\n"
  4462. "that produces the desired value of `p`. The search relies on the\n"
  4463. "monotonicity of `p` with `b`.\n"
  4464. "\n"
  4465. "References\n"
  4466. "----------\n"
  4467. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  4468. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  4469. " Functions, Inverses, and Other Parameters.\n"
  4470. ".. [2] DiDinato, A. R. and Morris, A. H.,\n"
  4471. " Algorithm 708: Significant Digit Computation of the Incomplete Beta\n"
  4472. " Function Ratios. ACM Trans. Math. Softw. 18 (1993), 360-373.")
  4473. ufunc_btdtrib_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4474. ufunc_btdtrib_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4475. ufunc_btdtrib_types[0] = <char>NPY_FLOAT
  4476. ufunc_btdtrib_types[1] = <char>NPY_FLOAT
  4477. ufunc_btdtrib_types[2] = <char>NPY_FLOAT
  4478. ufunc_btdtrib_types[3] = <char>NPY_FLOAT
  4479. ufunc_btdtrib_types[4] = <char>NPY_DOUBLE
  4480. ufunc_btdtrib_types[5] = <char>NPY_DOUBLE
  4481. ufunc_btdtrib_types[6] = <char>NPY_DOUBLE
  4482. ufunc_btdtrib_types[7] = <char>NPY_DOUBLE
  4483. ufunc_btdtrib_ptr[2*0] = <void*>_func_cdfbet4_wrap
  4484. ufunc_btdtrib_ptr[2*0+1] = <void*>(<char*>"btdtrib")
  4485. ufunc_btdtrib_ptr[2*1] = <void*>_func_cdfbet4_wrap
  4486. ufunc_btdtrib_ptr[2*1+1] = <void*>(<char*>"btdtrib")
  4487. ufunc_btdtrib_data[0] = &ufunc_btdtrib_ptr[2*0]
  4488. ufunc_btdtrib_data[1] = &ufunc_btdtrib_ptr[2*1]
  4489. btdtrib = np.PyUFunc_FromFuncAndData(ufunc_btdtrib_loops, ufunc_btdtrib_data, ufunc_btdtrib_types, 2, 3, 1, 0, "btdtrib", ufunc_btdtrib_doc, 0)
  4490. cdef np.PyUFuncGenericFunction ufunc_cbrt_loops[2]
  4491. cdef void *ufunc_cbrt_ptr[4]
  4492. cdef void *ufunc_cbrt_data[2]
  4493. cdef char ufunc_cbrt_types[4]
  4494. cdef char *ufunc_cbrt_doc = (
  4495. "cbrt(x, out=None)\n"
  4496. "\n"
  4497. "Element-wise cube root of `x`.\n"
  4498. "\n"
  4499. "Parameters\n"
  4500. "----------\n"
  4501. "x : array_like\n"
  4502. " `x` must contain real numbers.\n"
  4503. "out : ndarray, optional\n"
  4504. " Optional output array for the function values\n"
  4505. "\n"
  4506. "Returns\n"
  4507. "-------\n"
  4508. "scalar or ndarray\n"
  4509. " The cube root of each value in `x`.\n"
  4510. "\n"
  4511. "Examples\n"
  4512. "--------\n"
  4513. ">>> from scipy.special import cbrt\n"
  4514. "\n"
  4515. ">>> cbrt(8)\n"
  4516. "2.0\n"
  4517. ">>> cbrt([-8, -3, 0.125, 1.331])\n"
  4518. "array([-2. , -1.44224957, 0.5 , 1.1 ])")
  4519. ufunc_cbrt_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  4520. ufunc_cbrt_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  4521. ufunc_cbrt_types[0] = <char>NPY_FLOAT
  4522. ufunc_cbrt_types[1] = <char>NPY_FLOAT
  4523. ufunc_cbrt_types[2] = <char>NPY_DOUBLE
  4524. ufunc_cbrt_types[3] = <char>NPY_DOUBLE
  4525. ufunc_cbrt_ptr[2*0] = <void*>_func_cbrt
  4526. ufunc_cbrt_ptr[2*0+1] = <void*>(<char*>"cbrt")
  4527. ufunc_cbrt_ptr[2*1] = <void*>_func_cbrt
  4528. ufunc_cbrt_ptr[2*1+1] = <void*>(<char*>"cbrt")
  4529. ufunc_cbrt_data[0] = &ufunc_cbrt_ptr[2*0]
  4530. ufunc_cbrt_data[1] = &ufunc_cbrt_ptr[2*1]
  4531. cbrt = np.PyUFunc_FromFuncAndData(ufunc_cbrt_loops, ufunc_cbrt_data, ufunc_cbrt_types, 2, 1, 1, 0, "cbrt", ufunc_cbrt_doc, 0)
  4532. cdef np.PyUFuncGenericFunction ufunc_chdtr_loops[2]
  4533. cdef void *ufunc_chdtr_ptr[4]
  4534. cdef void *ufunc_chdtr_data[2]
  4535. cdef char ufunc_chdtr_types[6]
  4536. cdef char *ufunc_chdtr_doc = (
  4537. "chdtr(v, x, out=None)\n"
  4538. "\n"
  4539. "Chi square cumulative distribution function.\n"
  4540. "\n"
  4541. "Returns the area under the left tail (from 0 to `x`) of the Chi\n"
  4542. "square probability density function with `v` degrees of freedom:\n"
  4543. "\n"
  4544. ".. math::\n"
  4545. "\n"
  4546. " \\frac{1}{2^{v/2} \\Gamma(v/2)} \\int_0^x t^{v/2 - 1} e^{-t/2} dt\n"
  4547. "\n"
  4548. "Here :math:`\\Gamma` is the Gamma function; see `gamma`. This\n"
  4549. "integral can be expressed in terms of the regularized lower\n"
  4550. "incomplete gamma function `gammainc` as\n"
  4551. "``gammainc(v / 2, x / 2)``. [1]_\n"
  4552. "\n"
  4553. "Parameters\n"
  4554. "----------\n"
  4555. "v : array_like\n"
  4556. " Degrees of freedom.\n"
  4557. "x : array_like\n"
  4558. " Upper bound of the integral.\n"
  4559. "out : ndarray, optional\n"
  4560. " Optional output array for the function results.\n"
  4561. "\n"
  4562. "Returns\n"
  4563. "-------\n"
  4564. "scalar or ndarray\n"
  4565. " Values of the cumulative distribution function.\n"
  4566. "\n"
  4567. "See Also\n"
  4568. "--------\n"
  4569. "chdtrc, chdtri, chdtriv, gammainc\n"
  4570. "\n"
  4571. "References\n"
  4572. "----------\n"
  4573. ".. [1] Chi-Square distribution,\n"
  4574. " https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm\n"
  4575. "\n"
  4576. "Examples\n"
  4577. "--------\n"
  4578. ">>> import numpy as np\n"
  4579. ">>> import scipy.special as sc\n"
  4580. "\n"
  4581. "It can be expressed in terms of the regularized lower incomplete\n"
  4582. "gamma function.\n"
  4583. "\n"
  4584. ">>> v = 1\n"
  4585. ">>> x = np.arange(4)\n"
  4586. ">>> sc.chdtr(v, x)\n"
  4587. "array([0. , 0.68268949, 0.84270079, 0.91673548])\n"
  4588. ">>> sc.gammainc(v / 2, x / 2)\n"
  4589. "array([0. , 0.68268949, 0.84270079, 0.91673548])")
  4590. ufunc_chdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4591. ufunc_chdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4592. ufunc_chdtr_types[0] = <char>NPY_FLOAT
  4593. ufunc_chdtr_types[1] = <char>NPY_FLOAT
  4594. ufunc_chdtr_types[2] = <char>NPY_FLOAT
  4595. ufunc_chdtr_types[3] = <char>NPY_DOUBLE
  4596. ufunc_chdtr_types[4] = <char>NPY_DOUBLE
  4597. ufunc_chdtr_types[5] = <char>NPY_DOUBLE
  4598. ufunc_chdtr_ptr[2*0] = <void*>_func_chdtr
  4599. ufunc_chdtr_ptr[2*0+1] = <void*>(<char*>"chdtr")
  4600. ufunc_chdtr_ptr[2*1] = <void*>_func_chdtr
  4601. ufunc_chdtr_ptr[2*1+1] = <void*>(<char*>"chdtr")
  4602. ufunc_chdtr_data[0] = &ufunc_chdtr_ptr[2*0]
  4603. ufunc_chdtr_data[1] = &ufunc_chdtr_ptr[2*1]
  4604. chdtr = np.PyUFunc_FromFuncAndData(ufunc_chdtr_loops, ufunc_chdtr_data, ufunc_chdtr_types, 2, 2, 1, 0, "chdtr", ufunc_chdtr_doc, 0)
  4605. cdef np.PyUFuncGenericFunction ufunc_chdtrc_loops[2]
  4606. cdef void *ufunc_chdtrc_ptr[4]
  4607. cdef void *ufunc_chdtrc_data[2]
  4608. cdef char ufunc_chdtrc_types[6]
  4609. cdef char *ufunc_chdtrc_doc = (
  4610. "chdtrc(v, x, out=None)\n"
  4611. "\n"
  4612. "Chi square survival function.\n"
  4613. "\n"
  4614. "Returns the area under the right hand tail (from `x` to infinity)\n"
  4615. "of the Chi square probability density function with `v` degrees of\n"
  4616. "freedom:\n"
  4617. "\n"
  4618. ".. math::\n"
  4619. "\n"
  4620. " \\frac{1}{2^{v/2} \\Gamma(v/2)} \\int_x^\\infty t^{v/2 - 1} e^{-t/2} dt\n"
  4621. "\n"
  4622. "Here :math:`\\Gamma` is the Gamma function; see `gamma`. This\n"
  4623. "integral can be expressed in terms of the regularized upper\n"
  4624. "incomplete gamma function `gammaincc` as\n"
  4625. "``gammaincc(v / 2, x / 2)``. [1]_\n"
  4626. "\n"
  4627. "Parameters\n"
  4628. "----------\n"
  4629. "v : array_like\n"
  4630. " Degrees of freedom.\n"
  4631. "x : array_like\n"
  4632. " Lower bound of the integral.\n"
  4633. "out : ndarray, optional\n"
  4634. " Optional output array for the function results.\n"
  4635. "\n"
  4636. "Returns\n"
  4637. "-------\n"
  4638. "scalar or ndarray\n"
  4639. " Values of the survival function.\n"
  4640. "\n"
  4641. "See Also\n"
  4642. "--------\n"
  4643. "chdtr, chdtri, chdtriv, gammaincc\n"
  4644. "\n"
  4645. "References\n"
  4646. "----------\n"
  4647. ".. [1] Chi-Square distribution,\n"
  4648. " https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm\n"
  4649. "\n"
  4650. "Examples\n"
  4651. "--------\n"
  4652. ">>> import numpy as np\n"
  4653. ">>> import scipy.special as sc\n"
  4654. "\n"
  4655. "It can be expressed in terms of the regularized upper incomplete\n"
  4656. "gamma function.\n"
  4657. "\n"
  4658. ">>> v = 1\n"
  4659. ">>> x = np.arange(4)\n"
  4660. ">>> sc.chdtrc(v, x)\n"
  4661. "array([1. , 0.31731051, 0.15729921, 0.08326452])\n"
  4662. ">>> sc.gammaincc(v / 2, x / 2)\n"
  4663. "array([1. , 0.31731051, 0.15729921, 0.08326452])")
  4664. ufunc_chdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4665. ufunc_chdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4666. ufunc_chdtrc_types[0] = <char>NPY_FLOAT
  4667. ufunc_chdtrc_types[1] = <char>NPY_FLOAT
  4668. ufunc_chdtrc_types[2] = <char>NPY_FLOAT
  4669. ufunc_chdtrc_types[3] = <char>NPY_DOUBLE
  4670. ufunc_chdtrc_types[4] = <char>NPY_DOUBLE
  4671. ufunc_chdtrc_types[5] = <char>NPY_DOUBLE
  4672. ufunc_chdtrc_ptr[2*0] = <void*>_func_chdtrc
  4673. ufunc_chdtrc_ptr[2*0+1] = <void*>(<char*>"chdtrc")
  4674. ufunc_chdtrc_ptr[2*1] = <void*>_func_chdtrc
  4675. ufunc_chdtrc_ptr[2*1+1] = <void*>(<char*>"chdtrc")
  4676. ufunc_chdtrc_data[0] = &ufunc_chdtrc_ptr[2*0]
  4677. ufunc_chdtrc_data[1] = &ufunc_chdtrc_ptr[2*1]
  4678. chdtrc = np.PyUFunc_FromFuncAndData(ufunc_chdtrc_loops, ufunc_chdtrc_data, ufunc_chdtrc_types, 2, 2, 1, 0, "chdtrc", ufunc_chdtrc_doc, 0)
  4679. cdef np.PyUFuncGenericFunction ufunc_chdtri_loops[2]
  4680. cdef void *ufunc_chdtri_ptr[4]
  4681. cdef void *ufunc_chdtri_data[2]
  4682. cdef char ufunc_chdtri_types[6]
  4683. cdef char *ufunc_chdtri_doc = (
  4684. "chdtri(v, p, out=None)\n"
  4685. "\n"
  4686. "Inverse to `chdtrc` with respect to `x`.\n"
  4687. "\n"
  4688. "Returns `x` such that ``chdtrc(v, x) == p``.\n"
  4689. "\n"
  4690. "Parameters\n"
  4691. "----------\n"
  4692. "v : array_like\n"
  4693. " Degrees of freedom.\n"
  4694. "p : array_like\n"
  4695. " Probability.\n"
  4696. "out : ndarray, optional\n"
  4697. " Optional output array for the function results.\n"
  4698. "\n"
  4699. "Returns\n"
  4700. "-------\n"
  4701. "x : scalar or ndarray\n"
  4702. " Value so that the probability a Chi square random variable\n"
  4703. " with `v` degrees of freedom is greater than `x` equals `p`.\n"
  4704. "\n"
  4705. "See Also\n"
  4706. "--------\n"
  4707. "chdtrc, chdtr, chdtriv\n"
  4708. "\n"
  4709. "References\n"
  4710. "----------\n"
  4711. ".. [1] Chi-Square distribution,\n"
  4712. " https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm\n"
  4713. "\n"
  4714. "Examples\n"
  4715. "--------\n"
  4716. ">>> import scipy.special as sc\n"
  4717. "\n"
  4718. "It inverts `chdtrc`.\n"
  4719. "\n"
  4720. ">>> v, p = 1, 0.3\n"
  4721. ">>> sc.chdtrc(v, sc.chdtri(v, p))\n"
  4722. "0.3\n"
  4723. ">>> x = 1\n"
  4724. ">>> sc.chdtri(v, sc.chdtrc(v, x))\n"
  4725. "1.0")
  4726. ufunc_chdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4727. ufunc_chdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4728. ufunc_chdtri_types[0] = <char>NPY_FLOAT
  4729. ufunc_chdtri_types[1] = <char>NPY_FLOAT
  4730. ufunc_chdtri_types[2] = <char>NPY_FLOAT
  4731. ufunc_chdtri_types[3] = <char>NPY_DOUBLE
  4732. ufunc_chdtri_types[4] = <char>NPY_DOUBLE
  4733. ufunc_chdtri_types[5] = <char>NPY_DOUBLE
  4734. ufunc_chdtri_ptr[2*0] = <void*>_func_chdtri
  4735. ufunc_chdtri_ptr[2*0+1] = <void*>(<char*>"chdtri")
  4736. ufunc_chdtri_ptr[2*1] = <void*>_func_chdtri
  4737. ufunc_chdtri_ptr[2*1+1] = <void*>(<char*>"chdtri")
  4738. ufunc_chdtri_data[0] = &ufunc_chdtri_ptr[2*0]
  4739. ufunc_chdtri_data[1] = &ufunc_chdtri_ptr[2*1]
  4740. chdtri = np.PyUFunc_FromFuncAndData(ufunc_chdtri_loops, ufunc_chdtri_data, ufunc_chdtri_types, 2, 2, 1, 0, "chdtri", ufunc_chdtri_doc, 0)
  4741. cdef np.PyUFuncGenericFunction ufunc_chdtriv_loops[2]
  4742. cdef void *ufunc_chdtriv_ptr[4]
  4743. cdef void *ufunc_chdtriv_data[2]
  4744. cdef char ufunc_chdtriv_types[6]
  4745. cdef char *ufunc_chdtriv_doc = (
  4746. "chdtriv(p, x, out=None)\n"
  4747. "\n"
  4748. "Inverse to `chdtr` with respect to `v`.\n"
  4749. "\n"
  4750. "Returns `v` such that ``chdtr(v, x) == p``.\n"
  4751. "\n"
  4752. "Parameters\n"
  4753. "----------\n"
  4754. "p : array_like\n"
  4755. " Probability that the Chi square random variable is less than\n"
  4756. " or equal to `x`.\n"
  4757. "x : array_like\n"
  4758. " Nonnegative input.\n"
  4759. "out : ndarray, optional\n"
  4760. " Optional output array for the function results.\n"
  4761. "\n"
  4762. "Returns\n"
  4763. "-------\n"
  4764. "scalar or ndarray\n"
  4765. " Degrees of freedom.\n"
  4766. "\n"
  4767. "See Also\n"
  4768. "--------\n"
  4769. "chdtr, chdtrc, chdtri\n"
  4770. "\n"
  4771. "References\n"
  4772. "----------\n"
  4773. ".. [1] Chi-Square distribution,\n"
  4774. " https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm\n"
  4775. "\n"
  4776. "Examples\n"
  4777. "--------\n"
  4778. ">>> import scipy.special as sc\n"
  4779. "\n"
  4780. "It inverts `chdtr`.\n"
  4781. "\n"
  4782. ">>> p, x = 0.5, 1\n"
  4783. ">>> sc.chdtr(sc.chdtriv(p, x), x)\n"
  4784. "0.5000000000202172\n"
  4785. ">>> v = 1\n"
  4786. ">>> sc.chdtriv(sc.chdtr(v, x), v)\n"
  4787. "1.0000000000000013")
  4788. ufunc_chdtriv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  4789. ufunc_chdtriv_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  4790. ufunc_chdtriv_types[0] = <char>NPY_FLOAT
  4791. ufunc_chdtriv_types[1] = <char>NPY_FLOAT
  4792. ufunc_chdtriv_types[2] = <char>NPY_FLOAT
  4793. ufunc_chdtriv_types[3] = <char>NPY_DOUBLE
  4794. ufunc_chdtriv_types[4] = <char>NPY_DOUBLE
  4795. ufunc_chdtriv_types[5] = <char>NPY_DOUBLE
  4796. ufunc_chdtriv_ptr[2*0] = <void*>_func_cdfchi3_wrap
  4797. ufunc_chdtriv_ptr[2*0+1] = <void*>(<char*>"chdtriv")
  4798. ufunc_chdtriv_ptr[2*1] = <void*>_func_cdfchi3_wrap
  4799. ufunc_chdtriv_ptr[2*1+1] = <void*>(<char*>"chdtriv")
  4800. ufunc_chdtriv_data[0] = &ufunc_chdtriv_ptr[2*0]
  4801. ufunc_chdtriv_data[1] = &ufunc_chdtriv_ptr[2*1]
  4802. chdtriv = np.PyUFunc_FromFuncAndData(ufunc_chdtriv_loops, ufunc_chdtriv_data, ufunc_chdtriv_types, 2, 2, 1, 0, "chdtriv", ufunc_chdtriv_doc, 0)
  4803. cdef np.PyUFuncGenericFunction ufunc_chndtr_loops[2]
  4804. cdef void *ufunc_chndtr_ptr[4]
  4805. cdef void *ufunc_chndtr_data[2]
  4806. cdef char ufunc_chndtr_types[8]
  4807. cdef char *ufunc_chndtr_doc = (
  4808. "chndtr(x, df, nc, out=None)\n"
  4809. "\n"
  4810. "Non-central chi square cumulative distribution function\n"
  4811. "\n"
  4812. "The cumulative distribution function is given by:\n"
  4813. "\n"
  4814. ".. math::\n"
  4815. "\n"
  4816. " P(\\chi^{\\prime 2} \\vert \\nu, \\lambda) =\\sum_{j=0}^{\\infty}\n"
  4817. " e^{-\\lambda /2}\n"
  4818. " \\frac{(\\lambda /2)^j}{j!} P(\\chi^{\\prime 2} \\vert \\nu + 2j),\n"
  4819. "\n"
  4820. "where :math:`\\nu > 0` is the degrees of freedom (``df``) and\n"
  4821. ":math:`\\lambda \\geq 0` is the non-centrality parameter (``nc``).\n"
  4822. "\n"
  4823. "Parameters\n"
  4824. "----------\n"
  4825. "x : array_like\n"
  4826. " Upper bound of the integral; must satisfy ``x >= 0``\n"
  4827. "df : array_like\n"
  4828. " Degrees of freedom; must satisfy ``df > 0``\n"
  4829. "nc : array_like\n"
  4830. " Non-centrality parameter; must satisfy ``nc >= 0``\n"
  4831. "out : ndarray, optional\n"
  4832. " Optional output array for the function results\n"
  4833. "\n"
  4834. "Returns\n"
  4835. "-------\n"
  4836. "x : scalar or ndarray\n"
  4837. " Value of the non-central chi square cumulative distribution function.\n"
  4838. "\n"
  4839. "See Also\n"
  4840. "--------\n"
  4841. "chndtrix, chndtridf, chndtrinc")
  4842. ufunc_chndtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4843. ufunc_chndtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4844. ufunc_chndtr_types[0] = <char>NPY_FLOAT
  4845. ufunc_chndtr_types[1] = <char>NPY_FLOAT
  4846. ufunc_chndtr_types[2] = <char>NPY_FLOAT
  4847. ufunc_chndtr_types[3] = <char>NPY_FLOAT
  4848. ufunc_chndtr_types[4] = <char>NPY_DOUBLE
  4849. ufunc_chndtr_types[5] = <char>NPY_DOUBLE
  4850. ufunc_chndtr_types[6] = <char>NPY_DOUBLE
  4851. ufunc_chndtr_types[7] = <char>NPY_DOUBLE
  4852. ufunc_chndtr_ptr[2*0] = <void*>_func_cdfchn1_wrap
  4853. ufunc_chndtr_ptr[2*0+1] = <void*>(<char*>"chndtr")
  4854. ufunc_chndtr_ptr[2*1] = <void*>_func_cdfchn1_wrap
  4855. ufunc_chndtr_ptr[2*1+1] = <void*>(<char*>"chndtr")
  4856. ufunc_chndtr_data[0] = &ufunc_chndtr_ptr[2*0]
  4857. ufunc_chndtr_data[1] = &ufunc_chndtr_ptr[2*1]
  4858. chndtr = np.PyUFunc_FromFuncAndData(ufunc_chndtr_loops, ufunc_chndtr_data, ufunc_chndtr_types, 2, 3, 1, 0, "chndtr", ufunc_chndtr_doc, 0)
  4859. cdef np.PyUFuncGenericFunction ufunc_chndtridf_loops[2]
  4860. cdef void *ufunc_chndtridf_ptr[4]
  4861. cdef void *ufunc_chndtridf_data[2]
  4862. cdef char ufunc_chndtridf_types[8]
  4863. cdef char *ufunc_chndtridf_doc = (
  4864. "chndtridf(x, p, nc, out=None)\n"
  4865. "\n"
  4866. "Inverse to `chndtr` vs `df`\n"
  4867. "\n"
  4868. "Calculated using a search to find a value for `df` that produces the\n"
  4869. "desired value of `p`.\n"
  4870. "\n"
  4871. "Parameters\n"
  4872. "----------\n"
  4873. "x : array_like\n"
  4874. " Upper bound of the integral; must satisfy ``x >= 0``\n"
  4875. "p : array_like\n"
  4876. " Probability; must satisfy ``0 <= p < 1``\n"
  4877. "nc : array_like\n"
  4878. " Non-centrality parameter; must satisfy ``nc >= 0``\n"
  4879. "out : ndarray, optional\n"
  4880. " Optional output array for the function results\n"
  4881. "\n"
  4882. "Returns\n"
  4883. "-------\n"
  4884. "df : scalar or ndarray\n"
  4885. " Degrees of freedom\n"
  4886. "\n"
  4887. "See Also\n"
  4888. "--------\n"
  4889. "chndtr, chndtrix, chndtrinc")
  4890. ufunc_chndtridf_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4891. ufunc_chndtridf_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4892. ufunc_chndtridf_types[0] = <char>NPY_FLOAT
  4893. ufunc_chndtridf_types[1] = <char>NPY_FLOAT
  4894. ufunc_chndtridf_types[2] = <char>NPY_FLOAT
  4895. ufunc_chndtridf_types[3] = <char>NPY_FLOAT
  4896. ufunc_chndtridf_types[4] = <char>NPY_DOUBLE
  4897. ufunc_chndtridf_types[5] = <char>NPY_DOUBLE
  4898. ufunc_chndtridf_types[6] = <char>NPY_DOUBLE
  4899. ufunc_chndtridf_types[7] = <char>NPY_DOUBLE
  4900. ufunc_chndtridf_ptr[2*0] = <void*>_func_cdfchn3_wrap
  4901. ufunc_chndtridf_ptr[2*0+1] = <void*>(<char*>"chndtridf")
  4902. ufunc_chndtridf_ptr[2*1] = <void*>_func_cdfchn3_wrap
  4903. ufunc_chndtridf_ptr[2*1+1] = <void*>(<char*>"chndtridf")
  4904. ufunc_chndtridf_data[0] = &ufunc_chndtridf_ptr[2*0]
  4905. ufunc_chndtridf_data[1] = &ufunc_chndtridf_ptr[2*1]
  4906. chndtridf = np.PyUFunc_FromFuncAndData(ufunc_chndtridf_loops, ufunc_chndtridf_data, ufunc_chndtridf_types, 2, 3, 1, 0, "chndtridf", ufunc_chndtridf_doc, 0)
  4907. cdef np.PyUFuncGenericFunction ufunc_chndtrinc_loops[2]
  4908. cdef void *ufunc_chndtrinc_ptr[4]
  4909. cdef void *ufunc_chndtrinc_data[2]
  4910. cdef char ufunc_chndtrinc_types[8]
  4911. cdef char *ufunc_chndtrinc_doc = (
  4912. "chndtrinc(x, df, p, out=None)\n"
  4913. "\n"
  4914. "Inverse to `chndtr` vs `nc`\n"
  4915. "\n"
  4916. "Calculated using a search to find a value for `df` that produces the\n"
  4917. "desired value of `p`.\n"
  4918. "\n"
  4919. "Parameters\n"
  4920. "----------\n"
  4921. "x : array_like\n"
  4922. " Upper bound of the integral; must satisfy ``x >= 0``\n"
  4923. "df : array_like\n"
  4924. " Degrees of freedom; must satisfy ``df > 0``\n"
  4925. "p : array_like\n"
  4926. " Probability; must satisfy ``0 <= p < 1``\n"
  4927. "out : ndarray, optional\n"
  4928. " Optional output array for the function results\n"
  4929. "\n"
  4930. "Returns\n"
  4931. "-------\n"
  4932. "nc : scalar or ndarray\n"
  4933. " Non-centrality\n"
  4934. "\n"
  4935. "See Also\n"
  4936. "--------\n"
  4937. "chndtr, chndtrix, chndtrinc")
  4938. ufunc_chndtrinc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4939. ufunc_chndtrinc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4940. ufunc_chndtrinc_types[0] = <char>NPY_FLOAT
  4941. ufunc_chndtrinc_types[1] = <char>NPY_FLOAT
  4942. ufunc_chndtrinc_types[2] = <char>NPY_FLOAT
  4943. ufunc_chndtrinc_types[3] = <char>NPY_FLOAT
  4944. ufunc_chndtrinc_types[4] = <char>NPY_DOUBLE
  4945. ufunc_chndtrinc_types[5] = <char>NPY_DOUBLE
  4946. ufunc_chndtrinc_types[6] = <char>NPY_DOUBLE
  4947. ufunc_chndtrinc_types[7] = <char>NPY_DOUBLE
  4948. ufunc_chndtrinc_ptr[2*0] = <void*>_func_cdfchn4_wrap
  4949. ufunc_chndtrinc_ptr[2*0+1] = <void*>(<char*>"chndtrinc")
  4950. ufunc_chndtrinc_ptr[2*1] = <void*>_func_cdfchn4_wrap
  4951. ufunc_chndtrinc_ptr[2*1+1] = <void*>(<char*>"chndtrinc")
  4952. ufunc_chndtrinc_data[0] = &ufunc_chndtrinc_ptr[2*0]
  4953. ufunc_chndtrinc_data[1] = &ufunc_chndtrinc_ptr[2*1]
  4954. chndtrinc = np.PyUFunc_FromFuncAndData(ufunc_chndtrinc_loops, ufunc_chndtrinc_data, ufunc_chndtrinc_types, 2, 3, 1, 0, "chndtrinc", ufunc_chndtrinc_doc, 0)
  4955. cdef np.PyUFuncGenericFunction ufunc_chndtrix_loops[2]
  4956. cdef void *ufunc_chndtrix_ptr[4]
  4957. cdef void *ufunc_chndtrix_data[2]
  4958. cdef char ufunc_chndtrix_types[8]
  4959. cdef char *ufunc_chndtrix_doc = (
  4960. "chndtrix(p, df, nc, out=None)\n"
  4961. "\n"
  4962. "Inverse to `chndtr` vs `x`\n"
  4963. "\n"
  4964. "Calculated using a search to find a value for `x` that produces the\n"
  4965. "desired value of `p`.\n"
  4966. "\n"
  4967. "Parameters\n"
  4968. "----------\n"
  4969. "p : array_like\n"
  4970. " Probability; must satisfy ``0 <= p < 1``\n"
  4971. "df : array_like\n"
  4972. " Degrees of freedom; must satisfy ``df > 0``\n"
  4973. "nc : array_like\n"
  4974. " Non-centrality parameter; must satisfy ``nc >= 0``\n"
  4975. "out : ndarray, optional\n"
  4976. " Optional output array for the function results\n"
  4977. "\n"
  4978. "Returns\n"
  4979. "-------\n"
  4980. "x : scalar or ndarray\n"
  4981. " Value so that the probability a non-central Chi square random variable\n"
  4982. " with `df` degrees of freedom and non-centrality, `nc`, is greater than\n"
  4983. " `x` equals `p`.\n"
  4984. "\n"
  4985. "See Also\n"
  4986. "--------\n"
  4987. "chndtr, chndtridf, chndtrinc")
  4988. ufunc_chndtrix_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  4989. ufunc_chndtrix_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  4990. ufunc_chndtrix_types[0] = <char>NPY_FLOAT
  4991. ufunc_chndtrix_types[1] = <char>NPY_FLOAT
  4992. ufunc_chndtrix_types[2] = <char>NPY_FLOAT
  4993. ufunc_chndtrix_types[3] = <char>NPY_FLOAT
  4994. ufunc_chndtrix_types[4] = <char>NPY_DOUBLE
  4995. ufunc_chndtrix_types[5] = <char>NPY_DOUBLE
  4996. ufunc_chndtrix_types[6] = <char>NPY_DOUBLE
  4997. ufunc_chndtrix_types[7] = <char>NPY_DOUBLE
  4998. ufunc_chndtrix_ptr[2*0] = <void*>_func_cdfchn2_wrap
  4999. ufunc_chndtrix_ptr[2*0+1] = <void*>(<char*>"chndtrix")
  5000. ufunc_chndtrix_ptr[2*1] = <void*>_func_cdfchn2_wrap
  5001. ufunc_chndtrix_ptr[2*1+1] = <void*>(<char*>"chndtrix")
  5002. ufunc_chndtrix_data[0] = &ufunc_chndtrix_ptr[2*0]
  5003. ufunc_chndtrix_data[1] = &ufunc_chndtrix_ptr[2*1]
  5004. chndtrix = np.PyUFunc_FromFuncAndData(ufunc_chndtrix_loops, ufunc_chndtrix_data, ufunc_chndtrix_types, 2, 3, 1, 0, "chndtrix", ufunc_chndtrix_doc, 0)
  5005. cdef np.PyUFuncGenericFunction ufunc_cosdg_loops[2]
  5006. cdef void *ufunc_cosdg_ptr[4]
  5007. cdef void *ufunc_cosdg_data[2]
  5008. cdef char ufunc_cosdg_types[4]
  5009. cdef char *ufunc_cosdg_doc = (
  5010. "cosdg(x, out=None)\n"
  5011. "\n"
  5012. "Cosine of the angle `x` given in degrees.\n"
  5013. "\n"
  5014. "Parameters\n"
  5015. "----------\n"
  5016. "x : array_like\n"
  5017. " Angle, given in degrees.\n"
  5018. "out : ndarray, optional\n"
  5019. " Optional output array for the function results.\n"
  5020. "\n"
  5021. "Returns\n"
  5022. "-------\n"
  5023. "scalar or ndarray\n"
  5024. " Cosine of the input.\n"
  5025. "\n"
  5026. "See Also\n"
  5027. "--------\n"
  5028. "sindg, tandg, cotdg\n"
  5029. "\n"
  5030. "Examples\n"
  5031. "--------\n"
  5032. ">>> import numpy as np\n"
  5033. ">>> import scipy.special as sc\n"
  5034. "\n"
  5035. "It is more accurate than using cosine directly.\n"
  5036. "\n"
  5037. ">>> x = 90 + 180 * np.arange(3)\n"
  5038. ">>> sc.cosdg(x)\n"
  5039. "array([-0., 0., -0.])\n"
  5040. ">>> np.cos(x * np.pi / 180)\n"
  5041. "array([ 6.1232340e-17, -1.8369702e-16, 3.0616170e-16])")
  5042. ufunc_cosdg_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5043. ufunc_cosdg_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5044. ufunc_cosdg_types[0] = <char>NPY_FLOAT
  5045. ufunc_cosdg_types[1] = <char>NPY_FLOAT
  5046. ufunc_cosdg_types[2] = <char>NPY_DOUBLE
  5047. ufunc_cosdg_types[3] = <char>NPY_DOUBLE
  5048. ufunc_cosdg_ptr[2*0] = <void*>_func_cosdg
  5049. ufunc_cosdg_ptr[2*0+1] = <void*>(<char*>"cosdg")
  5050. ufunc_cosdg_ptr[2*1] = <void*>_func_cosdg
  5051. ufunc_cosdg_ptr[2*1+1] = <void*>(<char*>"cosdg")
  5052. ufunc_cosdg_data[0] = &ufunc_cosdg_ptr[2*0]
  5053. ufunc_cosdg_data[1] = &ufunc_cosdg_ptr[2*1]
  5054. cosdg = np.PyUFunc_FromFuncAndData(ufunc_cosdg_loops, ufunc_cosdg_data, ufunc_cosdg_types, 2, 1, 1, 0, "cosdg", ufunc_cosdg_doc, 0)
  5055. cdef np.PyUFuncGenericFunction ufunc_cosm1_loops[2]
  5056. cdef void *ufunc_cosm1_ptr[4]
  5057. cdef void *ufunc_cosm1_data[2]
  5058. cdef char ufunc_cosm1_types[4]
  5059. cdef char *ufunc_cosm1_doc = (
  5060. "cosm1(x, out=None)\n"
  5061. "\n"
  5062. "cos(x) - 1 for use when `x` is near zero.\n"
  5063. "\n"
  5064. "Parameters\n"
  5065. "----------\n"
  5066. "x : array_like\n"
  5067. " Real valued argument.\n"
  5068. "out : ndarray, optional\n"
  5069. " Optional output array for the function results.\n"
  5070. "\n"
  5071. "Returns\n"
  5072. "-------\n"
  5073. "scalar or ndarray\n"
  5074. " Values of ``cos(x) - 1``.\n"
  5075. "\n"
  5076. "See Also\n"
  5077. "--------\n"
  5078. "expm1, log1p\n"
  5079. "\n"
  5080. "Examples\n"
  5081. "--------\n"
  5082. ">>> import numpy as np\n"
  5083. ">>> import scipy.special as sc\n"
  5084. "\n"
  5085. "It is more accurate than computing ``cos(x) - 1`` directly for\n"
  5086. "``x`` around 0.\n"
  5087. "\n"
  5088. ">>> x = 1e-30\n"
  5089. ">>> np.cos(x) - 1\n"
  5090. "0.0\n"
  5091. ">>> sc.cosm1(x)\n"
  5092. "-5.0000000000000005e-61")
  5093. ufunc_cosm1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5094. ufunc_cosm1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5095. ufunc_cosm1_types[0] = <char>NPY_FLOAT
  5096. ufunc_cosm1_types[1] = <char>NPY_FLOAT
  5097. ufunc_cosm1_types[2] = <char>NPY_DOUBLE
  5098. ufunc_cosm1_types[3] = <char>NPY_DOUBLE
  5099. ufunc_cosm1_ptr[2*0] = <void*>_func_cosm1
  5100. ufunc_cosm1_ptr[2*0+1] = <void*>(<char*>"cosm1")
  5101. ufunc_cosm1_ptr[2*1] = <void*>_func_cosm1
  5102. ufunc_cosm1_ptr[2*1+1] = <void*>(<char*>"cosm1")
  5103. ufunc_cosm1_data[0] = &ufunc_cosm1_ptr[2*0]
  5104. ufunc_cosm1_data[1] = &ufunc_cosm1_ptr[2*1]
  5105. cosm1 = np.PyUFunc_FromFuncAndData(ufunc_cosm1_loops, ufunc_cosm1_data, ufunc_cosm1_types, 2, 1, 1, 0, "cosm1", ufunc_cosm1_doc, 0)
  5106. cdef np.PyUFuncGenericFunction ufunc_cotdg_loops[2]
  5107. cdef void *ufunc_cotdg_ptr[4]
  5108. cdef void *ufunc_cotdg_data[2]
  5109. cdef char ufunc_cotdg_types[4]
  5110. cdef char *ufunc_cotdg_doc = (
  5111. "cotdg(x, out=None)\n"
  5112. "\n"
  5113. "Cotangent of the angle `x` given in degrees.\n"
  5114. "\n"
  5115. "Parameters\n"
  5116. "----------\n"
  5117. "x : array_like\n"
  5118. " Angle, given in degrees.\n"
  5119. "out : ndarray, optional\n"
  5120. " Optional output array for the function results.\n"
  5121. "\n"
  5122. "Returns\n"
  5123. "-------\n"
  5124. "scalar or ndarray\n"
  5125. " Cotangent at the input.\n"
  5126. "\n"
  5127. "See Also\n"
  5128. "--------\n"
  5129. "sindg, cosdg, tandg\n"
  5130. "\n"
  5131. "Examples\n"
  5132. "--------\n"
  5133. ">>> import numpy as np\n"
  5134. ">>> import scipy.special as sc\n"
  5135. "\n"
  5136. "It is more accurate than using cotangent directly.\n"
  5137. "\n"
  5138. ">>> x = 90 + 180 * np.arange(3)\n"
  5139. ">>> sc.cotdg(x)\n"
  5140. "array([0., 0., 0.])\n"
  5141. ">>> 1 / np.tan(x * np.pi / 180)\n"
  5142. "array([6.1232340e-17, 1.8369702e-16, 3.0616170e-16])")
  5143. ufunc_cotdg_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5144. ufunc_cotdg_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5145. ufunc_cotdg_types[0] = <char>NPY_FLOAT
  5146. ufunc_cotdg_types[1] = <char>NPY_FLOAT
  5147. ufunc_cotdg_types[2] = <char>NPY_DOUBLE
  5148. ufunc_cotdg_types[3] = <char>NPY_DOUBLE
  5149. ufunc_cotdg_ptr[2*0] = <void*>_func_cotdg
  5150. ufunc_cotdg_ptr[2*0+1] = <void*>(<char*>"cotdg")
  5151. ufunc_cotdg_ptr[2*1] = <void*>_func_cotdg
  5152. ufunc_cotdg_ptr[2*1+1] = <void*>(<char*>"cotdg")
  5153. ufunc_cotdg_data[0] = &ufunc_cotdg_ptr[2*0]
  5154. ufunc_cotdg_data[1] = &ufunc_cotdg_ptr[2*1]
  5155. cotdg = np.PyUFunc_FromFuncAndData(ufunc_cotdg_loops, ufunc_cotdg_data, ufunc_cotdg_types, 2, 1, 1, 0, "cotdg", ufunc_cotdg_doc, 0)
  5156. cdef np.PyUFuncGenericFunction ufunc_dawsn_loops[4]
  5157. cdef void *ufunc_dawsn_ptr[8]
  5158. cdef void *ufunc_dawsn_data[4]
  5159. cdef char ufunc_dawsn_types[8]
  5160. cdef char *ufunc_dawsn_doc = (
  5161. "dawsn(x, out=None)\n"
  5162. "\n"
  5163. "Dawson's integral.\n"
  5164. "\n"
  5165. "Computes::\n"
  5166. "\n"
  5167. " exp(-x**2) * integral(exp(t**2), t=0..x).\n"
  5168. "\n"
  5169. "Parameters\n"
  5170. "----------\n"
  5171. "x : array_like\n"
  5172. " Function parameter.\n"
  5173. "out : ndarray, optional\n"
  5174. " Optional output array for the function values\n"
  5175. "\n"
  5176. "Returns\n"
  5177. "-------\n"
  5178. "y : scalar or ndarray\n"
  5179. " Value of the integral.\n"
  5180. "\n"
  5181. "See Also\n"
  5182. "--------\n"
  5183. "wofz, erf, erfc, erfcx, erfi\n"
  5184. "\n"
  5185. "References\n"
  5186. "----------\n"
  5187. ".. [1] Steven G. Johnson, Faddeeva W function implementation.\n"
  5188. " http://ab-initio.mit.edu/Faddeeva\n"
  5189. "\n"
  5190. "Examples\n"
  5191. "--------\n"
  5192. ">>> import numpy as np\n"
  5193. ">>> from scipy import special\n"
  5194. ">>> import matplotlib.pyplot as plt\n"
  5195. ">>> x = np.linspace(-15, 15, num=1000)\n"
  5196. ">>> plt.plot(x, special.dawsn(x))\n"
  5197. ">>> plt.xlabel('$x$')\n"
  5198. ">>> plt.ylabel('$dawsn(x)$')\n"
  5199. ">>> plt.show()")
  5200. ufunc_dawsn_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5201. ufunc_dawsn_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5202. ufunc_dawsn_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  5203. ufunc_dawsn_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  5204. ufunc_dawsn_types[0] = <char>NPY_FLOAT
  5205. ufunc_dawsn_types[1] = <char>NPY_FLOAT
  5206. ufunc_dawsn_types[2] = <char>NPY_DOUBLE
  5207. ufunc_dawsn_types[3] = <char>NPY_DOUBLE
  5208. ufunc_dawsn_types[4] = <char>NPY_CFLOAT
  5209. ufunc_dawsn_types[5] = <char>NPY_CFLOAT
  5210. ufunc_dawsn_types[6] = <char>NPY_CDOUBLE
  5211. ufunc_dawsn_types[7] = <char>NPY_CDOUBLE
  5212. ufunc_dawsn_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_dawsn
  5213. ufunc_dawsn_ptr[2*0+1] = <void*>(<char*>"dawsn")
  5214. ufunc_dawsn_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_dawsn
  5215. ufunc_dawsn_ptr[2*1+1] = <void*>(<char*>"dawsn")
  5216. ufunc_dawsn_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_dawsn_complex
  5217. ufunc_dawsn_ptr[2*2+1] = <void*>(<char*>"dawsn")
  5218. ufunc_dawsn_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_dawsn_complex
  5219. ufunc_dawsn_ptr[2*3+1] = <void*>(<char*>"dawsn")
  5220. ufunc_dawsn_data[0] = &ufunc_dawsn_ptr[2*0]
  5221. ufunc_dawsn_data[1] = &ufunc_dawsn_ptr[2*1]
  5222. ufunc_dawsn_data[2] = &ufunc_dawsn_ptr[2*2]
  5223. ufunc_dawsn_data[3] = &ufunc_dawsn_ptr[2*3]
  5224. dawsn = np.PyUFunc_FromFuncAndData(ufunc_dawsn_loops, ufunc_dawsn_data, ufunc_dawsn_types, 4, 1, 1, 0, "dawsn", ufunc_dawsn_doc, 0)
  5225. cdef np.PyUFuncGenericFunction ufunc_ellipe_loops[2]
  5226. cdef void *ufunc_ellipe_ptr[4]
  5227. cdef void *ufunc_ellipe_data[2]
  5228. cdef char ufunc_ellipe_types[4]
  5229. cdef char *ufunc_ellipe_doc = (
  5230. "ellipe(m, out=None)\n"
  5231. "\n"
  5232. "Complete elliptic integral of the second kind\n"
  5233. "\n"
  5234. "This function is defined as\n"
  5235. "\n"
  5236. ".. math:: E(m) = \\int_0^{\\pi/2} [1 - m \\sin(t)^2]^{1/2} dt\n"
  5237. "\n"
  5238. "Parameters\n"
  5239. "----------\n"
  5240. "m : array_like\n"
  5241. " Defines the parameter of the elliptic integral.\n"
  5242. "out : ndarray, optional\n"
  5243. " Optional output array for the function values\n"
  5244. "\n"
  5245. "Returns\n"
  5246. "-------\n"
  5247. "E : scalar or ndarray\n"
  5248. " Value of the elliptic integral.\n"
  5249. "\n"
  5250. "Notes\n"
  5251. "-----\n"
  5252. "Wrapper for the Cephes [1]_ routine `ellpe`.\n"
  5253. "\n"
  5254. "For `m > 0` the computation uses the approximation,\n"
  5255. "\n"
  5256. ".. math:: E(m) \\approx P(1-m) - (1-m) \\log(1-m) Q(1-m),\n"
  5257. "\n"
  5258. "where :math:`P` and :math:`Q` are tenth-order polynomials. For\n"
  5259. "`m < 0`, the relation\n"
  5260. "\n"
  5261. ".. math:: E(m) = E(m/(m - 1)) \\sqrt(1-m)\n"
  5262. "\n"
  5263. "is used.\n"
  5264. "\n"
  5265. "The parameterization in terms of :math:`m` follows that of section\n"
  5266. "17.2 in [2]_. Other parameterizations in terms of the\n"
  5267. "complementary parameter :math:`1 - m`, modular angle\n"
  5268. ":math:`\\sin^2(\\alpha) = m`, or modulus :math:`k^2 = m` are also\n"
  5269. "used, so be careful that you choose the correct parameter.\n"
  5270. "\n"
  5271. "The Legendre E integral is related to Carlson's symmetric R_D or R_G\n"
  5272. "functions in multiple ways [3]_. For example,\n"
  5273. "\n"
  5274. ".. math:: E(m) = 2 R_G(0, 1-k^2, 1) .\n"
  5275. "\n"
  5276. "See Also\n"
  5277. "--------\n"
  5278. "ellipkm1 : Complete elliptic integral of the first kind, near `m` = 1\n"
  5279. "ellipk : Complete elliptic integral of the first kind\n"
  5280. "ellipkinc : Incomplete elliptic integral of the first kind\n"
  5281. "ellipeinc : Incomplete elliptic integral of the second kind\n"
  5282. "elliprd : Symmetric elliptic integral of the second kind.\n"
  5283. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  5284. "\n"
  5285. "References\n"
  5286. "----------\n"
  5287. ".. [1] Cephes Mathematical Functions Library,\n"
  5288. " http://www.netlib.org/cephes/\n"
  5289. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  5290. " Handbook of Mathematical Functions with Formulas,\n"
  5291. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  5292. ".. [3] NIST Digital Library of Mathematical\n"
  5293. " Functions. http://dlmf.nist.gov/, Release 1.0.28 of\n"
  5294. " 2020-09-15. See Sec. 19.25(i) https://dlmf.nist.gov/19.25#i\n"
  5295. "\n"
  5296. "Examples\n"
  5297. "--------\n"
  5298. "This function is used in finding the circumference of an\n"
  5299. "ellipse with semi-major axis `a` and semi-minor axis `b`.\n"
  5300. "\n"
  5301. ">>> import numpy as np\n"
  5302. ">>> from scipy import special\n"
  5303. "\n"
  5304. ">>> a = 3.5\n"
  5305. ">>> b = 2.1\n"
  5306. ">>> e_sq = 1.0 - b**2/a**2 # eccentricity squared\n"
  5307. "\n"
  5308. "Then the circumference is found using the following:\n"
  5309. "\n"
  5310. ">>> C = 4*a*special.ellipe(e_sq) # circumference formula\n"
  5311. ">>> C\n"
  5312. "17.868899204378693\n"
  5313. "\n"
  5314. "When `a` and `b` are the same (meaning eccentricity is 0),\n"
  5315. "this reduces to the circumference of a circle.\n"
  5316. "\n"
  5317. ">>> 4*a*special.ellipe(0.0) # formula for ellipse with a = b\n"
  5318. "21.991148575128552\n"
  5319. ">>> 2*np.pi*a # formula for circle of radius a\n"
  5320. "21.991148575128552")
  5321. ufunc_ellipe_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5322. ufunc_ellipe_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5323. ufunc_ellipe_types[0] = <char>NPY_FLOAT
  5324. ufunc_ellipe_types[1] = <char>NPY_FLOAT
  5325. ufunc_ellipe_types[2] = <char>NPY_DOUBLE
  5326. ufunc_ellipe_types[3] = <char>NPY_DOUBLE
  5327. ufunc_ellipe_ptr[2*0] = <void*>_func_ellpe
  5328. ufunc_ellipe_ptr[2*0+1] = <void*>(<char*>"ellipe")
  5329. ufunc_ellipe_ptr[2*1] = <void*>_func_ellpe
  5330. ufunc_ellipe_ptr[2*1+1] = <void*>(<char*>"ellipe")
  5331. ufunc_ellipe_data[0] = &ufunc_ellipe_ptr[2*0]
  5332. ufunc_ellipe_data[1] = &ufunc_ellipe_ptr[2*1]
  5333. ellipe = np.PyUFunc_FromFuncAndData(ufunc_ellipe_loops, ufunc_ellipe_data, ufunc_ellipe_types, 2, 1, 1, 0, "ellipe", ufunc_ellipe_doc, 0)
  5334. cdef np.PyUFuncGenericFunction ufunc_ellipeinc_loops[2]
  5335. cdef void *ufunc_ellipeinc_ptr[4]
  5336. cdef void *ufunc_ellipeinc_data[2]
  5337. cdef char ufunc_ellipeinc_types[6]
  5338. cdef char *ufunc_ellipeinc_doc = (
  5339. "ellipeinc(phi, m, out=None)\n"
  5340. "\n"
  5341. "Incomplete elliptic integral of the second kind\n"
  5342. "\n"
  5343. "This function is defined as\n"
  5344. "\n"
  5345. ".. math:: E(\\phi, m) = \\int_0^{\\phi} [1 - m \\sin(t)^2]^{1/2} dt\n"
  5346. "\n"
  5347. "Parameters\n"
  5348. "----------\n"
  5349. "phi : array_like\n"
  5350. " amplitude of the elliptic integral.\n"
  5351. "m : array_like\n"
  5352. " parameter of the elliptic integral.\n"
  5353. "out : ndarray, optional\n"
  5354. " Optional output array for the function values\n"
  5355. "\n"
  5356. "Returns\n"
  5357. "-------\n"
  5358. "E : scalar or ndarray\n"
  5359. " Value of the elliptic integral.\n"
  5360. "\n"
  5361. "Notes\n"
  5362. "-----\n"
  5363. "Wrapper for the Cephes [1]_ routine `ellie`.\n"
  5364. "\n"
  5365. "Computation uses arithmetic-geometric means algorithm.\n"
  5366. "\n"
  5367. "The parameterization in terms of :math:`m` follows that of section\n"
  5368. "17.2 in [2]_. Other parameterizations in terms of the\n"
  5369. "complementary parameter :math:`1 - m`, modular angle\n"
  5370. ":math:`\\sin^2(\\alpha) = m`, or modulus :math:`k^2 = m` are also\n"
  5371. "used, so be careful that you choose the correct parameter.\n"
  5372. "\n"
  5373. "The Legendre E incomplete integral can be related to combinations\n"
  5374. "of Carlson's symmetric integrals R_D, R_F, and R_G in multiple\n"
  5375. "ways [3]_. For example, with :math:`c = \\csc^2\\phi`,\n"
  5376. "\n"
  5377. ".. math::\n"
  5378. " E(\\phi, m) = R_F(c-1, c-k^2, c)\n"
  5379. " - \\frac{1}{3} k^2 R_D(c-1, c-k^2, c) .\n"
  5380. "\n"
  5381. "See Also\n"
  5382. "--------\n"
  5383. "ellipkm1 : Complete elliptic integral of the first kind, near `m` = 1\n"
  5384. "ellipk : Complete elliptic integral of the first kind\n"
  5385. "ellipkinc : Incomplete elliptic integral of the first kind\n"
  5386. "ellipe : Complete elliptic integral of the second kind\n"
  5387. "elliprd : Symmetric elliptic integral of the second kind.\n"
  5388. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5389. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  5390. "\n"
  5391. "References\n"
  5392. "----------\n"
  5393. ".. [1] Cephes Mathematical Functions Library,\n"
  5394. " http://www.netlib.org/cephes/\n"
  5395. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  5396. " Handbook of Mathematical Functions with Formulas,\n"
  5397. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  5398. ".. [3] NIST Digital Library of Mathematical\n"
  5399. " Functions. http://dlmf.nist.gov/, Release 1.0.28 of\n"
  5400. " 2020-09-15. See Sec. 19.25(i) https://dlmf.nist.gov/19.25#i")
  5401. ufunc_ellipeinc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  5402. ufunc_ellipeinc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  5403. ufunc_ellipeinc_types[0] = <char>NPY_FLOAT
  5404. ufunc_ellipeinc_types[1] = <char>NPY_FLOAT
  5405. ufunc_ellipeinc_types[2] = <char>NPY_FLOAT
  5406. ufunc_ellipeinc_types[3] = <char>NPY_DOUBLE
  5407. ufunc_ellipeinc_types[4] = <char>NPY_DOUBLE
  5408. ufunc_ellipeinc_types[5] = <char>NPY_DOUBLE
  5409. ufunc_ellipeinc_ptr[2*0] = <void*>_func_ellie
  5410. ufunc_ellipeinc_ptr[2*0+1] = <void*>(<char*>"ellipeinc")
  5411. ufunc_ellipeinc_ptr[2*1] = <void*>_func_ellie
  5412. ufunc_ellipeinc_ptr[2*1+1] = <void*>(<char*>"ellipeinc")
  5413. ufunc_ellipeinc_data[0] = &ufunc_ellipeinc_ptr[2*0]
  5414. ufunc_ellipeinc_data[1] = &ufunc_ellipeinc_ptr[2*1]
  5415. ellipeinc = np.PyUFunc_FromFuncAndData(ufunc_ellipeinc_loops, ufunc_ellipeinc_data, ufunc_ellipeinc_types, 2, 2, 1, 0, "ellipeinc", ufunc_ellipeinc_doc, 0)
  5416. cdef np.PyUFuncGenericFunction ufunc_ellipj_loops[2]
  5417. cdef void *ufunc_ellipj_ptr[4]
  5418. cdef void *ufunc_ellipj_data[2]
  5419. cdef char ufunc_ellipj_types[12]
  5420. cdef char *ufunc_ellipj_doc = (
  5421. "ellipj(u, m, out=None)\n"
  5422. "\n"
  5423. "Jacobian elliptic functions\n"
  5424. "\n"
  5425. "Calculates the Jacobian elliptic functions of parameter `m` between\n"
  5426. "0 and 1, and real argument `u`.\n"
  5427. "\n"
  5428. "Parameters\n"
  5429. "----------\n"
  5430. "m : array_like\n"
  5431. " Parameter.\n"
  5432. "u : array_like\n"
  5433. " Argument.\n"
  5434. "out : tuple of ndarray, optional\n"
  5435. " Optional output arrays for the function values\n"
  5436. "\n"
  5437. "Returns\n"
  5438. "-------\n"
  5439. "sn, cn, dn, ph : 4-tuple of scalar or ndarray\n"
  5440. " The returned functions::\n"
  5441. "\n"
  5442. " sn(u|m), cn(u|m), dn(u|m)\n"
  5443. "\n"
  5444. " The value `ph` is such that if `u = ellipkinc(ph, m)`,\n"
  5445. " then `sn(u|m) = sin(ph)` and `cn(u|m) = cos(ph)`.\n"
  5446. "\n"
  5447. "Notes\n"
  5448. "-----\n"
  5449. "Wrapper for the Cephes [1]_ routine `ellpj`.\n"
  5450. "\n"
  5451. "These functions are periodic, with quarter-period on the real axis\n"
  5452. "equal to the complete elliptic integral `ellipk(m)`.\n"
  5453. "\n"
  5454. "Relation to incomplete elliptic integral: If `u = ellipkinc(phi,m)`, then\n"
  5455. "`sn(u|m) = sin(phi)`, and `cn(u|m) = cos(phi)`. The `phi` is called\n"
  5456. "the amplitude of `u`.\n"
  5457. "\n"
  5458. "Computation is by means of the arithmetic-geometric mean algorithm,\n"
  5459. "except when `m` is within 1e-9 of 0 or 1. In the latter case with `m`\n"
  5460. "close to 1, the approximation applies only for `phi < pi/2`.\n"
  5461. "\n"
  5462. "See also\n"
  5463. "--------\n"
  5464. "ellipk : Complete elliptic integral of the first kind\n"
  5465. "ellipkinc : Incomplete elliptic integral of the first kind\n"
  5466. "\n"
  5467. "References\n"
  5468. "----------\n"
  5469. ".. [1] Cephes Mathematical Functions Library,\n"
  5470. " http://www.netlib.org/cephes/")
  5471. ufunc_ellipj_loops[0] = <np.PyUFuncGenericFunction>loop_i_dd_dddd_As_ff_ffff
  5472. ufunc_ellipj_loops[1] = <np.PyUFuncGenericFunction>loop_i_dd_dddd_As_dd_dddd
  5473. ufunc_ellipj_types[0] = <char>NPY_FLOAT
  5474. ufunc_ellipj_types[1] = <char>NPY_FLOAT
  5475. ufunc_ellipj_types[2] = <char>NPY_FLOAT
  5476. ufunc_ellipj_types[3] = <char>NPY_FLOAT
  5477. ufunc_ellipj_types[4] = <char>NPY_FLOAT
  5478. ufunc_ellipj_types[5] = <char>NPY_FLOAT
  5479. ufunc_ellipj_types[6] = <char>NPY_DOUBLE
  5480. ufunc_ellipj_types[7] = <char>NPY_DOUBLE
  5481. ufunc_ellipj_types[8] = <char>NPY_DOUBLE
  5482. ufunc_ellipj_types[9] = <char>NPY_DOUBLE
  5483. ufunc_ellipj_types[10] = <char>NPY_DOUBLE
  5484. ufunc_ellipj_types[11] = <char>NPY_DOUBLE
  5485. ufunc_ellipj_ptr[2*0] = <void*>_func_ellpj
  5486. ufunc_ellipj_ptr[2*0+1] = <void*>(<char*>"ellipj")
  5487. ufunc_ellipj_ptr[2*1] = <void*>_func_ellpj
  5488. ufunc_ellipj_ptr[2*1+1] = <void*>(<char*>"ellipj")
  5489. ufunc_ellipj_data[0] = &ufunc_ellipj_ptr[2*0]
  5490. ufunc_ellipj_data[1] = &ufunc_ellipj_ptr[2*1]
  5491. ellipj = np.PyUFunc_FromFuncAndData(ufunc_ellipj_loops, ufunc_ellipj_data, ufunc_ellipj_types, 2, 2, 4, 0, "ellipj", ufunc_ellipj_doc, 0)
  5492. cdef np.PyUFuncGenericFunction ufunc_ellipk_loops[2]
  5493. cdef void *ufunc_ellipk_ptr[4]
  5494. cdef void *ufunc_ellipk_data[2]
  5495. cdef char ufunc_ellipk_types[4]
  5496. cdef char *ufunc_ellipk_doc = (
  5497. "ellipk(m, out=None)\n"
  5498. "\n"
  5499. "Complete elliptic integral of the first kind.\n"
  5500. "\n"
  5501. "This function is defined as\n"
  5502. "\n"
  5503. ".. math:: K(m) = \\int_0^{\\pi/2} [1 - m \\sin(t)^2]^{-1/2} dt\n"
  5504. "\n"
  5505. "Parameters\n"
  5506. "----------\n"
  5507. "m : array_like\n"
  5508. " The parameter of the elliptic integral.\n"
  5509. "out : ndarray, optional\n"
  5510. " Optional output array for the function values\n"
  5511. "\n"
  5512. "Returns\n"
  5513. "-------\n"
  5514. "K : scalar or ndarray\n"
  5515. " Value of the elliptic integral.\n"
  5516. "\n"
  5517. "Notes\n"
  5518. "-----\n"
  5519. "For more precision around point m = 1, use `ellipkm1`, which this\n"
  5520. "function calls.\n"
  5521. "\n"
  5522. "The parameterization in terms of :math:`m` follows that of section\n"
  5523. "17.2 in [1]_. Other parameterizations in terms of the\n"
  5524. "complementary parameter :math:`1 - m`, modular angle\n"
  5525. ":math:`\\sin^2(\\alpha) = m`, or modulus :math:`k^2 = m` are also\n"
  5526. "used, so be careful that you choose the correct parameter.\n"
  5527. "\n"
  5528. "The Legendre K integral is related to Carlson's symmetric R_F\n"
  5529. "function by [2]_:\n"
  5530. "\n"
  5531. ".. math:: K(m) = R_F(0, 1-k^2, 1) .\n"
  5532. "\n"
  5533. "See Also\n"
  5534. "--------\n"
  5535. "ellipkm1 : Complete elliptic integral of the first kind around m = 1\n"
  5536. "ellipkinc : Incomplete elliptic integral of the first kind\n"
  5537. "ellipe : Complete elliptic integral of the second kind\n"
  5538. "ellipeinc : Incomplete elliptic integral of the second kind\n"
  5539. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5540. "\n"
  5541. "References\n"
  5542. "----------\n"
  5543. ".. [1] Milton Abramowitz and Irene A. Stegun, eds.\n"
  5544. " Handbook of Mathematical Functions with Formulas,\n"
  5545. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  5546. ".. [2] NIST Digital Library of Mathematical\n"
  5547. " Functions. http://dlmf.nist.gov/, Release 1.0.28 of\n"
  5548. " 2020-09-15. See Sec. 19.25(i) https://dlmf.nist.gov/19.25#i")
  5549. ufunc_ellipk_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5550. ufunc_ellipk_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5551. ufunc_ellipk_types[0] = <char>NPY_FLOAT
  5552. ufunc_ellipk_types[1] = <char>NPY_FLOAT
  5553. ufunc_ellipk_types[2] = <char>NPY_DOUBLE
  5554. ufunc_ellipk_types[3] = <char>NPY_DOUBLE
  5555. ufunc_ellipk_ptr[2*0] = <void*>_func_ellipk
  5556. ufunc_ellipk_ptr[2*0+1] = <void*>(<char*>"ellipk")
  5557. ufunc_ellipk_ptr[2*1] = <void*>_func_ellipk
  5558. ufunc_ellipk_ptr[2*1+1] = <void*>(<char*>"ellipk")
  5559. ufunc_ellipk_data[0] = &ufunc_ellipk_ptr[2*0]
  5560. ufunc_ellipk_data[1] = &ufunc_ellipk_ptr[2*1]
  5561. ellipk = np.PyUFunc_FromFuncAndData(ufunc_ellipk_loops, ufunc_ellipk_data, ufunc_ellipk_types, 2, 1, 1, 0, "ellipk", ufunc_ellipk_doc, 0)
  5562. cdef np.PyUFuncGenericFunction ufunc_ellipkinc_loops[2]
  5563. cdef void *ufunc_ellipkinc_ptr[4]
  5564. cdef void *ufunc_ellipkinc_data[2]
  5565. cdef char ufunc_ellipkinc_types[6]
  5566. cdef char *ufunc_ellipkinc_doc = (
  5567. "ellipkinc(phi, m, out=None)\n"
  5568. "\n"
  5569. "Incomplete elliptic integral of the first kind\n"
  5570. "\n"
  5571. "This function is defined as\n"
  5572. "\n"
  5573. ".. math:: K(\\phi, m) = \\int_0^{\\phi} [1 - m \\sin(t)^2]^{-1/2} dt\n"
  5574. "\n"
  5575. "This function is also called :math:`F(\\phi, m)`.\n"
  5576. "\n"
  5577. "Parameters\n"
  5578. "----------\n"
  5579. "phi : array_like\n"
  5580. " amplitude of the elliptic integral\n"
  5581. "m : array_like\n"
  5582. " parameter of the elliptic integral\n"
  5583. "out : ndarray, optional\n"
  5584. " Optional output array for the function values\n"
  5585. "\n"
  5586. "Returns\n"
  5587. "-------\n"
  5588. "K : scalar or ndarray\n"
  5589. " Value of the elliptic integral\n"
  5590. "\n"
  5591. "Notes\n"
  5592. "-----\n"
  5593. "Wrapper for the Cephes [1]_ routine `ellik`. The computation is\n"
  5594. "carried out using the arithmetic-geometric mean algorithm.\n"
  5595. "\n"
  5596. "The parameterization in terms of :math:`m` follows that of section\n"
  5597. "17.2 in [2]_. Other parameterizations in terms of the\n"
  5598. "complementary parameter :math:`1 - m`, modular angle\n"
  5599. ":math:`\\sin^2(\\alpha) = m`, or modulus :math:`k^2 = m` are also\n"
  5600. "used, so be careful that you choose the correct parameter.\n"
  5601. "\n"
  5602. "The Legendre K incomplete integral (or F integral) is related to\n"
  5603. "Carlson's symmetric R_F function [3]_.\n"
  5604. "Setting :math:`c = \\csc^2\\phi`,\n"
  5605. "\n"
  5606. ".. math:: F(\\phi, m) = R_F(c-1, c-k^2, c) .\n"
  5607. "\n"
  5608. "See Also\n"
  5609. "--------\n"
  5610. "ellipkm1 : Complete elliptic integral of the first kind, near `m` = 1\n"
  5611. "ellipk : Complete elliptic integral of the first kind\n"
  5612. "ellipe : Complete elliptic integral of the second kind\n"
  5613. "ellipeinc : Incomplete elliptic integral of the second kind\n"
  5614. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5615. "\n"
  5616. "References\n"
  5617. "----------\n"
  5618. ".. [1] Cephes Mathematical Functions Library,\n"
  5619. " http://www.netlib.org/cephes/\n"
  5620. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  5621. " Handbook of Mathematical Functions with Formulas,\n"
  5622. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  5623. ".. [3] NIST Digital Library of Mathematical\n"
  5624. " Functions. http://dlmf.nist.gov/, Release 1.0.28 of\n"
  5625. " 2020-09-15. See Sec. 19.25(i) https://dlmf.nist.gov/19.25#i")
  5626. ufunc_ellipkinc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  5627. ufunc_ellipkinc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  5628. ufunc_ellipkinc_types[0] = <char>NPY_FLOAT
  5629. ufunc_ellipkinc_types[1] = <char>NPY_FLOAT
  5630. ufunc_ellipkinc_types[2] = <char>NPY_FLOAT
  5631. ufunc_ellipkinc_types[3] = <char>NPY_DOUBLE
  5632. ufunc_ellipkinc_types[4] = <char>NPY_DOUBLE
  5633. ufunc_ellipkinc_types[5] = <char>NPY_DOUBLE
  5634. ufunc_ellipkinc_ptr[2*0] = <void*>_func_ellik
  5635. ufunc_ellipkinc_ptr[2*0+1] = <void*>(<char*>"ellipkinc")
  5636. ufunc_ellipkinc_ptr[2*1] = <void*>_func_ellik
  5637. ufunc_ellipkinc_ptr[2*1+1] = <void*>(<char*>"ellipkinc")
  5638. ufunc_ellipkinc_data[0] = &ufunc_ellipkinc_ptr[2*0]
  5639. ufunc_ellipkinc_data[1] = &ufunc_ellipkinc_ptr[2*1]
  5640. ellipkinc = np.PyUFunc_FromFuncAndData(ufunc_ellipkinc_loops, ufunc_ellipkinc_data, ufunc_ellipkinc_types, 2, 2, 1, 0, "ellipkinc", ufunc_ellipkinc_doc, 0)
  5641. cdef np.PyUFuncGenericFunction ufunc_ellipkm1_loops[2]
  5642. cdef void *ufunc_ellipkm1_ptr[4]
  5643. cdef void *ufunc_ellipkm1_data[2]
  5644. cdef char ufunc_ellipkm1_types[4]
  5645. cdef char *ufunc_ellipkm1_doc = (
  5646. "ellipkm1(p, out=None)\n"
  5647. "\n"
  5648. "Complete elliptic integral of the first kind around `m` = 1\n"
  5649. "\n"
  5650. "This function is defined as\n"
  5651. "\n"
  5652. ".. math:: K(p) = \\int_0^{\\pi/2} [1 - m \\sin(t)^2]^{-1/2} dt\n"
  5653. "\n"
  5654. "where `m = 1 - p`.\n"
  5655. "\n"
  5656. "Parameters\n"
  5657. "----------\n"
  5658. "p : array_like\n"
  5659. " Defines the parameter of the elliptic integral as `m = 1 - p`.\n"
  5660. "out : ndarray, optional\n"
  5661. " Optional output array for the function values\n"
  5662. "\n"
  5663. "Returns\n"
  5664. "-------\n"
  5665. "K : scalar or ndarray\n"
  5666. " Value of the elliptic integral.\n"
  5667. "\n"
  5668. "Notes\n"
  5669. "-----\n"
  5670. "Wrapper for the Cephes [1]_ routine `ellpk`.\n"
  5671. "\n"
  5672. "For `p <= 1`, computation uses the approximation,\n"
  5673. "\n"
  5674. ".. math:: K(p) \\approx P(p) - \\log(p) Q(p),\n"
  5675. "\n"
  5676. "where :math:`P` and :math:`Q` are tenth-order polynomials. The\n"
  5677. "argument `p` is used internally rather than `m` so that the logarithmic\n"
  5678. "singularity at `m = 1` will be shifted to the origin; this preserves\n"
  5679. "maximum accuracy. For `p > 1`, the identity\n"
  5680. "\n"
  5681. ".. math:: K(p) = K(1/p)/\\sqrt(p)\n"
  5682. "\n"
  5683. "is used.\n"
  5684. "\n"
  5685. "See Also\n"
  5686. "--------\n"
  5687. "ellipk : Complete elliptic integral of the first kind\n"
  5688. "ellipkinc : Incomplete elliptic integral of the first kind\n"
  5689. "ellipe : Complete elliptic integral of the second kind\n"
  5690. "ellipeinc : Incomplete elliptic integral of the second kind\n"
  5691. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5692. "\n"
  5693. "References\n"
  5694. "----------\n"
  5695. ".. [1] Cephes Mathematical Functions Library,\n"
  5696. " http://www.netlib.org/cephes/")
  5697. ufunc_ellipkm1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  5698. ufunc_ellipkm1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  5699. ufunc_ellipkm1_types[0] = <char>NPY_FLOAT
  5700. ufunc_ellipkm1_types[1] = <char>NPY_FLOAT
  5701. ufunc_ellipkm1_types[2] = <char>NPY_DOUBLE
  5702. ufunc_ellipkm1_types[3] = <char>NPY_DOUBLE
  5703. ufunc_ellipkm1_ptr[2*0] = <void*>_func_ellpk
  5704. ufunc_ellipkm1_ptr[2*0+1] = <void*>(<char*>"ellipkm1")
  5705. ufunc_ellipkm1_ptr[2*1] = <void*>_func_ellpk
  5706. ufunc_ellipkm1_ptr[2*1+1] = <void*>(<char*>"ellipkm1")
  5707. ufunc_ellipkm1_data[0] = &ufunc_ellipkm1_ptr[2*0]
  5708. ufunc_ellipkm1_data[1] = &ufunc_ellipkm1_ptr[2*1]
  5709. ellipkm1 = np.PyUFunc_FromFuncAndData(ufunc_ellipkm1_loops, ufunc_ellipkm1_data, ufunc_ellipkm1_types, 2, 1, 1, 0, "ellipkm1", ufunc_ellipkm1_doc, 0)
  5710. cdef np.PyUFuncGenericFunction ufunc_elliprc_loops[4]
  5711. cdef void *ufunc_elliprc_ptr[8]
  5712. cdef void *ufunc_elliprc_data[4]
  5713. cdef char ufunc_elliprc_types[12]
  5714. cdef char *ufunc_elliprc_doc = (
  5715. "elliprc(x, y, out=None)\n"
  5716. "\n"
  5717. "Degenerate symmetric elliptic integral.\n"
  5718. "\n"
  5719. "The function RC is defined as [1]_\n"
  5720. "\n"
  5721. ".. math::\n"
  5722. "\n"
  5723. " R_{\\mathrm{C}}(x, y) =\n"
  5724. " \\frac{1}{2} \\int_0^{+\\infty} (t + x)^{-1/2} (t + y)^{-1} dt\n"
  5725. " = R_{\\mathrm{F}}(x, y, y)\n"
  5726. "\n"
  5727. "Parameters\n"
  5728. "----------\n"
  5729. "x, y : array_like\n"
  5730. " Real or complex input parameters. `x` can be any number in the\n"
  5731. " complex plane cut along the negative real axis. `y` must be non-zero.\n"
  5732. "out : ndarray, optional\n"
  5733. " Optional output array for the function values\n"
  5734. "\n"
  5735. "Returns\n"
  5736. "-------\n"
  5737. "R : scalar or ndarray\n"
  5738. " Value of the integral. If `y` is real and negative, the Cauchy\n"
  5739. " principal value is returned. If both of `x` and `y` are real, the\n"
  5740. " return value is real. Otherwise, the return value is complex.\n"
  5741. "\n"
  5742. "Notes\n"
  5743. "-----\n"
  5744. "RC is a degenerate case of the symmetric integral RF: ``elliprc(x, y) ==\n"
  5745. "elliprf(x, y, y)``. It is an elementary function rather than an elliptic\n"
  5746. "integral.\n"
  5747. "\n"
  5748. "The code implements Carlson's algorithm based on the duplication theorems\n"
  5749. "and series expansion up to the 7th order. [2]_\n"
  5750. "\n"
  5751. ".. versionadded:: 1.8.0\n"
  5752. "\n"
  5753. "See Also\n"
  5754. "--------\n"
  5755. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5756. "elliprd : Symmetric elliptic integral of the second kind.\n"
  5757. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  5758. "elliprj : Symmetric elliptic integral of the third kind.\n"
  5759. "\n"
  5760. "References\n"
  5761. "----------\n"
  5762. ".. [1] B. C. Carlson, ed., Chapter 19 in \"Digital Library of Mathematical\n"
  5763. " Functions,\" NIST, US Dept. of Commerce.\n"
  5764. " https://dlmf.nist.gov/19.16.E6\n"
  5765. ".. [2] B. C. Carlson, \"Numerical computation of real or complex elliptic\n"
  5766. " integrals,\" Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.\n"
  5767. " https://arxiv.org/abs/math/9409227\n"
  5768. " https://doi.org/10.1007/BF02198293\n"
  5769. "\n"
  5770. "Examples\n"
  5771. "--------\n"
  5772. "Basic homogeneity property:\n"
  5773. "\n"
  5774. ">>> import numpy as np\n"
  5775. ">>> from scipy.special import elliprc\n"
  5776. "\n"
  5777. ">>> x = 1.2 + 3.4j\n"
  5778. ">>> y = 5.\n"
  5779. ">>> scale = 0.3 + 0.4j\n"
  5780. ">>> elliprc(scale*x, scale*y)\n"
  5781. "(0.5484493976710874-0.4169557678995833j)\n"
  5782. "\n"
  5783. ">>> elliprc(x, y)/np.sqrt(scale)\n"
  5784. "(0.5484493976710874-0.41695576789958333j)\n"
  5785. "\n"
  5786. "When the two arguments coincide, the integral is particularly\n"
  5787. "simple:\n"
  5788. "\n"
  5789. ">>> x = 1.2 + 3.4j\n"
  5790. ">>> elliprc(x, x)\n"
  5791. "(0.4299173120614631-0.3041729818745595j)\n"
  5792. "\n"
  5793. ">>> 1/np.sqrt(x)\n"
  5794. "(0.4299173120614631-0.30417298187455954j)\n"
  5795. "\n"
  5796. "Another simple case: the first argument vanishes:\n"
  5797. "\n"
  5798. ">>> y = 1.2 + 3.4j\n"
  5799. ">>> elliprc(0, y)\n"
  5800. "(0.6753125346116815-0.47779380263880866j)\n"
  5801. "\n"
  5802. ">>> np.pi/2/np.sqrt(y)\n"
  5803. "(0.6753125346116815-0.4777938026388088j)\n"
  5804. "\n"
  5805. "When `x` and `y` are both positive, we can express\n"
  5806. ":math:`R_C(x,y)` in terms of more elementary functions. For the\n"
  5807. "case :math:`0 \\le x < y`,\n"
  5808. "\n"
  5809. ">>> x = 3.2\n"
  5810. ">>> y = 6.\n"
  5811. ">>> elliprc(x, y)\n"
  5812. "0.44942991498453444\n"
  5813. "\n"
  5814. ">>> np.arctan(np.sqrt((y-x)/x))/np.sqrt(y-x)\n"
  5815. "0.44942991498453433\n"
  5816. "\n"
  5817. "And for the case :math:`0 \\le y < x`,\n"
  5818. "\n"
  5819. ">>> x = 6.\n"
  5820. ">>> y = 3.2\n"
  5821. ">>> elliprc(x,y)\n"
  5822. "0.4989837501576147\n"
  5823. "\n"
  5824. ">>> np.log((np.sqrt(x)+np.sqrt(x-y))/np.sqrt(y))/np.sqrt(x-y)\n"
  5825. "0.49898375015761476")
  5826. ufunc_elliprc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  5827. ufunc_elliprc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  5828. ufunc_elliprc_loops[2] = <np.PyUFuncGenericFunction>loop_D_DD__As_FF_F
  5829. ufunc_elliprc_loops[3] = <np.PyUFuncGenericFunction>loop_D_DD__As_DD_D
  5830. ufunc_elliprc_types[0] = <char>NPY_FLOAT
  5831. ufunc_elliprc_types[1] = <char>NPY_FLOAT
  5832. ufunc_elliprc_types[2] = <char>NPY_FLOAT
  5833. ufunc_elliprc_types[3] = <char>NPY_DOUBLE
  5834. ufunc_elliprc_types[4] = <char>NPY_DOUBLE
  5835. ufunc_elliprc_types[5] = <char>NPY_DOUBLE
  5836. ufunc_elliprc_types[6] = <char>NPY_CFLOAT
  5837. ufunc_elliprc_types[7] = <char>NPY_CFLOAT
  5838. ufunc_elliprc_types[8] = <char>NPY_CFLOAT
  5839. ufunc_elliprc_types[9] = <char>NPY_CDOUBLE
  5840. ufunc_elliprc_types[10] = <char>NPY_CDOUBLE
  5841. ufunc_elliprc_types[11] = <char>NPY_CDOUBLE
  5842. ufunc_elliprc_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_fellint_RC
  5843. ufunc_elliprc_ptr[2*0+1] = <void*>(<char*>"elliprc")
  5844. ufunc_elliprc_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_fellint_RC
  5845. ufunc_elliprc_ptr[2*1+1] = <void*>(<char*>"elliprc")
  5846. ufunc_elliprc_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_cellint_RC
  5847. ufunc_elliprc_ptr[2*2+1] = <void*>(<char*>"elliprc")
  5848. ufunc_elliprc_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_cellint_RC
  5849. ufunc_elliprc_ptr[2*3+1] = <void*>(<char*>"elliprc")
  5850. ufunc_elliprc_data[0] = &ufunc_elliprc_ptr[2*0]
  5851. ufunc_elliprc_data[1] = &ufunc_elliprc_ptr[2*1]
  5852. ufunc_elliprc_data[2] = &ufunc_elliprc_ptr[2*2]
  5853. ufunc_elliprc_data[3] = &ufunc_elliprc_ptr[2*3]
  5854. elliprc = np.PyUFunc_FromFuncAndData(ufunc_elliprc_loops, ufunc_elliprc_data, ufunc_elliprc_types, 4, 2, 1, 0, "elliprc", ufunc_elliprc_doc, 0)
  5855. cdef np.PyUFuncGenericFunction ufunc_elliprd_loops[4]
  5856. cdef void *ufunc_elliprd_ptr[8]
  5857. cdef void *ufunc_elliprd_data[4]
  5858. cdef char ufunc_elliprd_types[16]
  5859. cdef char *ufunc_elliprd_doc = (
  5860. "elliprd(x, y, z, out=None)\n"
  5861. "\n"
  5862. "Symmetric elliptic integral of the second kind.\n"
  5863. "\n"
  5864. "The function RD is defined as [1]_\n"
  5865. "\n"
  5866. ".. math::\n"
  5867. "\n"
  5868. " R_{\\mathrm{D}}(x, y, z) =\n"
  5869. " \\frac{3}{2} \\int_0^{+\\infty} [(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}\n"
  5870. " dt\n"
  5871. "\n"
  5872. "Parameters\n"
  5873. "----------\n"
  5874. "x, y, z : array_like\n"
  5875. " Real or complex input parameters. `x` or `y` can be any number in the\n"
  5876. " complex plane cut along the negative real axis, but at most one of them\n"
  5877. " can be zero, while `z` must be non-zero.\n"
  5878. "out : ndarray, optional\n"
  5879. " Optional output array for the function values\n"
  5880. "\n"
  5881. "Returns\n"
  5882. "-------\n"
  5883. "R : scalar or ndarray\n"
  5884. " Value of the integral. If all of `x`, `y`, and `z` are real, the\n"
  5885. " return value is real. Otherwise, the return value is complex.\n"
  5886. "\n"
  5887. "Notes\n"
  5888. "-----\n"
  5889. "RD is a degenerate case of the elliptic integral RJ: ``elliprd(x, y, z) ==\n"
  5890. "elliprj(x, y, z, z)``.\n"
  5891. "\n"
  5892. "The code implements Carlson's algorithm based on the duplication theorems\n"
  5893. "and series expansion up to the 7th order. [2]_\n"
  5894. "\n"
  5895. ".. versionadded:: 1.8.0\n"
  5896. "\n"
  5897. "See Also\n"
  5898. "--------\n"
  5899. "elliprc : Degenerate symmetric elliptic integral.\n"
  5900. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  5901. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  5902. "elliprj : Symmetric elliptic integral of the third kind.\n"
  5903. "\n"
  5904. "References\n"
  5905. "----------\n"
  5906. ".. [1] B. C. Carlson, ed., Chapter 19 in \"Digital Library of Mathematical\n"
  5907. " Functions,\" NIST, US Dept. of Commerce.\n"
  5908. " https://dlmf.nist.gov/19.16.E5\n"
  5909. ".. [2] B. C. Carlson, \"Numerical computation of real or complex elliptic\n"
  5910. " integrals,\" Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.\n"
  5911. " https://arxiv.org/abs/math/9409227\n"
  5912. " https://doi.org/10.1007/BF02198293\n"
  5913. "\n"
  5914. "Examples\n"
  5915. "--------\n"
  5916. "Basic homogeneity property:\n"
  5917. "\n"
  5918. ">>> import numpy as np\n"
  5919. ">>> from scipy.special import elliprd\n"
  5920. "\n"
  5921. ">>> x = 1.2 + 3.4j\n"
  5922. ">>> y = 5.\n"
  5923. ">>> z = 6.\n"
  5924. ">>> scale = 0.3 + 0.4j\n"
  5925. ">>> elliprd(scale*x, scale*y, scale*z)\n"
  5926. "(-0.03703043835680379-0.24500934665683802j)\n"
  5927. "\n"
  5928. ">>> elliprd(x, y, z)*np.power(scale, -1.5)\n"
  5929. "(-0.0370304383568038-0.24500934665683805j)\n"
  5930. "\n"
  5931. "All three arguments coincide:\n"
  5932. "\n"
  5933. ">>> x = 1.2 + 3.4j\n"
  5934. ">>> elliprd(x, x, x)\n"
  5935. "(-0.03986825876151896-0.14051741840449586j)\n"
  5936. "\n"
  5937. ">>> np.power(x, -1.5)\n"
  5938. "(-0.03986825876151894-0.14051741840449583j)\n"
  5939. "\n"
  5940. "The so-called \"second lemniscate constant\":\n"
  5941. "\n"
  5942. ">>> elliprd(0, 2, 1)/3\n"
  5943. "0.5990701173677961\n"
  5944. "\n"
  5945. ">>> from scipy.special import gamma\n"
  5946. ">>> gamma(0.75)**2/np.sqrt(2*np.pi)\n"
  5947. "0.5990701173677959")
  5948. ufunc_elliprd_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  5949. ufunc_elliprd_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  5950. ufunc_elliprd_loops[2] = <np.PyUFuncGenericFunction>loop_D_DDD__As_FFF_F
  5951. ufunc_elliprd_loops[3] = <np.PyUFuncGenericFunction>loop_D_DDD__As_DDD_D
  5952. ufunc_elliprd_types[0] = <char>NPY_FLOAT
  5953. ufunc_elliprd_types[1] = <char>NPY_FLOAT
  5954. ufunc_elliprd_types[2] = <char>NPY_FLOAT
  5955. ufunc_elliprd_types[3] = <char>NPY_FLOAT
  5956. ufunc_elliprd_types[4] = <char>NPY_DOUBLE
  5957. ufunc_elliprd_types[5] = <char>NPY_DOUBLE
  5958. ufunc_elliprd_types[6] = <char>NPY_DOUBLE
  5959. ufunc_elliprd_types[7] = <char>NPY_DOUBLE
  5960. ufunc_elliprd_types[8] = <char>NPY_CFLOAT
  5961. ufunc_elliprd_types[9] = <char>NPY_CFLOAT
  5962. ufunc_elliprd_types[10] = <char>NPY_CFLOAT
  5963. ufunc_elliprd_types[11] = <char>NPY_CFLOAT
  5964. ufunc_elliprd_types[12] = <char>NPY_CDOUBLE
  5965. ufunc_elliprd_types[13] = <char>NPY_CDOUBLE
  5966. ufunc_elliprd_types[14] = <char>NPY_CDOUBLE
  5967. ufunc_elliprd_types[15] = <char>NPY_CDOUBLE
  5968. ufunc_elliprd_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_fellint_RD
  5969. ufunc_elliprd_ptr[2*0+1] = <void*>(<char*>"elliprd")
  5970. ufunc_elliprd_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_fellint_RD
  5971. ufunc_elliprd_ptr[2*1+1] = <void*>(<char*>"elliprd")
  5972. ufunc_elliprd_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_cellint_RD
  5973. ufunc_elliprd_ptr[2*2+1] = <void*>(<char*>"elliprd")
  5974. ufunc_elliprd_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_cellint_RD
  5975. ufunc_elliprd_ptr[2*3+1] = <void*>(<char*>"elliprd")
  5976. ufunc_elliprd_data[0] = &ufunc_elliprd_ptr[2*0]
  5977. ufunc_elliprd_data[1] = &ufunc_elliprd_ptr[2*1]
  5978. ufunc_elliprd_data[2] = &ufunc_elliprd_ptr[2*2]
  5979. ufunc_elliprd_data[3] = &ufunc_elliprd_ptr[2*3]
  5980. elliprd = np.PyUFunc_FromFuncAndData(ufunc_elliprd_loops, ufunc_elliprd_data, ufunc_elliprd_types, 4, 3, 1, 0, "elliprd", ufunc_elliprd_doc, 0)
  5981. cdef np.PyUFuncGenericFunction ufunc_elliprf_loops[4]
  5982. cdef void *ufunc_elliprf_ptr[8]
  5983. cdef void *ufunc_elliprf_data[4]
  5984. cdef char ufunc_elliprf_types[16]
  5985. cdef char *ufunc_elliprf_doc = (
  5986. "elliprf(x, y, z, out=None)\n"
  5987. "\n"
  5988. "Completely-symmetric elliptic integral of the first kind.\n"
  5989. "\n"
  5990. "The function RF is defined as [1]_\n"
  5991. "\n"
  5992. ".. math::\n"
  5993. "\n"
  5994. " R_{\\mathrm{F}}(x, y, z) =\n"
  5995. " \\frac{1}{2} \\int_0^{+\\infty} [(t + x) (t + y) (t + z)]^{-1/2} dt\n"
  5996. "\n"
  5997. "Parameters\n"
  5998. "----------\n"
  5999. "x, y, z : array_like\n"
  6000. " Real or complex input parameters. `x`, `y`, or `z` can be any number in\n"
  6001. " the complex plane cut along the negative real axis, but at most one of\n"
  6002. " them can be zero.\n"
  6003. "out : ndarray, optional\n"
  6004. " Optional output array for the function values\n"
  6005. "\n"
  6006. "Returns\n"
  6007. "-------\n"
  6008. "R : scalar or ndarray\n"
  6009. " Value of the integral. If all of `x`, `y`, and `z` are real, the return\n"
  6010. " value is real. Otherwise, the return value is complex.\n"
  6011. "\n"
  6012. "Notes\n"
  6013. "-----\n"
  6014. "The code implements Carlson's algorithm based on the duplication theorems\n"
  6015. "and series expansion up to the 7th order (cf.:\n"
  6016. "https://dlmf.nist.gov/19.36.i) and the AGM algorithm for the complete\n"
  6017. "integral. [2]_\n"
  6018. "\n"
  6019. ".. versionadded:: 1.8.0\n"
  6020. "\n"
  6021. "See Also\n"
  6022. "--------\n"
  6023. "elliprc : Degenerate symmetric integral.\n"
  6024. "elliprd : Symmetric elliptic integral of the second kind.\n"
  6025. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  6026. "elliprj : Symmetric elliptic integral of the third kind.\n"
  6027. "\n"
  6028. "References\n"
  6029. "----------\n"
  6030. ".. [1] B. C. Carlson, ed., Chapter 19 in \"Digital Library of Mathematical\n"
  6031. " Functions,\" NIST, US Dept. of Commerce.\n"
  6032. " https://dlmf.nist.gov/19.16.E1\n"
  6033. ".. [2] B. C. Carlson, \"Numerical computation of real or complex elliptic\n"
  6034. " integrals,\" Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.\n"
  6035. " https://arxiv.org/abs/math/9409227\n"
  6036. " https://doi.org/10.1007/BF02198293\n"
  6037. "\n"
  6038. "Examples\n"
  6039. "--------\n"
  6040. "Basic homogeneity property:\n"
  6041. "\n"
  6042. ">>> import numpy as np\n"
  6043. ">>> from scipy.special import elliprf\n"
  6044. "\n"
  6045. ">>> x = 1.2 + 3.4j\n"
  6046. ">>> y = 5.\n"
  6047. ">>> z = 6.\n"
  6048. ">>> scale = 0.3 + 0.4j\n"
  6049. ">>> elliprf(scale*x, scale*y, scale*z)\n"
  6050. "(0.5328051227278146-0.4008623567957094j)\n"
  6051. "\n"
  6052. ">>> elliprf(x, y, z)/np.sqrt(scale)\n"
  6053. "(0.5328051227278147-0.4008623567957095j)\n"
  6054. "\n"
  6055. "All three arguments coincide:\n"
  6056. "\n"
  6057. ">>> x = 1.2 + 3.4j\n"
  6058. ">>> elliprf(x, x, x)\n"
  6059. "(0.42991731206146316-0.30417298187455954j)\n"
  6060. "\n"
  6061. ">>> 1/np.sqrt(x)\n"
  6062. "(0.4299173120614631-0.30417298187455954j)\n"
  6063. "\n"
  6064. "The so-called \"first lemniscate constant\":\n"
  6065. "\n"
  6066. ">>> elliprf(0, 1, 2)\n"
  6067. "1.3110287771460598\n"
  6068. "\n"
  6069. ">>> from scipy.special import gamma\n"
  6070. ">>> gamma(0.25)**2/(4*np.sqrt(2*np.pi))\n"
  6071. "1.3110287771460598")
  6072. ufunc_elliprf_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  6073. ufunc_elliprf_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  6074. ufunc_elliprf_loops[2] = <np.PyUFuncGenericFunction>loop_D_DDD__As_FFF_F
  6075. ufunc_elliprf_loops[3] = <np.PyUFuncGenericFunction>loop_D_DDD__As_DDD_D
  6076. ufunc_elliprf_types[0] = <char>NPY_FLOAT
  6077. ufunc_elliprf_types[1] = <char>NPY_FLOAT
  6078. ufunc_elliprf_types[2] = <char>NPY_FLOAT
  6079. ufunc_elliprf_types[3] = <char>NPY_FLOAT
  6080. ufunc_elliprf_types[4] = <char>NPY_DOUBLE
  6081. ufunc_elliprf_types[5] = <char>NPY_DOUBLE
  6082. ufunc_elliprf_types[6] = <char>NPY_DOUBLE
  6083. ufunc_elliprf_types[7] = <char>NPY_DOUBLE
  6084. ufunc_elliprf_types[8] = <char>NPY_CFLOAT
  6085. ufunc_elliprf_types[9] = <char>NPY_CFLOAT
  6086. ufunc_elliprf_types[10] = <char>NPY_CFLOAT
  6087. ufunc_elliprf_types[11] = <char>NPY_CFLOAT
  6088. ufunc_elliprf_types[12] = <char>NPY_CDOUBLE
  6089. ufunc_elliprf_types[13] = <char>NPY_CDOUBLE
  6090. ufunc_elliprf_types[14] = <char>NPY_CDOUBLE
  6091. ufunc_elliprf_types[15] = <char>NPY_CDOUBLE
  6092. ufunc_elliprf_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_fellint_RF
  6093. ufunc_elliprf_ptr[2*0+1] = <void*>(<char*>"elliprf")
  6094. ufunc_elliprf_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_fellint_RF
  6095. ufunc_elliprf_ptr[2*1+1] = <void*>(<char*>"elliprf")
  6096. ufunc_elliprf_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_cellint_RF
  6097. ufunc_elliprf_ptr[2*2+1] = <void*>(<char*>"elliprf")
  6098. ufunc_elliprf_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_cellint_RF
  6099. ufunc_elliprf_ptr[2*3+1] = <void*>(<char*>"elliprf")
  6100. ufunc_elliprf_data[0] = &ufunc_elliprf_ptr[2*0]
  6101. ufunc_elliprf_data[1] = &ufunc_elliprf_ptr[2*1]
  6102. ufunc_elliprf_data[2] = &ufunc_elliprf_ptr[2*2]
  6103. ufunc_elliprf_data[3] = &ufunc_elliprf_ptr[2*3]
  6104. elliprf = np.PyUFunc_FromFuncAndData(ufunc_elliprf_loops, ufunc_elliprf_data, ufunc_elliprf_types, 4, 3, 1, 0, "elliprf", ufunc_elliprf_doc, 0)
  6105. cdef np.PyUFuncGenericFunction ufunc_elliprg_loops[4]
  6106. cdef void *ufunc_elliprg_ptr[8]
  6107. cdef void *ufunc_elliprg_data[4]
  6108. cdef char ufunc_elliprg_types[16]
  6109. cdef char *ufunc_elliprg_doc = (
  6110. "elliprg(x, y, z, out=None)\n"
  6111. "\n"
  6112. "Completely-symmetric elliptic integral of the second kind.\n"
  6113. "\n"
  6114. "The function RG is defined as [1]_\n"
  6115. "\n"
  6116. ".. math::\n"
  6117. "\n"
  6118. " R_{\\mathrm{G}}(x, y, z) =\n"
  6119. " \\frac{1}{4} \\int_0^{+\\infty} [(t + x) (t + y) (t + z)]^{-1/2}\n"
  6120. " \\left(\\frac{x}{t + x} + \\frac{y}{t + y} + \\frac{z}{t + z}\\right) t\n"
  6121. " dt\n"
  6122. "\n"
  6123. "Parameters\n"
  6124. "----------\n"
  6125. "x, y, z : array_like\n"
  6126. " Real or complex input parameters. `x`, `y`, or `z` can be any number in\n"
  6127. " the complex plane cut along the negative real axis.\n"
  6128. "out : ndarray, optional\n"
  6129. " Optional output array for the function values\n"
  6130. "\n"
  6131. "Returns\n"
  6132. "-------\n"
  6133. "R : scalar or ndarray\n"
  6134. " Value of the integral. If all of `x`, `y`, and `z` are real, the return\n"
  6135. " value is real. Otherwise, the return value is complex.\n"
  6136. "\n"
  6137. "Notes\n"
  6138. "-----\n"
  6139. "The implementation uses the relation [1]_\n"
  6140. "\n"
  6141. ".. math::\n"
  6142. "\n"
  6143. " 2 R_{\\mathrm{G}}(x, y, z) =\n"
  6144. " z R_{\\mathrm{F}}(x, y, z) -\n"
  6145. " \\frac{1}{3} (x - z) (y - z) R_{\\mathrm{D}}(x, y, z) +\n"
  6146. " \\sqrt{\\frac{x y}{z}}\n"
  6147. "\n"
  6148. "and the symmetry of `x`, `y`, `z` when at least one non-zero parameter can\n"
  6149. "be chosen as the pivot. When one of the arguments is close to zero, the AGM\n"
  6150. "method is applied instead. Other special cases are computed following Ref.\n"
  6151. "[2]_\n"
  6152. "\n"
  6153. ".. versionadded:: 1.8.0\n"
  6154. "\n"
  6155. "See Also\n"
  6156. "--------\n"
  6157. "elliprc : Degenerate symmetric integral.\n"
  6158. "elliprd : Symmetric elliptic integral of the second kind.\n"
  6159. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  6160. "elliprj : Symmetric elliptic integral of the third kind.\n"
  6161. "\n"
  6162. "References\n"
  6163. "----------\n"
  6164. ".. [1] B. C. Carlson, \"Numerical computation of real or complex elliptic\n"
  6165. " integrals,\" Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.\n"
  6166. " https://arxiv.org/abs/math/9409227\n"
  6167. " https://doi.org/10.1007/BF02198293\n"
  6168. ".. [2] B. C. Carlson, ed., Chapter 19 in \"Digital Library of Mathematical\n"
  6169. " Functions,\" NIST, US Dept. of Commerce.\n"
  6170. " https://dlmf.nist.gov/19.16.E1\n"
  6171. " https://dlmf.nist.gov/19.20.ii\n"
  6172. "\n"
  6173. "Examples\n"
  6174. "--------\n"
  6175. "Basic homogeneity property:\n"
  6176. "\n"
  6177. ">>> import numpy as np\n"
  6178. ">>> from scipy.special import elliprg\n"
  6179. "\n"
  6180. ">>> x = 1.2 + 3.4j\n"
  6181. ">>> y = 5.\n"
  6182. ">>> z = 6.\n"
  6183. ">>> scale = 0.3 + 0.4j\n"
  6184. ">>> elliprg(scale*x, scale*y, scale*z)\n"
  6185. "(1.195936862005246+0.8470988320464167j)\n"
  6186. "\n"
  6187. ">>> elliprg(x, y, z)*np.sqrt(scale)\n"
  6188. "(1.195936862005246+0.8470988320464165j)\n"
  6189. "\n"
  6190. "Simplifications:\n"
  6191. "\n"
  6192. ">>> elliprg(0, y, y)\n"
  6193. "1.756203682760182\n"
  6194. "\n"
  6195. ">>> 0.25*np.pi*np.sqrt(y)\n"
  6196. "1.7562036827601817\n"
  6197. "\n"
  6198. ">>> elliprg(0, 0, z)\n"
  6199. "1.224744871391589\n"
  6200. "\n"
  6201. ">>> 0.5*np.sqrt(z)\n"
  6202. "1.224744871391589\n"
  6203. "\n"
  6204. "The surface area of a triaxial ellipsoid with semiaxes ``a``, ``b``, and\n"
  6205. "``c`` is given by\n"
  6206. "\n"
  6207. ".. math::\n"
  6208. "\n"
  6209. " S = 4 \\pi a b c R_{\\mathrm{G}}(1 / a^2, 1 / b^2, 1 / c^2).\n"
  6210. "\n"
  6211. ">>> def ellipsoid_area(a, b, c):\n"
  6212. "... r = 4.0 * np.pi * a * b * c\n"
  6213. "... return r * elliprg(1.0 / (a * a), 1.0 / (b * b), 1.0 / (c * c))\n"
  6214. ">>> print(ellipsoid_area(1, 3, 5))\n"
  6215. "108.62688289491807")
  6216. ufunc_elliprg_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  6217. ufunc_elliprg_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  6218. ufunc_elliprg_loops[2] = <np.PyUFuncGenericFunction>loop_D_DDD__As_FFF_F
  6219. ufunc_elliprg_loops[3] = <np.PyUFuncGenericFunction>loop_D_DDD__As_DDD_D
  6220. ufunc_elliprg_types[0] = <char>NPY_FLOAT
  6221. ufunc_elliprg_types[1] = <char>NPY_FLOAT
  6222. ufunc_elliprg_types[2] = <char>NPY_FLOAT
  6223. ufunc_elliprg_types[3] = <char>NPY_FLOAT
  6224. ufunc_elliprg_types[4] = <char>NPY_DOUBLE
  6225. ufunc_elliprg_types[5] = <char>NPY_DOUBLE
  6226. ufunc_elliprg_types[6] = <char>NPY_DOUBLE
  6227. ufunc_elliprg_types[7] = <char>NPY_DOUBLE
  6228. ufunc_elliprg_types[8] = <char>NPY_CFLOAT
  6229. ufunc_elliprg_types[9] = <char>NPY_CFLOAT
  6230. ufunc_elliprg_types[10] = <char>NPY_CFLOAT
  6231. ufunc_elliprg_types[11] = <char>NPY_CFLOAT
  6232. ufunc_elliprg_types[12] = <char>NPY_CDOUBLE
  6233. ufunc_elliprg_types[13] = <char>NPY_CDOUBLE
  6234. ufunc_elliprg_types[14] = <char>NPY_CDOUBLE
  6235. ufunc_elliprg_types[15] = <char>NPY_CDOUBLE
  6236. ufunc_elliprg_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_fellint_RG
  6237. ufunc_elliprg_ptr[2*0+1] = <void*>(<char*>"elliprg")
  6238. ufunc_elliprg_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_fellint_RG
  6239. ufunc_elliprg_ptr[2*1+1] = <void*>(<char*>"elliprg")
  6240. ufunc_elliprg_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_cellint_RG
  6241. ufunc_elliprg_ptr[2*2+1] = <void*>(<char*>"elliprg")
  6242. ufunc_elliprg_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_cellint_RG
  6243. ufunc_elliprg_ptr[2*3+1] = <void*>(<char*>"elliprg")
  6244. ufunc_elliprg_data[0] = &ufunc_elliprg_ptr[2*0]
  6245. ufunc_elliprg_data[1] = &ufunc_elliprg_ptr[2*1]
  6246. ufunc_elliprg_data[2] = &ufunc_elliprg_ptr[2*2]
  6247. ufunc_elliprg_data[3] = &ufunc_elliprg_ptr[2*3]
  6248. elliprg = np.PyUFunc_FromFuncAndData(ufunc_elliprg_loops, ufunc_elliprg_data, ufunc_elliprg_types, 4, 3, 1, 0, "elliprg", ufunc_elliprg_doc, 0)
  6249. cdef np.PyUFuncGenericFunction ufunc_elliprj_loops[4]
  6250. cdef void *ufunc_elliprj_ptr[8]
  6251. cdef void *ufunc_elliprj_data[4]
  6252. cdef char ufunc_elliprj_types[20]
  6253. cdef char *ufunc_elliprj_doc = (
  6254. "elliprj(x, y, z, p, out=None)\n"
  6255. "\n"
  6256. "Symmetric elliptic integral of the third kind.\n"
  6257. "\n"
  6258. "The function RJ is defined as [1]_\n"
  6259. "\n"
  6260. ".. math::\n"
  6261. "\n"
  6262. " R_{\\mathrm{J}}(x, y, z, p) =\n"
  6263. " \\frac{3}{2} \\int_0^{+\\infty} [(t + x) (t + y) (t + z)]^{-1/2}\n"
  6264. " (t + p)^{-1} dt\n"
  6265. "\n"
  6266. ".. warning::\n"
  6267. " This function should be considered experimental when the inputs are\n"
  6268. " unbalanced. Check correctness with another independent implementation.\n"
  6269. "\n"
  6270. "Parameters\n"
  6271. "----------\n"
  6272. "x, y, z, p : array_like\n"
  6273. " Real or complex input parameters. `x`, `y`, or `z` are numbers in\n"
  6274. " the complex plane cut along the negative real axis (subject to further\n"
  6275. " constraints, see Notes), and at most one of them can be zero. `p` must\n"
  6276. " be non-zero.\n"
  6277. "out : ndarray, optional\n"
  6278. " Optional output array for the function values\n"
  6279. "\n"
  6280. "Returns\n"
  6281. "-------\n"
  6282. "R : scalar or ndarray\n"
  6283. " Value of the integral. If all of `x`, `y`, `z`, and `p` are real, the\n"
  6284. " return value is real. Otherwise, the return value is complex.\n"
  6285. "\n"
  6286. " If `p` is real and negative, while `x`, `y`, and `z` are real,\n"
  6287. " non-negative, and at most one of them is zero, the Cauchy principal\n"
  6288. " value is returned. [1]_ [2]_\n"
  6289. "\n"
  6290. "Notes\n"
  6291. "-----\n"
  6292. "The code implements Carlson's algorithm based on the duplication theorems\n"
  6293. "and series expansion up to the 7th order. [3]_ The algorithm is slightly\n"
  6294. "different from its earlier incarnation as it appears in [1]_, in that the\n"
  6295. "call to `elliprc` (or ``atan``/``atanh``, see [4]_) is no longer needed in\n"
  6296. "the inner loop. Asymptotic approximations are used where arguments differ\n"
  6297. "widely in the order of magnitude. [5]_\n"
  6298. "\n"
  6299. "The input values are subject to certain sufficient but not necessary\n"
  6300. "constaints when input arguments are complex. Notably, ``x``, ``y``, and\n"
  6301. "``z`` must have non-negative real parts, unless two of them are\n"
  6302. "non-negative and complex-conjugates to each other while the other is a real\n"
  6303. "non-negative number. [1]_ If the inputs do not satisfy the sufficient\n"
  6304. "condition described in Ref. [1]_ they are rejected outright with the output\n"
  6305. "set to NaN.\n"
  6306. "\n"
  6307. "In the case where one of ``x``, ``y``, and ``z`` is equal to ``p``, the\n"
  6308. "function ``elliprd`` should be preferred because of its less restrictive\n"
  6309. "domain.\n"
  6310. "\n"
  6311. ".. versionadded:: 1.8.0\n"
  6312. "\n"
  6313. "See Also\n"
  6314. "--------\n"
  6315. "elliprc : Degenerate symmetric integral.\n"
  6316. "elliprd : Symmetric elliptic integral of the second kind.\n"
  6317. "elliprf : Completely-symmetric elliptic integral of the first kind.\n"
  6318. "elliprg : Completely-symmetric elliptic integral of the second kind.\n"
  6319. "\n"
  6320. "References\n"
  6321. "----------\n"
  6322. ".. [1] B. C. Carlson, \"Numerical computation of real or complex elliptic\n"
  6323. " integrals,\" Numer. Algorithm, vol. 10, no. 1, pp. 13-26, 1995.\n"
  6324. " https://arxiv.org/abs/math/9409227\n"
  6325. " https://doi.org/10.1007/BF02198293\n"
  6326. ".. [2] B. C. Carlson, ed., Chapter 19 in \"Digital Library of Mathematical\n"
  6327. " Functions,\" NIST, US Dept. of Commerce.\n"
  6328. " https://dlmf.nist.gov/19.20.iii\n"
  6329. ".. [3] B. C. Carlson, J. FitzSimmons, \"Reduction Theorems for Elliptic\n"
  6330. " Integrands with the Square Root of Two Quadratic Factors,\" J.\n"
  6331. " Comput. Appl. Math., vol. 118, nos. 1-2, pp. 71-85, 2000.\n"
  6332. " https://doi.org/10.1016/S0377-0427(00)00282-X\n"
  6333. ".. [4] F. Johansson, \"Numerical Evaluation of Elliptic Functions, Elliptic\n"
  6334. " Integrals and Modular Forms,\" in J. Blumlein, C. Schneider, P.\n"
  6335. " Paule, eds., \"Elliptic Integrals, Elliptic Functions and Modular\n"
  6336. " Forms in Quantum Field Theory,\" pp. 269-293, 2019 (Cham,\n"
  6337. " Switzerland: Springer Nature Switzerland)\n"
  6338. " https://arxiv.org/abs/1806.06725\n"
  6339. " https://doi.org/10.1007/978-3-030-04480-0\n"
  6340. ".. [5] B. C. Carlson, J. L. Gustafson, \"Asymptotic Approximations for\n"
  6341. " Symmetric Elliptic Integrals,\" SIAM J. Math. Anls., vol. 25, no. 2,\n"
  6342. " pp. 288-303, 1994.\n"
  6343. " https://arxiv.org/abs/math/9310223\n"
  6344. " https://doi.org/10.1137/S0036141092228477\n"
  6345. "\n"
  6346. "Examples\n"
  6347. "--------\n"
  6348. "Basic homogeneity property:\n"
  6349. "\n"
  6350. ">>> import numpy as np\n"
  6351. ">>> from scipy.special import elliprj\n"
  6352. "\n"
  6353. ">>> x = 1.2 + 3.4j\n"
  6354. ">>> y = 5.\n"
  6355. ">>> z = 6.\n"
  6356. ">>> p = 7.\n"
  6357. ">>> scale = 0.3 - 0.4j\n"
  6358. ">>> elliprj(scale*x, scale*y, scale*z, scale*p)\n"
  6359. "(0.10834905565679157+0.19694950747103812j)\n"
  6360. "\n"
  6361. ">>> elliprj(x, y, z, p)*np.power(scale, -1.5)\n"
  6362. "(0.10834905565679556+0.19694950747103854j)\n"
  6363. "\n"
  6364. "Reduction to simpler elliptic integral:\n"
  6365. "\n"
  6366. ">>> elliprj(x, y, z, z)\n"
  6367. "(0.08288462362195129-0.028376809745123258j)\n"
  6368. "\n"
  6369. ">>> from scipy.special import elliprd\n"
  6370. ">>> elliprd(x, y, z)\n"
  6371. "(0.08288462362195136-0.028376809745123296j)\n"
  6372. "\n"
  6373. "All arguments coincide:\n"
  6374. "\n"
  6375. ">>> elliprj(x, x, x, x)\n"
  6376. "(-0.03986825876151896-0.14051741840449586j)\n"
  6377. "\n"
  6378. ">>> np.power(x, -1.5)\n"
  6379. "(-0.03986825876151894-0.14051741840449583j)")
  6380. ufunc_elliprj_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  6381. ufunc_elliprj_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  6382. ufunc_elliprj_loops[2] = <np.PyUFuncGenericFunction>loop_D_DDDD__As_FFFF_F
  6383. ufunc_elliprj_loops[3] = <np.PyUFuncGenericFunction>loop_D_DDDD__As_DDDD_D
  6384. ufunc_elliprj_types[0] = <char>NPY_FLOAT
  6385. ufunc_elliprj_types[1] = <char>NPY_FLOAT
  6386. ufunc_elliprj_types[2] = <char>NPY_FLOAT
  6387. ufunc_elliprj_types[3] = <char>NPY_FLOAT
  6388. ufunc_elliprj_types[4] = <char>NPY_FLOAT
  6389. ufunc_elliprj_types[5] = <char>NPY_DOUBLE
  6390. ufunc_elliprj_types[6] = <char>NPY_DOUBLE
  6391. ufunc_elliprj_types[7] = <char>NPY_DOUBLE
  6392. ufunc_elliprj_types[8] = <char>NPY_DOUBLE
  6393. ufunc_elliprj_types[9] = <char>NPY_DOUBLE
  6394. ufunc_elliprj_types[10] = <char>NPY_CFLOAT
  6395. ufunc_elliprj_types[11] = <char>NPY_CFLOAT
  6396. ufunc_elliprj_types[12] = <char>NPY_CFLOAT
  6397. ufunc_elliprj_types[13] = <char>NPY_CFLOAT
  6398. ufunc_elliprj_types[14] = <char>NPY_CFLOAT
  6399. ufunc_elliprj_types[15] = <char>NPY_CDOUBLE
  6400. ufunc_elliprj_types[16] = <char>NPY_CDOUBLE
  6401. ufunc_elliprj_types[17] = <char>NPY_CDOUBLE
  6402. ufunc_elliprj_types[18] = <char>NPY_CDOUBLE
  6403. ufunc_elliprj_types[19] = <char>NPY_CDOUBLE
  6404. ufunc_elliprj_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_fellint_RJ
  6405. ufunc_elliprj_ptr[2*0+1] = <void*>(<char*>"elliprj")
  6406. ufunc_elliprj_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_fellint_RJ
  6407. ufunc_elliprj_ptr[2*1+1] = <void*>(<char*>"elliprj")
  6408. ufunc_elliprj_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_cellint_RJ
  6409. ufunc_elliprj_ptr[2*2+1] = <void*>(<char*>"elliprj")
  6410. ufunc_elliprj_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_cellint_RJ
  6411. ufunc_elliprj_ptr[2*3+1] = <void*>(<char*>"elliprj")
  6412. ufunc_elliprj_data[0] = &ufunc_elliprj_ptr[2*0]
  6413. ufunc_elliprj_data[1] = &ufunc_elliprj_ptr[2*1]
  6414. ufunc_elliprj_data[2] = &ufunc_elliprj_ptr[2*2]
  6415. ufunc_elliprj_data[3] = &ufunc_elliprj_ptr[2*3]
  6416. elliprj = np.PyUFunc_FromFuncAndData(ufunc_elliprj_loops, ufunc_elliprj_data, ufunc_elliprj_types, 4, 4, 1, 0, "elliprj", ufunc_elliprj_doc, 0)
  6417. cdef np.PyUFuncGenericFunction ufunc_entr_loops[2]
  6418. cdef void *ufunc_entr_ptr[4]
  6419. cdef void *ufunc_entr_data[2]
  6420. cdef char ufunc_entr_types[4]
  6421. cdef char *ufunc_entr_doc = (
  6422. "entr(x, out=None)\n"
  6423. "\n"
  6424. "Elementwise function for computing entropy.\n"
  6425. "\n"
  6426. ".. math:: \\text{entr}(x) = \\begin{cases} - x \\log(x) & x > 0 \\\\ 0 & x = 0 \\\\ -\\infty & \\text{otherwise} \\end{cases}\n"
  6427. "\n"
  6428. "Parameters\n"
  6429. "----------\n"
  6430. "x : ndarray\n"
  6431. " Input array.\n"
  6432. "out : ndarray, optional\n"
  6433. " Optional output array for the function values\n"
  6434. "\n"
  6435. "Returns\n"
  6436. "-------\n"
  6437. "res : scalar or ndarray\n"
  6438. " The value of the elementwise entropy function at the given points `x`.\n"
  6439. "\n"
  6440. "See Also\n"
  6441. "--------\n"
  6442. "kl_div, rel_entr, scipy.stats.entropy\n"
  6443. "\n"
  6444. "Notes\n"
  6445. "-----\n"
  6446. ".. versionadded:: 0.15.0\n"
  6447. "\n"
  6448. "This function is concave.\n"
  6449. "\n"
  6450. "The origin of this function is in convex programming; see [1]_.\n"
  6451. "Given a probability distribution :math:`p_1, \\ldots, p_n`,\n"
  6452. "the definition of entropy in the context of *information theory* is\n"
  6453. "\n"
  6454. ".. math::\n"
  6455. "\n"
  6456. " \\sum_{i = 1}^n \\mathrm{entr}(p_i).\n"
  6457. "\n"
  6458. "To compute the latter quantity, use `scipy.stats.entropy`.\n"
  6459. "\n"
  6460. "References\n"
  6461. "----------\n"
  6462. ".. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.\n"
  6463. " Cambridge University Press, 2004.\n"
  6464. " :doi:`https://doi.org/10.1017/CBO9780511804441`")
  6465. ufunc_entr_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6466. ufunc_entr_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6467. ufunc_entr_types[0] = <char>NPY_FLOAT
  6468. ufunc_entr_types[1] = <char>NPY_FLOAT
  6469. ufunc_entr_types[2] = <char>NPY_DOUBLE
  6470. ufunc_entr_types[3] = <char>NPY_DOUBLE
  6471. ufunc_entr_ptr[2*0] = <void*>_func_entr
  6472. ufunc_entr_ptr[2*0+1] = <void*>(<char*>"entr")
  6473. ufunc_entr_ptr[2*1] = <void*>_func_entr
  6474. ufunc_entr_ptr[2*1+1] = <void*>(<char*>"entr")
  6475. ufunc_entr_data[0] = &ufunc_entr_ptr[2*0]
  6476. ufunc_entr_data[1] = &ufunc_entr_ptr[2*1]
  6477. entr = np.PyUFunc_FromFuncAndData(ufunc_entr_loops, ufunc_entr_data, ufunc_entr_types, 2, 1, 1, 0, "entr", ufunc_entr_doc, 0)
  6478. cdef np.PyUFuncGenericFunction ufunc_erf_loops[4]
  6479. cdef void *ufunc_erf_ptr[8]
  6480. cdef void *ufunc_erf_data[4]
  6481. cdef char ufunc_erf_types[8]
  6482. cdef char *ufunc_erf_doc = (
  6483. "erf(z, out=None)\n"
  6484. "\n"
  6485. "Returns the error function of complex argument.\n"
  6486. "\n"
  6487. "It is defined as ``2/sqrt(pi)*integral(exp(-t**2), t=0..z)``.\n"
  6488. "\n"
  6489. "Parameters\n"
  6490. "----------\n"
  6491. "x : ndarray\n"
  6492. " Input array.\n"
  6493. "out : ndarray, optional\n"
  6494. " Optional output array for the function values\n"
  6495. "\n"
  6496. "Returns\n"
  6497. "-------\n"
  6498. "res : scalar or ndarray\n"
  6499. " The values of the error function at the given points `x`.\n"
  6500. "\n"
  6501. "See Also\n"
  6502. "--------\n"
  6503. "erfc, erfinv, erfcinv, wofz, erfcx, erfi\n"
  6504. "\n"
  6505. "Notes\n"
  6506. "-----\n"
  6507. "The cumulative of the unit normal distribution is given by\n"
  6508. "``Phi(z) = 1/2[1 + erf(z/sqrt(2))]``.\n"
  6509. "\n"
  6510. "References\n"
  6511. "----------\n"
  6512. ".. [1] https://en.wikipedia.org/wiki/Error_function\n"
  6513. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  6514. " Handbook of Mathematical Functions with Formulas,\n"
  6515. " Graphs, and Mathematical Tables. New York: Dover,\n"
  6516. " 1972. http://www.math.sfu.ca/~cbm/aands/page_297.htm\n"
  6517. ".. [3] Steven G. Johnson, Faddeeva W function implementation.\n"
  6518. " http://ab-initio.mit.edu/Faddeeva\n"
  6519. "\n"
  6520. "Examples\n"
  6521. "--------\n"
  6522. ">>> import numpy as np\n"
  6523. ">>> from scipy import special\n"
  6524. ">>> import matplotlib.pyplot as plt\n"
  6525. ">>> x = np.linspace(-3, 3)\n"
  6526. ">>> plt.plot(x, special.erf(x))\n"
  6527. ">>> plt.xlabel('$x$')\n"
  6528. ">>> plt.ylabel('$erf(x)$')\n"
  6529. ">>> plt.show()")
  6530. ufunc_erf_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6531. ufunc_erf_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6532. ufunc_erf_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  6533. ufunc_erf_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  6534. ufunc_erf_types[0] = <char>NPY_FLOAT
  6535. ufunc_erf_types[1] = <char>NPY_FLOAT
  6536. ufunc_erf_types[2] = <char>NPY_DOUBLE
  6537. ufunc_erf_types[3] = <char>NPY_DOUBLE
  6538. ufunc_erf_types[4] = <char>NPY_CFLOAT
  6539. ufunc_erf_types[5] = <char>NPY_CFLOAT
  6540. ufunc_erf_types[6] = <char>NPY_CDOUBLE
  6541. ufunc_erf_types[7] = <char>NPY_CDOUBLE
  6542. ufunc_erf_ptr[2*0] = <void*>_func_erf
  6543. ufunc_erf_ptr[2*0+1] = <void*>(<char*>"erf")
  6544. ufunc_erf_ptr[2*1] = <void*>_func_erf
  6545. ufunc_erf_ptr[2*1+1] = <void*>(<char*>"erf")
  6546. ufunc_erf_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erf
  6547. ufunc_erf_ptr[2*2+1] = <void*>(<char*>"erf")
  6548. ufunc_erf_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erf
  6549. ufunc_erf_ptr[2*3+1] = <void*>(<char*>"erf")
  6550. ufunc_erf_data[0] = &ufunc_erf_ptr[2*0]
  6551. ufunc_erf_data[1] = &ufunc_erf_ptr[2*1]
  6552. ufunc_erf_data[2] = &ufunc_erf_ptr[2*2]
  6553. ufunc_erf_data[3] = &ufunc_erf_ptr[2*3]
  6554. erf = np.PyUFunc_FromFuncAndData(ufunc_erf_loops, ufunc_erf_data, ufunc_erf_types, 4, 1, 1, 0, "erf", ufunc_erf_doc, 0)
  6555. cdef np.PyUFuncGenericFunction ufunc_erfc_loops[4]
  6556. cdef void *ufunc_erfc_ptr[8]
  6557. cdef void *ufunc_erfc_data[4]
  6558. cdef char ufunc_erfc_types[8]
  6559. cdef char *ufunc_erfc_doc = (
  6560. "erfc(x, out=None)\n"
  6561. "\n"
  6562. "Complementary error function, ``1 - erf(x)``.\n"
  6563. "\n"
  6564. "Parameters\n"
  6565. "----------\n"
  6566. "x : array_like\n"
  6567. " Real or complex valued argument\n"
  6568. "out : ndarray, optional\n"
  6569. " Optional output array for the function results\n"
  6570. "\n"
  6571. "Returns\n"
  6572. "-------\n"
  6573. "scalar or ndarray\n"
  6574. " Values of the complementary error function\n"
  6575. "\n"
  6576. "See Also\n"
  6577. "--------\n"
  6578. "erf, erfi, erfcx, dawsn, wofz\n"
  6579. "\n"
  6580. "References\n"
  6581. "----------\n"
  6582. ".. [1] Steven G. Johnson, Faddeeva W function implementation.\n"
  6583. " http://ab-initio.mit.edu/Faddeeva\n"
  6584. "\n"
  6585. "Examples\n"
  6586. "--------\n"
  6587. ">>> import numpy as np\n"
  6588. ">>> from scipy import special\n"
  6589. ">>> import matplotlib.pyplot as plt\n"
  6590. ">>> x = np.linspace(-3, 3)\n"
  6591. ">>> plt.plot(x, special.erfc(x))\n"
  6592. ">>> plt.xlabel('$x$')\n"
  6593. ">>> plt.ylabel('$erfc(x)$')\n"
  6594. ">>> plt.show()")
  6595. ufunc_erfc_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6596. ufunc_erfc_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6597. ufunc_erfc_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  6598. ufunc_erfc_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  6599. ufunc_erfc_types[0] = <char>NPY_FLOAT
  6600. ufunc_erfc_types[1] = <char>NPY_FLOAT
  6601. ufunc_erfc_types[2] = <char>NPY_DOUBLE
  6602. ufunc_erfc_types[3] = <char>NPY_DOUBLE
  6603. ufunc_erfc_types[4] = <char>NPY_CFLOAT
  6604. ufunc_erfc_types[5] = <char>NPY_CFLOAT
  6605. ufunc_erfc_types[6] = <char>NPY_CDOUBLE
  6606. ufunc_erfc_types[7] = <char>NPY_CDOUBLE
  6607. ufunc_erfc_ptr[2*0] = <void*>_func_erfc
  6608. ufunc_erfc_ptr[2*0+1] = <void*>(<char*>"erfc")
  6609. ufunc_erfc_ptr[2*1] = <void*>_func_erfc
  6610. ufunc_erfc_ptr[2*1+1] = <void*>(<char*>"erfc")
  6611. ufunc_erfc_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfc_complex
  6612. ufunc_erfc_ptr[2*2+1] = <void*>(<char*>"erfc")
  6613. ufunc_erfc_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfc_complex
  6614. ufunc_erfc_ptr[2*3+1] = <void*>(<char*>"erfc")
  6615. ufunc_erfc_data[0] = &ufunc_erfc_ptr[2*0]
  6616. ufunc_erfc_data[1] = &ufunc_erfc_ptr[2*1]
  6617. ufunc_erfc_data[2] = &ufunc_erfc_ptr[2*2]
  6618. ufunc_erfc_data[3] = &ufunc_erfc_ptr[2*3]
  6619. erfc = np.PyUFunc_FromFuncAndData(ufunc_erfc_loops, ufunc_erfc_data, ufunc_erfc_types, 4, 1, 1, 0, "erfc", ufunc_erfc_doc, 0)
  6620. cdef np.PyUFuncGenericFunction ufunc_erfcinv_loops[2]
  6621. cdef void *ufunc_erfcinv_ptr[4]
  6622. cdef void *ufunc_erfcinv_data[2]
  6623. cdef char ufunc_erfcinv_types[4]
  6624. cdef char *ufunc_erfcinv_doc = (
  6625. "erfcinv(y, out=None)\n"
  6626. "\n"
  6627. "Inverse of the complementary error function.\n"
  6628. "\n"
  6629. "Computes the inverse of the complementary error function.\n"
  6630. "\n"
  6631. "In the complex domain, there is no unique complex number w satisfying\n"
  6632. "erfc(w)=z. This indicates a true inverse function would be multivalued.\n"
  6633. "When the domain restricts to the real, 0 < x < 2, there is a unique real\n"
  6634. "number satisfying erfc(erfcinv(x)) = erfcinv(erfc(x)).\n"
  6635. "\n"
  6636. "It is related to inverse of the error function by erfcinv(1-x) = erfinv(x)\n"
  6637. "\n"
  6638. "Parameters\n"
  6639. "----------\n"
  6640. "y : ndarray\n"
  6641. " Argument at which to evaluate. Domain: [0, 2]\n"
  6642. "out : ndarray, optional\n"
  6643. " Optional output array for the function values\n"
  6644. "\n"
  6645. "Returns\n"
  6646. "-------\n"
  6647. "erfcinv : scalar or ndarray\n"
  6648. " The inverse of erfc of y, element-wise\n"
  6649. "\n"
  6650. "See Also\n"
  6651. "--------\n"
  6652. "erf : Error function of a complex argument\n"
  6653. "erfc : Complementary error function, ``1 - erf(x)``\n"
  6654. "erfinv : Inverse of the error function\n"
  6655. "\n"
  6656. "Examples\n"
  6657. "--------\n"
  6658. ">>> import numpy as np\n"
  6659. ">>> import matplotlib.pyplot as plt\n"
  6660. ">>> from scipy.special import erfcinv\n"
  6661. "\n"
  6662. ">>> erfcinv(0.5)\n"
  6663. "0.4769362762044699\n"
  6664. "\n"
  6665. ">>> y = np.linspace(0.0, 2.0, num=11)\n"
  6666. ">>> erfcinv(y)\n"
  6667. "array([ inf, 0.9061938 , 0.59511608, 0.37080716, 0.17914345,\n"
  6668. " -0. , -0.17914345, -0.37080716, -0.59511608, -0.9061938 ,\n"
  6669. " -inf])\n"
  6670. "\n"
  6671. "Plot the function:\n"
  6672. "\n"
  6673. ">>> y = np.linspace(0, 2, 200)\n"
  6674. ">>> fig, ax = plt.subplots()\n"
  6675. ">>> ax.plot(y, erfcinv(y))\n"
  6676. ">>> ax.grid(True)\n"
  6677. ">>> ax.set_xlabel('y')\n"
  6678. ">>> ax.set_title('erfcinv(y)')\n"
  6679. ">>> plt.show()")
  6680. ufunc_erfcinv_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6681. ufunc_erfcinv_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6682. ufunc_erfcinv_types[0] = <char>NPY_FLOAT
  6683. ufunc_erfcinv_types[1] = <char>NPY_FLOAT
  6684. ufunc_erfcinv_types[2] = <char>NPY_DOUBLE
  6685. ufunc_erfcinv_types[3] = <char>NPY_DOUBLE
  6686. ufunc_erfcinv_ptr[2*0] = <void*>_func_erfcinv
  6687. ufunc_erfcinv_ptr[2*0+1] = <void*>(<char*>"erfcinv")
  6688. ufunc_erfcinv_ptr[2*1] = <void*>_func_erfcinv
  6689. ufunc_erfcinv_ptr[2*1+1] = <void*>(<char*>"erfcinv")
  6690. ufunc_erfcinv_data[0] = &ufunc_erfcinv_ptr[2*0]
  6691. ufunc_erfcinv_data[1] = &ufunc_erfcinv_ptr[2*1]
  6692. erfcinv = np.PyUFunc_FromFuncAndData(ufunc_erfcinv_loops, ufunc_erfcinv_data, ufunc_erfcinv_types, 2, 1, 1, 0, "erfcinv", ufunc_erfcinv_doc, 0)
  6693. cdef np.PyUFuncGenericFunction ufunc_erfcx_loops[4]
  6694. cdef void *ufunc_erfcx_ptr[8]
  6695. cdef void *ufunc_erfcx_data[4]
  6696. cdef char ufunc_erfcx_types[8]
  6697. cdef char *ufunc_erfcx_doc = (
  6698. "erfcx(x, out=None)\n"
  6699. "\n"
  6700. "Scaled complementary error function, ``exp(x**2) * erfc(x)``.\n"
  6701. "\n"
  6702. "Parameters\n"
  6703. "----------\n"
  6704. "x : array_like\n"
  6705. " Real or complex valued argument\n"
  6706. "out : ndarray, optional\n"
  6707. " Optional output array for the function results\n"
  6708. "\n"
  6709. "Returns\n"
  6710. "-------\n"
  6711. "scalar or ndarray\n"
  6712. " Values of the scaled complementary error function\n"
  6713. "\n"
  6714. "\n"
  6715. "See Also\n"
  6716. "--------\n"
  6717. "erf, erfc, erfi, dawsn, wofz\n"
  6718. "\n"
  6719. "Notes\n"
  6720. "-----\n"
  6721. "\n"
  6722. ".. versionadded:: 0.12.0\n"
  6723. "\n"
  6724. "References\n"
  6725. "----------\n"
  6726. ".. [1] Steven G. Johnson, Faddeeva W function implementation.\n"
  6727. " http://ab-initio.mit.edu/Faddeeva\n"
  6728. "\n"
  6729. "Examples\n"
  6730. "--------\n"
  6731. ">>> import numpy as np\n"
  6732. ">>> from scipy import special\n"
  6733. ">>> import matplotlib.pyplot as plt\n"
  6734. ">>> x = np.linspace(-3, 3)\n"
  6735. ">>> plt.plot(x, special.erfcx(x))\n"
  6736. ">>> plt.xlabel('$x$')\n"
  6737. ">>> plt.ylabel('$erfcx(x)$')\n"
  6738. ">>> plt.show()")
  6739. ufunc_erfcx_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6740. ufunc_erfcx_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6741. ufunc_erfcx_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  6742. ufunc_erfcx_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  6743. ufunc_erfcx_types[0] = <char>NPY_FLOAT
  6744. ufunc_erfcx_types[1] = <char>NPY_FLOAT
  6745. ufunc_erfcx_types[2] = <char>NPY_DOUBLE
  6746. ufunc_erfcx_types[3] = <char>NPY_DOUBLE
  6747. ufunc_erfcx_types[4] = <char>NPY_CFLOAT
  6748. ufunc_erfcx_types[5] = <char>NPY_CFLOAT
  6749. ufunc_erfcx_types[6] = <char>NPY_CDOUBLE
  6750. ufunc_erfcx_types[7] = <char>NPY_CDOUBLE
  6751. ufunc_erfcx_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfcx
  6752. ufunc_erfcx_ptr[2*0+1] = <void*>(<char*>"erfcx")
  6753. ufunc_erfcx_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfcx
  6754. ufunc_erfcx_ptr[2*1+1] = <void*>(<char*>"erfcx")
  6755. ufunc_erfcx_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfcx_complex
  6756. ufunc_erfcx_ptr[2*2+1] = <void*>(<char*>"erfcx")
  6757. ufunc_erfcx_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfcx_complex
  6758. ufunc_erfcx_ptr[2*3+1] = <void*>(<char*>"erfcx")
  6759. ufunc_erfcx_data[0] = &ufunc_erfcx_ptr[2*0]
  6760. ufunc_erfcx_data[1] = &ufunc_erfcx_ptr[2*1]
  6761. ufunc_erfcx_data[2] = &ufunc_erfcx_ptr[2*2]
  6762. ufunc_erfcx_data[3] = &ufunc_erfcx_ptr[2*3]
  6763. erfcx = np.PyUFunc_FromFuncAndData(ufunc_erfcx_loops, ufunc_erfcx_data, ufunc_erfcx_types, 4, 1, 1, 0, "erfcx", ufunc_erfcx_doc, 0)
  6764. cdef np.PyUFuncGenericFunction ufunc_erfi_loops[4]
  6765. cdef void *ufunc_erfi_ptr[8]
  6766. cdef void *ufunc_erfi_data[4]
  6767. cdef char ufunc_erfi_types[8]
  6768. cdef char *ufunc_erfi_doc = (
  6769. "erfi(z, out=None)\n"
  6770. "\n"
  6771. "Imaginary error function, ``-i erf(i z)``.\n"
  6772. "\n"
  6773. "Parameters\n"
  6774. "----------\n"
  6775. "z : array_like\n"
  6776. " Real or complex valued argument\n"
  6777. "out : ndarray, optional\n"
  6778. " Optional output array for the function results\n"
  6779. "\n"
  6780. "Returns\n"
  6781. "-------\n"
  6782. "scalar or ndarray\n"
  6783. " Values of the imaginary error function\n"
  6784. "\n"
  6785. "See Also\n"
  6786. "--------\n"
  6787. "erf, erfc, erfcx, dawsn, wofz\n"
  6788. "\n"
  6789. "Notes\n"
  6790. "-----\n"
  6791. "\n"
  6792. ".. versionadded:: 0.12.0\n"
  6793. "\n"
  6794. "References\n"
  6795. "----------\n"
  6796. ".. [1] Steven G. Johnson, Faddeeva W function implementation.\n"
  6797. " http://ab-initio.mit.edu/Faddeeva\n"
  6798. "\n"
  6799. "Examples\n"
  6800. "--------\n"
  6801. ">>> import numpy as np\n"
  6802. ">>> from scipy import special\n"
  6803. ">>> import matplotlib.pyplot as plt\n"
  6804. ">>> x = np.linspace(-3, 3)\n"
  6805. ">>> plt.plot(x, special.erfi(x))\n"
  6806. ">>> plt.xlabel('$x$')\n"
  6807. ">>> plt.ylabel('$erfi(x)$')\n"
  6808. ">>> plt.show()")
  6809. ufunc_erfi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  6810. ufunc_erfi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6811. ufunc_erfi_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  6812. ufunc_erfi_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  6813. ufunc_erfi_types[0] = <char>NPY_FLOAT
  6814. ufunc_erfi_types[1] = <char>NPY_FLOAT
  6815. ufunc_erfi_types[2] = <char>NPY_DOUBLE
  6816. ufunc_erfi_types[3] = <char>NPY_DOUBLE
  6817. ufunc_erfi_types[4] = <char>NPY_CFLOAT
  6818. ufunc_erfi_types[5] = <char>NPY_CFLOAT
  6819. ufunc_erfi_types[6] = <char>NPY_CDOUBLE
  6820. ufunc_erfi_types[7] = <char>NPY_CDOUBLE
  6821. ufunc_erfi_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfi
  6822. ufunc_erfi_ptr[2*0+1] = <void*>(<char*>"erfi")
  6823. ufunc_erfi_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfi
  6824. ufunc_erfi_ptr[2*1+1] = <void*>(<char*>"erfi")
  6825. ufunc_erfi_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfi_complex
  6826. ufunc_erfi_ptr[2*2+1] = <void*>(<char*>"erfi")
  6827. ufunc_erfi_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_erfi_complex
  6828. ufunc_erfi_ptr[2*3+1] = <void*>(<char*>"erfi")
  6829. ufunc_erfi_data[0] = &ufunc_erfi_ptr[2*0]
  6830. ufunc_erfi_data[1] = &ufunc_erfi_ptr[2*1]
  6831. ufunc_erfi_data[2] = &ufunc_erfi_ptr[2*2]
  6832. ufunc_erfi_data[3] = &ufunc_erfi_ptr[2*3]
  6833. erfi = np.PyUFunc_FromFuncAndData(ufunc_erfi_loops, ufunc_erfi_data, ufunc_erfi_types, 4, 1, 1, 0, "erfi", ufunc_erfi_doc, 0)
  6834. cdef np.PyUFuncGenericFunction ufunc_erfinv_loops[2]
  6835. cdef void *ufunc_erfinv_ptr[4]
  6836. cdef void *ufunc_erfinv_data[2]
  6837. cdef char ufunc_erfinv_types[4]
  6838. cdef char *ufunc_erfinv_doc = (
  6839. "erfinv(y, out=None)\n"
  6840. "\n"
  6841. "Inverse of the error function.\n"
  6842. "\n"
  6843. "Computes the inverse of the error function.\n"
  6844. "\n"
  6845. "In the complex domain, there is no unique complex number w satisfying\n"
  6846. "erf(w)=z. This indicates a true inverse function would be multivalued.\n"
  6847. "When the domain restricts to the real, -1 < x < 1, there is a unique real\n"
  6848. "number satisfying erf(erfinv(x)) = x.\n"
  6849. "\n"
  6850. "Parameters\n"
  6851. "----------\n"
  6852. "y : ndarray\n"
  6853. " Argument at which to evaluate. Domain: [-1, 1]\n"
  6854. "out : ndarray, optional\n"
  6855. " Optional output array for the function values\n"
  6856. "\n"
  6857. "Returns\n"
  6858. "-------\n"
  6859. "erfinv : scalar or ndarray\n"
  6860. " The inverse of erf of y, element-wise\n"
  6861. "\n"
  6862. "See Also\n"
  6863. "--------\n"
  6864. "erf : Error function of a complex argument\n"
  6865. "erfc : Complementary error function, ``1 - erf(x)``\n"
  6866. "erfcinv : Inverse of the complementary error function\n"
  6867. "\n"
  6868. "Examples\n"
  6869. "--------\n"
  6870. ">>> import numpy as np\n"
  6871. ">>> import matplotlib.pyplot as plt\n"
  6872. ">>> from scipy.special import erfinv, erf\n"
  6873. "\n"
  6874. ">>> erfinv(0.5)\n"
  6875. "0.4769362762044699\n"
  6876. "\n"
  6877. ">>> y = np.linspace(-1.0, 1.0, num=9)\n"
  6878. ">>> x = erfinv(y)\n"
  6879. ">>> x\n"
  6880. "array([ -inf, -0.81341985, -0.47693628, -0.22531206, 0. ,\n"
  6881. " 0.22531206, 0.47693628, 0.81341985, inf])\n"
  6882. "\n"
  6883. "Verify that ``erf(erfinv(y))`` is ``y``.\n"
  6884. "\n"
  6885. ">>> erf(x)\n"
  6886. "array([-1. , -0.75, -0.5 , -0.25, 0. , 0.25, 0.5 , 0.75, 1. ])\n"
  6887. "\n"
  6888. "Plot the function:\n"
  6889. "\n"
  6890. ">>> y = np.linspace(-1, 1, 200)\n"
  6891. ">>> fig, ax = plt.subplots()\n"
  6892. ">>> ax.plot(y, erfinv(y))\n"
  6893. ">>> ax.grid(True)\n"
  6894. ">>> ax.set_xlabel('y')\n"
  6895. ">>> ax.set_title('erfinv(y)')\n"
  6896. ">>> plt.show()")
  6897. ufunc_erfinv_loops[0] = <np.PyUFuncGenericFunction>loop_f_f__As_f_f
  6898. ufunc_erfinv_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  6899. ufunc_erfinv_types[0] = <char>NPY_FLOAT
  6900. ufunc_erfinv_types[1] = <char>NPY_FLOAT
  6901. ufunc_erfinv_types[2] = <char>NPY_DOUBLE
  6902. ufunc_erfinv_types[3] = <char>NPY_DOUBLE
  6903. ufunc_erfinv_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_erfinv_float
  6904. ufunc_erfinv_ptr[2*0+1] = <void*>(<char*>"erfinv")
  6905. ufunc_erfinv_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_erfinv_double
  6906. ufunc_erfinv_ptr[2*1+1] = <void*>(<char*>"erfinv")
  6907. ufunc_erfinv_data[0] = &ufunc_erfinv_ptr[2*0]
  6908. ufunc_erfinv_data[1] = &ufunc_erfinv_ptr[2*1]
  6909. erfinv = np.PyUFunc_FromFuncAndData(ufunc_erfinv_loops, ufunc_erfinv_data, ufunc_erfinv_types, 2, 1, 1, 0, "erfinv", ufunc_erfinv_doc, 0)
  6910. cdef np.PyUFuncGenericFunction ufunc_eval_chebyc_loops[5]
  6911. cdef void *ufunc_eval_chebyc_ptr[10]
  6912. cdef void *ufunc_eval_chebyc_data[5]
  6913. cdef char ufunc_eval_chebyc_types[15]
  6914. cdef char *ufunc_eval_chebyc_doc = (
  6915. "eval_chebyc(n, x, out=None)\n"
  6916. "\n"
  6917. "Evaluate Chebyshev polynomial of the first kind on [-2, 2] at a\n"
  6918. "point.\n"
  6919. "\n"
  6920. "These polynomials are defined as\n"
  6921. "\n"
  6922. ".. math::\n"
  6923. "\n"
  6924. " C_n(x) = 2 T_n(x/2)\n"
  6925. "\n"
  6926. "where :math:`T_n` is a Chebyshev polynomial of the first kind. See\n"
  6927. "22.5.11 in [AS]_ for details.\n"
  6928. "\n"
  6929. "Parameters\n"
  6930. "----------\n"
  6931. "n : array_like\n"
  6932. " Degree of the polynomial. If not an integer, the result is\n"
  6933. " determined via the relation to `eval_chebyt`.\n"
  6934. "x : array_like\n"
  6935. " Points at which to evaluate the Chebyshev polynomial\n"
  6936. "out : ndarray, optional\n"
  6937. " Optional output array for the function values\n"
  6938. "\n"
  6939. "Returns\n"
  6940. "-------\n"
  6941. "C : scalar or ndarray\n"
  6942. " Values of the Chebyshev polynomial\n"
  6943. "\n"
  6944. "See Also\n"
  6945. "--------\n"
  6946. "roots_chebyc : roots and quadrature weights of Chebyshev\n"
  6947. " polynomials of the first kind on [-2, 2]\n"
  6948. "chebyc : Chebyshev polynomial object\n"
  6949. "numpy.polynomial.chebyshev.Chebyshev : Chebyshev series\n"
  6950. "eval_chebyt : evaluate Chebycshev polynomials of the first kind\n"
  6951. "\n"
  6952. "References\n"
  6953. "----------\n"
  6954. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  6955. " Handbook of Mathematical Functions with Formulas,\n"
  6956. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  6957. "\n"
  6958. "Examples\n"
  6959. "--------\n"
  6960. ">>> import numpy as np\n"
  6961. ">>> import scipy.special as sc\n"
  6962. "\n"
  6963. "They are a scaled version of the Chebyshev polynomials of the\n"
  6964. "first kind.\n"
  6965. "\n"
  6966. ">>> x = np.linspace(-2, 2, 6)\n"
  6967. ">>> sc.eval_chebyc(3, x)\n"
  6968. "array([-2. , 1.872, 1.136, -1.136, -1.872, 2. ])\n"
  6969. ">>> 2 * sc.eval_chebyt(3, x / 2)\n"
  6970. "array([-2. , 1.872, 1.136, -1.136, -1.872, 2. ])")
  6971. ufunc_eval_chebyc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  6972. ufunc_eval_chebyc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  6973. ufunc_eval_chebyc_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  6974. ufunc_eval_chebyc_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  6975. ufunc_eval_chebyc_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  6976. ufunc_eval_chebyc_types[0] = <char>NPY_LONG
  6977. ufunc_eval_chebyc_types[1] = <char>NPY_DOUBLE
  6978. ufunc_eval_chebyc_types[2] = <char>NPY_DOUBLE
  6979. ufunc_eval_chebyc_types[3] = <char>NPY_FLOAT
  6980. ufunc_eval_chebyc_types[4] = <char>NPY_FLOAT
  6981. ufunc_eval_chebyc_types[5] = <char>NPY_FLOAT
  6982. ufunc_eval_chebyc_types[6] = <char>NPY_FLOAT
  6983. ufunc_eval_chebyc_types[7] = <char>NPY_CFLOAT
  6984. ufunc_eval_chebyc_types[8] = <char>NPY_CFLOAT
  6985. ufunc_eval_chebyc_types[9] = <char>NPY_DOUBLE
  6986. ufunc_eval_chebyc_types[10] = <char>NPY_DOUBLE
  6987. ufunc_eval_chebyc_types[11] = <char>NPY_DOUBLE
  6988. ufunc_eval_chebyc_types[12] = <char>NPY_DOUBLE
  6989. ufunc_eval_chebyc_types[13] = <char>NPY_CDOUBLE
  6990. ufunc_eval_chebyc_types[14] = <char>NPY_CDOUBLE
  6991. ufunc_eval_chebyc_ptr[2*0] = <void*>_func_eval_chebyc_l
  6992. ufunc_eval_chebyc_ptr[2*0+1] = <void*>(<char*>"eval_chebyc")
  6993. ufunc_eval_chebyc_ptr[2*1] = <void*>_func_eval_chebyc[double]
  6994. ufunc_eval_chebyc_ptr[2*1+1] = <void*>(<char*>"eval_chebyc")
  6995. ufunc_eval_chebyc_ptr[2*2] = <void*>_func_eval_chebyc[double_complex]
  6996. ufunc_eval_chebyc_ptr[2*2+1] = <void*>(<char*>"eval_chebyc")
  6997. ufunc_eval_chebyc_ptr[2*3] = <void*>_func_eval_chebyc[double]
  6998. ufunc_eval_chebyc_ptr[2*3+1] = <void*>(<char*>"eval_chebyc")
  6999. ufunc_eval_chebyc_ptr[2*4] = <void*>_func_eval_chebyc[double_complex]
  7000. ufunc_eval_chebyc_ptr[2*4+1] = <void*>(<char*>"eval_chebyc")
  7001. ufunc_eval_chebyc_data[0] = &ufunc_eval_chebyc_ptr[2*0]
  7002. ufunc_eval_chebyc_data[1] = &ufunc_eval_chebyc_ptr[2*1]
  7003. ufunc_eval_chebyc_data[2] = &ufunc_eval_chebyc_ptr[2*2]
  7004. ufunc_eval_chebyc_data[3] = &ufunc_eval_chebyc_ptr[2*3]
  7005. ufunc_eval_chebyc_data[4] = &ufunc_eval_chebyc_ptr[2*4]
  7006. eval_chebyc = np.PyUFunc_FromFuncAndData(ufunc_eval_chebyc_loops, ufunc_eval_chebyc_data, ufunc_eval_chebyc_types, 5, 2, 1, 0, "eval_chebyc", ufunc_eval_chebyc_doc, 0)
  7007. cdef np.PyUFuncGenericFunction ufunc_eval_chebys_loops[5]
  7008. cdef void *ufunc_eval_chebys_ptr[10]
  7009. cdef void *ufunc_eval_chebys_data[5]
  7010. cdef char ufunc_eval_chebys_types[15]
  7011. cdef char *ufunc_eval_chebys_doc = (
  7012. "eval_chebys(n, x, out=None)\n"
  7013. "\n"
  7014. "Evaluate Chebyshev polynomial of the second kind on [-2, 2] at a\n"
  7015. "point.\n"
  7016. "\n"
  7017. "These polynomials are defined as\n"
  7018. "\n"
  7019. ".. math::\n"
  7020. "\n"
  7021. " S_n(x) = U_n(x/2)\n"
  7022. "\n"
  7023. "where :math:`U_n` is a Chebyshev polynomial of the second\n"
  7024. "kind. See 22.5.13 in [AS]_ for details.\n"
  7025. "\n"
  7026. "Parameters\n"
  7027. "----------\n"
  7028. "n : array_like\n"
  7029. " Degree of the polynomial. If not an integer, the result is\n"
  7030. " determined via the relation to `eval_chebyu`.\n"
  7031. "x : array_like\n"
  7032. " Points at which to evaluate the Chebyshev polynomial\n"
  7033. "out : ndarray, optional\n"
  7034. " Optional output array for the function values\n"
  7035. "\n"
  7036. "Returns\n"
  7037. "-------\n"
  7038. "S : scalar or ndarray\n"
  7039. " Values of the Chebyshev polynomial\n"
  7040. "\n"
  7041. "See Also\n"
  7042. "--------\n"
  7043. "roots_chebys : roots and quadrature weights of Chebyshev\n"
  7044. " polynomials of the second kind on [-2, 2]\n"
  7045. "chebys : Chebyshev polynomial object\n"
  7046. "eval_chebyu : evaluate Chebyshev polynomials of the second kind\n"
  7047. "\n"
  7048. "References\n"
  7049. "----------\n"
  7050. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7051. " Handbook of Mathematical Functions with Formulas,\n"
  7052. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  7053. "\n"
  7054. "Examples\n"
  7055. "--------\n"
  7056. ">>> import numpy as np\n"
  7057. ">>> import scipy.special as sc\n"
  7058. "\n"
  7059. "They are a scaled version of the Chebyshev polynomials of the\n"
  7060. "second kind.\n"
  7061. "\n"
  7062. ">>> x = np.linspace(-2, 2, 6)\n"
  7063. ">>> sc.eval_chebys(3, x)\n"
  7064. "array([-4. , 0.672, 0.736, -0.736, -0.672, 4. ])\n"
  7065. ">>> sc.eval_chebyu(3, x / 2)\n"
  7066. "array([-4. , 0.672, 0.736, -0.736, -0.672, 4. ])")
  7067. ufunc_eval_chebys_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7068. ufunc_eval_chebys_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7069. ufunc_eval_chebys_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7070. ufunc_eval_chebys_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7071. ufunc_eval_chebys_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7072. ufunc_eval_chebys_types[0] = <char>NPY_LONG
  7073. ufunc_eval_chebys_types[1] = <char>NPY_DOUBLE
  7074. ufunc_eval_chebys_types[2] = <char>NPY_DOUBLE
  7075. ufunc_eval_chebys_types[3] = <char>NPY_FLOAT
  7076. ufunc_eval_chebys_types[4] = <char>NPY_FLOAT
  7077. ufunc_eval_chebys_types[5] = <char>NPY_FLOAT
  7078. ufunc_eval_chebys_types[6] = <char>NPY_FLOAT
  7079. ufunc_eval_chebys_types[7] = <char>NPY_CFLOAT
  7080. ufunc_eval_chebys_types[8] = <char>NPY_CFLOAT
  7081. ufunc_eval_chebys_types[9] = <char>NPY_DOUBLE
  7082. ufunc_eval_chebys_types[10] = <char>NPY_DOUBLE
  7083. ufunc_eval_chebys_types[11] = <char>NPY_DOUBLE
  7084. ufunc_eval_chebys_types[12] = <char>NPY_DOUBLE
  7085. ufunc_eval_chebys_types[13] = <char>NPY_CDOUBLE
  7086. ufunc_eval_chebys_types[14] = <char>NPY_CDOUBLE
  7087. ufunc_eval_chebys_ptr[2*0] = <void*>_func_eval_chebys_l
  7088. ufunc_eval_chebys_ptr[2*0+1] = <void*>(<char*>"eval_chebys")
  7089. ufunc_eval_chebys_ptr[2*1] = <void*>_func_eval_chebys[double]
  7090. ufunc_eval_chebys_ptr[2*1+1] = <void*>(<char*>"eval_chebys")
  7091. ufunc_eval_chebys_ptr[2*2] = <void*>_func_eval_chebys[double_complex]
  7092. ufunc_eval_chebys_ptr[2*2+1] = <void*>(<char*>"eval_chebys")
  7093. ufunc_eval_chebys_ptr[2*3] = <void*>_func_eval_chebys[double]
  7094. ufunc_eval_chebys_ptr[2*3+1] = <void*>(<char*>"eval_chebys")
  7095. ufunc_eval_chebys_ptr[2*4] = <void*>_func_eval_chebys[double_complex]
  7096. ufunc_eval_chebys_ptr[2*4+1] = <void*>(<char*>"eval_chebys")
  7097. ufunc_eval_chebys_data[0] = &ufunc_eval_chebys_ptr[2*0]
  7098. ufunc_eval_chebys_data[1] = &ufunc_eval_chebys_ptr[2*1]
  7099. ufunc_eval_chebys_data[2] = &ufunc_eval_chebys_ptr[2*2]
  7100. ufunc_eval_chebys_data[3] = &ufunc_eval_chebys_ptr[2*3]
  7101. ufunc_eval_chebys_data[4] = &ufunc_eval_chebys_ptr[2*4]
  7102. eval_chebys = np.PyUFunc_FromFuncAndData(ufunc_eval_chebys_loops, ufunc_eval_chebys_data, ufunc_eval_chebys_types, 5, 2, 1, 0, "eval_chebys", ufunc_eval_chebys_doc, 0)
  7103. cdef np.PyUFuncGenericFunction ufunc_eval_chebyt_loops[5]
  7104. cdef void *ufunc_eval_chebyt_ptr[10]
  7105. cdef void *ufunc_eval_chebyt_data[5]
  7106. cdef char ufunc_eval_chebyt_types[15]
  7107. cdef char *ufunc_eval_chebyt_doc = (
  7108. "eval_chebyt(n, x, out=None)\n"
  7109. "\n"
  7110. "Evaluate Chebyshev polynomial of the first kind at a point.\n"
  7111. "\n"
  7112. "The Chebyshev polynomials of the first kind can be defined via the\n"
  7113. "Gauss hypergeometric function :math:`{}_2F_1` as\n"
  7114. "\n"
  7115. ".. math::\n"
  7116. "\n"
  7117. " T_n(x) = {}_2F_1(n, -n; 1/2; (1 - x)/2).\n"
  7118. "\n"
  7119. "When :math:`n` is an integer the result is a polynomial of degree\n"
  7120. ":math:`n`. See 22.5.47 in [AS]_ for details.\n"
  7121. "\n"
  7122. "Parameters\n"
  7123. "----------\n"
  7124. "n : array_like\n"
  7125. " Degree of the polynomial. If not an integer, the result is\n"
  7126. " determined via the relation to the Gauss hypergeometric\n"
  7127. " function.\n"
  7128. "x : array_like\n"
  7129. " Points at which to evaluate the Chebyshev polynomial\n"
  7130. "out : ndarray, optional\n"
  7131. " Optional output array for the function values\n"
  7132. "\n"
  7133. "Returns\n"
  7134. "-------\n"
  7135. "T : scalar or ndarray\n"
  7136. " Values of the Chebyshev polynomial\n"
  7137. "\n"
  7138. "See Also\n"
  7139. "--------\n"
  7140. "roots_chebyt : roots and quadrature weights of Chebyshev\n"
  7141. " polynomials of the first kind\n"
  7142. "chebyu : Chebychev polynomial object\n"
  7143. "eval_chebyu : evaluate Chebyshev polynomials of the second kind\n"
  7144. "hyp2f1 : Gauss hypergeometric function\n"
  7145. "numpy.polynomial.chebyshev.Chebyshev : Chebyshev series\n"
  7146. "\n"
  7147. "Notes\n"
  7148. "-----\n"
  7149. "This routine is numerically stable for `x` in ``[-1, 1]`` at least\n"
  7150. "up to order ``10000``.\n"
  7151. "\n"
  7152. "References\n"
  7153. "----------\n"
  7154. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7155. " Handbook of Mathematical Functions with Formulas,\n"
  7156. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7157. ufunc_eval_chebyt_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7158. ufunc_eval_chebyt_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7159. ufunc_eval_chebyt_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7160. ufunc_eval_chebyt_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7161. ufunc_eval_chebyt_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7162. ufunc_eval_chebyt_types[0] = <char>NPY_LONG
  7163. ufunc_eval_chebyt_types[1] = <char>NPY_DOUBLE
  7164. ufunc_eval_chebyt_types[2] = <char>NPY_DOUBLE
  7165. ufunc_eval_chebyt_types[3] = <char>NPY_FLOAT
  7166. ufunc_eval_chebyt_types[4] = <char>NPY_FLOAT
  7167. ufunc_eval_chebyt_types[5] = <char>NPY_FLOAT
  7168. ufunc_eval_chebyt_types[6] = <char>NPY_FLOAT
  7169. ufunc_eval_chebyt_types[7] = <char>NPY_CFLOAT
  7170. ufunc_eval_chebyt_types[8] = <char>NPY_CFLOAT
  7171. ufunc_eval_chebyt_types[9] = <char>NPY_DOUBLE
  7172. ufunc_eval_chebyt_types[10] = <char>NPY_DOUBLE
  7173. ufunc_eval_chebyt_types[11] = <char>NPY_DOUBLE
  7174. ufunc_eval_chebyt_types[12] = <char>NPY_DOUBLE
  7175. ufunc_eval_chebyt_types[13] = <char>NPY_CDOUBLE
  7176. ufunc_eval_chebyt_types[14] = <char>NPY_CDOUBLE
  7177. ufunc_eval_chebyt_ptr[2*0] = <void*>_func_eval_chebyt_l
  7178. ufunc_eval_chebyt_ptr[2*0+1] = <void*>(<char*>"eval_chebyt")
  7179. ufunc_eval_chebyt_ptr[2*1] = <void*>_func_eval_chebyt[double]
  7180. ufunc_eval_chebyt_ptr[2*1+1] = <void*>(<char*>"eval_chebyt")
  7181. ufunc_eval_chebyt_ptr[2*2] = <void*>_func_eval_chebyt[double_complex]
  7182. ufunc_eval_chebyt_ptr[2*2+1] = <void*>(<char*>"eval_chebyt")
  7183. ufunc_eval_chebyt_ptr[2*3] = <void*>_func_eval_chebyt[double]
  7184. ufunc_eval_chebyt_ptr[2*3+1] = <void*>(<char*>"eval_chebyt")
  7185. ufunc_eval_chebyt_ptr[2*4] = <void*>_func_eval_chebyt[double_complex]
  7186. ufunc_eval_chebyt_ptr[2*4+1] = <void*>(<char*>"eval_chebyt")
  7187. ufunc_eval_chebyt_data[0] = &ufunc_eval_chebyt_ptr[2*0]
  7188. ufunc_eval_chebyt_data[1] = &ufunc_eval_chebyt_ptr[2*1]
  7189. ufunc_eval_chebyt_data[2] = &ufunc_eval_chebyt_ptr[2*2]
  7190. ufunc_eval_chebyt_data[3] = &ufunc_eval_chebyt_ptr[2*3]
  7191. ufunc_eval_chebyt_data[4] = &ufunc_eval_chebyt_ptr[2*4]
  7192. eval_chebyt = np.PyUFunc_FromFuncAndData(ufunc_eval_chebyt_loops, ufunc_eval_chebyt_data, ufunc_eval_chebyt_types, 5, 2, 1, 0, "eval_chebyt", ufunc_eval_chebyt_doc, 0)
  7193. cdef np.PyUFuncGenericFunction ufunc_eval_chebyu_loops[5]
  7194. cdef void *ufunc_eval_chebyu_ptr[10]
  7195. cdef void *ufunc_eval_chebyu_data[5]
  7196. cdef char ufunc_eval_chebyu_types[15]
  7197. cdef char *ufunc_eval_chebyu_doc = (
  7198. "eval_chebyu(n, x, out=None)\n"
  7199. "\n"
  7200. "Evaluate Chebyshev polynomial of the second kind at a point.\n"
  7201. "\n"
  7202. "The Chebyshev polynomials of the second kind can be defined via\n"
  7203. "the Gauss hypergeometric function :math:`{}_2F_1` as\n"
  7204. "\n"
  7205. ".. math::\n"
  7206. "\n"
  7207. " U_n(x) = (n + 1) {}_2F_1(-n, n + 2; 3/2; (1 - x)/2).\n"
  7208. "\n"
  7209. "When :math:`n` is an integer the result is a polynomial of degree\n"
  7210. ":math:`n`. See 22.5.48 in [AS]_ for details.\n"
  7211. "\n"
  7212. "Parameters\n"
  7213. "----------\n"
  7214. "n : array_like\n"
  7215. " Degree of the polynomial. If not an integer, the result is\n"
  7216. " determined via the relation to the Gauss hypergeometric\n"
  7217. " function.\n"
  7218. "x : array_like\n"
  7219. " Points at which to evaluate the Chebyshev polynomial\n"
  7220. "out : ndarray, optional\n"
  7221. " Optional output array for the function values\n"
  7222. "\n"
  7223. "Returns\n"
  7224. "-------\n"
  7225. "U : scalar or ndarray\n"
  7226. " Values of the Chebyshev polynomial\n"
  7227. "\n"
  7228. "See Also\n"
  7229. "--------\n"
  7230. "roots_chebyu : roots and quadrature weights of Chebyshev\n"
  7231. " polynomials of the second kind\n"
  7232. "chebyu : Chebyshev polynomial object\n"
  7233. "eval_chebyt : evaluate Chebyshev polynomials of the first kind\n"
  7234. "hyp2f1 : Gauss hypergeometric function\n"
  7235. "\n"
  7236. "References\n"
  7237. "----------\n"
  7238. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7239. " Handbook of Mathematical Functions with Formulas,\n"
  7240. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7241. ufunc_eval_chebyu_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7242. ufunc_eval_chebyu_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7243. ufunc_eval_chebyu_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7244. ufunc_eval_chebyu_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7245. ufunc_eval_chebyu_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7246. ufunc_eval_chebyu_types[0] = <char>NPY_LONG
  7247. ufunc_eval_chebyu_types[1] = <char>NPY_DOUBLE
  7248. ufunc_eval_chebyu_types[2] = <char>NPY_DOUBLE
  7249. ufunc_eval_chebyu_types[3] = <char>NPY_FLOAT
  7250. ufunc_eval_chebyu_types[4] = <char>NPY_FLOAT
  7251. ufunc_eval_chebyu_types[5] = <char>NPY_FLOAT
  7252. ufunc_eval_chebyu_types[6] = <char>NPY_FLOAT
  7253. ufunc_eval_chebyu_types[7] = <char>NPY_CFLOAT
  7254. ufunc_eval_chebyu_types[8] = <char>NPY_CFLOAT
  7255. ufunc_eval_chebyu_types[9] = <char>NPY_DOUBLE
  7256. ufunc_eval_chebyu_types[10] = <char>NPY_DOUBLE
  7257. ufunc_eval_chebyu_types[11] = <char>NPY_DOUBLE
  7258. ufunc_eval_chebyu_types[12] = <char>NPY_DOUBLE
  7259. ufunc_eval_chebyu_types[13] = <char>NPY_CDOUBLE
  7260. ufunc_eval_chebyu_types[14] = <char>NPY_CDOUBLE
  7261. ufunc_eval_chebyu_ptr[2*0] = <void*>_func_eval_chebyu_l
  7262. ufunc_eval_chebyu_ptr[2*0+1] = <void*>(<char*>"eval_chebyu")
  7263. ufunc_eval_chebyu_ptr[2*1] = <void*>_func_eval_chebyu[double]
  7264. ufunc_eval_chebyu_ptr[2*1+1] = <void*>(<char*>"eval_chebyu")
  7265. ufunc_eval_chebyu_ptr[2*2] = <void*>_func_eval_chebyu[double_complex]
  7266. ufunc_eval_chebyu_ptr[2*2+1] = <void*>(<char*>"eval_chebyu")
  7267. ufunc_eval_chebyu_ptr[2*3] = <void*>_func_eval_chebyu[double]
  7268. ufunc_eval_chebyu_ptr[2*3+1] = <void*>(<char*>"eval_chebyu")
  7269. ufunc_eval_chebyu_ptr[2*4] = <void*>_func_eval_chebyu[double_complex]
  7270. ufunc_eval_chebyu_ptr[2*4+1] = <void*>(<char*>"eval_chebyu")
  7271. ufunc_eval_chebyu_data[0] = &ufunc_eval_chebyu_ptr[2*0]
  7272. ufunc_eval_chebyu_data[1] = &ufunc_eval_chebyu_ptr[2*1]
  7273. ufunc_eval_chebyu_data[2] = &ufunc_eval_chebyu_ptr[2*2]
  7274. ufunc_eval_chebyu_data[3] = &ufunc_eval_chebyu_ptr[2*3]
  7275. ufunc_eval_chebyu_data[4] = &ufunc_eval_chebyu_ptr[2*4]
  7276. eval_chebyu = np.PyUFunc_FromFuncAndData(ufunc_eval_chebyu_loops, ufunc_eval_chebyu_data, ufunc_eval_chebyu_types, 5, 2, 1, 0, "eval_chebyu", ufunc_eval_chebyu_doc, 0)
  7277. cdef np.PyUFuncGenericFunction ufunc_eval_gegenbauer_loops[5]
  7278. cdef void *ufunc_eval_gegenbauer_ptr[10]
  7279. cdef void *ufunc_eval_gegenbauer_data[5]
  7280. cdef char ufunc_eval_gegenbauer_types[20]
  7281. cdef char *ufunc_eval_gegenbauer_doc = (
  7282. "eval_gegenbauer(n, alpha, x, out=None)\n"
  7283. "\n"
  7284. "Evaluate Gegenbauer polynomial at a point.\n"
  7285. "\n"
  7286. "The Gegenbauer polynomials can be defined via the Gauss\n"
  7287. "hypergeometric function :math:`{}_2F_1` as\n"
  7288. "\n"
  7289. ".. math::\n"
  7290. "\n"
  7291. " C_n^{(\\alpha)} = \\frac{(2\\alpha)_n}{\\Gamma(n + 1)}\n"
  7292. " {}_2F_1(-n, 2\\alpha + n; \\alpha + 1/2; (1 - z)/2).\n"
  7293. "\n"
  7294. "When :math:`n` is an integer the result is a polynomial of degree\n"
  7295. ":math:`n`. See 22.5.46 in [AS]_ for details.\n"
  7296. "\n"
  7297. "Parameters\n"
  7298. "----------\n"
  7299. "n : array_like\n"
  7300. " Degree of the polynomial. If not an integer, the result is\n"
  7301. " determined via the relation to the Gauss hypergeometric\n"
  7302. " function.\n"
  7303. "alpha : array_like\n"
  7304. " Parameter\n"
  7305. "x : array_like\n"
  7306. " Points at which to evaluate the Gegenbauer polynomial\n"
  7307. "out : ndarray, optional\n"
  7308. " Optional output array for the function values\n"
  7309. "\n"
  7310. "Returns\n"
  7311. "-------\n"
  7312. "C : scalar or ndarray\n"
  7313. " Values of the Gegenbauer polynomial\n"
  7314. "\n"
  7315. "See Also\n"
  7316. "--------\n"
  7317. "roots_gegenbauer : roots and quadrature weights of Gegenbauer\n"
  7318. " polynomials\n"
  7319. "gegenbauer : Gegenbauer polynomial object\n"
  7320. "hyp2f1 : Gauss hypergeometric function\n"
  7321. "\n"
  7322. "References\n"
  7323. "----------\n"
  7324. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7325. " Handbook of Mathematical Functions with Formulas,\n"
  7326. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7327. ufunc_eval_gegenbauer_loops[0] = <np.PyUFuncGenericFunction>loop_d_ldd__As_ldd_d
  7328. ufunc_eval_gegenbauer_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  7329. ufunc_eval_gegenbauer_loops[2] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ffF_F
  7330. ufunc_eval_gegenbauer_loops[3] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  7331. ufunc_eval_gegenbauer_loops[4] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ddD_D
  7332. ufunc_eval_gegenbauer_types[0] = <char>NPY_LONG
  7333. ufunc_eval_gegenbauer_types[1] = <char>NPY_DOUBLE
  7334. ufunc_eval_gegenbauer_types[2] = <char>NPY_DOUBLE
  7335. ufunc_eval_gegenbauer_types[3] = <char>NPY_DOUBLE
  7336. ufunc_eval_gegenbauer_types[4] = <char>NPY_FLOAT
  7337. ufunc_eval_gegenbauer_types[5] = <char>NPY_FLOAT
  7338. ufunc_eval_gegenbauer_types[6] = <char>NPY_FLOAT
  7339. ufunc_eval_gegenbauer_types[7] = <char>NPY_FLOAT
  7340. ufunc_eval_gegenbauer_types[8] = <char>NPY_FLOAT
  7341. ufunc_eval_gegenbauer_types[9] = <char>NPY_FLOAT
  7342. ufunc_eval_gegenbauer_types[10] = <char>NPY_CFLOAT
  7343. ufunc_eval_gegenbauer_types[11] = <char>NPY_CFLOAT
  7344. ufunc_eval_gegenbauer_types[12] = <char>NPY_DOUBLE
  7345. ufunc_eval_gegenbauer_types[13] = <char>NPY_DOUBLE
  7346. ufunc_eval_gegenbauer_types[14] = <char>NPY_DOUBLE
  7347. ufunc_eval_gegenbauer_types[15] = <char>NPY_DOUBLE
  7348. ufunc_eval_gegenbauer_types[16] = <char>NPY_DOUBLE
  7349. ufunc_eval_gegenbauer_types[17] = <char>NPY_DOUBLE
  7350. ufunc_eval_gegenbauer_types[18] = <char>NPY_CDOUBLE
  7351. ufunc_eval_gegenbauer_types[19] = <char>NPY_CDOUBLE
  7352. ufunc_eval_gegenbauer_ptr[2*0] = <void*>_func_eval_gegenbauer_l
  7353. ufunc_eval_gegenbauer_ptr[2*0+1] = <void*>(<char*>"eval_gegenbauer")
  7354. ufunc_eval_gegenbauer_ptr[2*1] = <void*>_func_eval_gegenbauer[double]
  7355. ufunc_eval_gegenbauer_ptr[2*1+1] = <void*>(<char*>"eval_gegenbauer")
  7356. ufunc_eval_gegenbauer_ptr[2*2] = <void*>_func_eval_gegenbauer[double_complex]
  7357. ufunc_eval_gegenbauer_ptr[2*2+1] = <void*>(<char*>"eval_gegenbauer")
  7358. ufunc_eval_gegenbauer_ptr[2*3] = <void*>_func_eval_gegenbauer[double]
  7359. ufunc_eval_gegenbauer_ptr[2*3+1] = <void*>(<char*>"eval_gegenbauer")
  7360. ufunc_eval_gegenbauer_ptr[2*4] = <void*>_func_eval_gegenbauer[double_complex]
  7361. ufunc_eval_gegenbauer_ptr[2*4+1] = <void*>(<char*>"eval_gegenbauer")
  7362. ufunc_eval_gegenbauer_data[0] = &ufunc_eval_gegenbauer_ptr[2*0]
  7363. ufunc_eval_gegenbauer_data[1] = &ufunc_eval_gegenbauer_ptr[2*1]
  7364. ufunc_eval_gegenbauer_data[2] = &ufunc_eval_gegenbauer_ptr[2*2]
  7365. ufunc_eval_gegenbauer_data[3] = &ufunc_eval_gegenbauer_ptr[2*3]
  7366. ufunc_eval_gegenbauer_data[4] = &ufunc_eval_gegenbauer_ptr[2*4]
  7367. eval_gegenbauer = np.PyUFunc_FromFuncAndData(ufunc_eval_gegenbauer_loops, ufunc_eval_gegenbauer_data, ufunc_eval_gegenbauer_types, 5, 3, 1, 0, "eval_gegenbauer", ufunc_eval_gegenbauer_doc, 0)
  7368. cdef np.PyUFuncGenericFunction ufunc_eval_genlaguerre_loops[5]
  7369. cdef void *ufunc_eval_genlaguerre_ptr[10]
  7370. cdef void *ufunc_eval_genlaguerre_data[5]
  7371. cdef char ufunc_eval_genlaguerre_types[20]
  7372. cdef char *ufunc_eval_genlaguerre_doc = (
  7373. "eval_genlaguerre(n, alpha, x, out=None)\n"
  7374. "\n"
  7375. "Evaluate generalized Laguerre polynomial at a point.\n"
  7376. "\n"
  7377. "The generalized Laguerre polynomials can be defined via the\n"
  7378. "confluent hypergeometric function :math:`{}_1F_1` as\n"
  7379. "\n"
  7380. ".. math::\n"
  7381. "\n"
  7382. " L_n^{(\\alpha)}(x) = \\binom{n + \\alpha}{n}\n"
  7383. " {}_1F_1(-n, \\alpha + 1, x).\n"
  7384. "\n"
  7385. "When :math:`n` is an integer the result is a polynomial of degree\n"
  7386. ":math:`n`. See 22.5.54 in [AS]_ for details. The Laguerre\n"
  7387. "polynomials are the special case where :math:`\\alpha = 0`.\n"
  7388. "\n"
  7389. "Parameters\n"
  7390. "----------\n"
  7391. "n : array_like\n"
  7392. " Degree of the polynomial. If not an integer, the result is\n"
  7393. " determined via the relation to the confluent hypergeometric\n"
  7394. " function.\n"
  7395. "alpha : array_like\n"
  7396. " Parameter; must have ``alpha > -1``\n"
  7397. "x : array_like\n"
  7398. " Points at which to evaluate the generalized Laguerre\n"
  7399. " polynomial\n"
  7400. "out : ndarray, optional\n"
  7401. " Optional output array for the function values\n"
  7402. "\n"
  7403. "Returns\n"
  7404. "-------\n"
  7405. "L : scalar or ndarray\n"
  7406. " Values of the generalized Laguerre polynomial\n"
  7407. "\n"
  7408. "See Also\n"
  7409. "--------\n"
  7410. "roots_genlaguerre : roots and quadrature weights of generalized\n"
  7411. " Laguerre polynomials\n"
  7412. "genlaguerre : generalized Laguerre polynomial object\n"
  7413. "hyp1f1 : confluent hypergeometric function\n"
  7414. "eval_laguerre : evaluate Laguerre polynomials\n"
  7415. "\n"
  7416. "References\n"
  7417. "----------\n"
  7418. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7419. " Handbook of Mathematical Functions with Formulas,\n"
  7420. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7421. ufunc_eval_genlaguerre_loops[0] = <np.PyUFuncGenericFunction>loop_d_ldd__As_ldd_d
  7422. ufunc_eval_genlaguerre_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  7423. ufunc_eval_genlaguerre_loops[2] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ffF_F
  7424. ufunc_eval_genlaguerre_loops[3] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  7425. ufunc_eval_genlaguerre_loops[4] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ddD_D
  7426. ufunc_eval_genlaguerre_types[0] = <char>NPY_LONG
  7427. ufunc_eval_genlaguerre_types[1] = <char>NPY_DOUBLE
  7428. ufunc_eval_genlaguerre_types[2] = <char>NPY_DOUBLE
  7429. ufunc_eval_genlaguerre_types[3] = <char>NPY_DOUBLE
  7430. ufunc_eval_genlaguerre_types[4] = <char>NPY_FLOAT
  7431. ufunc_eval_genlaguerre_types[5] = <char>NPY_FLOAT
  7432. ufunc_eval_genlaguerre_types[6] = <char>NPY_FLOAT
  7433. ufunc_eval_genlaguerre_types[7] = <char>NPY_FLOAT
  7434. ufunc_eval_genlaguerre_types[8] = <char>NPY_FLOAT
  7435. ufunc_eval_genlaguerre_types[9] = <char>NPY_FLOAT
  7436. ufunc_eval_genlaguerre_types[10] = <char>NPY_CFLOAT
  7437. ufunc_eval_genlaguerre_types[11] = <char>NPY_CFLOAT
  7438. ufunc_eval_genlaguerre_types[12] = <char>NPY_DOUBLE
  7439. ufunc_eval_genlaguerre_types[13] = <char>NPY_DOUBLE
  7440. ufunc_eval_genlaguerre_types[14] = <char>NPY_DOUBLE
  7441. ufunc_eval_genlaguerre_types[15] = <char>NPY_DOUBLE
  7442. ufunc_eval_genlaguerre_types[16] = <char>NPY_DOUBLE
  7443. ufunc_eval_genlaguerre_types[17] = <char>NPY_DOUBLE
  7444. ufunc_eval_genlaguerre_types[18] = <char>NPY_CDOUBLE
  7445. ufunc_eval_genlaguerre_types[19] = <char>NPY_CDOUBLE
  7446. ufunc_eval_genlaguerre_ptr[2*0] = <void*>_func_eval_genlaguerre_l
  7447. ufunc_eval_genlaguerre_ptr[2*0+1] = <void*>(<char*>"eval_genlaguerre")
  7448. ufunc_eval_genlaguerre_ptr[2*1] = <void*>_func_eval_genlaguerre[double]
  7449. ufunc_eval_genlaguerre_ptr[2*1+1] = <void*>(<char*>"eval_genlaguerre")
  7450. ufunc_eval_genlaguerre_ptr[2*2] = <void*>_func_eval_genlaguerre[double_complex]
  7451. ufunc_eval_genlaguerre_ptr[2*2+1] = <void*>(<char*>"eval_genlaguerre")
  7452. ufunc_eval_genlaguerre_ptr[2*3] = <void*>_func_eval_genlaguerre[double]
  7453. ufunc_eval_genlaguerre_ptr[2*3+1] = <void*>(<char*>"eval_genlaguerre")
  7454. ufunc_eval_genlaguerre_ptr[2*4] = <void*>_func_eval_genlaguerre[double_complex]
  7455. ufunc_eval_genlaguerre_ptr[2*4+1] = <void*>(<char*>"eval_genlaguerre")
  7456. ufunc_eval_genlaguerre_data[0] = &ufunc_eval_genlaguerre_ptr[2*0]
  7457. ufunc_eval_genlaguerre_data[1] = &ufunc_eval_genlaguerre_ptr[2*1]
  7458. ufunc_eval_genlaguerre_data[2] = &ufunc_eval_genlaguerre_ptr[2*2]
  7459. ufunc_eval_genlaguerre_data[3] = &ufunc_eval_genlaguerre_ptr[2*3]
  7460. ufunc_eval_genlaguerre_data[4] = &ufunc_eval_genlaguerre_ptr[2*4]
  7461. eval_genlaguerre = np.PyUFunc_FromFuncAndData(ufunc_eval_genlaguerre_loops, ufunc_eval_genlaguerre_data, ufunc_eval_genlaguerre_types, 5, 3, 1, 0, "eval_genlaguerre", ufunc_eval_genlaguerre_doc, 0)
  7462. cdef np.PyUFuncGenericFunction ufunc_eval_hermite_loops[1]
  7463. cdef void *ufunc_eval_hermite_ptr[2]
  7464. cdef void *ufunc_eval_hermite_data[1]
  7465. cdef char ufunc_eval_hermite_types[3]
  7466. cdef char *ufunc_eval_hermite_doc = (
  7467. "eval_hermite(n, x, out=None)\n"
  7468. "\n"
  7469. "Evaluate physicist's Hermite polynomial at a point.\n"
  7470. "\n"
  7471. "Defined by\n"
  7472. "\n"
  7473. ".. math::\n"
  7474. "\n"
  7475. " H_n(x) = (-1)^n e^{x^2} \\frac{d^n}{dx^n} e^{-x^2};\n"
  7476. "\n"
  7477. ":math:`H_n` is a polynomial of degree :math:`n`. See 22.11.7 in\n"
  7478. "[AS]_ for details.\n"
  7479. "\n"
  7480. "Parameters\n"
  7481. "----------\n"
  7482. "n : array_like\n"
  7483. " Degree of the polynomial\n"
  7484. "x : array_like\n"
  7485. " Points at which to evaluate the Hermite polynomial\n"
  7486. "out : ndarray, optional\n"
  7487. " Optional output array for the function values\n"
  7488. "\n"
  7489. "Returns\n"
  7490. "-------\n"
  7491. "H : scalar or ndarray\n"
  7492. " Values of the Hermite polynomial\n"
  7493. "\n"
  7494. "See Also\n"
  7495. "--------\n"
  7496. "roots_hermite : roots and quadrature weights of physicist's\n"
  7497. " Hermite polynomials\n"
  7498. "hermite : physicist's Hermite polynomial object\n"
  7499. "numpy.polynomial.hermite.Hermite : Physicist's Hermite series\n"
  7500. "eval_hermitenorm : evaluate Probabilist's Hermite polynomials\n"
  7501. "\n"
  7502. "References\n"
  7503. "----------\n"
  7504. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7505. " Handbook of Mathematical Functions with Formulas,\n"
  7506. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7507. ufunc_eval_hermite_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7508. ufunc_eval_hermite_types[0] = <char>NPY_LONG
  7509. ufunc_eval_hermite_types[1] = <char>NPY_DOUBLE
  7510. ufunc_eval_hermite_types[2] = <char>NPY_DOUBLE
  7511. ufunc_eval_hermite_ptr[2*0] = <void*>_func_eval_hermite
  7512. ufunc_eval_hermite_ptr[2*0+1] = <void*>(<char*>"eval_hermite")
  7513. ufunc_eval_hermite_data[0] = &ufunc_eval_hermite_ptr[2*0]
  7514. eval_hermite = np.PyUFunc_FromFuncAndData(ufunc_eval_hermite_loops, ufunc_eval_hermite_data, ufunc_eval_hermite_types, 1, 2, 1, 0, "eval_hermite", ufunc_eval_hermite_doc, 0)
  7515. cdef np.PyUFuncGenericFunction ufunc_eval_hermitenorm_loops[1]
  7516. cdef void *ufunc_eval_hermitenorm_ptr[2]
  7517. cdef void *ufunc_eval_hermitenorm_data[1]
  7518. cdef char ufunc_eval_hermitenorm_types[3]
  7519. cdef char *ufunc_eval_hermitenorm_doc = (
  7520. "eval_hermitenorm(n, x, out=None)\n"
  7521. "\n"
  7522. "Evaluate probabilist's (normalized) Hermite polynomial at a\n"
  7523. "point.\n"
  7524. "\n"
  7525. "Defined by\n"
  7526. "\n"
  7527. ".. math::\n"
  7528. "\n"
  7529. " He_n(x) = (-1)^n e^{x^2/2} \\frac{d^n}{dx^n} e^{-x^2/2};\n"
  7530. "\n"
  7531. ":math:`He_n` is a polynomial of degree :math:`n`. See 22.11.8 in\n"
  7532. "[AS]_ for details.\n"
  7533. "\n"
  7534. "Parameters\n"
  7535. "----------\n"
  7536. "n : array_like\n"
  7537. " Degree of the polynomial\n"
  7538. "x : array_like\n"
  7539. " Points at which to evaluate the Hermite polynomial\n"
  7540. "out : ndarray, optional\n"
  7541. " Optional output array for the function values\n"
  7542. "\n"
  7543. "Returns\n"
  7544. "-------\n"
  7545. "He : scalar or ndarray\n"
  7546. " Values of the Hermite polynomial\n"
  7547. "\n"
  7548. "See Also\n"
  7549. "--------\n"
  7550. "roots_hermitenorm : roots and quadrature weights of probabilist's\n"
  7551. " Hermite polynomials\n"
  7552. "hermitenorm : probabilist's Hermite polynomial object\n"
  7553. "numpy.polynomial.hermite_e.HermiteE : Probabilist's Hermite series\n"
  7554. "eval_hermite : evaluate physicist's Hermite polynomials\n"
  7555. "\n"
  7556. "References\n"
  7557. "----------\n"
  7558. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7559. " Handbook of Mathematical Functions with Formulas,\n"
  7560. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7561. ufunc_eval_hermitenorm_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7562. ufunc_eval_hermitenorm_types[0] = <char>NPY_LONG
  7563. ufunc_eval_hermitenorm_types[1] = <char>NPY_DOUBLE
  7564. ufunc_eval_hermitenorm_types[2] = <char>NPY_DOUBLE
  7565. ufunc_eval_hermitenorm_ptr[2*0] = <void*>_func_eval_hermitenorm
  7566. ufunc_eval_hermitenorm_ptr[2*0+1] = <void*>(<char*>"eval_hermitenorm")
  7567. ufunc_eval_hermitenorm_data[0] = &ufunc_eval_hermitenorm_ptr[2*0]
  7568. eval_hermitenorm = np.PyUFunc_FromFuncAndData(ufunc_eval_hermitenorm_loops, ufunc_eval_hermitenorm_data, ufunc_eval_hermitenorm_types, 1, 2, 1, 0, "eval_hermitenorm", ufunc_eval_hermitenorm_doc, 0)
  7569. cdef np.PyUFuncGenericFunction ufunc_eval_jacobi_loops[5]
  7570. cdef void *ufunc_eval_jacobi_ptr[10]
  7571. cdef void *ufunc_eval_jacobi_data[5]
  7572. cdef char ufunc_eval_jacobi_types[25]
  7573. cdef char *ufunc_eval_jacobi_doc = (
  7574. "eval_jacobi(n, alpha, beta, x, out=None)\n"
  7575. "\n"
  7576. "Evaluate Jacobi polynomial at a point.\n"
  7577. "\n"
  7578. "The Jacobi polynomials can be defined via the Gauss hypergeometric\n"
  7579. "function :math:`{}_2F_1` as\n"
  7580. "\n"
  7581. ".. math::\n"
  7582. "\n"
  7583. " P_n^{(\\alpha, \\beta)}(x) = \\frac{(\\alpha + 1)_n}{\\Gamma(n + 1)}\n"
  7584. " {}_2F_1(-n, 1 + \\alpha + \\beta + n; \\alpha + 1; (1 - z)/2)\n"
  7585. "\n"
  7586. "where :math:`(\\cdot)_n` is the Pochhammer symbol; see `poch`. When\n"
  7587. ":math:`n` is an integer the result is a polynomial of degree\n"
  7588. ":math:`n`. See 22.5.42 in [AS]_ for details.\n"
  7589. "\n"
  7590. "Parameters\n"
  7591. "----------\n"
  7592. "n : array_like\n"
  7593. " Degree of the polynomial. If not an integer the result is\n"
  7594. " determined via the relation to the Gauss hypergeometric\n"
  7595. " function.\n"
  7596. "alpha : array_like\n"
  7597. " Parameter\n"
  7598. "beta : array_like\n"
  7599. " Parameter\n"
  7600. "x : array_like\n"
  7601. " Points at which to evaluate the polynomial\n"
  7602. "out : ndarray, optional\n"
  7603. " Optional output array for the function values\n"
  7604. "\n"
  7605. "Returns\n"
  7606. "-------\n"
  7607. "P : scalar or ndarray\n"
  7608. " Values of the Jacobi polynomial\n"
  7609. "\n"
  7610. "See Also\n"
  7611. "--------\n"
  7612. "roots_jacobi : roots and quadrature weights of Jacobi polynomials\n"
  7613. "jacobi : Jacobi polynomial object\n"
  7614. "hyp2f1 : Gauss hypergeometric function\n"
  7615. "\n"
  7616. "References\n"
  7617. "----------\n"
  7618. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7619. " Handbook of Mathematical Functions with Formulas,\n"
  7620. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7621. ufunc_eval_jacobi_loops[0] = <np.PyUFuncGenericFunction>loop_d_lddd__As_lddd_d
  7622. ufunc_eval_jacobi_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  7623. ufunc_eval_jacobi_loops[2] = <np.PyUFuncGenericFunction>loop_D_dddD__As_fffF_F
  7624. ufunc_eval_jacobi_loops[3] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  7625. ufunc_eval_jacobi_loops[4] = <np.PyUFuncGenericFunction>loop_D_dddD__As_dddD_D
  7626. ufunc_eval_jacobi_types[0] = <char>NPY_LONG
  7627. ufunc_eval_jacobi_types[1] = <char>NPY_DOUBLE
  7628. ufunc_eval_jacobi_types[2] = <char>NPY_DOUBLE
  7629. ufunc_eval_jacobi_types[3] = <char>NPY_DOUBLE
  7630. ufunc_eval_jacobi_types[4] = <char>NPY_DOUBLE
  7631. ufunc_eval_jacobi_types[5] = <char>NPY_FLOAT
  7632. ufunc_eval_jacobi_types[6] = <char>NPY_FLOAT
  7633. ufunc_eval_jacobi_types[7] = <char>NPY_FLOAT
  7634. ufunc_eval_jacobi_types[8] = <char>NPY_FLOAT
  7635. ufunc_eval_jacobi_types[9] = <char>NPY_FLOAT
  7636. ufunc_eval_jacobi_types[10] = <char>NPY_FLOAT
  7637. ufunc_eval_jacobi_types[11] = <char>NPY_FLOAT
  7638. ufunc_eval_jacobi_types[12] = <char>NPY_FLOAT
  7639. ufunc_eval_jacobi_types[13] = <char>NPY_CFLOAT
  7640. ufunc_eval_jacobi_types[14] = <char>NPY_CFLOAT
  7641. ufunc_eval_jacobi_types[15] = <char>NPY_DOUBLE
  7642. ufunc_eval_jacobi_types[16] = <char>NPY_DOUBLE
  7643. ufunc_eval_jacobi_types[17] = <char>NPY_DOUBLE
  7644. ufunc_eval_jacobi_types[18] = <char>NPY_DOUBLE
  7645. ufunc_eval_jacobi_types[19] = <char>NPY_DOUBLE
  7646. ufunc_eval_jacobi_types[20] = <char>NPY_DOUBLE
  7647. ufunc_eval_jacobi_types[21] = <char>NPY_DOUBLE
  7648. ufunc_eval_jacobi_types[22] = <char>NPY_DOUBLE
  7649. ufunc_eval_jacobi_types[23] = <char>NPY_CDOUBLE
  7650. ufunc_eval_jacobi_types[24] = <char>NPY_CDOUBLE
  7651. ufunc_eval_jacobi_ptr[2*0] = <void*>_func_eval_jacobi_l
  7652. ufunc_eval_jacobi_ptr[2*0+1] = <void*>(<char*>"eval_jacobi")
  7653. ufunc_eval_jacobi_ptr[2*1] = <void*>_func_eval_jacobi[double]
  7654. ufunc_eval_jacobi_ptr[2*1+1] = <void*>(<char*>"eval_jacobi")
  7655. ufunc_eval_jacobi_ptr[2*2] = <void*>_func_eval_jacobi[double_complex]
  7656. ufunc_eval_jacobi_ptr[2*2+1] = <void*>(<char*>"eval_jacobi")
  7657. ufunc_eval_jacobi_ptr[2*3] = <void*>_func_eval_jacobi[double]
  7658. ufunc_eval_jacobi_ptr[2*3+1] = <void*>(<char*>"eval_jacobi")
  7659. ufunc_eval_jacobi_ptr[2*4] = <void*>_func_eval_jacobi[double_complex]
  7660. ufunc_eval_jacobi_ptr[2*4+1] = <void*>(<char*>"eval_jacobi")
  7661. ufunc_eval_jacobi_data[0] = &ufunc_eval_jacobi_ptr[2*0]
  7662. ufunc_eval_jacobi_data[1] = &ufunc_eval_jacobi_ptr[2*1]
  7663. ufunc_eval_jacobi_data[2] = &ufunc_eval_jacobi_ptr[2*2]
  7664. ufunc_eval_jacobi_data[3] = &ufunc_eval_jacobi_ptr[2*3]
  7665. ufunc_eval_jacobi_data[4] = &ufunc_eval_jacobi_ptr[2*4]
  7666. eval_jacobi = np.PyUFunc_FromFuncAndData(ufunc_eval_jacobi_loops, ufunc_eval_jacobi_data, ufunc_eval_jacobi_types, 5, 4, 1, 0, "eval_jacobi", ufunc_eval_jacobi_doc, 0)
  7667. cdef np.PyUFuncGenericFunction ufunc_eval_laguerre_loops[5]
  7668. cdef void *ufunc_eval_laguerre_ptr[10]
  7669. cdef void *ufunc_eval_laguerre_data[5]
  7670. cdef char ufunc_eval_laguerre_types[15]
  7671. cdef char *ufunc_eval_laguerre_doc = (
  7672. "eval_laguerre(n, x, out=None)\n"
  7673. "\n"
  7674. "Evaluate Laguerre polynomial at a point.\n"
  7675. "\n"
  7676. "The Laguerre polynomials can be defined via the confluent\n"
  7677. "hypergeometric function :math:`{}_1F_1` as\n"
  7678. "\n"
  7679. ".. math::\n"
  7680. "\n"
  7681. " L_n(x) = {}_1F_1(-n, 1, x).\n"
  7682. "\n"
  7683. "See 22.5.16 and 22.5.54 in [AS]_ for details. When :math:`n` is an\n"
  7684. "integer the result is a polynomial of degree :math:`n`.\n"
  7685. "\n"
  7686. "Parameters\n"
  7687. "----------\n"
  7688. "n : array_like\n"
  7689. " Degree of the polynomial. If not an integer the result is\n"
  7690. " determined via the relation to the confluent hypergeometric\n"
  7691. " function.\n"
  7692. "x : array_like\n"
  7693. " Points at which to evaluate the Laguerre polynomial\n"
  7694. "out : ndarray, optional\n"
  7695. " Optional output array for the function values\n"
  7696. "\n"
  7697. "Returns\n"
  7698. "-------\n"
  7699. "L : scalar or ndarray\n"
  7700. " Values of the Laguerre polynomial\n"
  7701. "\n"
  7702. "See Also\n"
  7703. "--------\n"
  7704. "roots_laguerre : roots and quadrature weights of Laguerre\n"
  7705. " polynomials\n"
  7706. "laguerre : Laguerre polynomial object\n"
  7707. "numpy.polynomial.laguerre.Laguerre : Laguerre series\n"
  7708. "eval_genlaguerre : evaluate generalized Laguerre polynomials\n"
  7709. "\n"
  7710. "References\n"
  7711. "----------\n"
  7712. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7713. " Handbook of Mathematical Functions with Formulas,\n"
  7714. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7715. ufunc_eval_laguerre_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7716. ufunc_eval_laguerre_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7717. ufunc_eval_laguerre_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7718. ufunc_eval_laguerre_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7719. ufunc_eval_laguerre_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7720. ufunc_eval_laguerre_types[0] = <char>NPY_LONG
  7721. ufunc_eval_laguerre_types[1] = <char>NPY_DOUBLE
  7722. ufunc_eval_laguerre_types[2] = <char>NPY_DOUBLE
  7723. ufunc_eval_laguerre_types[3] = <char>NPY_FLOAT
  7724. ufunc_eval_laguerre_types[4] = <char>NPY_FLOAT
  7725. ufunc_eval_laguerre_types[5] = <char>NPY_FLOAT
  7726. ufunc_eval_laguerre_types[6] = <char>NPY_FLOAT
  7727. ufunc_eval_laguerre_types[7] = <char>NPY_CFLOAT
  7728. ufunc_eval_laguerre_types[8] = <char>NPY_CFLOAT
  7729. ufunc_eval_laguerre_types[9] = <char>NPY_DOUBLE
  7730. ufunc_eval_laguerre_types[10] = <char>NPY_DOUBLE
  7731. ufunc_eval_laguerre_types[11] = <char>NPY_DOUBLE
  7732. ufunc_eval_laguerre_types[12] = <char>NPY_DOUBLE
  7733. ufunc_eval_laguerre_types[13] = <char>NPY_CDOUBLE
  7734. ufunc_eval_laguerre_types[14] = <char>NPY_CDOUBLE
  7735. ufunc_eval_laguerre_ptr[2*0] = <void*>_func_eval_laguerre_l
  7736. ufunc_eval_laguerre_ptr[2*0+1] = <void*>(<char*>"eval_laguerre")
  7737. ufunc_eval_laguerre_ptr[2*1] = <void*>_func_eval_laguerre[double]
  7738. ufunc_eval_laguerre_ptr[2*1+1] = <void*>(<char*>"eval_laguerre")
  7739. ufunc_eval_laguerre_ptr[2*2] = <void*>_func_eval_laguerre[double_complex]
  7740. ufunc_eval_laguerre_ptr[2*2+1] = <void*>(<char*>"eval_laguerre")
  7741. ufunc_eval_laguerre_ptr[2*3] = <void*>_func_eval_laguerre[double]
  7742. ufunc_eval_laguerre_ptr[2*3+1] = <void*>(<char*>"eval_laguerre")
  7743. ufunc_eval_laguerre_ptr[2*4] = <void*>_func_eval_laguerre[double_complex]
  7744. ufunc_eval_laguerre_ptr[2*4+1] = <void*>(<char*>"eval_laguerre")
  7745. ufunc_eval_laguerre_data[0] = &ufunc_eval_laguerre_ptr[2*0]
  7746. ufunc_eval_laguerre_data[1] = &ufunc_eval_laguerre_ptr[2*1]
  7747. ufunc_eval_laguerre_data[2] = &ufunc_eval_laguerre_ptr[2*2]
  7748. ufunc_eval_laguerre_data[3] = &ufunc_eval_laguerre_ptr[2*3]
  7749. ufunc_eval_laguerre_data[4] = &ufunc_eval_laguerre_ptr[2*4]
  7750. eval_laguerre = np.PyUFunc_FromFuncAndData(ufunc_eval_laguerre_loops, ufunc_eval_laguerre_data, ufunc_eval_laguerre_types, 5, 2, 1, 0, "eval_laguerre", ufunc_eval_laguerre_doc, 0)
  7751. cdef np.PyUFuncGenericFunction ufunc_eval_legendre_loops[5]
  7752. cdef void *ufunc_eval_legendre_ptr[10]
  7753. cdef void *ufunc_eval_legendre_data[5]
  7754. cdef char ufunc_eval_legendre_types[15]
  7755. cdef char *ufunc_eval_legendre_doc = (
  7756. "eval_legendre(n, x, out=None)\n"
  7757. "\n"
  7758. "Evaluate Legendre polynomial at a point.\n"
  7759. "\n"
  7760. "The Legendre polynomials can be defined via the Gauss\n"
  7761. "hypergeometric function :math:`{}_2F_1` as\n"
  7762. "\n"
  7763. ".. math::\n"
  7764. "\n"
  7765. " P_n(x) = {}_2F_1(-n, n + 1; 1; (1 - x)/2).\n"
  7766. "\n"
  7767. "When :math:`n` is an integer the result is a polynomial of degree\n"
  7768. ":math:`n`. See 22.5.49 in [AS]_ for details.\n"
  7769. "\n"
  7770. "Parameters\n"
  7771. "----------\n"
  7772. "n : array_like\n"
  7773. " Degree of the polynomial. If not an integer, the result is\n"
  7774. " determined via the relation to the Gauss hypergeometric\n"
  7775. " function.\n"
  7776. "x : array_like\n"
  7777. " Points at which to evaluate the Legendre polynomial\n"
  7778. "out : ndarray, optional\n"
  7779. " Optional output array for the function values\n"
  7780. "\n"
  7781. "Returns\n"
  7782. "-------\n"
  7783. "P : scalar or ndarray\n"
  7784. " Values of the Legendre polynomial\n"
  7785. "\n"
  7786. "See Also\n"
  7787. "--------\n"
  7788. "roots_legendre : roots and quadrature weights of Legendre\n"
  7789. " polynomials\n"
  7790. "legendre : Legendre polynomial object\n"
  7791. "hyp2f1 : Gauss hypergeometric function\n"
  7792. "numpy.polynomial.legendre.Legendre : Legendre series\n"
  7793. "\n"
  7794. "References\n"
  7795. "----------\n"
  7796. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7797. " Handbook of Mathematical Functions with Formulas,\n"
  7798. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  7799. "\n"
  7800. "Examples\n"
  7801. "--------\n"
  7802. ">>> import numpy as np\n"
  7803. ">>> from scipy.special import eval_legendre\n"
  7804. "\n"
  7805. "Evaluate the zero-order Legendre polynomial at x = 0\n"
  7806. "\n"
  7807. ">>> eval_legendre(0, 0)\n"
  7808. "1.0\n"
  7809. "\n"
  7810. "Evaluate the first-order Legendre polynomial between -1 and 1\n"
  7811. "\n"
  7812. ">>> X = np.linspace(-1, 1, 5) # Domain of Legendre polynomials\n"
  7813. ">>> eval_legendre(1, X)\n"
  7814. "array([-1. , -0.5, 0. , 0.5, 1. ])\n"
  7815. "\n"
  7816. "Evaluate Legendre polynomials of order 0 through 4 at x = 0\n"
  7817. "\n"
  7818. ">>> N = range(0, 5)\n"
  7819. ">>> eval_legendre(N, 0)\n"
  7820. "array([ 1. , 0. , -0.5 , 0. , 0.375])\n"
  7821. "\n"
  7822. "Plot Legendre polynomials of order 0 through 4\n"
  7823. "\n"
  7824. ">>> X = np.linspace(-1, 1)\n"
  7825. "\n"
  7826. ">>> import matplotlib.pyplot as plt\n"
  7827. ">>> for n in range(0, 5):\n"
  7828. "... y = eval_legendre(n, X)\n"
  7829. "... plt.plot(X, y, label=r'$P_{}(x)$'.format(n))\n"
  7830. "\n"
  7831. ">>> plt.title(\"Legendre Polynomials\")\n"
  7832. ">>> plt.xlabel(\"x\")\n"
  7833. ">>> plt.ylabel(r'$P_n(x)$')\n"
  7834. ">>> plt.legend(loc='lower right')\n"
  7835. ">>> plt.show()")
  7836. ufunc_eval_legendre_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7837. ufunc_eval_legendre_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7838. ufunc_eval_legendre_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7839. ufunc_eval_legendre_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7840. ufunc_eval_legendre_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7841. ufunc_eval_legendre_types[0] = <char>NPY_LONG
  7842. ufunc_eval_legendre_types[1] = <char>NPY_DOUBLE
  7843. ufunc_eval_legendre_types[2] = <char>NPY_DOUBLE
  7844. ufunc_eval_legendre_types[3] = <char>NPY_FLOAT
  7845. ufunc_eval_legendre_types[4] = <char>NPY_FLOAT
  7846. ufunc_eval_legendre_types[5] = <char>NPY_FLOAT
  7847. ufunc_eval_legendre_types[6] = <char>NPY_FLOAT
  7848. ufunc_eval_legendre_types[7] = <char>NPY_CFLOAT
  7849. ufunc_eval_legendre_types[8] = <char>NPY_CFLOAT
  7850. ufunc_eval_legendre_types[9] = <char>NPY_DOUBLE
  7851. ufunc_eval_legendre_types[10] = <char>NPY_DOUBLE
  7852. ufunc_eval_legendre_types[11] = <char>NPY_DOUBLE
  7853. ufunc_eval_legendre_types[12] = <char>NPY_DOUBLE
  7854. ufunc_eval_legendre_types[13] = <char>NPY_CDOUBLE
  7855. ufunc_eval_legendre_types[14] = <char>NPY_CDOUBLE
  7856. ufunc_eval_legendre_ptr[2*0] = <void*>_func_eval_legendre_l
  7857. ufunc_eval_legendre_ptr[2*0+1] = <void*>(<char*>"eval_legendre")
  7858. ufunc_eval_legendre_ptr[2*1] = <void*>_func_eval_legendre[double]
  7859. ufunc_eval_legendre_ptr[2*1+1] = <void*>(<char*>"eval_legendre")
  7860. ufunc_eval_legendre_ptr[2*2] = <void*>_func_eval_legendre[double_complex]
  7861. ufunc_eval_legendre_ptr[2*2+1] = <void*>(<char*>"eval_legendre")
  7862. ufunc_eval_legendre_ptr[2*3] = <void*>_func_eval_legendre[double]
  7863. ufunc_eval_legendre_ptr[2*3+1] = <void*>(<char*>"eval_legendre")
  7864. ufunc_eval_legendre_ptr[2*4] = <void*>_func_eval_legendre[double_complex]
  7865. ufunc_eval_legendre_ptr[2*4+1] = <void*>(<char*>"eval_legendre")
  7866. ufunc_eval_legendre_data[0] = &ufunc_eval_legendre_ptr[2*0]
  7867. ufunc_eval_legendre_data[1] = &ufunc_eval_legendre_ptr[2*1]
  7868. ufunc_eval_legendre_data[2] = &ufunc_eval_legendre_ptr[2*2]
  7869. ufunc_eval_legendre_data[3] = &ufunc_eval_legendre_ptr[2*3]
  7870. ufunc_eval_legendre_data[4] = &ufunc_eval_legendre_ptr[2*4]
  7871. eval_legendre = np.PyUFunc_FromFuncAndData(ufunc_eval_legendre_loops, ufunc_eval_legendre_data, ufunc_eval_legendre_types, 5, 2, 1, 0, "eval_legendre", ufunc_eval_legendre_doc, 0)
  7872. cdef np.PyUFuncGenericFunction ufunc_eval_sh_chebyt_loops[5]
  7873. cdef void *ufunc_eval_sh_chebyt_ptr[10]
  7874. cdef void *ufunc_eval_sh_chebyt_data[5]
  7875. cdef char ufunc_eval_sh_chebyt_types[15]
  7876. cdef char *ufunc_eval_sh_chebyt_doc = (
  7877. "eval_sh_chebyt(n, x, out=None)\n"
  7878. "\n"
  7879. "Evaluate shifted Chebyshev polynomial of the first kind at a\n"
  7880. "point.\n"
  7881. "\n"
  7882. "These polynomials are defined as\n"
  7883. "\n"
  7884. ".. math::\n"
  7885. "\n"
  7886. " T_n^*(x) = T_n(2x - 1)\n"
  7887. "\n"
  7888. "where :math:`T_n` is a Chebyshev polynomial of the first kind. See\n"
  7889. "22.5.14 in [AS]_ for details.\n"
  7890. "\n"
  7891. "Parameters\n"
  7892. "----------\n"
  7893. "n : array_like\n"
  7894. " Degree of the polynomial. If not an integer, the result is\n"
  7895. " determined via the relation to `eval_chebyt`.\n"
  7896. "x : array_like\n"
  7897. " Points at which to evaluate the shifted Chebyshev polynomial\n"
  7898. "out : ndarray, optional\n"
  7899. " Optional output array for the function values\n"
  7900. "\n"
  7901. "Returns\n"
  7902. "-------\n"
  7903. "T : scalar or ndarray\n"
  7904. " Values of the shifted Chebyshev polynomial\n"
  7905. "\n"
  7906. "See Also\n"
  7907. "--------\n"
  7908. "roots_sh_chebyt : roots and quadrature weights of shifted\n"
  7909. " Chebyshev polynomials of the first kind\n"
  7910. "sh_chebyt : shifted Chebyshev polynomial object\n"
  7911. "eval_chebyt : evaluate Chebyshev polynomials of the first kind\n"
  7912. "numpy.polynomial.chebyshev.Chebyshev : Chebyshev series\n"
  7913. "\n"
  7914. "References\n"
  7915. "----------\n"
  7916. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7917. " Handbook of Mathematical Functions with Formulas,\n"
  7918. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  7919. ufunc_eval_sh_chebyt_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  7920. ufunc_eval_sh_chebyt_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  7921. ufunc_eval_sh_chebyt_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  7922. ufunc_eval_sh_chebyt_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  7923. ufunc_eval_sh_chebyt_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  7924. ufunc_eval_sh_chebyt_types[0] = <char>NPY_LONG
  7925. ufunc_eval_sh_chebyt_types[1] = <char>NPY_DOUBLE
  7926. ufunc_eval_sh_chebyt_types[2] = <char>NPY_DOUBLE
  7927. ufunc_eval_sh_chebyt_types[3] = <char>NPY_FLOAT
  7928. ufunc_eval_sh_chebyt_types[4] = <char>NPY_FLOAT
  7929. ufunc_eval_sh_chebyt_types[5] = <char>NPY_FLOAT
  7930. ufunc_eval_sh_chebyt_types[6] = <char>NPY_FLOAT
  7931. ufunc_eval_sh_chebyt_types[7] = <char>NPY_CFLOAT
  7932. ufunc_eval_sh_chebyt_types[8] = <char>NPY_CFLOAT
  7933. ufunc_eval_sh_chebyt_types[9] = <char>NPY_DOUBLE
  7934. ufunc_eval_sh_chebyt_types[10] = <char>NPY_DOUBLE
  7935. ufunc_eval_sh_chebyt_types[11] = <char>NPY_DOUBLE
  7936. ufunc_eval_sh_chebyt_types[12] = <char>NPY_DOUBLE
  7937. ufunc_eval_sh_chebyt_types[13] = <char>NPY_CDOUBLE
  7938. ufunc_eval_sh_chebyt_types[14] = <char>NPY_CDOUBLE
  7939. ufunc_eval_sh_chebyt_ptr[2*0] = <void*>_func_eval_sh_chebyt_l
  7940. ufunc_eval_sh_chebyt_ptr[2*0+1] = <void*>(<char*>"eval_sh_chebyt")
  7941. ufunc_eval_sh_chebyt_ptr[2*1] = <void*>_func_eval_sh_chebyt[double]
  7942. ufunc_eval_sh_chebyt_ptr[2*1+1] = <void*>(<char*>"eval_sh_chebyt")
  7943. ufunc_eval_sh_chebyt_ptr[2*2] = <void*>_func_eval_sh_chebyt[double_complex]
  7944. ufunc_eval_sh_chebyt_ptr[2*2+1] = <void*>(<char*>"eval_sh_chebyt")
  7945. ufunc_eval_sh_chebyt_ptr[2*3] = <void*>_func_eval_sh_chebyt[double]
  7946. ufunc_eval_sh_chebyt_ptr[2*3+1] = <void*>(<char*>"eval_sh_chebyt")
  7947. ufunc_eval_sh_chebyt_ptr[2*4] = <void*>_func_eval_sh_chebyt[double_complex]
  7948. ufunc_eval_sh_chebyt_ptr[2*4+1] = <void*>(<char*>"eval_sh_chebyt")
  7949. ufunc_eval_sh_chebyt_data[0] = &ufunc_eval_sh_chebyt_ptr[2*0]
  7950. ufunc_eval_sh_chebyt_data[1] = &ufunc_eval_sh_chebyt_ptr[2*1]
  7951. ufunc_eval_sh_chebyt_data[2] = &ufunc_eval_sh_chebyt_ptr[2*2]
  7952. ufunc_eval_sh_chebyt_data[3] = &ufunc_eval_sh_chebyt_ptr[2*3]
  7953. ufunc_eval_sh_chebyt_data[4] = &ufunc_eval_sh_chebyt_ptr[2*4]
  7954. eval_sh_chebyt = np.PyUFunc_FromFuncAndData(ufunc_eval_sh_chebyt_loops, ufunc_eval_sh_chebyt_data, ufunc_eval_sh_chebyt_types, 5, 2, 1, 0, "eval_sh_chebyt", ufunc_eval_sh_chebyt_doc, 0)
  7955. cdef np.PyUFuncGenericFunction ufunc_eval_sh_chebyu_loops[5]
  7956. cdef void *ufunc_eval_sh_chebyu_ptr[10]
  7957. cdef void *ufunc_eval_sh_chebyu_data[5]
  7958. cdef char ufunc_eval_sh_chebyu_types[15]
  7959. cdef char *ufunc_eval_sh_chebyu_doc = (
  7960. "eval_sh_chebyu(n, x, out=None)\n"
  7961. "\n"
  7962. "Evaluate shifted Chebyshev polynomial of the second kind at a\n"
  7963. "point.\n"
  7964. "\n"
  7965. "These polynomials are defined as\n"
  7966. "\n"
  7967. ".. math::\n"
  7968. "\n"
  7969. " U_n^*(x) = U_n(2x - 1)\n"
  7970. "\n"
  7971. "where :math:`U_n` is a Chebyshev polynomial of the first kind. See\n"
  7972. "22.5.15 in [AS]_ for details.\n"
  7973. "\n"
  7974. "Parameters\n"
  7975. "----------\n"
  7976. "n : array_like\n"
  7977. " Degree of the polynomial. If not an integer, the result is\n"
  7978. " determined via the relation to `eval_chebyu`.\n"
  7979. "x : array_like\n"
  7980. " Points at which to evaluate the shifted Chebyshev polynomial\n"
  7981. "out : ndarray, optional\n"
  7982. " Optional output array for the function values\n"
  7983. "\n"
  7984. "Returns\n"
  7985. "-------\n"
  7986. "U : scalar or ndarray\n"
  7987. " Values of the shifted Chebyshev polynomial\n"
  7988. "\n"
  7989. "See Also\n"
  7990. "--------\n"
  7991. "roots_sh_chebyu : roots and quadrature weights of shifted\n"
  7992. " Chebychev polynomials of the second kind\n"
  7993. "sh_chebyu : shifted Chebyshev polynomial object\n"
  7994. "eval_chebyu : evaluate Chebyshev polynomials of the second kind\n"
  7995. "\n"
  7996. "References\n"
  7997. "----------\n"
  7998. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  7999. " Handbook of Mathematical Functions with Formulas,\n"
  8000. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  8001. ufunc_eval_sh_chebyu_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  8002. ufunc_eval_sh_chebyu_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  8003. ufunc_eval_sh_chebyu_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  8004. ufunc_eval_sh_chebyu_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  8005. ufunc_eval_sh_chebyu_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  8006. ufunc_eval_sh_chebyu_types[0] = <char>NPY_LONG
  8007. ufunc_eval_sh_chebyu_types[1] = <char>NPY_DOUBLE
  8008. ufunc_eval_sh_chebyu_types[2] = <char>NPY_DOUBLE
  8009. ufunc_eval_sh_chebyu_types[3] = <char>NPY_FLOAT
  8010. ufunc_eval_sh_chebyu_types[4] = <char>NPY_FLOAT
  8011. ufunc_eval_sh_chebyu_types[5] = <char>NPY_FLOAT
  8012. ufunc_eval_sh_chebyu_types[6] = <char>NPY_FLOAT
  8013. ufunc_eval_sh_chebyu_types[7] = <char>NPY_CFLOAT
  8014. ufunc_eval_sh_chebyu_types[8] = <char>NPY_CFLOAT
  8015. ufunc_eval_sh_chebyu_types[9] = <char>NPY_DOUBLE
  8016. ufunc_eval_sh_chebyu_types[10] = <char>NPY_DOUBLE
  8017. ufunc_eval_sh_chebyu_types[11] = <char>NPY_DOUBLE
  8018. ufunc_eval_sh_chebyu_types[12] = <char>NPY_DOUBLE
  8019. ufunc_eval_sh_chebyu_types[13] = <char>NPY_CDOUBLE
  8020. ufunc_eval_sh_chebyu_types[14] = <char>NPY_CDOUBLE
  8021. ufunc_eval_sh_chebyu_ptr[2*0] = <void*>_func_eval_sh_chebyu_l
  8022. ufunc_eval_sh_chebyu_ptr[2*0+1] = <void*>(<char*>"eval_sh_chebyu")
  8023. ufunc_eval_sh_chebyu_ptr[2*1] = <void*>_func_eval_sh_chebyu[double]
  8024. ufunc_eval_sh_chebyu_ptr[2*1+1] = <void*>(<char*>"eval_sh_chebyu")
  8025. ufunc_eval_sh_chebyu_ptr[2*2] = <void*>_func_eval_sh_chebyu[double_complex]
  8026. ufunc_eval_sh_chebyu_ptr[2*2+1] = <void*>(<char*>"eval_sh_chebyu")
  8027. ufunc_eval_sh_chebyu_ptr[2*3] = <void*>_func_eval_sh_chebyu[double]
  8028. ufunc_eval_sh_chebyu_ptr[2*3+1] = <void*>(<char*>"eval_sh_chebyu")
  8029. ufunc_eval_sh_chebyu_ptr[2*4] = <void*>_func_eval_sh_chebyu[double_complex]
  8030. ufunc_eval_sh_chebyu_ptr[2*4+1] = <void*>(<char*>"eval_sh_chebyu")
  8031. ufunc_eval_sh_chebyu_data[0] = &ufunc_eval_sh_chebyu_ptr[2*0]
  8032. ufunc_eval_sh_chebyu_data[1] = &ufunc_eval_sh_chebyu_ptr[2*1]
  8033. ufunc_eval_sh_chebyu_data[2] = &ufunc_eval_sh_chebyu_ptr[2*2]
  8034. ufunc_eval_sh_chebyu_data[3] = &ufunc_eval_sh_chebyu_ptr[2*3]
  8035. ufunc_eval_sh_chebyu_data[4] = &ufunc_eval_sh_chebyu_ptr[2*4]
  8036. eval_sh_chebyu = np.PyUFunc_FromFuncAndData(ufunc_eval_sh_chebyu_loops, ufunc_eval_sh_chebyu_data, ufunc_eval_sh_chebyu_types, 5, 2, 1, 0, "eval_sh_chebyu", ufunc_eval_sh_chebyu_doc, 0)
  8037. cdef np.PyUFuncGenericFunction ufunc_eval_sh_jacobi_loops[5]
  8038. cdef void *ufunc_eval_sh_jacobi_ptr[10]
  8039. cdef void *ufunc_eval_sh_jacobi_data[5]
  8040. cdef char ufunc_eval_sh_jacobi_types[25]
  8041. cdef char *ufunc_eval_sh_jacobi_doc = (
  8042. "eval_sh_jacobi(n, p, q, x, out=None)\n"
  8043. "\n"
  8044. "Evaluate shifted Jacobi polynomial at a point.\n"
  8045. "\n"
  8046. "Defined by\n"
  8047. "\n"
  8048. ".. math::\n"
  8049. "\n"
  8050. " G_n^{(p, q)}(x)\n"
  8051. " = \\binom{2n + p - 1}{n}^{-1} P_n^{(p - q, q - 1)}(2x - 1),\n"
  8052. "\n"
  8053. "where :math:`P_n^{(\\cdot, \\cdot)}` is the n-th Jacobi\n"
  8054. "polynomial. See 22.5.2 in [AS]_ for details.\n"
  8055. "\n"
  8056. "Parameters\n"
  8057. "----------\n"
  8058. "n : int\n"
  8059. " Degree of the polynomial. If not an integer, the result is\n"
  8060. " determined via the relation to `binom` and `eval_jacobi`.\n"
  8061. "p : float\n"
  8062. " Parameter\n"
  8063. "q : float\n"
  8064. " Parameter\n"
  8065. "out : ndarray, optional\n"
  8066. " Optional output array for the function values\n"
  8067. "\n"
  8068. "Returns\n"
  8069. "-------\n"
  8070. "G : scalar or ndarray\n"
  8071. " Values of the shifted Jacobi polynomial.\n"
  8072. "\n"
  8073. "See Also\n"
  8074. "--------\n"
  8075. "roots_sh_jacobi : roots and quadrature weights of shifted Jacobi\n"
  8076. " polynomials\n"
  8077. "sh_jacobi : shifted Jacobi polynomial object\n"
  8078. "eval_jacobi : evaluate Jacobi polynomials\n"
  8079. "\n"
  8080. "References\n"
  8081. "----------\n"
  8082. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  8083. " Handbook of Mathematical Functions with Formulas,\n"
  8084. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  8085. ufunc_eval_sh_jacobi_loops[0] = <np.PyUFuncGenericFunction>loop_d_lddd__As_lddd_d
  8086. ufunc_eval_sh_jacobi_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  8087. ufunc_eval_sh_jacobi_loops[2] = <np.PyUFuncGenericFunction>loop_D_dddD__As_fffF_F
  8088. ufunc_eval_sh_jacobi_loops[3] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  8089. ufunc_eval_sh_jacobi_loops[4] = <np.PyUFuncGenericFunction>loop_D_dddD__As_dddD_D
  8090. ufunc_eval_sh_jacobi_types[0] = <char>NPY_LONG
  8091. ufunc_eval_sh_jacobi_types[1] = <char>NPY_DOUBLE
  8092. ufunc_eval_sh_jacobi_types[2] = <char>NPY_DOUBLE
  8093. ufunc_eval_sh_jacobi_types[3] = <char>NPY_DOUBLE
  8094. ufunc_eval_sh_jacobi_types[4] = <char>NPY_DOUBLE
  8095. ufunc_eval_sh_jacobi_types[5] = <char>NPY_FLOAT
  8096. ufunc_eval_sh_jacobi_types[6] = <char>NPY_FLOAT
  8097. ufunc_eval_sh_jacobi_types[7] = <char>NPY_FLOAT
  8098. ufunc_eval_sh_jacobi_types[8] = <char>NPY_FLOAT
  8099. ufunc_eval_sh_jacobi_types[9] = <char>NPY_FLOAT
  8100. ufunc_eval_sh_jacobi_types[10] = <char>NPY_FLOAT
  8101. ufunc_eval_sh_jacobi_types[11] = <char>NPY_FLOAT
  8102. ufunc_eval_sh_jacobi_types[12] = <char>NPY_FLOAT
  8103. ufunc_eval_sh_jacobi_types[13] = <char>NPY_CFLOAT
  8104. ufunc_eval_sh_jacobi_types[14] = <char>NPY_CFLOAT
  8105. ufunc_eval_sh_jacobi_types[15] = <char>NPY_DOUBLE
  8106. ufunc_eval_sh_jacobi_types[16] = <char>NPY_DOUBLE
  8107. ufunc_eval_sh_jacobi_types[17] = <char>NPY_DOUBLE
  8108. ufunc_eval_sh_jacobi_types[18] = <char>NPY_DOUBLE
  8109. ufunc_eval_sh_jacobi_types[19] = <char>NPY_DOUBLE
  8110. ufunc_eval_sh_jacobi_types[20] = <char>NPY_DOUBLE
  8111. ufunc_eval_sh_jacobi_types[21] = <char>NPY_DOUBLE
  8112. ufunc_eval_sh_jacobi_types[22] = <char>NPY_DOUBLE
  8113. ufunc_eval_sh_jacobi_types[23] = <char>NPY_CDOUBLE
  8114. ufunc_eval_sh_jacobi_types[24] = <char>NPY_CDOUBLE
  8115. ufunc_eval_sh_jacobi_ptr[2*0] = <void*>_func_eval_sh_jacobi_l
  8116. ufunc_eval_sh_jacobi_ptr[2*0+1] = <void*>(<char*>"eval_sh_jacobi")
  8117. ufunc_eval_sh_jacobi_ptr[2*1] = <void*>_func_eval_sh_jacobi[double]
  8118. ufunc_eval_sh_jacobi_ptr[2*1+1] = <void*>(<char*>"eval_sh_jacobi")
  8119. ufunc_eval_sh_jacobi_ptr[2*2] = <void*>_func_eval_sh_jacobi[double_complex]
  8120. ufunc_eval_sh_jacobi_ptr[2*2+1] = <void*>(<char*>"eval_sh_jacobi")
  8121. ufunc_eval_sh_jacobi_ptr[2*3] = <void*>_func_eval_sh_jacobi[double]
  8122. ufunc_eval_sh_jacobi_ptr[2*3+1] = <void*>(<char*>"eval_sh_jacobi")
  8123. ufunc_eval_sh_jacobi_ptr[2*4] = <void*>_func_eval_sh_jacobi[double_complex]
  8124. ufunc_eval_sh_jacobi_ptr[2*4+1] = <void*>(<char*>"eval_sh_jacobi")
  8125. ufunc_eval_sh_jacobi_data[0] = &ufunc_eval_sh_jacobi_ptr[2*0]
  8126. ufunc_eval_sh_jacobi_data[1] = &ufunc_eval_sh_jacobi_ptr[2*1]
  8127. ufunc_eval_sh_jacobi_data[2] = &ufunc_eval_sh_jacobi_ptr[2*2]
  8128. ufunc_eval_sh_jacobi_data[3] = &ufunc_eval_sh_jacobi_ptr[2*3]
  8129. ufunc_eval_sh_jacobi_data[4] = &ufunc_eval_sh_jacobi_ptr[2*4]
  8130. eval_sh_jacobi = np.PyUFunc_FromFuncAndData(ufunc_eval_sh_jacobi_loops, ufunc_eval_sh_jacobi_data, ufunc_eval_sh_jacobi_types, 5, 4, 1, 0, "eval_sh_jacobi", ufunc_eval_sh_jacobi_doc, 0)
  8131. cdef np.PyUFuncGenericFunction ufunc_eval_sh_legendre_loops[5]
  8132. cdef void *ufunc_eval_sh_legendre_ptr[10]
  8133. cdef void *ufunc_eval_sh_legendre_data[5]
  8134. cdef char ufunc_eval_sh_legendre_types[15]
  8135. cdef char *ufunc_eval_sh_legendre_doc = (
  8136. "eval_sh_legendre(n, x, out=None)\n"
  8137. "\n"
  8138. "Evaluate shifted Legendre polynomial at a point.\n"
  8139. "\n"
  8140. "These polynomials are defined as\n"
  8141. "\n"
  8142. ".. math::\n"
  8143. "\n"
  8144. " P_n^*(x) = P_n(2x - 1)\n"
  8145. "\n"
  8146. "where :math:`P_n` is a Legendre polynomial. See 2.2.11 in [AS]_\n"
  8147. "for details.\n"
  8148. "\n"
  8149. "Parameters\n"
  8150. "----------\n"
  8151. "n : array_like\n"
  8152. " Degree of the polynomial. If not an integer, the value is\n"
  8153. " determined via the relation to `eval_legendre`.\n"
  8154. "x : array_like\n"
  8155. " Points at which to evaluate the shifted Legendre polynomial\n"
  8156. "out : ndarray, optional\n"
  8157. " Optional output array for the function values\n"
  8158. "\n"
  8159. "Returns\n"
  8160. "-------\n"
  8161. "P : scalar or ndarray\n"
  8162. " Values of the shifted Legendre polynomial\n"
  8163. "\n"
  8164. "See Also\n"
  8165. "--------\n"
  8166. "roots_sh_legendre : roots and quadrature weights of shifted\n"
  8167. " Legendre polynomials\n"
  8168. "sh_legendre : shifted Legendre polynomial object\n"
  8169. "eval_legendre : evaluate Legendre polynomials\n"
  8170. "numpy.polynomial.legendre.Legendre : Legendre series\n"
  8171. "\n"
  8172. "References\n"
  8173. "----------\n"
  8174. ".. [AS] Milton Abramowitz and Irene A. Stegun, eds.\n"
  8175. " Handbook of Mathematical Functions with Formulas,\n"
  8176. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  8177. ufunc_eval_sh_legendre_loops[0] = <np.PyUFuncGenericFunction>loop_d_ld__As_ld_d
  8178. ufunc_eval_sh_legendre_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  8179. ufunc_eval_sh_legendre_loops[2] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  8180. ufunc_eval_sh_legendre_loops[3] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  8181. ufunc_eval_sh_legendre_loops[4] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  8182. ufunc_eval_sh_legendre_types[0] = <char>NPY_LONG
  8183. ufunc_eval_sh_legendre_types[1] = <char>NPY_DOUBLE
  8184. ufunc_eval_sh_legendre_types[2] = <char>NPY_DOUBLE
  8185. ufunc_eval_sh_legendre_types[3] = <char>NPY_FLOAT
  8186. ufunc_eval_sh_legendre_types[4] = <char>NPY_FLOAT
  8187. ufunc_eval_sh_legendre_types[5] = <char>NPY_FLOAT
  8188. ufunc_eval_sh_legendre_types[6] = <char>NPY_FLOAT
  8189. ufunc_eval_sh_legendre_types[7] = <char>NPY_CFLOAT
  8190. ufunc_eval_sh_legendre_types[8] = <char>NPY_CFLOAT
  8191. ufunc_eval_sh_legendre_types[9] = <char>NPY_DOUBLE
  8192. ufunc_eval_sh_legendre_types[10] = <char>NPY_DOUBLE
  8193. ufunc_eval_sh_legendre_types[11] = <char>NPY_DOUBLE
  8194. ufunc_eval_sh_legendre_types[12] = <char>NPY_DOUBLE
  8195. ufunc_eval_sh_legendre_types[13] = <char>NPY_CDOUBLE
  8196. ufunc_eval_sh_legendre_types[14] = <char>NPY_CDOUBLE
  8197. ufunc_eval_sh_legendre_ptr[2*0] = <void*>_func_eval_sh_legendre_l
  8198. ufunc_eval_sh_legendre_ptr[2*0+1] = <void*>(<char*>"eval_sh_legendre")
  8199. ufunc_eval_sh_legendre_ptr[2*1] = <void*>_func_eval_sh_legendre[double]
  8200. ufunc_eval_sh_legendre_ptr[2*1+1] = <void*>(<char*>"eval_sh_legendre")
  8201. ufunc_eval_sh_legendre_ptr[2*2] = <void*>_func_eval_sh_legendre[double_complex]
  8202. ufunc_eval_sh_legendre_ptr[2*2+1] = <void*>(<char*>"eval_sh_legendre")
  8203. ufunc_eval_sh_legendre_ptr[2*3] = <void*>_func_eval_sh_legendre[double]
  8204. ufunc_eval_sh_legendre_ptr[2*3+1] = <void*>(<char*>"eval_sh_legendre")
  8205. ufunc_eval_sh_legendre_ptr[2*4] = <void*>_func_eval_sh_legendre[double_complex]
  8206. ufunc_eval_sh_legendre_ptr[2*4+1] = <void*>(<char*>"eval_sh_legendre")
  8207. ufunc_eval_sh_legendre_data[0] = &ufunc_eval_sh_legendre_ptr[2*0]
  8208. ufunc_eval_sh_legendre_data[1] = &ufunc_eval_sh_legendre_ptr[2*1]
  8209. ufunc_eval_sh_legendre_data[2] = &ufunc_eval_sh_legendre_ptr[2*2]
  8210. ufunc_eval_sh_legendre_data[3] = &ufunc_eval_sh_legendre_ptr[2*3]
  8211. ufunc_eval_sh_legendre_data[4] = &ufunc_eval_sh_legendre_ptr[2*4]
  8212. eval_sh_legendre = np.PyUFunc_FromFuncAndData(ufunc_eval_sh_legendre_loops, ufunc_eval_sh_legendre_data, ufunc_eval_sh_legendre_types, 5, 2, 1, 0, "eval_sh_legendre", ufunc_eval_sh_legendre_doc, 0)
  8213. cdef np.PyUFuncGenericFunction ufunc_exp1_loops[4]
  8214. cdef void *ufunc_exp1_ptr[8]
  8215. cdef void *ufunc_exp1_data[4]
  8216. cdef char ufunc_exp1_types[8]
  8217. cdef char *ufunc_exp1_doc = (
  8218. "exp1(z, out=None)\n"
  8219. "\n"
  8220. "Exponential integral E1.\n"
  8221. "\n"
  8222. "For complex :math:`z \\ne 0` the exponential integral can be defined as\n"
  8223. "[1]_\n"
  8224. "\n"
  8225. ".. math::\n"
  8226. "\n"
  8227. " E_1(z) = \\int_z^\\infty \\frac{e^{-t}}{t} dt,\n"
  8228. "\n"
  8229. "where the path of the integral does not cross the negative real\n"
  8230. "axis or pass through the origin.\n"
  8231. "\n"
  8232. "Parameters\n"
  8233. "----------\n"
  8234. "z: array_like\n"
  8235. " Real or complex argument.\n"
  8236. "out : ndarray, optional\n"
  8237. " Optional output array for the function results\n"
  8238. "\n"
  8239. "Returns\n"
  8240. "-------\n"
  8241. "scalar or ndarray\n"
  8242. " Values of the exponential integral E1\n"
  8243. "\n"
  8244. "See Also\n"
  8245. "--------\n"
  8246. "expi : exponential integral :math:`Ei`\n"
  8247. "expn : generalization of :math:`E_1`\n"
  8248. "\n"
  8249. "Notes\n"
  8250. "-----\n"
  8251. "For :math:`x > 0` it is related to the exponential integral\n"
  8252. ":math:`Ei` (see `expi`) via the relation\n"
  8253. "\n"
  8254. ".. math::\n"
  8255. "\n"
  8256. " E_1(x) = -Ei(-x).\n"
  8257. "\n"
  8258. "References\n"
  8259. "----------\n"
  8260. ".. [1] Digital Library of Mathematical Functions, 6.2.1\n"
  8261. " https://dlmf.nist.gov/6.2#E1\n"
  8262. "\n"
  8263. "Examples\n"
  8264. "--------\n"
  8265. ">>> import numpy as np\n"
  8266. ">>> import scipy.special as sc\n"
  8267. "\n"
  8268. "It has a pole at 0.\n"
  8269. "\n"
  8270. ">>> sc.exp1(0)\n"
  8271. "inf\n"
  8272. "\n"
  8273. "It has a branch cut on the negative real axis.\n"
  8274. "\n"
  8275. ">>> sc.exp1(-1)\n"
  8276. "nan\n"
  8277. ">>> sc.exp1(complex(-1, 0))\n"
  8278. "(-1.8951178163559368-3.141592653589793j)\n"
  8279. ">>> sc.exp1(complex(-1, -0.0))\n"
  8280. "(-1.8951178163559368+3.141592653589793j)\n"
  8281. "\n"
  8282. "It approaches 0 along the positive real axis.\n"
  8283. "\n"
  8284. ">>> sc.exp1([1, 10, 100, 1000])\n"
  8285. "array([2.19383934e-01, 4.15696893e-06, 3.68359776e-46, 0.00000000e+00])\n"
  8286. "\n"
  8287. "It is related to `expi`.\n"
  8288. "\n"
  8289. ">>> x = np.array([1, 2, 3, 4])\n"
  8290. ">>> sc.exp1(x)\n"
  8291. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])\n"
  8292. ">>> -sc.expi(-x)\n"
  8293. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])")
  8294. ufunc_exp1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8295. ufunc_exp1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8296. ufunc_exp1_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  8297. ufunc_exp1_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  8298. ufunc_exp1_types[0] = <char>NPY_FLOAT
  8299. ufunc_exp1_types[1] = <char>NPY_FLOAT
  8300. ufunc_exp1_types[2] = <char>NPY_DOUBLE
  8301. ufunc_exp1_types[3] = <char>NPY_DOUBLE
  8302. ufunc_exp1_types[4] = <char>NPY_CFLOAT
  8303. ufunc_exp1_types[5] = <char>NPY_CFLOAT
  8304. ufunc_exp1_types[6] = <char>NPY_CDOUBLE
  8305. ufunc_exp1_types[7] = <char>NPY_CDOUBLE
  8306. ufunc_exp1_ptr[2*0] = <void*>_func_exp1_wrap
  8307. ufunc_exp1_ptr[2*0+1] = <void*>(<char*>"exp1")
  8308. ufunc_exp1_ptr[2*1] = <void*>_func_exp1_wrap
  8309. ufunc_exp1_ptr[2*1+1] = <void*>(<char*>"exp1")
  8310. ufunc_exp1_ptr[2*2] = <void*>_func_cexp1_wrap
  8311. ufunc_exp1_ptr[2*2+1] = <void*>(<char*>"exp1")
  8312. ufunc_exp1_ptr[2*3] = <void*>_func_cexp1_wrap
  8313. ufunc_exp1_ptr[2*3+1] = <void*>(<char*>"exp1")
  8314. ufunc_exp1_data[0] = &ufunc_exp1_ptr[2*0]
  8315. ufunc_exp1_data[1] = &ufunc_exp1_ptr[2*1]
  8316. ufunc_exp1_data[2] = &ufunc_exp1_ptr[2*2]
  8317. ufunc_exp1_data[3] = &ufunc_exp1_ptr[2*3]
  8318. exp1 = np.PyUFunc_FromFuncAndData(ufunc_exp1_loops, ufunc_exp1_data, ufunc_exp1_types, 4, 1, 1, 0, "exp1", ufunc_exp1_doc, 0)
  8319. cdef np.PyUFuncGenericFunction ufunc_exp10_loops[2]
  8320. cdef void *ufunc_exp10_ptr[4]
  8321. cdef void *ufunc_exp10_data[2]
  8322. cdef char ufunc_exp10_types[4]
  8323. cdef char *ufunc_exp10_doc = (
  8324. "exp10(x, out=None)\n"
  8325. "\n"
  8326. "Compute ``10**x`` element-wise.\n"
  8327. "\n"
  8328. "Parameters\n"
  8329. "----------\n"
  8330. "x : array_like\n"
  8331. " `x` must contain real numbers.\n"
  8332. "out : ndarray, optional\n"
  8333. " Optional output array for the function values\n"
  8334. "\n"
  8335. "Returns\n"
  8336. "-------\n"
  8337. "scalar or ndarray\n"
  8338. " ``10**x``, computed element-wise.\n"
  8339. "\n"
  8340. "Examples\n"
  8341. "--------\n"
  8342. ">>> import numpy as np\n"
  8343. ">>> from scipy.special import exp10\n"
  8344. "\n"
  8345. ">>> exp10(3)\n"
  8346. "1000.0\n"
  8347. ">>> x = np.array([[-1, -0.5, 0], [0.5, 1, 1.5]])\n"
  8348. ">>> exp10(x)\n"
  8349. "array([[ 0.1 , 0.31622777, 1. ],\n"
  8350. " [ 3.16227766, 10. , 31.6227766 ]])")
  8351. ufunc_exp10_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8352. ufunc_exp10_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8353. ufunc_exp10_types[0] = <char>NPY_FLOAT
  8354. ufunc_exp10_types[1] = <char>NPY_FLOAT
  8355. ufunc_exp10_types[2] = <char>NPY_DOUBLE
  8356. ufunc_exp10_types[3] = <char>NPY_DOUBLE
  8357. ufunc_exp10_ptr[2*0] = <void*>_func_exp10
  8358. ufunc_exp10_ptr[2*0+1] = <void*>(<char*>"exp10")
  8359. ufunc_exp10_ptr[2*1] = <void*>_func_exp10
  8360. ufunc_exp10_ptr[2*1+1] = <void*>(<char*>"exp10")
  8361. ufunc_exp10_data[0] = &ufunc_exp10_ptr[2*0]
  8362. ufunc_exp10_data[1] = &ufunc_exp10_ptr[2*1]
  8363. exp10 = np.PyUFunc_FromFuncAndData(ufunc_exp10_loops, ufunc_exp10_data, ufunc_exp10_types, 2, 1, 1, 0, "exp10", ufunc_exp10_doc, 0)
  8364. cdef np.PyUFuncGenericFunction ufunc_exp2_loops[2]
  8365. cdef void *ufunc_exp2_ptr[4]
  8366. cdef void *ufunc_exp2_data[2]
  8367. cdef char ufunc_exp2_types[4]
  8368. cdef char *ufunc_exp2_doc = (
  8369. "exp2(x, out=None)\n"
  8370. "\n"
  8371. "Compute ``2**x`` element-wise.\n"
  8372. "\n"
  8373. "Parameters\n"
  8374. "----------\n"
  8375. "x : array_like\n"
  8376. " `x` must contain real numbers.\n"
  8377. "out : ndarray, optional\n"
  8378. " Optional output array for the function values\n"
  8379. "\n"
  8380. "Returns\n"
  8381. "-------\n"
  8382. "scalar or ndarray\n"
  8383. " ``2**x``, computed element-wise.\n"
  8384. "\n"
  8385. "Examples\n"
  8386. "--------\n"
  8387. ">>> import numpy as np\n"
  8388. ">>> from scipy.special import exp2\n"
  8389. "\n"
  8390. ">>> exp2(3)\n"
  8391. "8.0\n"
  8392. ">>> x = np.array([[-1, -0.5, 0], [0.5, 1, 1.5]])\n"
  8393. ">>> exp2(x)\n"
  8394. "array([[ 0.5 , 0.70710678, 1. ],\n"
  8395. " [ 1.41421356, 2. , 2.82842712]])")
  8396. ufunc_exp2_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8397. ufunc_exp2_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8398. ufunc_exp2_types[0] = <char>NPY_FLOAT
  8399. ufunc_exp2_types[1] = <char>NPY_FLOAT
  8400. ufunc_exp2_types[2] = <char>NPY_DOUBLE
  8401. ufunc_exp2_types[3] = <char>NPY_DOUBLE
  8402. ufunc_exp2_ptr[2*0] = <void*>_func_exp2
  8403. ufunc_exp2_ptr[2*0+1] = <void*>(<char*>"exp2")
  8404. ufunc_exp2_ptr[2*1] = <void*>_func_exp2
  8405. ufunc_exp2_ptr[2*1+1] = <void*>(<char*>"exp2")
  8406. ufunc_exp2_data[0] = &ufunc_exp2_ptr[2*0]
  8407. ufunc_exp2_data[1] = &ufunc_exp2_ptr[2*1]
  8408. exp2 = np.PyUFunc_FromFuncAndData(ufunc_exp2_loops, ufunc_exp2_data, ufunc_exp2_types, 2, 1, 1, 0, "exp2", ufunc_exp2_doc, 0)
  8409. cdef np.PyUFuncGenericFunction ufunc_expi_loops[4]
  8410. cdef void *ufunc_expi_ptr[8]
  8411. cdef void *ufunc_expi_data[4]
  8412. cdef char ufunc_expi_types[8]
  8413. cdef char *ufunc_expi_doc = (
  8414. "expi(x, out=None)\n"
  8415. "\n"
  8416. "Exponential integral Ei.\n"
  8417. "\n"
  8418. "For real :math:`x`, the exponential integral is defined as [1]_\n"
  8419. "\n"
  8420. ".. math::\n"
  8421. "\n"
  8422. " Ei(x) = \\int_{-\\infty}^x \\frac{e^t}{t} dt.\n"
  8423. "\n"
  8424. "For :math:`x > 0` the integral is understood as a Cauchy principal\n"
  8425. "value.\n"
  8426. "\n"
  8427. "It is extended to the complex plane by analytic continuation of\n"
  8428. "the function on the interval :math:`(0, \\infty)`. The complex\n"
  8429. "variant has a branch cut on the negative real axis.\n"
  8430. "\n"
  8431. "Parameters\n"
  8432. "----------\n"
  8433. "x : array_like\n"
  8434. " Real or complex valued argument\n"
  8435. "out : ndarray, optional\n"
  8436. " Optional output array for the function results\n"
  8437. "\n"
  8438. "Returns\n"
  8439. "-------\n"
  8440. "scalar or ndarray\n"
  8441. " Values of the exponential integral\n"
  8442. "\n"
  8443. "Notes\n"
  8444. "-----\n"
  8445. "The exponential integrals :math:`E_1` and :math:`Ei` satisfy the\n"
  8446. "relation\n"
  8447. "\n"
  8448. ".. math::\n"
  8449. "\n"
  8450. " E_1(x) = -Ei(-x)\n"
  8451. "\n"
  8452. "for :math:`x > 0`.\n"
  8453. "\n"
  8454. "See Also\n"
  8455. "--------\n"
  8456. "exp1 : Exponential integral :math:`E_1`\n"
  8457. "expn : Generalized exponential integral :math:`E_n`\n"
  8458. "\n"
  8459. "References\n"
  8460. "----------\n"
  8461. ".. [1] Digital Library of Mathematical Functions, 6.2.5\n"
  8462. " https://dlmf.nist.gov/6.2#E5\n"
  8463. "\n"
  8464. "Examples\n"
  8465. "--------\n"
  8466. ">>> import numpy as np\n"
  8467. ">>> import scipy.special as sc\n"
  8468. "\n"
  8469. "It is related to `exp1`.\n"
  8470. "\n"
  8471. ">>> x = np.array([1, 2, 3, 4])\n"
  8472. ">>> -sc.expi(-x)\n"
  8473. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])\n"
  8474. ">>> sc.exp1(x)\n"
  8475. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])\n"
  8476. "\n"
  8477. "The complex variant has a branch cut on the negative real axis.\n"
  8478. "\n"
  8479. ">>> sc.expi(-1 + 1e-12j)\n"
  8480. "(-0.21938393439552062+3.1415926535894254j)\n"
  8481. ">>> sc.expi(-1 - 1e-12j)\n"
  8482. "(-0.21938393439552062-3.1415926535894254j)\n"
  8483. "\n"
  8484. "As the complex variant approaches the branch cut, the real parts\n"
  8485. "approach the value of the real variant.\n"
  8486. "\n"
  8487. ">>> sc.expi(-1)\n"
  8488. "-0.21938393439552062\n"
  8489. "\n"
  8490. "The SciPy implementation returns the real variant for complex\n"
  8491. "values on the branch cut.\n"
  8492. "\n"
  8493. ">>> sc.expi(complex(-1, 0.0))\n"
  8494. "(-0.21938393439552062-0j)\n"
  8495. ">>> sc.expi(complex(-1, -0.0))\n"
  8496. "(-0.21938393439552062-0j)")
  8497. ufunc_expi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8498. ufunc_expi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8499. ufunc_expi_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  8500. ufunc_expi_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  8501. ufunc_expi_types[0] = <char>NPY_FLOAT
  8502. ufunc_expi_types[1] = <char>NPY_FLOAT
  8503. ufunc_expi_types[2] = <char>NPY_DOUBLE
  8504. ufunc_expi_types[3] = <char>NPY_DOUBLE
  8505. ufunc_expi_types[4] = <char>NPY_CFLOAT
  8506. ufunc_expi_types[5] = <char>NPY_CFLOAT
  8507. ufunc_expi_types[6] = <char>NPY_CDOUBLE
  8508. ufunc_expi_types[7] = <char>NPY_CDOUBLE
  8509. ufunc_expi_ptr[2*0] = <void*>_func_expi_wrap
  8510. ufunc_expi_ptr[2*0+1] = <void*>(<char*>"expi")
  8511. ufunc_expi_ptr[2*1] = <void*>_func_expi_wrap
  8512. ufunc_expi_ptr[2*1+1] = <void*>(<char*>"expi")
  8513. ufunc_expi_ptr[2*2] = <void*>_func_cexpi_wrap
  8514. ufunc_expi_ptr[2*2+1] = <void*>(<char*>"expi")
  8515. ufunc_expi_ptr[2*3] = <void*>_func_cexpi_wrap
  8516. ufunc_expi_ptr[2*3+1] = <void*>(<char*>"expi")
  8517. ufunc_expi_data[0] = &ufunc_expi_ptr[2*0]
  8518. ufunc_expi_data[1] = &ufunc_expi_ptr[2*1]
  8519. ufunc_expi_data[2] = &ufunc_expi_ptr[2*2]
  8520. ufunc_expi_data[3] = &ufunc_expi_ptr[2*3]
  8521. expi = np.PyUFunc_FromFuncAndData(ufunc_expi_loops, ufunc_expi_data, ufunc_expi_types, 4, 1, 1, 0, "expi", ufunc_expi_doc, 0)
  8522. cdef np.PyUFuncGenericFunction ufunc_expit_loops[3]
  8523. cdef void *ufunc_expit_ptr[6]
  8524. cdef void *ufunc_expit_data[3]
  8525. cdef char ufunc_expit_types[6]
  8526. cdef char *ufunc_expit_doc = (
  8527. "expit(x, out=None)\n"
  8528. "\n"
  8529. "Expit (a.k.a. logistic sigmoid) ufunc for ndarrays.\n"
  8530. "\n"
  8531. "The expit function, also known as the logistic sigmoid function, is\n"
  8532. "defined as ``expit(x) = 1/(1+exp(-x))``. It is the inverse of the\n"
  8533. "logit function.\n"
  8534. "\n"
  8535. "Parameters\n"
  8536. "----------\n"
  8537. "x : ndarray\n"
  8538. " The ndarray to apply expit to element-wise.\n"
  8539. "out : ndarray, optional\n"
  8540. " Optional output array for the function values\n"
  8541. "\n"
  8542. "Returns\n"
  8543. "-------\n"
  8544. "scalar or ndarray\n"
  8545. " An ndarray of the same shape as x. Its entries\n"
  8546. " are `expit` of the corresponding entry of x.\n"
  8547. "\n"
  8548. "See Also\n"
  8549. "--------\n"
  8550. "logit\n"
  8551. "\n"
  8552. "Notes\n"
  8553. "-----\n"
  8554. "As a ufunc expit takes a number of optional\n"
  8555. "keyword arguments. For more information\n"
  8556. "see `ufuncs <https://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_\n"
  8557. "\n"
  8558. ".. versionadded:: 0.10.0\n"
  8559. "\n"
  8560. "Examples\n"
  8561. "--------\n"
  8562. ">>> import numpy as np\n"
  8563. ">>> from scipy.special import expit, logit\n"
  8564. "\n"
  8565. ">>> expit([-np.inf, -1.5, 0, 1.5, np.inf])\n"
  8566. "array([ 0. , 0.18242552, 0.5 , 0.81757448, 1. ])\n"
  8567. "\n"
  8568. "`logit` is the inverse of `expit`:\n"
  8569. "\n"
  8570. ">>> logit(expit([-2.5, 0, 3.1, 5.0]))\n"
  8571. "array([-2.5, 0. , 3.1, 5. ])\n"
  8572. "\n"
  8573. "Plot expit(x) for x in [-6, 6]:\n"
  8574. "\n"
  8575. ">>> import matplotlib.pyplot as plt\n"
  8576. ">>> x = np.linspace(-6, 6, 121)\n"
  8577. ">>> y = expit(x)\n"
  8578. ">>> plt.plot(x, y)\n"
  8579. ">>> plt.grid()\n"
  8580. ">>> plt.xlim(-6, 6)\n"
  8581. ">>> plt.xlabel('x')\n"
  8582. ">>> plt.title('expit(x)')\n"
  8583. ">>> plt.show()")
  8584. ufunc_expit_loops[0] = <np.PyUFuncGenericFunction>loop_f_f__As_f_f
  8585. ufunc_expit_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8586. ufunc_expit_loops[2] = <np.PyUFuncGenericFunction>loop_g_g__As_g_g
  8587. ufunc_expit_types[0] = <char>NPY_FLOAT
  8588. ufunc_expit_types[1] = <char>NPY_FLOAT
  8589. ufunc_expit_types[2] = <char>NPY_DOUBLE
  8590. ufunc_expit_types[3] = <char>NPY_DOUBLE
  8591. ufunc_expit_types[4] = <char>NPY_LONGDOUBLE
  8592. ufunc_expit_types[5] = <char>NPY_LONGDOUBLE
  8593. ufunc_expit_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_expitf
  8594. ufunc_expit_ptr[2*0+1] = <void*>(<char*>"expit")
  8595. ufunc_expit_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_expit
  8596. ufunc_expit_ptr[2*1+1] = <void*>(<char*>"expit")
  8597. ufunc_expit_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_expitl
  8598. ufunc_expit_ptr[2*2+1] = <void*>(<char*>"expit")
  8599. ufunc_expit_data[0] = &ufunc_expit_ptr[2*0]
  8600. ufunc_expit_data[1] = &ufunc_expit_ptr[2*1]
  8601. ufunc_expit_data[2] = &ufunc_expit_ptr[2*2]
  8602. expit = np.PyUFunc_FromFuncAndData(ufunc_expit_loops, ufunc_expit_data, ufunc_expit_types, 3, 1, 1, 0, "expit", ufunc_expit_doc, 0)
  8603. cdef np.PyUFuncGenericFunction ufunc_expm1_loops[4]
  8604. cdef void *ufunc_expm1_ptr[8]
  8605. cdef void *ufunc_expm1_data[4]
  8606. cdef char ufunc_expm1_types[8]
  8607. cdef char *ufunc_expm1_doc = (
  8608. "expm1(x, out=None)\n"
  8609. "\n"
  8610. "Compute ``exp(x) - 1``.\n"
  8611. "\n"
  8612. "When `x` is near zero, ``exp(x)`` is near 1, so the numerical calculation\n"
  8613. "of ``exp(x) - 1`` can suffer from catastrophic loss of precision.\n"
  8614. "``expm1(x)`` is implemented to avoid the loss of precision that occurs when\n"
  8615. "`x` is near zero.\n"
  8616. "\n"
  8617. "Parameters\n"
  8618. "----------\n"
  8619. "x : array_like\n"
  8620. " `x` must contain real numbers.\n"
  8621. "out : ndarray, optional\n"
  8622. " Optional output array for the function values\n"
  8623. "\n"
  8624. "Returns\n"
  8625. "-------\n"
  8626. "scalar or ndarray\n"
  8627. " ``exp(x) - 1`` computed element-wise.\n"
  8628. "\n"
  8629. "Examples\n"
  8630. "--------\n"
  8631. ">>> import numpy as np\n"
  8632. ">>> from scipy.special import expm1\n"
  8633. "\n"
  8634. ">>> expm1(1.0)\n"
  8635. "1.7182818284590451\n"
  8636. ">>> expm1([-0.2, -0.1, 0, 0.1, 0.2])\n"
  8637. "array([-0.18126925, -0.09516258, 0. , 0.10517092, 0.22140276])\n"
  8638. "\n"
  8639. "The exact value of ``exp(7.5e-13) - 1`` is::\n"
  8640. "\n"
  8641. " 7.5000000000028125000000007031250000001318...*10**-13.\n"
  8642. "\n"
  8643. "Here is what ``expm1(7.5e-13)`` gives:\n"
  8644. "\n"
  8645. ">>> expm1(7.5e-13)\n"
  8646. "7.5000000000028135e-13\n"
  8647. "\n"
  8648. "Compare that to ``exp(7.5e-13) - 1``, where the subtraction results in\n"
  8649. "a \"catastrophic\" loss of precision:\n"
  8650. "\n"
  8651. ">>> np.exp(7.5e-13) - 1\n"
  8652. "7.5006667543675576e-13")
  8653. ufunc_expm1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8654. ufunc_expm1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8655. ufunc_expm1_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  8656. ufunc_expm1_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  8657. ufunc_expm1_types[0] = <char>NPY_FLOAT
  8658. ufunc_expm1_types[1] = <char>NPY_FLOAT
  8659. ufunc_expm1_types[2] = <char>NPY_DOUBLE
  8660. ufunc_expm1_types[3] = <char>NPY_DOUBLE
  8661. ufunc_expm1_types[4] = <char>NPY_CFLOAT
  8662. ufunc_expm1_types[5] = <char>NPY_CFLOAT
  8663. ufunc_expm1_types[6] = <char>NPY_CDOUBLE
  8664. ufunc_expm1_types[7] = <char>NPY_CDOUBLE
  8665. ufunc_expm1_ptr[2*0] = <void*>_func_expm1
  8666. ufunc_expm1_ptr[2*0+1] = <void*>(<char*>"expm1")
  8667. ufunc_expm1_ptr[2*1] = <void*>_func_expm1
  8668. ufunc_expm1_ptr[2*1+1] = <void*>(<char*>"expm1")
  8669. ufunc_expm1_ptr[2*2] = <void*>_func_cexpm1
  8670. ufunc_expm1_ptr[2*2+1] = <void*>(<char*>"expm1")
  8671. ufunc_expm1_ptr[2*3] = <void*>_func_cexpm1
  8672. ufunc_expm1_ptr[2*3+1] = <void*>(<char*>"expm1")
  8673. ufunc_expm1_data[0] = &ufunc_expm1_ptr[2*0]
  8674. ufunc_expm1_data[1] = &ufunc_expm1_ptr[2*1]
  8675. ufunc_expm1_data[2] = &ufunc_expm1_ptr[2*2]
  8676. ufunc_expm1_data[3] = &ufunc_expm1_ptr[2*3]
  8677. expm1 = np.PyUFunc_FromFuncAndData(ufunc_expm1_loops, ufunc_expm1_data, ufunc_expm1_types, 4, 1, 1, 0, "expm1", ufunc_expm1_doc, 0)
  8678. cdef np.PyUFuncGenericFunction ufunc_expn_loops[3]
  8679. cdef void *ufunc_expn_ptr[6]
  8680. cdef void *ufunc_expn_data[3]
  8681. cdef char ufunc_expn_types[9]
  8682. cdef char *ufunc_expn_doc = (
  8683. "expn(n, x, out=None)\n"
  8684. "\n"
  8685. "Generalized exponential integral En.\n"
  8686. "\n"
  8687. "For integer :math:`n \\geq 0` and real :math:`x \\geq 0` the\n"
  8688. "generalized exponential integral is defined as [dlmf]_\n"
  8689. "\n"
  8690. ".. math::\n"
  8691. "\n"
  8692. " E_n(x) = x^{n - 1} \\int_x^\\infty \\frac{e^{-t}}{t^n} dt.\n"
  8693. "\n"
  8694. "Parameters\n"
  8695. "----------\n"
  8696. "n : array_like\n"
  8697. " Non-negative integers\n"
  8698. "x : array_like\n"
  8699. " Real argument\n"
  8700. "out : ndarray, optional\n"
  8701. " Optional output array for the function results\n"
  8702. "\n"
  8703. "Returns\n"
  8704. "-------\n"
  8705. "scalar or ndarray\n"
  8706. " Values of the generalized exponential integral\n"
  8707. "\n"
  8708. "See Also\n"
  8709. "--------\n"
  8710. "exp1 : special case of :math:`E_n` for :math:`n = 1`\n"
  8711. "expi : related to :math:`E_n` when :math:`n = 1`\n"
  8712. "\n"
  8713. "References\n"
  8714. "----------\n"
  8715. ".. [dlmf] Digital Library of Mathematical Functions, 8.19.2\n"
  8716. " https://dlmf.nist.gov/8.19#E2\n"
  8717. "\n"
  8718. "Examples\n"
  8719. "--------\n"
  8720. ">>> import numpy as np\n"
  8721. ">>> import scipy.special as sc\n"
  8722. "\n"
  8723. "Its domain is nonnegative n and x.\n"
  8724. "\n"
  8725. ">>> sc.expn(-1, 1.0), sc.expn(1, -1.0)\n"
  8726. "(nan, nan)\n"
  8727. "\n"
  8728. "It has a pole at ``x = 0`` for ``n = 1, 2``; for larger ``n`` it\n"
  8729. "is equal to ``1 / (n - 1)``.\n"
  8730. "\n"
  8731. ">>> sc.expn([0, 1, 2, 3, 4], 0)\n"
  8732. "array([ inf, inf, 1. , 0.5 , 0.33333333])\n"
  8733. "\n"
  8734. "For n equal to 0 it reduces to ``exp(-x) / x``.\n"
  8735. "\n"
  8736. ">>> x = np.array([1, 2, 3, 4])\n"
  8737. ">>> sc.expn(0, x)\n"
  8738. "array([0.36787944, 0.06766764, 0.01659569, 0.00457891])\n"
  8739. ">>> np.exp(-x) / x\n"
  8740. "array([0.36787944, 0.06766764, 0.01659569, 0.00457891])\n"
  8741. "\n"
  8742. "For n equal to 1 it reduces to `exp1`.\n"
  8743. "\n"
  8744. ">>> sc.expn(1, x)\n"
  8745. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])\n"
  8746. ">>> sc.exp1(x)\n"
  8747. "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])")
  8748. ufunc_expn_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  8749. ufunc_expn_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  8750. ufunc_expn_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  8751. ufunc_expn_types[0] = <char>NPY_LONG
  8752. ufunc_expn_types[1] = <char>NPY_DOUBLE
  8753. ufunc_expn_types[2] = <char>NPY_DOUBLE
  8754. ufunc_expn_types[3] = <char>NPY_FLOAT
  8755. ufunc_expn_types[4] = <char>NPY_FLOAT
  8756. ufunc_expn_types[5] = <char>NPY_FLOAT
  8757. ufunc_expn_types[6] = <char>NPY_DOUBLE
  8758. ufunc_expn_types[7] = <char>NPY_DOUBLE
  8759. ufunc_expn_types[8] = <char>NPY_DOUBLE
  8760. ufunc_expn_ptr[2*0] = <void*>_func_expn
  8761. ufunc_expn_ptr[2*0+1] = <void*>(<char*>"expn")
  8762. ufunc_expn_ptr[2*1] = <void*>_func_expn_unsafe
  8763. ufunc_expn_ptr[2*1+1] = <void*>(<char*>"expn")
  8764. ufunc_expn_ptr[2*2] = <void*>_func_expn_unsafe
  8765. ufunc_expn_ptr[2*2+1] = <void*>(<char*>"expn")
  8766. ufunc_expn_data[0] = &ufunc_expn_ptr[2*0]
  8767. ufunc_expn_data[1] = &ufunc_expn_ptr[2*1]
  8768. ufunc_expn_data[2] = &ufunc_expn_ptr[2*2]
  8769. expn = np.PyUFunc_FromFuncAndData(ufunc_expn_loops, ufunc_expn_data, ufunc_expn_types, 3, 2, 1, 0, "expn", ufunc_expn_doc, 0)
  8770. cdef np.PyUFuncGenericFunction ufunc_exprel_loops[2]
  8771. cdef void *ufunc_exprel_ptr[4]
  8772. cdef void *ufunc_exprel_data[2]
  8773. cdef char ufunc_exprel_types[4]
  8774. cdef char *ufunc_exprel_doc = (
  8775. "exprel(x, out=None)\n"
  8776. "\n"
  8777. "Relative error exponential, ``(exp(x) - 1)/x``.\n"
  8778. "\n"
  8779. "When `x` is near zero, ``exp(x)`` is near 1, so the numerical calculation\n"
  8780. "of ``exp(x) - 1`` can suffer from catastrophic loss of precision.\n"
  8781. "``exprel(x)`` is implemented to avoid the loss of precision that occurs when\n"
  8782. "`x` is near zero.\n"
  8783. "\n"
  8784. "Parameters\n"
  8785. "----------\n"
  8786. "x : ndarray\n"
  8787. " Input array. `x` must contain real numbers.\n"
  8788. "out : ndarray, optional\n"
  8789. " Optional output array for the function values\n"
  8790. "\n"
  8791. "Returns\n"
  8792. "-------\n"
  8793. "scalar or ndarray\n"
  8794. " ``(exp(x) - 1)/x``, computed element-wise.\n"
  8795. "\n"
  8796. "See Also\n"
  8797. "--------\n"
  8798. "expm1\n"
  8799. "\n"
  8800. "Notes\n"
  8801. "-----\n"
  8802. ".. versionadded:: 0.17.0\n"
  8803. "\n"
  8804. "Examples\n"
  8805. "--------\n"
  8806. ">>> import numpy as np\n"
  8807. ">>> from scipy.special import exprel\n"
  8808. "\n"
  8809. ">>> exprel(0.01)\n"
  8810. "1.0050167084168056\n"
  8811. ">>> exprel([-0.25, -0.1, 0, 0.1, 0.25])\n"
  8812. "array([ 0.88479687, 0.95162582, 1. , 1.05170918, 1.13610167])\n"
  8813. "\n"
  8814. "Compare ``exprel(5e-9)`` to the naive calculation. The exact value\n"
  8815. "is ``1.00000000250000000416...``.\n"
  8816. "\n"
  8817. ">>> exprel(5e-9)\n"
  8818. "1.0000000025\n"
  8819. "\n"
  8820. ">>> (np.exp(5e-9) - 1)/5e-9\n"
  8821. "0.99999999392252903")
  8822. ufunc_exprel_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  8823. ufunc_exprel_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  8824. ufunc_exprel_types[0] = <char>NPY_FLOAT
  8825. ufunc_exprel_types[1] = <char>NPY_FLOAT
  8826. ufunc_exprel_types[2] = <char>NPY_DOUBLE
  8827. ufunc_exprel_types[3] = <char>NPY_DOUBLE
  8828. ufunc_exprel_ptr[2*0] = <void*>_func_exprel
  8829. ufunc_exprel_ptr[2*0+1] = <void*>(<char*>"exprel")
  8830. ufunc_exprel_ptr[2*1] = <void*>_func_exprel
  8831. ufunc_exprel_ptr[2*1+1] = <void*>(<char*>"exprel")
  8832. ufunc_exprel_data[0] = &ufunc_exprel_ptr[2*0]
  8833. ufunc_exprel_data[1] = &ufunc_exprel_ptr[2*1]
  8834. exprel = np.PyUFunc_FromFuncAndData(ufunc_exprel_loops, ufunc_exprel_data, ufunc_exprel_types, 2, 1, 1, 0, "exprel", ufunc_exprel_doc, 0)
  8835. cdef np.PyUFuncGenericFunction ufunc_fdtr_loops[2]
  8836. cdef void *ufunc_fdtr_ptr[4]
  8837. cdef void *ufunc_fdtr_data[2]
  8838. cdef char ufunc_fdtr_types[8]
  8839. cdef char *ufunc_fdtr_doc = (
  8840. "fdtr(dfn, dfd, x, out=None)\n"
  8841. "\n"
  8842. "F cumulative distribution function.\n"
  8843. "\n"
  8844. "Returns the value of the cumulative distribution function of the\n"
  8845. "F-distribution, also known as Snedecor's F-distribution or the\n"
  8846. "Fisher-Snedecor distribution.\n"
  8847. "\n"
  8848. "The F-distribution with parameters :math:`d_n` and :math:`d_d` is the\n"
  8849. "distribution of the random variable,\n"
  8850. "\n"
  8851. ".. math::\n"
  8852. " X = \\frac{U_n/d_n}{U_d/d_d},\n"
  8853. "\n"
  8854. "where :math:`U_n` and :math:`U_d` are random variables distributed\n"
  8855. ":math:`\\chi^2`, with :math:`d_n` and :math:`d_d` degrees of freedom,\n"
  8856. "respectively.\n"
  8857. "\n"
  8858. "Parameters\n"
  8859. "----------\n"
  8860. "dfn : array_like\n"
  8861. " First parameter (positive float).\n"
  8862. "dfd : array_like\n"
  8863. " Second parameter (positive float).\n"
  8864. "x : array_like\n"
  8865. " Argument (nonnegative float).\n"
  8866. "out : ndarray, optional\n"
  8867. " Optional output array for the function values\n"
  8868. "\n"
  8869. "Returns\n"
  8870. "-------\n"
  8871. "y : scalar or ndarray\n"
  8872. " The CDF of the F-distribution with parameters `dfn` and `dfd` at `x`.\n"
  8873. "\n"
  8874. "See Also\n"
  8875. "--------\n"
  8876. "fdtrc : F distribution survival function\n"
  8877. "fdtri : F distribution inverse cumulative distribution\n"
  8878. "scipy.stats.f : F distribution\n"
  8879. "\n"
  8880. "Notes\n"
  8881. "-----\n"
  8882. "The regularized incomplete beta function is used, according to the\n"
  8883. "formula,\n"
  8884. "\n"
  8885. ".. math::\n"
  8886. " F(d_n, d_d; x) = I_{xd_n/(d_d + xd_n)}(d_n/2, d_d/2).\n"
  8887. "\n"
  8888. "Wrapper for the Cephes [1]_ routine `fdtr`. The F distribution is also\n"
  8889. "available as `scipy.stats.f`. Calling `fdtr` directly can improve\n"
  8890. "performance compared to the ``cdf`` method of `scipy.stats.f` (see last\n"
  8891. "example below).\n"
  8892. "\n"
  8893. "References\n"
  8894. "----------\n"
  8895. ".. [1] Cephes Mathematical Functions Library,\n"
  8896. " http://www.netlib.org/cephes/\n"
  8897. "\n"
  8898. "Examples\n"
  8899. "--------\n"
  8900. "Calculate the function for ``dfn=1`` and ``dfd=2`` at ``x=1``.\n"
  8901. "\n"
  8902. ">>> import numpy as np\n"
  8903. ">>> from scipy.special import fdtr\n"
  8904. ">>> fdtr(1, 2, 1)\n"
  8905. "0.5773502691896258\n"
  8906. "\n"
  8907. "Calculate the function at several points by providing a NumPy array for\n"
  8908. "`x`.\n"
  8909. "\n"
  8910. ">>> x = np.array([0.5, 2., 3.])\n"
  8911. ">>> fdtr(1, 2, x)\n"
  8912. "array([0.4472136 , 0.70710678, 0.77459667])\n"
  8913. "\n"
  8914. "Plot the function for several parameter sets.\n"
  8915. "\n"
  8916. ">>> import matplotlib.pyplot as plt\n"
  8917. ">>> dfn_parameters = [1, 5, 10, 50]\n"
  8918. ">>> dfd_parameters = [1, 1, 2, 3]\n"
  8919. ">>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']\n"
  8920. ">>> parameters_list = list(zip(dfn_parameters, dfd_parameters,\n"
  8921. "... linestyles))\n"
  8922. ">>> x = np.linspace(0, 30, 1000)\n"
  8923. ">>> fig, ax = plt.subplots()\n"
  8924. ">>> for parameter_set in parameters_list:\n"
  8925. "... dfn, dfd, style = parameter_set\n"
  8926. "... fdtr_vals = fdtr(dfn, dfd, x)\n"
  8927. "... ax.plot(x, fdtr_vals, label=rf\"$d_n={dfn},\\, d_d={dfd}$\",\n"
  8928. "... ls=style)\n"
  8929. ">>> ax.legend()\n"
  8930. ">>> ax.set_xlabel(\"$x$\")\n"
  8931. ">>> ax.set_title(\"F distribution cumulative distribution function\")\n"
  8932. ">>> plt.show()\n"
  8933. "\n"
  8934. "The F distribution is also available as `scipy.stats.f`. Using `fdtr`\n"
  8935. "directly can be much faster than calling the ``cdf`` method of\n"
  8936. "`scipy.stats.f`, especially for small arrays or individual values.\n"
  8937. "To get the same results one must use the following parametrization:\n"
  8938. "``stats.f(dfn, dfd).cdf(x)=fdtr(dfn, dfd, x)``.\n"
  8939. "\n"
  8940. ">>> from scipy.stats import f\n"
  8941. ">>> dfn, dfd = 1, 2\n"
  8942. ">>> x = 1\n"
  8943. ">>> fdtr_res = fdtr(dfn, dfd, x) # this will often be faster than below\n"
  8944. ">>> f_dist_res = f(dfn, dfd).cdf(x)\n"
  8945. ">>> fdtr_res == f_dist_res # test that results are equal\n"
  8946. "True")
  8947. ufunc_fdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  8948. ufunc_fdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  8949. ufunc_fdtr_types[0] = <char>NPY_FLOAT
  8950. ufunc_fdtr_types[1] = <char>NPY_FLOAT
  8951. ufunc_fdtr_types[2] = <char>NPY_FLOAT
  8952. ufunc_fdtr_types[3] = <char>NPY_FLOAT
  8953. ufunc_fdtr_types[4] = <char>NPY_DOUBLE
  8954. ufunc_fdtr_types[5] = <char>NPY_DOUBLE
  8955. ufunc_fdtr_types[6] = <char>NPY_DOUBLE
  8956. ufunc_fdtr_types[7] = <char>NPY_DOUBLE
  8957. ufunc_fdtr_ptr[2*0] = <void*>_func_fdtr
  8958. ufunc_fdtr_ptr[2*0+1] = <void*>(<char*>"fdtr")
  8959. ufunc_fdtr_ptr[2*1] = <void*>_func_fdtr
  8960. ufunc_fdtr_ptr[2*1+1] = <void*>(<char*>"fdtr")
  8961. ufunc_fdtr_data[0] = &ufunc_fdtr_ptr[2*0]
  8962. ufunc_fdtr_data[1] = &ufunc_fdtr_ptr[2*1]
  8963. fdtr = np.PyUFunc_FromFuncAndData(ufunc_fdtr_loops, ufunc_fdtr_data, ufunc_fdtr_types, 2, 3, 1, 0, "fdtr", ufunc_fdtr_doc, 0)
  8964. cdef np.PyUFuncGenericFunction ufunc_fdtrc_loops[2]
  8965. cdef void *ufunc_fdtrc_ptr[4]
  8966. cdef void *ufunc_fdtrc_data[2]
  8967. cdef char ufunc_fdtrc_types[8]
  8968. cdef char *ufunc_fdtrc_doc = (
  8969. "fdtrc(dfn, dfd, x, out=None)\n"
  8970. "\n"
  8971. "F survival function.\n"
  8972. "\n"
  8973. "Returns the complemented F-distribution function (the integral of the\n"
  8974. "density from `x` to infinity).\n"
  8975. "\n"
  8976. "Parameters\n"
  8977. "----------\n"
  8978. "dfn : array_like\n"
  8979. " First parameter (positive float).\n"
  8980. "dfd : array_like\n"
  8981. " Second parameter (positive float).\n"
  8982. "x : array_like\n"
  8983. " Argument (nonnegative float).\n"
  8984. "out : ndarray, optional\n"
  8985. " Optional output array for the function values\n"
  8986. "\n"
  8987. "Returns\n"
  8988. "-------\n"
  8989. "y : scalar or ndarray\n"
  8990. " The complemented F-distribution function with parameters `dfn` and\n"
  8991. " `dfd` at `x`.\n"
  8992. "\n"
  8993. "See Also\n"
  8994. "--------\n"
  8995. "fdtr : F distribution cumulative distribution function\n"
  8996. "fdtri : F distribution inverse cumulative distribution function\n"
  8997. "scipy.stats.f : F distribution\n"
  8998. "\n"
  8999. "Notes\n"
  9000. "-----\n"
  9001. "The regularized incomplete beta function is used, according to the\n"
  9002. "formula,\n"
  9003. "\n"
  9004. ".. math::\n"
  9005. " F(d_n, d_d; x) = I_{d_d/(d_d + xd_n)}(d_d/2, d_n/2).\n"
  9006. "\n"
  9007. "Wrapper for the Cephes [1]_ routine `fdtrc`. The F distribution is also\n"
  9008. "available as `scipy.stats.f`. Calling `fdtrc` directly can improve\n"
  9009. "performance compared to the ``sf`` method of `scipy.stats.f` (see last\n"
  9010. "example below).\n"
  9011. "\n"
  9012. "References\n"
  9013. "----------\n"
  9014. ".. [1] Cephes Mathematical Functions Library,\n"
  9015. " http://www.netlib.org/cephes/\n"
  9016. "\n"
  9017. "Examples\n"
  9018. "--------\n"
  9019. "Calculate the function for ``dfn=1`` and ``dfd=2`` at ``x=1``.\n"
  9020. "\n"
  9021. ">>> import numpy as np\n"
  9022. ">>> from scipy.special import fdtrc\n"
  9023. ">>> fdtrc(1, 2, 1)\n"
  9024. "0.42264973081037427\n"
  9025. "\n"
  9026. "Calculate the function at several points by providing a NumPy array for\n"
  9027. "`x`.\n"
  9028. "\n"
  9029. ">>> x = np.array([0.5, 2., 3.])\n"
  9030. ">>> fdtrc(1, 2, x)\n"
  9031. "array([0.5527864 , 0.29289322, 0.22540333])\n"
  9032. "\n"
  9033. "Plot the function for several parameter sets.\n"
  9034. "\n"
  9035. ">>> import matplotlib.pyplot as plt\n"
  9036. ">>> dfn_parameters = [1, 5, 10, 50]\n"
  9037. ">>> dfd_parameters = [1, 1, 2, 3]\n"
  9038. ">>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']\n"
  9039. ">>> parameters_list = list(zip(dfn_parameters, dfd_parameters,\n"
  9040. "... linestyles))\n"
  9041. ">>> x = np.linspace(0, 30, 1000)\n"
  9042. ">>> fig, ax = plt.subplots()\n"
  9043. ">>> for parameter_set in parameters_list:\n"
  9044. "... dfn, dfd, style = parameter_set\n"
  9045. "... fdtrc_vals = fdtrc(dfn, dfd, x)\n"
  9046. "... ax.plot(x, fdtrc_vals, label=rf\"$d_n={dfn},\\, d_d={dfd}$\",\n"
  9047. "... ls=style)\n"
  9048. ">>> ax.legend()\n"
  9049. ">>> ax.set_xlabel(\"$x$\")\n"
  9050. ">>> ax.set_title(\"F distribution survival function\")\n"
  9051. ">>> plt.show()\n"
  9052. "\n"
  9053. "The F distribution is also available as `scipy.stats.f`. Using `fdtrc`\n"
  9054. "directly can be much faster than calling the ``sf`` method of\n"
  9055. "`scipy.stats.f`, especially for small arrays or individual values.\n"
  9056. "To get the same results one must use the following parametrization:\n"
  9057. "``stats.f(dfn, dfd).sf(x)=fdtrc(dfn, dfd, x)``.\n"
  9058. "\n"
  9059. ">>> from scipy.stats import f\n"
  9060. ">>> dfn, dfd = 1, 2\n"
  9061. ">>> x = 1\n"
  9062. ">>> fdtrc_res = fdtrc(dfn, dfd, x) # this will often be faster than below\n"
  9063. ">>> f_dist_res = f(dfn, dfd).sf(x)\n"
  9064. ">>> f_dist_res == fdtrc_res # test that results are equal\n"
  9065. "True")
  9066. ufunc_fdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  9067. ufunc_fdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  9068. ufunc_fdtrc_types[0] = <char>NPY_FLOAT
  9069. ufunc_fdtrc_types[1] = <char>NPY_FLOAT
  9070. ufunc_fdtrc_types[2] = <char>NPY_FLOAT
  9071. ufunc_fdtrc_types[3] = <char>NPY_FLOAT
  9072. ufunc_fdtrc_types[4] = <char>NPY_DOUBLE
  9073. ufunc_fdtrc_types[5] = <char>NPY_DOUBLE
  9074. ufunc_fdtrc_types[6] = <char>NPY_DOUBLE
  9075. ufunc_fdtrc_types[7] = <char>NPY_DOUBLE
  9076. ufunc_fdtrc_ptr[2*0] = <void*>_func_fdtrc
  9077. ufunc_fdtrc_ptr[2*0+1] = <void*>(<char*>"fdtrc")
  9078. ufunc_fdtrc_ptr[2*1] = <void*>_func_fdtrc
  9079. ufunc_fdtrc_ptr[2*1+1] = <void*>(<char*>"fdtrc")
  9080. ufunc_fdtrc_data[0] = &ufunc_fdtrc_ptr[2*0]
  9081. ufunc_fdtrc_data[1] = &ufunc_fdtrc_ptr[2*1]
  9082. fdtrc = np.PyUFunc_FromFuncAndData(ufunc_fdtrc_loops, ufunc_fdtrc_data, ufunc_fdtrc_types, 2, 3, 1, 0, "fdtrc", ufunc_fdtrc_doc, 0)
  9083. cdef np.PyUFuncGenericFunction ufunc_fdtri_loops[2]
  9084. cdef void *ufunc_fdtri_ptr[4]
  9085. cdef void *ufunc_fdtri_data[2]
  9086. cdef char ufunc_fdtri_types[8]
  9087. cdef char *ufunc_fdtri_doc = (
  9088. "fdtri(dfn, dfd, p, out=None)\n"
  9089. "\n"
  9090. "The `p`-th quantile of the F-distribution.\n"
  9091. "\n"
  9092. "This function is the inverse of the F-distribution CDF, `fdtr`, returning\n"
  9093. "the `x` such that `fdtr(dfn, dfd, x) = p`.\n"
  9094. "\n"
  9095. "Parameters\n"
  9096. "----------\n"
  9097. "dfn : array_like\n"
  9098. " First parameter (positive float).\n"
  9099. "dfd : array_like\n"
  9100. " Second parameter (positive float).\n"
  9101. "p : array_like\n"
  9102. " Cumulative probability, in [0, 1].\n"
  9103. "out : ndarray, optional\n"
  9104. " Optional output array for the function values\n"
  9105. "\n"
  9106. "Returns\n"
  9107. "-------\n"
  9108. "x : scalar or ndarray\n"
  9109. " The quantile corresponding to `p`.\n"
  9110. "\n"
  9111. "See Also\n"
  9112. "--------\n"
  9113. "fdtr : F distribution cumulative distribution function\n"
  9114. "fdtrc : F distribution survival function\n"
  9115. "scipy.stats.f : F distribution\n"
  9116. "\n"
  9117. "Notes\n"
  9118. "-----\n"
  9119. "The computation is carried out using the relation to the inverse\n"
  9120. "regularized beta function, :math:`I^{-1}_x(a, b)`. Let\n"
  9121. ":math:`z = I^{-1}_p(d_d/2, d_n/2).` Then,\n"
  9122. "\n"
  9123. ".. math::\n"
  9124. " x = \\frac{d_d (1 - z)}{d_n z}.\n"
  9125. "\n"
  9126. "If `p` is such that :math:`x < 0.5`, the following relation is used\n"
  9127. "instead for improved stability: let\n"
  9128. ":math:`z' = I^{-1}_{1 - p}(d_n/2, d_d/2).` Then,\n"
  9129. "\n"
  9130. ".. math::\n"
  9131. " x = \\frac{d_d z'}{d_n (1 - z')}.\n"
  9132. "\n"
  9133. "Wrapper for the Cephes [1]_ routine `fdtri`.\n"
  9134. "\n"
  9135. "The F distribution is also available as `scipy.stats.f`. Calling\n"
  9136. "`fdtri` directly can improve performance compared to the ``ppf``\n"
  9137. "method of `scipy.stats.f` (see last example below).\n"
  9138. "\n"
  9139. "References\n"
  9140. "----------\n"
  9141. ".. [1] Cephes Mathematical Functions Library,\n"
  9142. " http://www.netlib.org/cephes/\n"
  9143. "\n"
  9144. "Examples\n"
  9145. "--------\n"
  9146. "`fdtri` represents the inverse of the F distribution CDF which is\n"
  9147. "available as `fdtr`. Here, we calculate the CDF for ``df1=1``, ``df2=2``\n"
  9148. "at ``x=3``. `fdtri` then returns ``3`` given the same values for `df1`,\n"
  9149. "`df2` and the computed CDF value.\n"
  9150. "\n"
  9151. ">>> import numpy as np\n"
  9152. ">>> from scipy.special import fdtri, fdtr\n"
  9153. ">>> df1, df2 = 1, 2\n"
  9154. ">>> x = 3\n"
  9155. ">>> cdf_value = fdtr(df1, df2, x)\n"
  9156. ">>> fdtri(df1, df2, cdf_value)\n"
  9157. "3.000000000000006\n"
  9158. "\n"
  9159. "Calculate the function at several points by providing a NumPy array for\n"
  9160. "`x`.\n"
  9161. "\n"
  9162. ">>> x = np.array([0.1, 0.4, 0.7])\n"
  9163. ">>> fdtri(1, 2, x)\n"
  9164. "array([0.02020202, 0.38095238, 1.92156863])\n"
  9165. "\n"
  9166. "Plot the function for several parameter sets.\n"
  9167. "\n"
  9168. ">>> import matplotlib.pyplot as plt\n"
  9169. ">>> dfn_parameters = [50, 10, 1, 50]\n"
  9170. ">>> dfd_parameters = [0.5, 1, 1, 5]\n"
  9171. ">>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']\n"
  9172. ">>> parameters_list = list(zip(dfn_parameters, dfd_parameters,\n"
  9173. "... linestyles))\n"
  9174. ">>> x = np.linspace(0, 1, 1000)\n"
  9175. ">>> fig, ax = plt.subplots()\n"
  9176. ">>> for parameter_set in parameters_list:\n"
  9177. "... dfn, dfd, style = parameter_set\n"
  9178. "... fdtri_vals = fdtri(dfn, dfd, x)\n"
  9179. "... ax.plot(x, fdtri_vals, label=rf\"$d_n={dfn},\\, d_d={dfd}$\",\n"
  9180. "... ls=style)\n"
  9181. ">>> ax.legend()\n"
  9182. ">>> ax.set_xlabel(\"$x$\")\n"
  9183. ">>> title = \"F distribution inverse cumulative distribution function\"\n"
  9184. ">>> ax.set_title(title)\n"
  9185. ">>> ax.set_ylim(0, 30)\n"
  9186. ">>> plt.show()\n"
  9187. "\n"
  9188. "The F distribution is also available as `scipy.stats.f`. Using `fdtri`\n"
  9189. "directly can be much faster than calling the ``ppf`` method of\n"
  9190. "`scipy.stats.f`, especially for small arrays or individual values.\n"
  9191. "To get the same results one must use the following parametrization:\n"
  9192. "``stats.f(dfn, dfd).ppf(x)=fdtri(dfn, dfd, x)``.\n"
  9193. "\n"
  9194. ">>> from scipy.stats import f\n"
  9195. ">>> dfn, dfd = 1, 2\n"
  9196. ">>> x = 0.7\n"
  9197. ">>> fdtri_res = fdtri(dfn, dfd, x) # this will often be faster than below\n"
  9198. ">>> f_dist_res = f(dfn, dfd).ppf(x)\n"
  9199. ">>> f_dist_res == fdtri_res # test that results are equal\n"
  9200. "True")
  9201. ufunc_fdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  9202. ufunc_fdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  9203. ufunc_fdtri_types[0] = <char>NPY_FLOAT
  9204. ufunc_fdtri_types[1] = <char>NPY_FLOAT
  9205. ufunc_fdtri_types[2] = <char>NPY_FLOAT
  9206. ufunc_fdtri_types[3] = <char>NPY_FLOAT
  9207. ufunc_fdtri_types[4] = <char>NPY_DOUBLE
  9208. ufunc_fdtri_types[5] = <char>NPY_DOUBLE
  9209. ufunc_fdtri_types[6] = <char>NPY_DOUBLE
  9210. ufunc_fdtri_types[7] = <char>NPY_DOUBLE
  9211. ufunc_fdtri_ptr[2*0] = <void*>_func_fdtri
  9212. ufunc_fdtri_ptr[2*0+1] = <void*>(<char*>"fdtri")
  9213. ufunc_fdtri_ptr[2*1] = <void*>_func_fdtri
  9214. ufunc_fdtri_ptr[2*1+1] = <void*>(<char*>"fdtri")
  9215. ufunc_fdtri_data[0] = &ufunc_fdtri_ptr[2*0]
  9216. ufunc_fdtri_data[1] = &ufunc_fdtri_ptr[2*1]
  9217. fdtri = np.PyUFunc_FromFuncAndData(ufunc_fdtri_loops, ufunc_fdtri_data, ufunc_fdtri_types, 2, 3, 1, 0, "fdtri", ufunc_fdtri_doc, 0)
  9218. cdef np.PyUFuncGenericFunction ufunc_fdtridfd_loops[2]
  9219. cdef void *ufunc_fdtridfd_ptr[4]
  9220. cdef void *ufunc_fdtridfd_data[2]
  9221. cdef char ufunc_fdtridfd_types[8]
  9222. cdef char *ufunc_fdtridfd_doc = (
  9223. "fdtridfd(dfn, p, x, out=None)\n"
  9224. "\n"
  9225. "Inverse to `fdtr` vs dfd\n"
  9226. "\n"
  9227. "Finds the F density argument dfd such that ``fdtr(dfn, dfd, x) == p``.\n"
  9228. "\n"
  9229. "Parameters\n"
  9230. "----------\n"
  9231. "dfn : array_like\n"
  9232. " First parameter (positive float).\n"
  9233. "p : array_like\n"
  9234. " Cumulative probability, in [0, 1].\n"
  9235. "x : array_like\n"
  9236. " Argument (nonnegative float).\n"
  9237. "out : ndarray, optional\n"
  9238. " Optional output array for the function values\n"
  9239. "\n"
  9240. "Returns\n"
  9241. "-------\n"
  9242. "dfd : scalar or ndarray\n"
  9243. " `dfd` such that ``fdtr(dfn, dfd, x) == p``.\n"
  9244. "\n"
  9245. "See Also\n"
  9246. "--------\n"
  9247. "fdtr, fdtrc, fdtri")
  9248. ufunc_fdtridfd_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  9249. ufunc_fdtridfd_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  9250. ufunc_fdtridfd_types[0] = <char>NPY_FLOAT
  9251. ufunc_fdtridfd_types[1] = <char>NPY_FLOAT
  9252. ufunc_fdtridfd_types[2] = <char>NPY_FLOAT
  9253. ufunc_fdtridfd_types[3] = <char>NPY_FLOAT
  9254. ufunc_fdtridfd_types[4] = <char>NPY_DOUBLE
  9255. ufunc_fdtridfd_types[5] = <char>NPY_DOUBLE
  9256. ufunc_fdtridfd_types[6] = <char>NPY_DOUBLE
  9257. ufunc_fdtridfd_types[7] = <char>NPY_DOUBLE
  9258. ufunc_fdtridfd_ptr[2*0] = <void*>_func_cdff4_wrap
  9259. ufunc_fdtridfd_ptr[2*0+1] = <void*>(<char*>"fdtridfd")
  9260. ufunc_fdtridfd_ptr[2*1] = <void*>_func_cdff4_wrap
  9261. ufunc_fdtridfd_ptr[2*1+1] = <void*>(<char*>"fdtridfd")
  9262. ufunc_fdtridfd_data[0] = &ufunc_fdtridfd_ptr[2*0]
  9263. ufunc_fdtridfd_data[1] = &ufunc_fdtridfd_ptr[2*1]
  9264. fdtridfd = np.PyUFunc_FromFuncAndData(ufunc_fdtridfd_loops, ufunc_fdtridfd_data, ufunc_fdtridfd_types, 2, 3, 1, 0, "fdtridfd", ufunc_fdtridfd_doc, 0)
  9265. cdef np.PyUFuncGenericFunction ufunc_fresnel_loops[4]
  9266. cdef void *ufunc_fresnel_ptr[8]
  9267. cdef void *ufunc_fresnel_data[4]
  9268. cdef char ufunc_fresnel_types[12]
  9269. cdef char *ufunc_fresnel_doc = (
  9270. "fresnel(z, out=None)\n"
  9271. "\n"
  9272. "Fresnel integrals.\n"
  9273. "\n"
  9274. "The Fresnel integrals are defined as\n"
  9275. "\n"
  9276. ".. math::\n"
  9277. "\n"
  9278. " S(z) &= \\int_0^z \\sin(\\pi t^2 /2) dt \\\\\n"
  9279. " C(z) &= \\int_0^z \\cos(\\pi t^2 /2) dt.\n"
  9280. "\n"
  9281. "See [dlmf]_ for details.\n"
  9282. "\n"
  9283. "Parameters\n"
  9284. "----------\n"
  9285. "z : array_like\n"
  9286. " Real or complex valued argument\n"
  9287. "out : 2-tuple of ndarrays, optional\n"
  9288. " Optional output arrays for the function results\n"
  9289. "\n"
  9290. "Returns\n"
  9291. "-------\n"
  9292. "S, C : 2-tuple of scalar or ndarray\n"
  9293. " Values of the Fresnel integrals\n"
  9294. "\n"
  9295. "See Also\n"
  9296. "--------\n"
  9297. "fresnel_zeros : zeros of the Fresnel integrals\n"
  9298. "\n"
  9299. "References\n"
  9300. "----------\n"
  9301. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9302. " https://dlmf.nist.gov/7.2#iii\n"
  9303. "\n"
  9304. "Examples\n"
  9305. "--------\n"
  9306. ">>> import numpy as np\n"
  9307. ">>> import scipy.special as sc\n"
  9308. "\n"
  9309. "As z goes to infinity along the real axis, S and C converge to 0.5.\n"
  9310. "\n"
  9311. ">>> S, C = sc.fresnel([0.1, 1, 10, 100, np.inf])\n"
  9312. ">>> S\n"
  9313. "array([0.00052359, 0.43825915, 0.46816998, 0.4968169 , 0.5 ])\n"
  9314. ">>> C\n"
  9315. "array([0.09999753, 0.7798934 , 0.49989869, 0.4999999 , 0.5 ])\n"
  9316. "\n"
  9317. "They are related to the error function `erf`.\n"
  9318. "\n"
  9319. ">>> z = np.array([1, 2, 3, 4])\n"
  9320. ">>> zeta = 0.5 * np.sqrt(np.pi) * (1 - 1j) * z\n"
  9321. ">>> S, C = sc.fresnel(z)\n"
  9322. ">>> C + 1j*S\n"
  9323. "array([0.7798934 +0.43825915j, 0.48825341+0.34341568j,\n"
  9324. " 0.60572079+0.496313j , 0.49842603+0.42051575j])\n"
  9325. ">>> 0.5 * (1 + 1j) * sc.erf(zeta)\n"
  9326. "array([0.7798934 +0.43825915j, 0.48825341+0.34341568j,\n"
  9327. " 0.60572079+0.496313j , 0.49842603+0.42051575j])")
  9328. ufunc_fresnel_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  9329. ufunc_fresnel_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  9330. ufunc_fresnel_loops[2] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_F_FF
  9331. ufunc_fresnel_loops[3] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_D_DD
  9332. ufunc_fresnel_types[0] = <char>NPY_FLOAT
  9333. ufunc_fresnel_types[1] = <char>NPY_FLOAT
  9334. ufunc_fresnel_types[2] = <char>NPY_FLOAT
  9335. ufunc_fresnel_types[3] = <char>NPY_DOUBLE
  9336. ufunc_fresnel_types[4] = <char>NPY_DOUBLE
  9337. ufunc_fresnel_types[5] = <char>NPY_DOUBLE
  9338. ufunc_fresnel_types[6] = <char>NPY_CFLOAT
  9339. ufunc_fresnel_types[7] = <char>NPY_CFLOAT
  9340. ufunc_fresnel_types[8] = <char>NPY_CFLOAT
  9341. ufunc_fresnel_types[9] = <char>NPY_CDOUBLE
  9342. ufunc_fresnel_types[10] = <char>NPY_CDOUBLE
  9343. ufunc_fresnel_types[11] = <char>NPY_CDOUBLE
  9344. ufunc_fresnel_ptr[2*0] = <void*>_func_fresnl
  9345. ufunc_fresnel_ptr[2*0+1] = <void*>(<char*>"fresnel")
  9346. ufunc_fresnel_ptr[2*1] = <void*>_func_fresnl
  9347. ufunc_fresnel_ptr[2*1+1] = <void*>(<char*>"fresnel")
  9348. ufunc_fresnel_ptr[2*2] = <void*>_func_cfresnl_wrap
  9349. ufunc_fresnel_ptr[2*2+1] = <void*>(<char*>"fresnel")
  9350. ufunc_fresnel_ptr[2*3] = <void*>_func_cfresnl_wrap
  9351. ufunc_fresnel_ptr[2*3+1] = <void*>(<char*>"fresnel")
  9352. ufunc_fresnel_data[0] = &ufunc_fresnel_ptr[2*0]
  9353. ufunc_fresnel_data[1] = &ufunc_fresnel_ptr[2*1]
  9354. ufunc_fresnel_data[2] = &ufunc_fresnel_ptr[2*2]
  9355. ufunc_fresnel_data[3] = &ufunc_fresnel_ptr[2*3]
  9356. fresnel = np.PyUFunc_FromFuncAndData(ufunc_fresnel_loops, ufunc_fresnel_data, ufunc_fresnel_types, 4, 1, 2, 0, "fresnel", ufunc_fresnel_doc, 0)
  9357. cdef np.PyUFuncGenericFunction ufunc_gamma_loops[4]
  9358. cdef void *ufunc_gamma_ptr[8]
  9359. cdef void *ufunc_gamma_data[4]
  9360. cdef char ufunc_gamma_types[8]
  9361. cdef char *ufunc_gamma_doc = (
  9362. "gamma(z, out=None)\n"
  9363. "\n"
  9364. "gamma function.\n"
  9365. "\n"
  9366. "The gamma function is defined as\n"
  9367. "\n"
  9368. ".. math::\n"
  9369. "\n"
  9370. " \\Gamma(z) = \\int_0^\\infty t^{z-1} e^{-t} dt\n"
  9371. "\n"
  9372. "for :math:`\\Re(z) > 0` and is extended to the rest of the complex\n"
  9373. "plane by analytic continuation. See [dlmf]_ for more details.\n"
  9374. "\n"
  9375. "Parameters\n"
  9376. "----------\n"
  9377. "z : array_like\n"
  9378. " Real or complex valued argument\n"
  9379. "out : ndarray, optional\n"
  9380. " Optional output array for the function values\n"
  9381. "\n"
  9382. "Returns\n"
  9383. "-------\n"
  9384. "scalar or ndarray\n"
  9385. " Values of the gamma function\n"
  9386. "\n"
  9387. "Notes\n"
  9388. "-----\n"
  9389. "The gamma function is often referred to as the generalized\n"
  9390. "factorial since :math:`\\Gamma(n + 1) = n!` for natural numbers\n"
  9391. ":math:`n`. More generally it satisfies the recurrence relation\n"
  9392. ":math:`\\Gamma(z + 1) = z \\cdot \\Gamma(z)` for complex :math:`z`,\n"
  9393. "which, combined with the fact that :math:`\\Gamma(1) = 1`, implies\n"
  9394. "the above identity for :math:`z = n`.\n"
  9395. "\n"
  9396. "References\n"
  9397. "----------\n"
  9398. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9399. " https://dlmf.nist.gov/5.2#E1\n"
  9400. "\n"
  9401. "Examples\n"
  9402. "--------\n"
  9403. ">>> import numpy as np\n"
  9404. ">>> from scipy.special import gamma, factorial\n"
  9405. "\n"
  9406. ">>> gamma([0, 0.5, 1, 5])\n"
  9407. "array([ inf, 1.77245385, 1. , 24. ])\n"
  9408. "\n"
  9409. ">>> z = 2.5 + 1j\n"
  9410. ">>> gamma(z)\n"
  9411. "(0.77476210455108352+0.70763120437959293j)\n"
  9412. ">>> gamma(z+1), z*gamma(z) # Recurrence property\n"
  9413. "((1.2292740569981171+2.5438401155000685j),\n"
  9414. " (1.2292740569981158+2.5438401155000658j))\n"
  9415. "\n"
  9416. ">>> gamma(0.5)**2 # gamma(0.5) = sqrt(pi)\n"
  9417. "3.1415926535897927\n"
  9418. "\n"
  9419. "Plot gamma(x) for real x\n"
  9420. "\n"
  9421. ">>> x = np.linspace(-3.5, 5.5, 2251)\n"
  9422. ">>> y = gamma(x)\n"
  9423. "\n"
  9424. ">>> import matplotlib.pyplot as plt\n"
  9425. ">>> plt.plot(x, y, 'b', alpha=0.6, label='gamma(x)')\n"
  9426. ">>> k = np.arange(1, 7)\n"
  9427. ">>> plt.plot(k, factorial(k-1), 'k*', alpha=0.6,\n"
  9428. "... label='(x-1)!, x = 1, 2, ...')\n"
  9429. ">>> plt.xlim(-3.5, 5.5)\n"
  9430. ">>> plt.ylim(-10, 25)\n"
  9431. ">>> plt.grid()\n"
  9432. ">>> plt.xlabel('x')\n"
  9433. ">>> plt.legend(loc='lower right')\n"
  9434. ">>> plt.show()")
  9435. ufunc_gamma_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  9436. ufunc_gamma_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  9437. ufunc_gamma_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  9438. ufunc_gamma_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  9439. ufunc_gamma_types[0] = <char>NPY_FLOAT
  9440. ufunc_gamma_types[1] = <char>NPY_FLOAT
  9441. ufunc_gamma_types[2] = <char>NPY_DOUBLE
  9442. ufunc_gamma_types[3] = <char>NPY_DOUBLE
  9443. ufunc_gamma_types[4] = <char>NPY_CFLOAT
  9444. ufunc_gamma_types[5] = <char>NPY_CFLOAT
  9445. ufunc_gamma_types[6] = <char>NPY_CDOUBLE
  9446. ufunc_gamma_types[7] = <char>NPY_CDOUBLE
  9447. ufunc_gamma_ptr[2*0] = <void*>_func_Gamma
  9448. ufunc_gamma_ptr[2*0+1] = <void*>(<char*>"gamma")
  9449. ufunc_gamma_ptr[2*1] = <void*>_func_Gamma
  9450. ufunc_gamma_ptr[2*1+1] = <void*>(<char*>"gamma")
  9451. ufunc_gamma_ptr[2*2] = <void*>_func_cgamma
  9452. ufunc_gamma_ptr[2*2+1] = <void*>(<char*>"gamma")
  9453. ufunc_gamma_ptr[2*3] = <void*>_func_cgamma
  9454. ufunc_gamma_ptr[2*3+1] = <void*>(<char*>"gamma")
  9455. ufunc_gamma_data[0] = &ufunc_gamma_ptr[2*0]
  9456. ufunc_gamma_data[1] = &ufunc_gamma_ptr[2*1]
  9457. ufunc_gamma_data[2] = &ufunc_gamma_ptr[2*2]
  9458. ufunc_gamma_data[3] = &ufunc_gamma_ptr[2*3]
  9459. gamma = np.PyUFunc_FromFuncAndData(ufunc_gamma_loops, ufunc_gamma_data, ufunc_gamma_types, 4, 1, 1, 0, "gamma", ufunc_gamma_doc, 0)
  9460. cdef np.PyUFuncGenericFunction ufunc_gammainc_loops[2]
  9461. cdef void *ufunc_gammainc_ptr[4]
  9462. cdef void *ufunc_gammainc_data[2]
  9463. cdef char ufunc_gammainc_types[6]
  9464. cdef char *ufunc_gammainc_doc = (
  9465. "gammainc(a, x, out=None)\n"
  9466. "\n"
  9467. "Regularized lower incomplete gamma function.\n"
  9468. "\n"
  9469. "It is defined as\n"
  9470. "\n"
  9471. ".. math::\n"
  9472. "\n"
  9473. " P(a, x) = \\frac{1}{\\Gamma(a)} \\int_0^x t^{a - 1}e^{-t} dt\n"
  9474. "\n"
  9475. "for :math:`a > 0` and :math:`x \\geq 0`. See [dlmf]_ for details.\n"
  9476. "\n"
  9477. "Parameters\n"
  9478. "----------\n"
  9479. "a : array_like\n"
  9480. " Positive parameter\n"
  9481. "x : array_like\n"
  9482. " Nonnegative argument\n"
  9483. "out : ndarray, optional\n"
  9484. " Optional output array for the function values\n"
  9485. "\n"
  9486. "Returns\n"
  9487. "-------\n"
  9488. "scalar or ndarray\n"
  9489. " Values of the lower incomplete gamma function\n"
  9490. "\n"
  9491. "Notes\n"
  9492. "-----\n"
  9493. "The function satisfies the relation ``gammainc(a, x) +\n"
  9494. "gammaincc(a, x) = 1`` where `gammaincc` is the regularized upper\n"
  9495. "incomplete gamma function.\n"
  9496. "\n"
  9497. "The implementation largely follows that of [boost]_.\n"
  9498. "\n"
  9499. "See also\n"
  9500. "--------\n"
  9501. "gammaincc : regularized upper incomplete gamma function\n"
  9502. "gammaincinv : inverse of the regularized lower incomplete gamma function\n"
  9503. "gammainccinv : inverse of the regularized upper incomplete gamma function\n"
  9504. "\n"
  9505. "References\n"
  9506. "----------\n"
  9507. ".. [dlmf] NIST Digital Library of Mathematical functions\n"
  9508. " https://dlmf.nist.gov/8.2#E4\n"
  9509. ".. [boost] Maddock et. al., \"Incomplete Gamma Functions\",\n"
  9510. " https://www.boost.org/doc/libs/1_61_0/libs/math/doc/html/math_toolkit/sf_gamma/igamma.html\n"
  9511. "\n"
  9512. "Examples\n"
  9513. "--------\n"
  9514. ">>> import scipy.special as sc\n"
  9515. "\n"
  9516. "It is the CDF of the gamma distribution, so it starts at 0 and\n"
  9517. "monotonically increases to 1.\n"
  9518. "\n"
  9519. ">>> sc.gammainc(0.5, [0, 1, 10, 100])\n"
  9520. "array([0. , 0.84270079, 0.99999226, 1. ])\n"
  9521. "\n"
  9522. "It is equal to one minus the upper incomplete gamma function.\n"
  9523. "\n"
  9524. ">>> a, x = 0.5, 0.4\n"
  9525. ">>> sc.gammainc(a, x)\n"
  9526. "0.6289066304773024\n"
  9527. ">>> 1 - sc.gammaincc(a, x)\n"
  9528. "0.6289066304773024")
  9529. ufunc_gammainc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  9530. ufunc_gammainc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  9531. ufunc_gammainc_types[0] = <char>NPY_FLOAT
  9532. ufunc_gammainc_types[1] = <char>NPY_FLOAT
  9533. ufunc_gammainc_types[2] = <char>NPY_FLOAT
  9534. ufunc_gammainc_types[3] = <char>NPY_DOUBLE
  9535. ufunc_gammainc_types[4] = <char>NPY_DOUBLE
  9536. ufunc_gammainc_types[5] = <char>NPY_DOUBLE
  9537. ufunc_gammainc_ptr[2*0] = <void*>_func_igam
  9538. ufunc_gammainc_ptr[2*0+1] = <void*>(<char*>"gammainc")
  9539. ufunc_gammainc_ptr[2*1] = <void*>_func_igam
  9540. ufunc_gammainc_ptr[2*1+1] = <void*>(<char*>"gammainc")
  9541. ufunc_gammainc_data[0] = &ufunc_gammainc_ptr[2*0]
  9542. ufunc_gammainc_data[1] = &ufunc_gammainc_ptr[2*1]
  9543. gammainc = np.PyUFunc_FromFuncAndData(ufunc_gammainc_loops, ufunc_gammainc_data, ufunc_gammainc_types, 2, 2, 1, 0, "gammainc", ufunc_gammainc_doc, 0)
  9544. cdef np.PyUFuncGenericFunction ufunc_gammaincc_loops[2]
  9545. cdef void *ufunc_gammaincc_ptr[4]
  9546. cdef void *ufunc_gammaincc_data[2]
  9547. cdef char ufunc_gammaincc_types[6]
  9548. cdef char *ufunc_gammaincc_doc = (
  9549. "gammaincc(a, x, out=None)\n"
  9550. "\n"
  9551. "Regularized upper incomplete gamma function.\n"
  9552. "\n"
  9553. "It is defined as\n"
  9554. "\n"
  9555. ".. math::\n"
  9556. "\n"
  9557. " Q(a, x) = \\frac{1}{\\Gamma(a)} \\int_x^\\infty t^{a - 1}e^{-t} dt\n"
  9558. "\n"
  9559. "for :math:`a > 0` and :math:`x \\geq 0`. See [dlmf]_ for details.\n"
  9560. "\n"
  9561. "Parameters\n"
  9562. "----------\n"
  9563. "a : array_like\n"
  9564. " Positive parameter\n"
  9565. "x : array_like\n"
  9566. " Nonnegative argument\n"
  9567. "out : ndarray, optional\n"
  9568. " Optional output array for the function values\n"
  9569. "\n"
  9570. "Returns\n"
  9571. "-------\n"
  9572. "scalar or ndarray\n"
  9573. " Values of the upper incomplete gamma function\n"
  9574. "\n"
  9575. "Notes\n"
  9576. "-----\n"
  9577. "The function satisfies the relation ``gammainc(a, x) +\n"
  9578. "gammaincc(a, x) = 1`` where `gammainc` is the regularized lower\n"
  9579. "incomplete gamma function.\n"
  9580. "\n"
  9581. "The implementation largely follows that of [boost]_.\n"
  9582. "\n"
  9583. "See also\n"
  9584. "--------\n"
  9585. "gammainc : regularized lower incomplete gamma function\n"
  9586. "gammaincinv : inverse of the regularized lower incomplete gamma function\n"
  9587. "gammainccinv : inverse of the regularized upper incomplete gamma function\n"
  9588. "\n"
  9589. "References\n"
  9590. "----------\n"
  9591. ".. [dlmf] NIST Digital Library of Mathematical functions\n"
  9592. " https://dlmf.nist.gov/8.2#E4\n"
  9593. ".. [boost] Maddock et. al., \"Incomplete Gamma Functions\",\n"
  9594. " https://www.boost.org/doc/libs/1_61_0/libs/math/doc/html/math_toolkit/sf_gamma/igamma.html\n"
  9595. "\n"
  9596. "Examples\n"
  9597. "--------\n"
  9598. ">>> import scipy.special as sc\n"
  9599. "\n"
  9600. "It is the survival function of the gamma distribution, so it\n"
  9601. "starts at 1 and monotonically decreases to 0.\n"
  9602. "\n"
  9603. ">>> sc.gammaincc(0.5, [0, 1, 10, 100, 1000])\n"
  9604. "array([1.00000000e+00, 1.57299207e-01, 7.74421643e-06, 2.08848758e-45,\n"
  9605. " 0.00000000e+00])\n"
  9606. "\n"
  9607. "It is equal to one minus the lower incomplete gamma function.\n"
  9608. "\n"
  9609. ">>> a, x = 0.5, 0.4\n"
  9610. ">>> sc.gammaincc(a, x)\n"
  9611. "0.37109336952269756\n"
  9612. ">>> 1 - sc.gammainc(a, x)\n"
  9613. "0.37109336952269756")
  9614. ufunc_gammaincc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  9615. ufunc_gammaincc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  9616. ufunc_gammaincc_types[0] = <char>NPY_FLOAT
  9617. ufunc_gammaincc_types[1] = <char>NPY_FLOAT
  9618. ufunc_gammaincc_types[2] = <char>NPY_FLOAT
  9619. ufunc_gammaincc_types[3] = <char>NPY_DOUBLE
  9620. ufunc_gammaincc_types[4] = <char>NPY_DOUBLE
  9621. ufunc_gammaincc_types[5] = <char>NPY_DOUBLE
  9622. ufunc_gammaincc_ptr[2*0] = <void*>_func_igamc
  9623. ufunc_gammaincc_ptr[2*0+1] = <void*>(<char*>"gammaincc")
  9624. ufunc_gammaincc_ptr[2*1] = <void*>_func_igamc
  9625. ufunc_gammaincc_ptr[2*1+1] = <void*>(<char*>"gammaincc")
  9626. ufunc_gammaincc_data[0] = &ufunc_gammaincc_ptr[2*0]
  9627. ufunc_gammaincc_data[1] = &ufunc_gammaincc_ptr[2*1]
  9628. gammaincc = np.PyUFunc_FromFuncAndData(ufunc_gammaincc_loops, ufunc_gammaincc_data, ufunc_gammaincc_types, 2, 2, 1, 0, "gammaincc", ufunc_gammaincc_doc, 0)
  9629. cdef np.PyUFuncGenericFunction ufunc_gammainccinv_loops[2]
  9630. cdef void *ufunc_gammainccinv_ptr[4]
  9631. cdef void *ufunc_gammainccinv_data[2]
  9632. cdef char ufunc_gammainccinv_types[6]
  9633. cdef char *ufunc_gammainccinv_doc = (
  9634. "gammainccinv(a, y, out=None)\n"
  9635. "\n"
  9636. "Inverse of the regularized upper incomplete gamma function.\n"
  9637. "\n"
  9638. "Given an input :math:`y` between 0 and 1, returns :math:`x` such\n"
  9639. "that :math:`y = Q(a, x)`. Here :math:`Q` is the regularized upper\n"
  9640. "incomplete gamma function; see `gammaincc`. This is well-defined\n"
  9641. "because the upper incomplete gamma function is monotonic as can\n"
  9642. "be seen from its definition in [dlmf]_.\n"
  9643. "\n"
  9644. "Parameters\n"
  9645. "----------\n"
  9646. "a : array_like\n"
  9647. " Positive parameter\n"
  9648. "y : array_like\n"
  9649. " Argument between 0 and 1, inclusive\n"
  9650. "out : ndarray, optional\n"
  9651. " Optional output array for the function values\n"
  9652. "\n"
  9653. "Returns\n"
  9654. "-------\n"
  9655. "scalar or ndarray\n"
  9656. " Values of the inverse of the upper incomplete gamma function\n"
  9657. "\n"
  9658. "See Also\n"
  9659. "--------\n"
  9660. "gammaincc : regularized upper incomplete gamma function\n"
  9661. "gammainc : regularized lower incomplete gamma function\n"
  9662. "gammaincinv : inverse of the regularized lower incomplete gamma function\n"
  9663. "\n"
  9664. "References\n"
  9665. "----------\n"
  9666. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9667. " https://dlmf.nist.gov/8.2#E4\n"
  9668. "\n"
  9669. "Examples\n"
  9670. "--------\n"
  9671. ">>> import scipy.special as sc\n"
  9672. "\n"
  9673. "It starts at infinity and monotonically decreases to 0.\n"
  9674. "\n"
  9675. ">>> sc.gammainccinv(0.5, [0, 0.1, 0.5, 1])\n"
  9676. "array([ inf, 1.35277173, 0.22746821, 0. ])\n"
  9677. "\n"
  9678. "It inverts the upper incomplete gamma function.\n"
  9679. "\n"
  9680. ">>> a, x = 0.5, [0, 0.1, 0.5, 1]\n"
  9681. ">>> sc.gammaincc(a, sc.gammainccinv(a, x))\n"
  9682. "array([0. , 0.1, 0.5, 1. ])\n"
  9683. "\n"
  9684. ">>> a, x = 0.5, [0, 10, 50]\n"
  9685. ">>> sc.gammainccinv(a, sc.gammaincc(a, x))\n"
  9686. "array([ 0., 10., 50.])")
  9687. ufunc_gammainccinv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  9688. ufunc_gammainccinv_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  9689. ufunc_gammainccinv_types[0] = <char>NPY_FLOAT
  9690. ufunc_gammainccinv_types[1] = <char>NPY_FLOAT
  9691. ufunc_gammainccinv_types[2] = <char>NPY_FLOAT
  9692. ufunc_gammainccinv_types[3] = <char>NPY_DOUBLE
  9693. ufunc_gammainccinv_types[4] = <char>NPY_DOUBLE
  9694. ufunc_gammainccinv_types[5] = <char>NPY_DOUBLE
  9695. ufunc_gammainccinv_ptr[2*0] = <void*>_func_igamci
  9696. ufunc_gammainccinv_ptr[2*0+1] = <void*>(<char*>"gammainccinv")
  9697. ufunc_gammainccinv_ptr[2*1] = <void*>_func_igamci
  9698. ufunc_gammainccinv_ptr[2*1+1] = <void*>(<char*>"gammainccinv")
  9699. ufunc_gammainccinv_data[0] = &ufunc_gammainccinv_ptr[2*0]
  9700. ufunc_gammainccinv_data[1] = &ufunc_gammainccinv_ptr[2*1]
  9701. gammainccinv = np.PyUFunc_FromFuncAndData(ufunc_gammainccinv_loops, ufunc_gammainccinv_data, ufunc_gammainccinv_types, 2, 2, 1, 0, "gammainccinv", ufunc_gammainccinv_doc, 0)
  9702. cdef np.PyUFuncGenericFunction ufunc_gammaincinv_loops[2]
  9703. cdef void *ufunc_gammaincinv_ptr[4]
  9704. cdef void *ufunc_gammaincinv_data[2]
  9705. cdef char ufunc_gammaincinv_types[6]
  9706. cdef char *ufunc_gammaincinv_doc = (
  9707. "gammaincinv(a, y, out=None)\n"
  9708. "\n"
  9709. "Inverse to the regularized lower incomplete gamma function.\n"
  9710. "\n"
  9711. "Given an input :math:`y` between 0 and 1, returns :math:`x` such\n"
  9712. "that :math:`y = P(a, x)`. Here :math:`P` is the regularized lower\n"
  9713. "incomplete gamma function; see `gammainc`. This is well-defined\n"
  9714. "because the lower incomplete gamma function is monotonic as can be\n"
  9715. "seen from its definition in [dlmf]_.\n"
  9716. "\n"
  9717. "Parameters\n"
  9718. "----------\n"
  9719. "a : array_like\n"
  9720. " Positive parameter\n"
  9721. "y : array_like\n"
  9722. " Parameter between 0 and 1, inclusive\n"
  9723. "out : ndarray, optional\n"
  9724. " Optional output array for the function values\n"
  9725. "\n"
  9726. "Returns\n"
  9727. "-------\n"
  9728. "scalar or ndarray\n"
  9729. " Values of the inverse of the lower incomplete gamma function\n"
  9730. "\n"
  9731. "See Also\n"
  9732. "--------\n"
  9733. "gammainc : regularized lower incomplete gamma function\n"
  9734. "gammaincc : regularized upper incomplete gamma function\n"
  9735. "gammainccinv : inverse of the regularized upper incomplete gamma function\n"
  9736. "\n"
  9737. "References\n"
  9738. "----------\n"
  9739. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9740. " https://dlmf.nist.gov/8.2#E4\n"
  9741. "\n"
  9742. "Examples\n"
  9743. "--------\n"
  9744. ">>> import scipy.special as sc\n"
  9745. "\n"
  9746. "It starts at 0 and monotonically increases to infinity.\n"
  9747. "\n"
  9748. ">>> sc.gammaincinv(0.5, [0, 0.1 ,0.5, 1])\n"
  9749. "array([0. , 0.00789539, 0.22746821, inf])\n"
  9750. "\n"
  9751. "It inverts the lower incomplete gamma function.\n"
  9752. "\n"
  9753. ">>> a, x = 0.5, [0, 0.1, 0.5, 1]\n"
  9754. ">>> sc.gammainc(a, sc.gammaincinv(a, x))\n"
  9755. "array([0. , 0.1, 0.5, 1. ])\n"
  9756. "\n"
  9757. ">>> a, x = 0.5, [0, 10, 25]\n"
  9758. ">>> sc.gammaincinv(a, sc.gammainc(a, x))\n"
  9759. "array([ 0. , 10. , 25.00001465])")
  9760. ufunc_gammaincinv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  9761. ufunc_gammaincinv_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  9762. ufunc_gammaincinv_types[0] = <char>NPY_FLOAT
  9763. ufunc_gammaincinv_types[1] = <char>NPY_FLOAT
  9764. ufunc_gammaincinv_types[2] = <char>NPY_FLOAT
  9765. ufunc_gammaincinv_types[3] = <char>NPY_DOUBLE
  9766. ufunc_gammaincinv_types[4] = <char>NPY_DOUBLE
  9767. ufunc_gammaincinv_types[5] = <char>NPY_DOUBLE
  9768. ufunc_gammaincinv_ptr[2*0] = <void*>_func_igami
  9769. ufunc_gammaincinv_ptr[2*0+1] = <void*>(<char*>"gammaincinv")
  9770. ufunc_gammaincinv_ptr[2*1] = <void*>_func_igami
  9771. ufunc_gammaincinv_ptr[2*1+1] = <void*>(<char*>"gammaincinv")
  9772. ufunc_gammaincinv_data[0] = &ufunc_gammaincinv_ptr[2*0]
  9773. ufunc_gammaincinv_data[1] = &ufunc_gammaincinv_ptr[2*1]
  9774. gammaincinv = np.PyUFunc_FromFuncAndData(ufunc_gammaincinv_loops, ufunc_gammaincinv_data, ufunc_gammaincinv_types, 2, 2, 1, 0, "gammaincinv", ufunc_gammaincinv_doc, 0)
  9775. cdef np.PyUFuncGenericFunction ufunc_gammaln_loops[2]
  9776. cdef void *ufunc_gammaln_ptr[4]
  9777. cdef void *ufunc_gammaln_data[2]
  9778. cdef char ufunc_gammaln_types[4]
  9779. cdef char *ufunc_gammaln_doc = (
  9780. "gammaln(x, out=None)\n"
  9781. "\n"
  9782. "Logarithm of the absolute value of the gamma function.\n"
  9783. "\n"
  9784. "Defined as\n"
  9785. "\n"
  9786. ".. math::\n"
  9787. "\n"
  9788. " \\ln(\\lvert\\Gamma(x)\\rvert)\n"
  9789. "\n"
  9790. "where :math:`\\Gamma` is the gamma function. For more details on\n"
  9791. "the gamma function, see [dlmf]_.\n"
  9792. "\n"
  9793. "Parameters\n"
  9794. "----------\n"
  9795. "x : array_like\n"
  9796. " Real argument\n"
  9797. "out : ndarray, optional\n"
  9798. " Optional output array for the function results\n"
  9799. "\n"
  9800. "Returns\n"
  9801. "-------\n"
  9802. "scalar or ndarray\n"
  9803. " Values of the log of the absolute value of gamma\n"
  9804. "\n"
  9805. "See Also\n"
  9806. "--------\n"
  9807. "gammasgn : sign of the gamma function\n"
  9808. "loggamma : principal branch of the logarithm of the gamma function\n"
  9809. "\n"
  9810. "Notes\n"
  9811. "-----\n"
  9812. "It is the same function as the Python standard library function\n"
  9813. ":func:`math.lgamma`.\n"
  9814. "\n"
  9815. "When used in conjunction with `gammasgn`, this function is useful\n"
  9816. "for working in logspace on the real axis without having to deal\n"
  9817. "with complex numbers via the relation ``exp(gammaln(x)) =\n"
  9818. "gammasgn(x) * gamma(x)``.\n"
  9819. "\n"
  9820. "For complex-valued log-gamma, use `loggamma` instead of `gammaln`.\n"
  9821. "\n"
  9822. "References\n"
  9823. "----------\n"
  9824. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9825. " https://dlmf.nist.gov/5\n"
  9826. "\n"
  9827. "Examples\n"
  9828. "--------\n"
  9829. ">>> import numpy as np\n"
  9830. ">>> import scipy.special as sc\n"
  9831. "\n"
  9832. "It has two positive zeros.\n"
  9833. "\n"
  9834. ">>> sc.gammaln([1, 2])\n"
  9835. "array([0., 0.])\n"
  9836. "\n"
  9837. "It has poles at nonpositive integers.\n"
  9838. "\n"
  9839. ">>> sc.gammaln([0, -1, -2, -3, -4])\n"
  9840. "array([inf, inf, inf, inf, inf])\n"
  9841. "\n"
  9842. "It asymptotically approaches ``x * log(x)`` (Stirling's formula).\n"
  9843. "\n"
  9844. ">>> x = np.array([1e10, 1e20, 1e40, 1e80])\n"
  9845. ">>> sc.gammaln(x)\n"
  9846. "array([2.20258509e+11, 4.50517019e+21, 9.11034037e+41, 1.83206807e+82])\n"
  9847. ">>> x * np.log(x)\n"
  9848. "array([2.30258509e+11, 4.60517019e+21, 9.21034037e+41, 1.84206807e+82])")
  9849. ufunc_gammaln_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  9850. ufunc_gammaln_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  9851. ufunc_gammaln_types[0] = <char>NPY_FLOAT
  9852. ufunc_gammaln_types[1] = <char>NPY_FLOAT
  9853. ufunc_gammaln_types[2] = <char>NPY_DOUBLE
  9854. ufunc_gammaln_types[3] = <char>NPY_DOUBLE
  9855. ufunc_gammaln_ptr[2*0] = <void*>_func_lgam
  9856. ufunc_gammaln_ptr[2*0+1] = <void*>(<char*>"gammaln")
  9857. ufunc_gammaln_ptr[2*1] = <void*>_func_lgam
  9858. ufunc_gammaln_ptr[2*1+1] = <void*>(<char*>"gammaln")
  9859. ufunc_gammaln_data[0] = &ufunc_gammaln_ptr[2*0]
  9860. ufunc_gammaln_data[1] = &ufunc_gammaln_ptr[2*1]
  9861. gammaln = np.PyUFunc_FromFuncAndData(ufunc_gammaln_loops, ufunc_gammaln_data, ufunc_gammaln_types, 2, 1, 1, 0, "gammaln", ufunc_gammaln_doc, 0)
  9862. cdef np.PyUFuncGenericFunction ufunc_gammasgn_loops[2]
  9863. cdef void *ufunc_gammasgn_ptr[4]
  9864. cdef void *ufunc_gammasgn_data[2]
  9865. cdef char ufunc_gammasgn_types[4]
  9866. cdef char *ufunc_gammasgn_doc = (
  9867. "gammasgn(x, out=None)\n"
  9868. "\n"
  9869. "Sign of the gamma function.\n"
  9870. "\n"
  9871. "It is defined as\n"
  9872. "\n"
  9873. ".. math::\n"
  9874. "\n"
  9875. " \\text{gammasgn}(x) =\n"
  9876. " \\begin{cases}\n"
  9877. " +1 & \\Gamma(x) > 0 \\\\\n"
  9878. " -1 & \\Gamma(x) < 0\n"
  9879. " \\end{cases}\n"
  9880. "\n"
  9881. "where :math:`\\Gamma` is the gamma function; see `gamma`. This\n"
  9882. "definition is complete since the gamma function is never zero;\n"
  9883. "see the discussion after [dlmf]_.\n"
  9884. "\n"
  9885. "Parameters\n"
  9886. "----------\n"
  9887. "x : array_like\n"
  9888. " Real argument\n"
  9889. "out : ndarray, optional\n"
  9890. " Optional output array for the function values\n"
  9891. "\n"
  9892. "Returns\n"
  9893. "-------\n"
  9894. "scalar or ndarray\n"
  9895. " Sign of the gamma function\n"
  9896. "\n"
  9897. "Notes\n"
  9898. "-----\n"
  9899. "The gamma function can be computed as ``gammasgn(x) *\n"
  9900. "np.exp(gammaln(x))``.\n"
  9901. "\n"
  9902. "See Also\n"
  9903. "--------\n"
  9904. "gamma : the gamma function\n"
  9905. "gammaln : log of the absolute value of the gamma function\n"
  9906. "loggamma : analytic continuation of the log of the gamma function\n"
  9907. "\n"
  9908. "References\n"
  9909. "----------\n"
  9910. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  9911. " https://dlmf.nist.gov/5.2#E1\n"
  9912. "\n"
  9913. "Examples\n"
  9914. "--------\n"
  9915. ">>> import numpy as np\n"
  9916. ">>> import scipy.special as sc\n"
  9917. "\n"
  9918. "It is 1 for `x > 0`.\n"
  9919. "\n"
  9920. ">>> sc.gammasgn([1, 2, 3, 4])\n"
  9921. "array([1., 1., 1., 1.])\n"
  9922. "\n"
  9923. "It alternates between -1 and 1 for negative integers.\n"
  9924. "\n"
  9925. ">>> sc.gammasgn([-0.5, -1.5, -2.5, -3.5])\n"
  9926. "array([-1., 1., -1., 1.])\n"
  9927. "\n"
  9928. "It can be used to compute the gamma function.\n"
  9929. "\n"
  9930. ">>> x = [1.5, 0.5, -0.5, -1.5]\n"
  9931. ">>> sc.gammasgn(x) * np.exp(sc.gammaln(x))\n"
  9932. "array([ 0.88622693, 1.77245385, -3.5449077 , 2.3632718 ])\n"
  9933. ">>> sc.gamma(x)\n"
  9934. "array([ 0.88622693, 1.77245385, -3.5449077 , 2.3632718 ])")
  9935. ufunc_gammasgn_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  9936. ufunc_gammasgn_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  9937. ufunc_gammasgn_types[0] = <char>NPY_FLOAT
  9938. ufunc_gammasgn_types[1] = <char>NPY_FLOAT
  9939. ufunc_gammasgn_types[2] = <char>NPY_DOUBLE
  9940. ufunc_gammasgn_types[3] = <char>NPY_DOUBLE
  9941. ufunc_gammasgn_ptr[2*0] = <void*>_func_gammasgn
  9942. ufunc_gammasgn_ptr[2*0+1] = <void*>(<char*>"gammasgn")
  9943. ufunc_gammasgn_ptr[2*1] = <void*>_func_gammasgn
  9944. ufunc_gammasgn_ptr[2*1+1] = <void*>(<char*>"gammasgn")
  9945. ufunc_gammasgn_data[0] = &ufunc_gammasgn_ptr[2*0]
  9946. ufunc_gammasgn_data[1] = &ufunc_gammasgn_ptr[2*1]
  9947. gammasgn = np.PyUFunc_FromFuncAndData(ufunc_gammasgn_loops, ufunc_gammasgn_data, ufunc_gammasgn_types, 2, 1, 1, 0, "gammasgn", ufunc_gammasgn_doc, 0)
  9948. cdef np.PyUFuncGenericFunction ufunc_gdtr_loops[2]
  9949. cdef void *ufunc_gdtr_ptr[4]
  9950. cdef void *ufunc_gdtr_data[2]
  9951. cdef char ufunc_gdtr_types[8]
  9952. cdef char *ufunc_gdtr_doc = (
  9953. "gdtr(a, b, x, out=None)\n"
  9954. "\n"
  9955. "Gamma distribution cumulative distribution function.\n"
  9956. "\n"
  9957. "Returns the integral from zero to `x` of the gamma probability density\n"
  9958. "function,\n"
  9959. "\n"
  9960. ".. math::\n"
  9961. "\n"
  9962. " F = \\int_0^x \\frac{a^b}{\\Gamma(b)} t^{b-1} e^{-at}\\,dt,\n"
  9963. "\n"
  9964. "where :math:`\\Gamma` is the gamma function.\n"
  9965. "\n"
  9966. "Parameters\n"
  9967. "----------\n"
  9968. "a : array_like\n"
  9969. " The rate parameter of the gamma distribution, sometimes denoted\n"
  9970. " :math:`\\beta` (float). It is also the reciprocal of the scale\n"
  9971. " parameter :math:`\\theta`.\n"
  9972. "b : array_like\n"
  9973. " The shape parameter of the gamma distribution, sometimes denoted\n"
  9974. " :math:`\\alpha` (float).\n"
  9975. "x : array_like\n"
  9976. " The quantile (upper limit of integration; float).\n"
  9977. "out : ndarray, optional\n"
  9978. " Optional output array for the function values\n"
  9979. "\n"
  9980. "See also\n"
  9981. "--------\n"
  9982. "gdtrc : 1 - CDF of the gamma distribution.\n"
  9983. "scipy.stats.gamma: Gamma distribution\n"
  9984. "\n"
  9985. "Returns\n"
  9986. "-------\n"
  9987. "F : scalar or ndarray\n"
  9988. " The CDF of the gamma distribution with parameters `a` and `b`\n"
  9989. " evaluated at `x`.\n"
  9990. "\n"
  9991. "Notes\n"
  9992. "-----\n"
  9993. "The evaluation is carried out using the relation to the incomplete gamma\n"
  9994. "integral (regularized gamma function).\n"
  9995. "\n"
  9996. "Wrapper for the Cephes [1]_ routine `gdtr`. Calling `gdtr` directly can\n"
  9997. "improve performance compared to the ``cdf`` method of `scipy.stats.gamma`\n"
  9998. "(see last example below).\n"
  9999. "\n"
  10000. "References\n"
  10001. "----------\n"
  10002. ".. [1] Cephes Mathematical Functions Library,\n"
  10003. " http://www.netlib.org/cephes/\n"
  10004. "\n"
  10005. "Examples\n"
  10006. "--------\n"
  10007. "Compute the function for ``a=1``, ``b=2`` at ``x=5``.\n"
  10008. "\n"
  10009. ">>> import numpy as np\n"
  10010. ">>> from scipy.special import gdtr\n"
  10011. ">>> import matplotlib.pyplot as plt\n"
  10012. ">>> gdtr(1., 2., 5.)\n"
  10013. "0.9595723180054873\n"
  10014. "\n"
  10015. "Compute the function for ``a=1`` and ``b=2`` at several points by\n"
  10016. "providing a NumPy array for `x`.\n"
  10017. "\n"
  10018. ">>> xvalues = np.array([1., 2., 3., 4])\n"
  10019. ">>> gdtr(1., 1., xvalues)\n"
  10020. "array([0.63212056, 0.86466472, 0.95021293, 0.98168436])\n"
  10021. "\n"
  10022. "`gdtr` can evaluate different parameter sets by providing arrays with\n"
  10023. "broadcasting compatible shapes for `a`, `b` and `x`. Here we compute the\n"
  10024. "function for three different `a` at four positions `x` and ``b=3``,\n"
  10025. "resulting in a 3x4 array.\n"
  10026. "\n"
  10027. ">>> a = np.array([[0.5], [1.5], [2.5]])\n"
  10028. ">>> x = np.array([1., 2., 3., 4])\n"
  10029. ">>> a.shape, x.shape\n"
  10030. "((3, 1), (4,))\n"
  10031. "\n"
  10032. ">>> gdtr(a, 3., x)\n"
  10033. "array([[0.01438768, 0.0803014 , 0.19115317, 0.32332358],\n"
  10034. " [0.19115317, 0.57680992, 0.82642193, 0.9380312 ],\n"
  10035. " [0.45618688, 0.87534798, 0.97974328, 0.9972306 ]])\n"
  10036. "\n"
  10037. "Plot the function for four different parameter sets.\n"
  10038. "\n"
  10039. ">>> a_parameters = [0.3, 1, 2, 6]\n"
  10040. ">>> b_parameters = [2, 10, 15, 20]\n"
  10041. ">>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']\n"
  10042. ">>> parameters_list = list(zip(a_parameters, b_parameters, linestyles))\n"
  10043. ">>> x = np.linspace(0, 30, 1000)\n"
  10044. ">>> fig, ax = plt.subplots()\n"
  10045. ">>> for parameter_set in parameters_list:\n"
  10046. "... a, b, style = parameter_set\n"
  10047. "... gdtr_vals = gdtr(a, b, x)\n"
  10048. "... ax.plot(x, gdtr_vals, label=f\"$a= {a},\\, b={b}$\", ls=style)\n"
  10049. ">>> ax.legend()\n"
  10050. ">>> ax.set_xlabel(\"$x$\")\n"
  10051. ">>> ax.set_title(\"Gamma distribution cumulative distribution function\")\n"
  10052. ">>> plt.show()\n"
  10053. "\n"
  10054. "The gamma distribution is also available as `scipy.stats.gamma`. Using\n"
  10055. "`gdtr` directly can be much faster than calling the ``cdf`` method of\n"
  10056. "`scipy.stats.gamma`, especially for small arrays or individual values.\n"
  10057. "To get the same results one must use the following parametrization:\n"
  10058. "``stats.gamma(b, scale=1/a).cdf(x)=gdtr(a, b, x)``.\n"
  10059. "\n"
  10060. ">>> from scipy.stats import gamma\n"
  10061. ">>> a = 2.\n"
  10062. ">>> b = 3\n"
  10063. ">>> x = 1.\n"
  10064. ">>> gdtr_result = gdtr(a, b, x) # this will often be faster than below\n"
  10065. ">>> gamma_dist_result = gamma(b, scale=1/a).cdf(x)\n"
  10066. ">>> gdtr_result == gamma_dist_result # test that results are equal\n"
  10067. "True")
  10068. ufunc_gdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  10069. ufunc_gdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  10070. ufunc_gdtr_types[0] = <char>NPY_FLOAT
  10071. ufunc_gdtr_types[1] = <char>NPY_FLOAT
  10072. ufunc_gdtr_types[2] = <char>NPY_FLOAT
  10073. ufunc_gdtr_types[3] = <char>NPY_FLOAT
  10074. ufunc_gdtr_types[4] = <char>NPY_DOUBLE
  10075. ufunc_gdtr_types[5] = <char>NPY_DOUBLE
  10076. ufunc_gdtr_types[6] = <char>NPY_DOUBLE
  10077. ufunc_gdtr_types[7] = <char>NPY_DOUBLE
  10078. ufunc_gdtr_ptr[2*0] = <void*>_func_gdtr
  10079. ufunc_gdtr_ptr[2*0+1] = <void*>(<char*>"gdtr")
  10080. ufunc_gdtr_ptr[2*1] = <void*>_func_gdtr
  10081. ufunc_gdtr_ptr[2*1+1] = <void*>(<char*>"gdtr")
  10082. ufunc_gdtr_data[0] = &ufunc_gdtr_ptr[2*0]
  10083. ufunc_gdtr_data[1] = &ufunc_gdtr_ptr[2*1]
  10084. gdtr = np.PyUFunc_FromFuncAndData(ufunc_gdtr_loops, ufunc_gdtr_data, ufunc_gdtr_types, 2, 3, 1, 0, "gdtr", ufunc_gdtr_doc, 0)
  10085. cdef np.PyUFuncGenericFunction ufunc_gdtrc_loops[2]
  10086. cdef void *ufunc_gdtrc_ptr[4]
  10087. cdef void *ufunc_gdtrc_data[2]
  10088. cdef char ufunc_gdtrc_types[8]
  10089. cdef char *ufunc_gdtrc_doc = (
  10090. "gdtrc(a, b, x, out=None)\n"
  10091. "\n"
  10092. "Gamma distribution survival function.\n"
  10093. "\n"
  10094. "Integral from `x` to infinity of the gamma probability density function,\n"
  10095. "\n"
  10096. ".. math::\n"
  10097. "\n"
  10098. " F = \\int_x^\\infty \\frac{a^b}{\\Gamma(b)} t^{b-1} e^{-at}\\,dt,\n"
  10099. "\n"
  10100. "where :math:`\\Gamma` is the gamma function.\n"
  10101. "\n"
  10102. "Parameters\n"
  10103. "----------\n"
  10104. "a : array_like\n"
  10105. " The rate parameter of the gamma distribution, sometimes denoted\n"
  10106. " :math:`\\beta` (float). It is also the reciprocal of the scale\n"
  10107. " parameter :math:`\\theta`.\n"
  10108. "b : array_like\n"
  10109. " The shape parameter of the gamma distribution, sometimes denoted\n"
  10110. " :math:`\\alpha` (float).\n"
  10111. "x : array_like\n"
  10112. " The quantile (lower limit of integration; float).\n"
  10113. "out : ndarray, optional\n"
  10114. " Optional output array for the function values\n"
  10115. "\n"
  10116. "Returns\n"
  10117. "-------\n"
  10118. "F : scalar or ndarray\n"
  10119. " The survival function of the gamma distribution with parameters `a`\n"
  10120. " and `b` evaluated at `x`.\n"
  10121. "\n"
  10122. "See Also\n"
  10123. "--------\n"
  10124. "gdtr: Gamma distribution cumulative distribution function\n"
  10125. "scipy.stats.gamma: Gamma distribution\n"
  10126. "gdtrix\n"
  10127. "\n"
  10128. "Notes\n"
  10129. "-----\n"
  10130. "The evaluation is carried out using the relation to the incomplete gamma\n"
  10131. "integral (regularized gamma function).\n"
  10132. "\n"
  10133. "Wrapper for the Cephes [1]_ routine `gdtrc`. Calling `gdtrc` directly can\n"
  10134. "improve performance compared to the ``sf`` method of `scipy.stats.gamma`\n"
  10135. "(see last example below).\n"
  10136. "\n"
  10137. "References\n"
  10138. "----------\n"
  10139. ".. [1] Cephes Mathematical Functions Library,\n"
  10140. " http://www.netlib.org/cephes/\n"
  10141. "\n"
  10142. "Examples\n"
  10143. "--------\n"
  10144. "Compute the function for ``a=1`` and ``b=2`` at ``x=5``.\n"
  10145. "\n"
  10146. ">>> import numpy as np\n"
  10147. ">>> from scipy.special import gdtrc\n"
  10148. ">>> import matplotlib.pyplot as plt\n"
  10149. ">>> gdtrc(1., 2., 5.)\n"
  10150. "0.04042768199451279\n"
  10151. "\n"
  10152. "Compute the function for ``a=1``, ``b=2`` at several points by providing\n"
  10153. "a NumPy array for `x`.\n"
  10154. "\n"
  10155. ">>> xvalues = np.array([1., 2., 3., 4])\n"
  10156. ">>> gdtrc(1., 1., xvalues)\n"
  10157. "array([0.36787944, 0.13533528, 0.04978707, 0.01831564])\n"
  10158. "\n"
  10159. "`gdtrc` can evaluate different parameter sets by providing arrays with\n"
  10160. "broadcasting compatible shapes for `a`, `b` and `x`. Here we compute the\n"
  10161. "function for three different `a` at four positions `x` and ``b=3``,\n"
  10162. "resulting in a 3x4 array.\n"
  10163. "\n"
  10164. ">>> a = np.array([[0.5], [1.5], [2.5]])\n"
  10165. ">>> x = np.array([1., 2., 3., 4])\n"
  10166. ">>> a.shape, x.shape\n"
  10167. "((3, 1), (4,))\n"
  10168. "\n"
  10169. ">>> gdtrc(a, 3., x)\n"
  10170. "array([[0.98561232, 0.9196986 , 0.80884683, 0.67667642],\n"
  10171. " [0.80884683, 0.42319008, 0.17357807, 0.0619688 ],\n"
  10172. " [0.54381312, 0.12465202, 0.02025672, 0.0027694 ]])\n"
  10173. "\n"
  10174. "Plot the function for four different parameter sets.\n"
  10175. "\n"
  10176. ">>> a_parameters = [0.3, 1, 2, 6]\n"
  10177. ">>> b_parameters = [2, 10, 15, 20]\n"
  10178. ">>> linestyles = ['solid', 'dashed', 'dotted', 'dashdot']\n"
  10179. ">>> parameters_list = list(zip(a_parameters, b_parameters, linestyles))\n"
  10180. ">>> x = np.linspace(0, 30, 1000)\n"
  10181. ">>> fig, ax = plt.subplots()\n"
  10182. ">>> for parameter_set in parameters_list:\n"
  10183. "... a, b, style = parameter_set\n"
  10184. "... gdtrc_vals = gdtrc(a, b, x)\n"
  10185. "... ax.plot(x, gdtrc_vals, label=f\"$a= {a},\\, b={b}$\", ls=style)\n"
  10186. ">>> ax.legend()\n"
  10187. ">>> ax.set_xlabel(\"$x$\")\n"
  10188. ">>> ax.set_title(\"Gamma distribution survival function\")\n"
  10189. ">>> plt.show()\n"
  10190. "\n"
  10191. "The gamma distribution is also available as `scipy.stats.gamma`.\n"
  10192. "Using `gdtrc` directly can be much faster than calling the ``sf`` method\n"
  10193. "of `scipy.stats.gamma`, especially for small arrays or individual\n"
  10194. "values. To get the same results one must use the following parametrization:\n"
  10195. "``stats.gamma(b, scale=1/a).sf(x)=gdtrc(a, b, x)``.\n"
  10196. "\n"
  10197. ">>> from scipy.stats import gamma\n"
  10198. ">>> a = 2\n"
  10199. ">>> b = 3\n"
  10200. ">>> x = 1.\n"
  10201. ">>> gdtrc_result = gdtrc(a, b, x) # this will often be faster than below\n"
  10202. ">>> gamma_dist_result = gamma(b, scale=1/a).sf(x)\n"
  10203. ">>> gdtrc_result == gamma_dist_result # test that results are equal\n"
  10204. "True")
  10205. ufunc_gdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  10206. ufunc_gdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  10207. ufunc_gdtrc_types[0] = <char>NPY_FLOAT
  10208. ufunc_gdtrc_types[1] = <char>NPY_FLOAT
  10209. ufunc_gdtrc_types[2] = <char>NPY_FLOAT
  10210. ufunc_gdtrc_types[3] = <char>NPY_FLOAT
  10211. ufunc_gdtrc_types[4] = <char>NPY_DOUBLE
  10212. ufunc_gdtrc_types[5] = <char>NPY_DOUBLE
  10213. ufunc_gdtrc_types[6] = <char>NPY_DOUBLE
  10214. ufunc_gdtrc_types[7] = <char>NPY_DOUBLE
  10215. ufunc_gdtrc_ptr[2*0] = <void*>_func_gdtrc
  10216. ufunc_gdtrc_ptr[2*0+1] = <void*>(<char*>"gdtrc")
  10217. ufunc_gdtrc_ptr[2*1] = <void*>_func_gdtrc
  10218. ufunc_gdtrc_ptr[2*1+1] = <void*>(<char*>"gdtrc")
  10219. ufunc_gdtrc_data[0] = &ufunc_gdtrc_ptr[2*0]
  10220. ufunc_gdtrc_data[1] = &ufunc_gdtrc_ptr[2*1]
  10221. gdtrc = np.PyUFunc_FromFuncAndData(ufunc_gdtrc_loops, ufunc_gdtrc_data, ufunc_gdtrc_types, 2, 3, 1, 0, "gdtrc", ufunc_gdtrc_doc, 0)
  10222. cdef np.PyUFuncGenericFunction ufunc_gdtria_loops[2]
  10223. cdef void *ufunc_gdtria_ptr[4]
  10224. cdef void *ufunc_gdtria_data[2]
  10225. cdef char ufunc_gdtria_types[8]
  10226. cdef char *ufunc_gdtria_doc = (
  10227. "gdtria(p, b, x, out=None)\n"
  10228. "\n"
  10229. "Inverse of `gdtr` vs a.\n"
  10230. "\n"
  10231. "Returns the inverse with respect to the parameter `a` of ``p =\n"
  10232. "gdtr(a, b, x)``, the cumulative distribution function of the gamma\n"
  10233. "distribution.\n"
  10234. "\n"
  10235. "Parameters\n"
  10236. "----------\n"
  10237. "p : array_like\n"
  10238. " Probability values.\n"
  10239. "b : array_like\n"
  10240. " `b` parameter values of `gdtr(a, b, x)`. `b` is the \"shape\" parameter\n"
  10241. " of the gamma distribution.\n"
  10242. "x : array_like\n"
  10243. " Nonnegative real values, from the domain of the gamma distribution.\n"
  10244. "out : ndarray, optional\n"
  10245. " If a fourth argument is given, it must be a numpy.ndarray whose size\n"
  10246. " matches the broadcast result of `a`, `b` and `x`. `out` is then the\n"
  10247. " array returned by the function.\n"
  10248. "\n"
  10249. "Returns\n"
  10250. "-------\n"
  10251. "a : scalar or ndarray\n"
  10252. " Values of the `a` parameter such that `p = gdtr(a, b, x)`. `1/a`\n"
  10253. " is the \"scale\" parameter of the gamma distribution.\n"
  10254. "\n"
  10255. "See Also\n"
  10256. "--------\n"
  10257. "gdtr : CDF of the gamma distribution.\n"
  10258. "gdtrib : Inverse with respect to `b` of `gdtr(a, b, x)`.\n"
  10259. "gdtrix : Inverse with respect to `x` of `gdtr(a, b, x)`.\n"
  10260. "\n"
  10261. "Notes\n"
  10262. "-----\n"
  10263. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfgam`.\n"
  10264. "\n"
  10265. "The cumulative distribution function `p` is computed using a routine by\n"
  10266. "DiDinato and Morris [2]_. Computation of `a` involves a search for a value\n"
  10267. "that produces the desired value of `p`. The search relies on the\n"
  10268. "monotonicity of `p` with `a`.\n"
  10269. "\n"
  10270. "References\n"
  10271. "----------\n"
  10272. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  10273. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  10274. " Functions, Inverses, and Other Parameters.\n"
  10275. ".. [2] DiDinato, A. R. and Morris, A. H.,\n"
  10276. " Computation of the incomplete gamma function ratios and their\n"
  10277. " inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.\n"
  10278. "\n"
  10279. "Examples\n"
  10280. "--------\n"
  10281. "First evaluate `gdtr`.\n"
  10282. "\n"
  10283. ">>> from scipy.special import gdtr, gdtria\n"
  10284. ">>> p = gdtr(1.2, 3.4, 5.6)\n"
  10285. ">>> print(p)\n"
  10286. "0.94378087442\n"
  10287. "\n"
  10288. "Verify the inverse.\n"
  10289. "\n"
  10290. ">>> gdtria(p, 3.4, 5.6)\n"
  10291. "1.2")
  10292. ufunc_gdtria_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  10293. ufunc_gdtria_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  10294. ufunc_gdtria_types[0] = <char>NPY_FLOAT
  10295. ufunc_gdtria_types[1] = <char>NPY_FLOAT
  10296. ufunc_gdtria_types[2] = <char>NPY_FLOAT
  10297. ufunc_gdtria_types[3] = <char>NPY_FLOAT
  10298. ufunc_gdtria_types[4] = <char>NPY_DOUBLE
  10299. ufunc_gdtria_types[5] = <char>NPY_DOUBLE
  10300. ufunc_gdtria_types[6] = <char>NPY_DOUBLE
  10301. ufunc_gdtria_types[7] = <char>NPY_DOUBLE
  10302. ufunc_gdtria_ptr[2*0] = <void*>_func_cdfgam4_wrap
  10303. ufunc_gdtria_ptr[2*0+1] = <void*>(<char*>"gdtria")
  10304. ufunc_gdtria_ptr[2*1] = <void*>_func_cdfgam4_wrap
  10305. ufunc_gdtria_ptr[2*1+1] = <void*>(<char*>"gdtria")
  10306. ufunc_gdtria_data[0] = &ufunc_gdtria_ptr[2*0]
  10307. ufunc_gdtria_data[1] = &ufunc_gdtria_ptr[2*1]
  10308. gdtria = np.PyUFunc_FromFuncAndData(ufunc_gdtria_loops, ufunc_gdtria_data, ufunc_gdtria_types, 2, 3, 1, 0, "gdtria", ufunc_gdtria_doc, 0)
  10309. cdef np.PyUFuncGenericFunction ufunc_gdtrib_loops[2]
  10310. cdef void *ufunc_gdtrib_ptr[4]
  10311. cdef void *ufunc_gdtrib_data[2]
  10312. cdef char ufunc_gdtrib_types[8]
  10313. cdef char *ufunc_gdtrib_doc = (
  10314. "gdtrib(a, p, x, out=None)\n"
  10315. "\n"
  10316. "Inverse of `gdtr` vs b.\n"
  10317. "\n"
  10318. "Returns the inverse with respect to the parameter `b` of ``p =\n"
  10319. "gdtr(a, b, x)``, the cumulative distribution function of the gamma\n"
  10320. "distribution.\n"
  10321. "\n"
  10322. "Parameters\n"
  10323. "----------\n"
  10324. "a : array_like\n"
  10325. " `a` parameter values of `gdtr(a, b, x)`. `1/a` is the \"scale\"\n"
  10326. " parameter of the gamma distribution.\n"
  10327. "p : array_like\n"
  10328. " Probability values.\n"
  10329. "x : array_like\n"
  10330. " Nonnegative real values, from the domain of the gamma distribution.\n"
  10331. "out : ndarray, optional\n"
  10332. " If a fourth argument is given, it must be a numpy.ndarray whose size\n"
  10333. " matches the broadcast result of `a`, `b` and `x`. `out` is then the\n"
  10334. " array returned by the function.\n"
  10335. "\n"
  10336. "Returns\n"
  10337. "-------\n"
  10338. "b : scalar or ndarray\n"
  10339. " Values of the `b` parameter such that `p = gdtr(a, b, x)`. `b` is\n"
  10340. " the \"shape\" parameter of the gamma distribution.\n"
  10341. "\n"
  10342. "See Also\n"
  10343. "--------\n"
  10344. "gdtr : CDF of the gamma distribution.\n"
  10345. "gdtria : Inverse with respect to `a` of `gdtr(a, b, x)`.\n"
  10346. "gdtrix : Inverse with respect to `x` of `gdtr(a, b, x)`.\n"
  10347. "\n"
  10348. "Notes\n"
  10349. "-----\n"
  10350. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfgam`.\n"
  10351. "\n"
  10352. "The cumulative distribution function `p` is computed using a routine by\n"
  10353. "DiDinato and Morris [2]_. Computation of `b` involves a search for a value\n"
  10354. "that produces the desired value of `p`. The search relies on the\n"
  10355. "monotonicity of `p` with `b`.\n"
  10356. "\n"
  10357. "References\n"
  10358. "----------\n"
  10359. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  10360. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  10361. " Functions, Inverses, and Other Parameters.\n"
  10362. ".. [2] DiDinato, A. R. and Morris, A. H.,\n"
  10363. " Computation of the incomplete gamma function ratios and their\n"
  10364. " inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.\n"
  10365. "\n"
  10366. "Examples\n"
  10367. "--------\n"
  10368. "First evaluate `gdtr`.\n"
  10369. "\n"
  10370. ">>> from scipy.special import gdtr, gdtrib\n"
  10371. ">>> p = gdtr(1.2, 3.4, 5.6)\n"
  10372. ">>> print(p)\n"
  10373. "0.94378087442\n"
  10374. "\n"
  10375. "Verify the inverse.\n"
  10376. "\n"
  10377. ">>> gdtrib(1.2, p, 5.6)\n"
  10378. "3.3999999999723882")
  10379. ufunc_gdtrib_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  10380. ufunc_gdtrib_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  10381. ufunc_gdtrib_types[0] = <char>NPY_FLOAT
  10382. ufunc_gdtrib_types[1] = <char>NPY_FLOAT
  10383. ufunc_gdtrib_types[2] = <char>NPY_FLOAT
  10384. ufunc_gdtrib_types[3] = <char>NPY_FLOAT
  10385. ufunc_gdtrib_types[4] = <char>NPY_DOUBLE
  10386. ufunc_gdtrib_types[5] = <char>NPY_DOUBLE
  10387. ufunc_gdtrib_types[6] = <char>NPY_DOUBLE
  10388. ufunc_gdtrib_types[7] = <char>NPY_DOUBLE
  10389. ufunc_gdtrib_ptr[2*0] = <void*>_func_cdfgam3_wrap
  10390. ufunc_gdtrib_ptr[2*0+1] = <void*>(<char*>"gdtrib")
  10391. ufunc_gdtrib_ptr[2*1] = <void*>_func_cdfgam3_wrap
  10392. ufunc_gdtrib_ptr[2*1+1] = <void*>(<char*>"gdtrib")
  10393. ufunc_gdtrib_data[0] = &ufunc_gdtrib_ptr[2*0]
  10394. ufunc_gdtrib_data[1] = &ufunc_gdtrib_ptr[2*1]
  10395. gdtrib = np.PyUFunc_FromFuncAndData(ufunc_gdtrib_loops, ufunc_gdtrib_data, ufunc_gdtrib_types, 2, 3, 1, 0, "gdtrib", ufunc_gdtrib_doc, 0)
  10396. cdef np.PyUFuncGenericFunction ufunc_gdtrix_loops[2]
  10397. cdef void *ufunc_gdtrix_ptr[4]
  10398. cdef void *ufunc_gdtrix_data[2]
  10399. cdef char ufunc_gdtrix_types[8]
  10400. cdef char *ufunc_gdtrix_doc = (
  10401. "gdtrix(a, b, p, out=None)\n"
  10402. "\n"
  10403. "Inverse of `gdtr` vs x.\n"
  10404. "\n"
  10405. "Returns the inverse with respect to the parameter `x` of ``p =\n"
  10406. "gdtr(a, b, x)``, the cumulative distribution function of the gamma\n"
  10407. "distribution. This is also known as the pth quantile of the\n"
  10408. "distribution.\n"
  10409. "\n"
  10410. "Parameters\n"
  10411. "----------\n"
  10412. "a : array_like\n"
  10413. " `a` parameter values of `gdtr(a, b, x)`. `1/a` is the \"scale\"\n"
  10414. " parameter of the gamma distribution.\n"
  10415. "b : array_like\n"
  10416. " `b` parameter values of `gdtr(a, b, x)`. `b` is the \"shape\" parameter\n"
  10417. " of the gamma distribution.\n"
  10418. "p : array_like\n"
  10419. " Probability values.\n"
  10420. "out : ndarray, optional\n"
  10421. " If a fourth argument is given, it must be a numpy.ndarray whose size\n"
  10422. " matches the broadcast result of `a`, `b` and `x`. `out` is then the\n"
  10423. " array returned by the function.\n"
  10424. "\n"
  10425. "Returns\n"
  10426. "-------\n"
  10427. "x : scalar or ndarray\n"
  10428. " Values of the `x` parameter such that `p = gdtr(a, b, x)`.\n"
  10429. "\n"
  10430. "See Also\n"
  10431. "--------\n"
  10432. "gdtr : CDF of the gamma distribution.\n"
  10433. "gdtria : Inverse with respect to `a` of `gdtr(a, b, x)`.\n"
  10434. "gdtrib : Inverse with respect to `b` of `gdtr(a, b, x)`.\n"
  10435. "\n"
  10436. "Notes\n"
  10437. "-----\n"
  10438. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfgam`.\n"
  10439. "\n"
  10440. "The cumulative distribution function `p` is computed using a routine by\n"
  10441. "DiDinato and Morris [2]_. Computation of `x` involves a search for a value\n"
  10442. "that produces the desired value of `p`. The search relies on the\n"
  10443. "monotonicity of `p` with `x`.\n"
  10444. "\n"
  10445. "References\n"
  10446. "----------\n"
  10447. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  10448. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  10449. " Functions, Inverses, and Other Parameters.\n"
  10450. ".. [2] DiDinato, A. R. and Morris, A. H.,\n"
  10451. " Computation of the incomplete gamma function ratios and their\n"
  10452. " inverse. ACM Trans. Math. Softw. 12 (1986), 377-393.\n"
  10453. "\n"
  10454. "Examples\n"
  10455. "--------\n"
  10456. "First evaluate `gdtr`.\n"
  10457. "\n"
  10458. ">>> from scipy.special import gdtr, gdtrix\n"
  10459. ">>> p = gdtr(1.2, 3.4, 5.6)\n"
  10460. ">>> print(p)\n"
  10461. "0.94378087442\n"
  10462. "\n"
  10463. "Verify the inverse.\n"
  10464. "\n"
  10465. ">>> gdtrix(1.2, 3.4, p)\n"
  10466. "5.5999999999999996")
  10467. ufunc_gdtrix_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  10468. ufunc_gdtrix_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  10469. ufunc_gdtrix_types[0] = <char>NPY_FLOAT
  10470. ufunc_gdtrix_types[1] = <char>NPY_FLOAT
  10471. ufunc_gdtrix_types[2] = <char>NPY_FLOAT
  10472. ufunc_gdtrix_types[3] = <char>NPY_FLOAT
  10473. ufunc_gdtrix_types[4] = <char>NPY_DOUBLE
  10474. ufunc_gdtrix_types[5] = <char>NPY_DOUBLE
  10475. ufunc_gdtrix_types[6] = <char>NPY_DOUBLE
  10476. ufunc_gdtrix_types[7] = <char>NPY_DOUBLE
  10477. ufunc_gdtrix_ptr[2*0] = <void*>_func_cdfgam2_wrap
  10478. ufunc_gdtrix_ptr[2*0+1] = <void*>(<char*>"gdtrix")
  10479. ufunc_gdtrix_ptr[2*1] = <void*>_func_cdfgam2_wrap
  10480. ufunc_gdtrix_ptr[2*1+1] = <void*>(<char*>"gdtrix")
  10481. ufunc_gdtrix_data[0] = &ufunc_gdtrix_ptr[2*0]
  10482. ufunc_gdtrix_data[1] = &ufunc_gdtrix_ptr[2*1]
  10483. gdtrix = np.PyUFunc_FromFuncAndData(ufunc_gdtrix_loops, ufunc_gdtrix_data, ufunc_gdtrix_types, 2, 3, 1, 0, "gdtrix", ufunc_gdtrix_doc, 0)
  10484. cdef np.PyUFuncGenericFunction ufunc_hankel1_loops[2]
  10485. cdef void *ufunc_hankel1_ptr[4]
  10486. cdef void *ufunc_hankel1_data[2]
  10487. cdef char ufunc_hankel1_types[6]
  10488. cdef char *ufunc_hankel1_doc = (
  10489. "hankel1(v, z, out=None)\n"
  10490. "\n"
  10491. "Hankel function of the first kind\n"
  10492. "\n"
  10493. "Parameters\n"
  10494. "----------\n"
  10495. "v : array_like\n"
  10496. " Order (float).\n"
  10497. "z : array_like\n"
  10498. " Argument (float or complex).\n"
  10499. "out : ndarray, optional\n"
  10500. " Optional output array for the function values\n"
  10501. "\n"
  10502. "Returns\n"
  10503. "-------\n"
  10504. "scalar or ndarray\n"
  10505. " Values of the Hankel function of the first kind.\n"
  10506. "\n"
  10507. "Notes\n"
  10508. "-----\n"
  10509. "A wrapper for the AMOS [1]_ routine `zbesh`, which carries out the\n"
  10510. "computation using the relation,\n"
  10511. "\n"
  10512. ".. math:: H^{(1)}_v(z) = \\frac{2}{\\imath\\pi} \\exp(-\\imath \\pi v/2) K_v(z \\exp(-\\imath\\pi/2))\n"
  10513. "\n"
  10514. "where :math:`K_v` is the modified Bessel function of the second kind.\n"
  10515. "For negative orders, the relation\n"
  10516. "\n"
  10517. ".. math:: H^{(1)}_{-v}(z) = H^{(1)}_v(z) \\exp(\\imath\\pi v)\n"
  10518. "\n"
  10519. "is used.\n"
  10520. "\n"
  10521. "See also\n"
  10522. "--------\n"
  10523. "hankel1e : ndarray\n"
  10524. " This function with leading exponential behavior stripped off.\n"
  10525. "\n"
  10526. "References\n"
  10527. "----------\n"
  10528. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  10529. " of a Complex Argument and Nonnegative Order\",\n"
  10530. " http://netlib.org/amos/")
  10531. ufunc_hankel1_loops[0] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  10532. ufunc_hankel1_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  10533. ufunc_hankel1_types[0] = <char>NPY_FLOAT
  10534. ufunc_hankel1_types[1] = <char>NPY_CFLOAT
  10535. ufunc_hankel1_types[2] = <char>NPY_CFLOAT
  10536. ufunc_hankel1_types[3] = <char>NPY_DOUBLE
  10537. ufunc_hankel1_types[4] = <char>NPY_CDOUBLE
  10538. ufunc_hankel1_types[5] = <char>NPY_CDOUBLE
  10539. ufunc_hankel1_ptr[2*0] = <void*>_func_cbesh_wrap1
  10540. ufunc_hankel1_ptr[2*0+1] = <void*>(<char*>"hankel1")
  10541. ufunc_hankel1_ptr[2*1] = <void*>_func_cbesh_wrap1
  10542. ufunc_hankel1_ptr[2*1+1] = <void*>(<char*>"hankel1")
  10543. ufunc_hankel1_data[0] = &ufunc_hankel1_ptr[2*0]
  10544. ufunc_hankel1_data[1] = &ufunc_hankel1_ptr[2*1]
  10545. hankel1 = np.PyUFunc_FromFuncAndData(ufunc_hankel1_loops, ufunc_hankel1_data, ufunc_hankel1_types, 2, 2, 1, 0, "hankel1", ufunc_hankel1_doc, 0)
  10546. cdef np.PyUFuncGenericFunction ufunc_hankel1e_loops[2]
  10547. cdef void *ufunc_hankel1e_ptr[4]
  10548. cdef void *ufunc_hankel1e_data[2]
  10549. cdef char ufunc_hankel1e_types[6]
  10550. cdef char *ufunc_hankel1e_doc = (
  10551. "hankel1e(v, z, out=None)\n"
  10552. "\n"
  10553. "Exponentially scaled Hankel function of the first kind\n"
  10554. "\n"
  10555. "Defined as::\n"
  10556. "\n"
  10557. " hankel1e(v, z) = hankel1(v, z) * exp(-1j * z)\n"
  10558. "\n"
  10559. "Parameters\n"
  10560. "----------\n"
  10561. "v : array_like\n"
  10562. " Order (float).\n"
  10563. "z : array_like\n"
  10564. " Argument (float or complex).\n"
  10565. "out : ndarray, optional\n"
  10566. " Optional output array for the function values\n"
  10567. "\n"
  10568. "Returns\n"
  10569. "-------\n"
  10570. "scalar or ndarray\n"
  10571. " Values of the exponentially scaled Hankel function.\n"
  10572. "\n"
  10573. "Notes\n"
  10574. "-----\n"
  10575. "A wrapper for the AMOS [1]_ routine `zbesh`, which carries out the\n"
  10576. "computation using the relation,\n"
  10577. "\n"
  10578. ".. math:: H^{(1)}_v(z) = \\frac{2}{\\imath\\pi} \\exp(-\\imath \\pi v/2) K_v(z \\exp(-\\imath\\pi/2))\n"
  10579. "\n"
  10580. "where :math:`K_v` is the modified Bessel function of the second kind.\n"
  10581. "For negative orders, the relation\n"
  10582. "\n"
  10583. ".. math:: H^{(1)}_{-v}(z) = H^{(1)}_v(z) \\exp(\\imath\\pi v)\n"
  10584. "\n"
  10585. "is used.\n"
  10586. "\n"
  10587. "References\n"
  10588. "----------\n"
  10589. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  10590. " of a Complex Argument and Nonnegative Order\",\n"
  10591. " http://netlib.org/amos/")
  10592. ufunc_hankel1e_loops[0] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  10593. ufunc_hankel1e_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  10594. ufunc_hankel1e_types[0] = <char>NPY_FLOAT
  10595. ufunc_hankel1e_types[1] = <char>NPY_CFLOAT
  10596. ufunc_hankel1e_types[2] = <char>NPY_CFLOAT
  10597. ufunc_hankel1e_types[3] = <char>NPY_DOUBLE
  10598. ufunc_hankel1e_types[4] = <char>NPY_CDOUBLE
  10599. ufunc_hankel1e_types[5] = <char>NPY_CDOUBLE
  10600. ufunc_hankel1e_ptr[2*0] = <void*>_func_cbesh_wrap1_e
  10601. ufunc_hankel1e_ptr[2*0+1] = <void*>(<char*>"hankel1e")
  10602. ufunc_hankel1e_ptr[2*1] = <void*>_func_cbesh_wrap1_e
  10603. ufunc_hankel1e_ptr[2*1+1] = <void*>(<char*>"hankel1e")
  10604. ufunc_hankel1e_data[0] = &ufunc_hankel1e_ptr[2*0]
  10605. ufunc_hankel1e_data[1] = &ufunc_hankel1e_ptr[2*1]
  10606. hankel1e = np.PyUFunc_FromFuncAndData(ufunc_hankel1e_loops, ufunc_hankel1e_data, ufunc_hankel1e_types, 2, 2, 1, 0, "hankel1e", ufunc_hankel1e_doc, 0)
  10607. cdef np.PyUFuncGenericFunction ufunc_hankel2_loops[2]
  10608. cdef void *ufunc_hankel2_ptr[4]
  10609. cdef void *ufunc_hankel2_data[2]
  10610. cdef char ufunc_hankel2_types[6]
  10611. cdef char *ufunc_hankel2_doc = (
  10612. "hankel2(v, z, out=None)\n"
  10613. "\n"
  10614. "Hankel function of the second kind\n"
  10615. "\n"
  10616. "Parameters\n"
  10617. "----------\n"
  10618. "v : array_like\n"
  10619. " Order (float).\n"
  10620. "z : array_like\n"
  10621. " Argument (float or complex).\n"
  10622. "out : ndarray, optional\n"
  10623. " Optional output array for the function values\n"
  10624. "\n"
  10625. "Returns\n"
  10626. "-------\n"
  10627. "scalar or ndarray\n"
  10628. " Values of the Hankel function of the second kind.\n"
  10629. "\n"
  10630. "Notes\n"
  10631. "-----\n"
  10632. "A wrapper for the AMOS [1]_ routine `zbesh`, which carries out the\n"
  10633. "computation using the relation,\n"
  10634. "\n"
  10635. ".. math:: H^{(2)}_v(z) = -\\frac{2}{\\imath\\pi} \\exp(\\imath \\pi v/2) K_v(z \\exp(\\imath\\pi/2))\n"
  10636. "\n"
  10637. "where :math:`K_v` is the modified Bessel function of the second kind.\n"
  10638. "For negative orders, the relation\n"
  10639. "\n"
  10640. ".. math:: H^{(2)}_{-v}(z) = H^{(2)}_v(z) \\exp(-\\imath\\pi v)\n"
  10641. "\n"
  10642. "is used.\n"
  10643. "\n"
  10644. "See also\n"
  10645. "--------\n"
  10646. "hankel2e : this function with leading exponential behavior stripped off.\n"
  10647. "\n"
  10648. "References\n"
  10649. "----------\n"
  10650. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  10651. " of a Complex Argument and Nonnegative Order\",\n"
  10652. " http://netlib.org/amos/")
  10653. ufunc_hankel2_loops[0] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  10654. ufunc_hankel2_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  10655. ufunc_hankel2_types[0] = <char>NPY_FLOAT
  10656. ufunc_hankel2_types[1] = <char>NPY_CFLOAT
  10657. ufunc_hankel2_types[2] = <char>NPY_CFLOAT
  10658. ufunc_hankel2_types[3] = <char>NPY_DOUBLE
  10659. ufunc_hankel2_types[4] = <char>NPY_CDOUBLE
  10660. ufunc_hankel2_types[5] = <char>NPY_CDOUBLE
  10661. ufunc_hankel2_ptr[2*0] = <void*>_func_cbesh_wrap2
  10662. ufunc_hankel2_ptr[2*0+1] = <void*>(<char*>"hankel2")
  10663. ufunc_hankel2_ptr[2*1] = <void*>_func_cbesh_wrap2
  10664. ufunc_hankel2_ptr[2*1+1] = <void*>(<char*>"hankel2")
  10665. ufunc_hankel2_data[0] = &ufunc_hankel2_ptr[2*0]
  10666. ufunc_hankel2_data[1] = &ufunc_hankel2_ptr[2*1]
  10667. hankel2 = np.PyUFunc_FromFuncAndData(ufunc_hankel2_loops, ufunc_hankel2_data, ufunc_hankel2_types, 2, 2, 1, 0, "hankel2", ufunc_hankel2_doc, 0)
  10668. cdef np.PyUFuncGenericFunction ufunc_hankel2e_loops[2]
  10669. cdef void *ufunc_hankel2e_ptr[4]
  10670. cdef void *ufunc_hankel2e_data[2]
  10671. cdef char ufunc_hankel2e_types[6]
  10672. cdef char *ufunc_hankel2e_doc = (
  10673. "hankel2e(v, z, out=None)\n"
  10674. "\n"
  10675. "Exponentially scaled Hankel function of the second kind\n"
  10676. "\n"
  10677. "Defined as::\n"
  10678. "\n"
  10679. " hankel2e(v, z) = hankel2(v, z) * exp(1j * z)\n"
  10680. "\n"
  10681. "Parameters\n"
  10682. "----------\n"
  10683. "v : array_like\n"
  10684. " Order (float).\n"
  10685. "z : array_like\n"
  10686. " Argument (float or complex).\n"
  10687. "out : ndarray, optional\n"
  10688. " Optional output array for the function values\n"
  10689. "\n"
  10690. "Returns\n"
  10691. "-------\n"
  10692. "scalar or ndarray\n"
  10693. " Values of the exponentially scaled Hankel function of the second kind.\n"
  10694. "\n"
  10695. "Notes\n"
  10696. "-----\n"
  10697. "A wrapper for the AMOS [1]_ routine `zbesh`, which carries out the\n"
  10698. "computation using the relation,\n"
  10699. "\n"
  10700. ".. math:: H^{(2)}_v(z) = -\\frac{2}{\\imath\\pi} \\exp(\\frac{\\imath \\pi v}{2}) K_v(z exp(\\frac{\\imath\\pi}{2}))\n"
  10701. "\n"
  10702. "where :math:`K_v` is the modified Bessel function of the second kind.\n"
  10703. "For negative orders, the relation\n"
  10704. "\n"
  10705. ".. math:: H^{(2)}_{-v}(z) = H^{(2)}_v(z) \\exp(-\\imath\\pi v)\n"
  10706. "\n"
  10707. "is used.\n"
  10708. "\n"
  10709. "References\n"
  10710. "----------\n"
  10711. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  10712. " of a Complex Argument and Nonnegative Order\",\n"
  10713. " http://netlib.org/amos/")
  10714. ufunc_hankel2e_loops[0] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  10715. ufunc_hankel2e_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  10716. ufunc_hankel2e_types[0] = <char>NPY_FLOAT
  10717. ufunc_hankel2e_types[1] = <char>NPY_CFLOAT
  10718. ufunc_hankel2e_types[2] = <char>NPY_CFLOAT
  10719. ufunc_hankel2e_types[3] = <char>NPY_DOUBLE
  10720. ufunc_hankel2e_types[4] = <char>NPY_CDOUBLE
  10721. ufunc_hankel2e_types[5] = <char>NPY_CDOUBLE
  10722. ufunc_hankel2e_ptr[2*0] = <void*>_func_cbesh_wrap2_e
  10723. ufunc_hankel2e_ptr[2*0+1] = <void*>(<char*>"hankel2e")
  10724. ufunc_hankel2e_ptr[2*1] = <void*>_func_cbesh_wrap2_e
  10725. ufunc_hankel2e_ptr[2*1+1] = <void*>(<char*>"hankel2e")
  10726. ufunc_hankel2e_data[0] = &ufunc_hankel2e_ptr[2*0]
  10727. ufunc_hankel2e_data[1] = &ufunc_hankel2e_ptr[2*1]
  10728. hankel2e = np.PyUFunc_FromFuncAndData(ufunc_hankel2e_loops, ufunc_hankel2e_data, ufunc_hankel2e_types, 2, 2, 1, 0, "hankel2e", ufunc_hankel2e_doc, 0)
  10729. cdef np.PyUFuncGenericFunction ufunc_huber_loops[2]
  10730. cdef void *ufunc_huber_ptr[4]
  10731. cdef void *ufunc_huber_data[2]
  10732. cdef char ufunc_huber_types[6]
  10733. cdef char *ufunc_huber_doc = (
  10734. "huber(delta, r, out=None)\n"
  10735. "\n"
  10736. "Huber loss function.\n"
  10737. "\n"
  10738. ".. math:: \\text{huber}(\\delta, r) = \\begin{cases} \\infty & \\delta < 0 \\\\ \\frac{1}{2}r^2 & 0 \\le \\delta, | r | \\le \\delta \\\\ \\delta ( |r| - \\frac{1}{2}\\delta ) & \\text{otherwise} \\end{cases}\n"
  10739. "\n"
  10740. "Parameters\n"
  10741. "----------\n"
  10742. "delta : ndarray\n"
  10743. " Input array, indicating the quadratic vs. linear loss changepoint.\n"
  10744. "r : ndarray\n"
  10745. " Input array, possibly representing residuals.\n"
  10746. "out : ndarray, optional\n"
  10747. " Optional output array for the function values\n"
  10748. "\n"
  10749. "Returns\n"
  10750. "-------\n"
  10751. "scalar or ndarray\n"
  10752. " The computed Huber loss function values.\n"
  10753. "\n"
  10754. "See also\n"
  10755. "--------\n"
  10756. "pseudo_huber : smooth approximation of this function\n"
  10757. "\n"
  10758. "Notes\n"
  10759. "-----\n"
  10760. "`huber` is useful as a loss function in robust statistics or machine\n"
  10761. "learning to reduce the influence of outliers as compared to the common\n"
  10762. "squared error loss, residuals with a magnitude higher than `delta` are\n"
  10763. "not squared [1]_.\n"
  10764. "\n"
  10765. "Typically, `r` represents residuals, the difference\n"
  10766. "between a model prediction and data. Then, for :math:`|r|\\leq\\delta`,\n"
  10767. "`huber` resembles the squared error and for :math:`|r|>\\delta` the\n"
  10768. "absolute error. This way, the Huber loss often achieves\n"
  10769. "a fast convergence in model fitting for small residuals like the squared\n"
  10770. "error loss function and still reduces the influence of outliers\n"
  10771. "(:math:`|r|>\\delta`) like the absolute error loss. As :math:`\\delta` is\n"
  10772. "the cutoff between squared and absolute error regimes, it has\n"
  10773. "to be tuned carefully for each problem. `huber` is also\n"
  10774. "convex, making it suitable for gradient based optimization.\n"
  10775. "\n"
  10776. ".. versionadded:: 0.15.0\n"
  10777. "\n"
  10778. "References\n"
  10779. "----------\n"
  10780. ".. [1] Peter Huber. \"Robust Estimation of a Location Parameter\",\n"
  10781. " 1964. Annals of Statistics. 53 (1): 73 - 101.\n"
  10782. "\n"
  10783. "Examples\n"
  10784. "--------\n"
  10785. "Import all necessary modules.\n"
  10786. "\n"
  10787. ">>> import numpy as np\n"
  10788. ">>> from scipy.special import huber\n"
  10789. ">>> import matplotlib.pyplot as plt\n"
  10790. "\n"
  10791. "Compute the function for ``delta=1`` at ``r=2``\n"
  10792. "\n"
  10793. ">>> huber(1., 2.)\n"
  10794. "1.5\n"
  10795. "\n"
  10796. "Compute the function for different `delta` by providing a NumPy array or\n"
  10797. "list for `delta`.\n"
  10798. "\n"
  10799. ">>> huber([1., 3., 5.], 4.)\n"
  10800. "array([3.5, 7.5, 8. ])\n"
  10801. "\n"
  10802. "Compute the function at different points by providing a NumPy array or\n"
  10803. "list for `r`.\n"
  10804. "\n"
  10805. ">>> huber(2., np.array([1., 1.5, 3.]))\n"
  10806. "array([0.5 , 1.125, 4. ])\n"
  10807. "\n"
  10808. "The function can be calculated for different `delta` and `r` by\n"
  10809. "providing arrays for both with compatible shapes for broadcasting.\n"
  10810. "\n"
  10811. ">>> r = np.array([1., 2.5, 8., 10.])\n"
  10812. ">>> deltas = np.array([[1.], [5.], [9.]])\n"
  10813. ">>> print(r.shape, deltas.shape)\n"
  10814. "(4,) (3, 1)\n"
  10815. "\n"
  10816. ">>> huber(deltas, r)\n"
  10817. "array([[ 0.5 , 2. , 7.5 , 9.5 ],\n"
  10818. " [ 0.5 , 3.125, 27.5 , 37.5 ],\n"
  10819. " [ 0.5 , 3.125, 32. , 49.5 ]])\n"
  10820. "\n"
  10821. "Plot the function for different `delta`.\n"
  10822. "\n"
  10823. ">>> x = np.linspace(-4, 4, 500)\n"
  10824. ">>> deltas = [1, 2, 3]\n"
  10825. ">>> linestyles = [\"dashed\", \"dotted\", \"dashdot\"]\n"
  10826. ">>> fig, ax = plt.subplots()\n"
  10827. ">>> combined_plot_parameters = list(zip(deltas, linestyles))\n"
  10828. ">>> for delta, style in combined_plot_parameters:\n"
  10829. "... ax.plot(x, huber(delta, x), label=f\"$\\delta={delta}$\", ls=style)\n"
  10830. ">>> ax.legend(loc=\"upper center\")\n"
  10831. ">>> ax.set_xlabel(\"$x$\")\n"
  10832. ">>> ax.set_title(\"Huber loss function $h_{\\delta}(x)$\")\n"
  10833. ">>> ax.set_xlim(-4, 4)\n"
  10834. ">>> ax.set_ylim(0, 8)\n"
  10835. ">>> plt.show()")
  10836. ufunc_huber_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  10837. ufunc_huber_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  10838. ufunc_huber_types[0] = <char>NPY_FLOAT
  10839. ufunc_huber_types[1] = <char>NPY_FLOAT
  10840. ufunc_huber_types[2] = <char>NPY_FLOAT
  10841. ufunc_huber_types[3] = <char>NPY_DOUBLE
  10842. ufunc_huber_types[4] = <char>NPY_DOUBLE
  10843. ufunc_huber_types[5] = <char>NPY_DOUBLE
  10844. ufunc_huber_ptr[2*0] = <void*>_func_huber
  10845. ufunc_huber_ptr[2*0+1] = <void*>(<char*>"huber")
  10846. ufunc_huber_ptr[2*1] = <void*>_func_huber
  10847. ufunc_huber_ptr[2*1+1] = <void*>(<char*>"huber")
  10848. ufunc_huber_data[0] = &ufunc_huber_ptr[2*0]
  10849. ufunc_huber_data[1] = &ufunc_huber_ptr[2*1]
  10850. huber = np.PyUFunc_FromFuncAndData(ufunc_huber_loops, ufunc_huber_data, ufunc_huber_types, 2, 2, 1, 0, "huber", ufunc_huber_doc, 0)
  10851. cdef np.PyUFuncGenericFunction ufunc_hyp0f1_loops[4]
  10852. cdef void *ufunc_hyp0f1_ptr[8]
  10853. cdef void *ufunc_hyp0f1_data[4]
  10854. cdef char ufunc_hyp0f1_types[12]
  10855. cdef char *ufunc_hyp0f1_doc = (
  10856. "hyp0f1(v, z, out=None)\n"
  10857. "\n"
  10858. "Confluent hypergeometric limit function 0F1.\n"
  10859. "\n"
  10860. "Parameters\n"
  10861. "----------\n"
  10862. "v : array_like\n"
  10863. " Real-valued parameter\n"
  10864. "z : array_like\n"
  10865. " Real- or complex-valued argument\n"
  10866. "out : ndarray, optional\n"
  10867. " Optional output array for the function results\n"
  10868. "\n"
  10869. "Returns\n"
  10870. "-------\n"
  10871. "scalar or ndarray\n"
  10872. " The confluent hypergeometric limit function\n"
  10873. "\n"
  10874. "Notes\n"
  10875. "-----\n"
  10876. "This function is defined as:\n"
  10877. "\n"
  10878. ".. math:: _0F_1(v, z) = \\sum_{k=0}^{\\infty}\\frac{z^k}{(v)_k k!}.\n"
  10879. "\n"
  10880. "It's also the limit as :math:`q \\to \\infty` of :math:`_1F_1(q; v; z/q)`,\n"
  10881. "and satisfies the differential equation :math:`f''(z) + vf'(z) =\n"
  10882. "f(z)`. See [1]_ for more information.\n"
  10883. "\n"
  10884. "References\n"
  10885. "----------\n"
  10886. ".. [1] Wolfram MathWorld, \"Confluent Hypergeometric Limit Function\",\n"
  10887. " http://mathworld.wolfram.com/ConfluentHypergeometricLimitFunction.html\n"
  10888. "\n"
  10889. "Examples\n"
  10890. "--------\n"
  10891. ">>> import numpy as np\n"
  10892. ">>> import scipy.special as sc\n"
  10893. "\n"
  10894. "It is one when `z` is zero.\n"
  10895. "\n"
  10896. ">>> sc.hyp0f1(1, 0)\n"
  10897. "1.0\n"
  10898. "\n"
  10899. "It is the limit of the confluent hypergeometric function as `q`\n"
  10900. "goes to infinity.\n"
  10901. "\n"
  10902. ">>> q = np.array([1, 10, 100, 1000])\n"
  10903. ">>> v = 1\n"
  10904. ">>> z = 1\n"
  10905. ">>> sc.hyp1f1(q, v, z / q)\n"
  10906. "array([2.71828183, 2.31481985, 2.28303778, 2.27992985])\n"
  10907. ">>> sc.hyp0f1(v, z)\n"
  10908. "2.2795853023360673\n"
  10909. "\n"
  10910. "It is related to Bessel functions.\n"
  10911. "\n"
  10912. ">>> n = 1\n"
  10913. ">>> x = np.linspace(0, 1, 5)\n"
  10914. ">>> sc.jv(n, x)\n"
  10915. "array([0. , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])\n"
  10916. ">>> (0.5 * x)**n / sc.factorial(n) * sc.hyp0f1(n + 1, -0.25 * x**2)\n"
  10917. "array([0. , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])")
  10918. ufunc_hyp0f1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  10919. ufunc_hyp0f1_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  10920. ufunc_hyp0f1_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  10921. ufunc_hyp0f1_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  10922. ufunc_hyp0f1_types[0] = <char>NPY_FLOAT
  10923. ufunc_hyp0f1_types[1] = <char>NPY_FLOAT
  10924. ufunc_hyp0f1_types[2] = <char>NPY_FLOAT
  10925. ufunc_hyp0f1_types[3] = <char>NPY_FLOAT
  10926. ufunc_hyp0f1_types[4] = <char>NPY_CFLOAT
  10927. ufunc_hyp0f1_types[5] = <char>NPY_CFLOAT
  10928. ufunc_hyp0f1_types[6] = <char>NPY_DOUBLE
  10929. ufunc_hyp0f1_types[7] = <char>NPY_DOUBLE
  10930. ufunc_hyp0f1_types[8] = <char>NPY_DOUBLE
  10931. ufunc_hyp0f1_types[9] = <char>NPY_DOUBLE
  10932. ufunc_hyp0f1_types[10] = <char>NPY_CDOUBLE
  10933. ufunc_hyp0f1_types[11] = <char>NPY_CDOUBLE
  10934. ufunc_hyp0f1_ptr[2*0] = <void*>_func__hyp0f1_real
  10935. ufunc_hyp0f1_ptr[2*0+1] = <void*>(<char*>"hyp0f1")
  10936. ufunc_hyp0f1_ptr[2*1] = <void*>_func__hyp0f1_cmplx
  10937. ufunc_hyp0f1_ptr[2*1+1] = <void*>(<char*>"hyp0f1")
  10938. ufunc_hyp0f1_ptr[2*2] = <void*>_func__hyp0f1_real
  10939. ufunc_hyp0f1_ptr[2*2+1] = <void*>(<char*>"hyp0f1")
  10940. ufunc_hyp0f1_ptr[2*3] = <void*>_func__hyp0f1_cmplx
  10941. ufunc_hyp0f1_ptr[2*3+1] = <void*>(<char*>"hyp0f1")
  10942. ufunc_hyp0f1_data[0] = &ufunc_hyp0f1_ptr[2*0]
  10943. ufunc_hyp0f1_data[1] = &ufunc_hyp0f1_ptr[2*1]
  10944. ufunc_hyp0f1_data[2] = &ufunc_hyp0f1_ptr[2*2]
  10945. ufunc_hyp0f1_data[3] = &ufunc_hyp0f1_ptr[2*3]
  10946. hyp0f1 = np.PyUFunc_FromFuncAndData(ufunc_hyp0f1_loops, ufunc_hyp0f1_data, ufunc_hyp0f1_types, 4, 2, 1, 0, "hyp0f1", ufunc_hyp0f1_doc, 0)
  10947. cdef np.PyUFuncGenericFunction ufunc_hyp1f1_loops[4]
  10948. cdef void *ufunc_hyp1f1_ptr[8]
  10949. cdef void *ufunc_hyp1f1_data[4]
  10950. cdef char ufunc_hyp1f1_types[16]
  10951. cdef char *ufunc_hyp1f1_doc = (
  10952. "hyp1f1(a, b, x, out=None)\n"
  10953. "\n"
  10954. "Confluent hypergeometric function 1F1.\n"
  10955. "\n"
  10956. "The confluent hypergeometric function is defined by the series\n"
  10957. "\n"
  10958. ".. math::\n"
  10959. "\n"
  10960. " {}_1F_1(a; b; x) = \\sum_{k = 0}^\\infty \\frac{(a)_k}{(b)_k k!} x^k.\n"
  10961. "\n"
  10962. "See [dlmf]_ for more details. Here :math:`(\\cdot)_k` is the\n"
  10963. "Pochhammer symbol; see `poch`.\n"
  10964. "\n"
  10965. "Parameters\n"
  10966. "----------\n"
  10967. "a, b : array_like\n"
  10968. " Real parameters\n"
  10969. "x : array_like\n"
  10970. " Real or complex argument\n"
  10971. "out : ndarray, optional\n"
  10972. " Optional output array for the function results\n"
  10973. "\n"
  10974. "Returns\n"
  10975. "-------\n"
  10976. "scalar or ndarray\n"
  10977. " Values of the confluent hypergeometric function\n"
  10978. "\n"
  10979. "See also\n"
  10980. "--------\n"
  10981. "hyperu : another confluent hypergeometric function\n"
  10982. "hyp0f1 : confluent hypergeometric limit function\n"
  10983. "hyp2f1 : Gaussian hypergeometric function\n"
  10984. "\n"
  10985. "References\n"
  10986. "----------\n"
  10987. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  10988. " https://dlmf.nist.gov/13.2#E2\n"
  10989. "\n"
  10990. "Examples\n"
  10991. "--------\n"
  10992. ">>> import numpy as np\n"
  10993. ">>> import scipy.special as sc\n"
  10994. "\n"
  10995. "It is one when `x` is zero:\n"
  10996. "\n"
  10997. ">>> sc.hyp1f1(0.5, 0.5, 0)\n"
  10998. "1.0\n"
  10999. "\n"
  11000. "It is singular when `b` is a nonpositive integer.\n"
  11001. "\n"
  11002. ">>> sc.hyp1f1(0.5, -1, 0)\n"
  11003. "inf\n"
  11004. "\n"
  11005. "It is a polynomial when `a` is a nonpositive integer.\n"
  11006. "\n"
  11007. ">>> a, b, x = -1, 0.5, np.array([1.0, 2.0, 3.0, 4.0])\n"
  11008. ">>> sc.hyp1f1(a, b, x)\n"
  11009. "array([-1., -3., -5., -7.])\n"
  11010. ">>> 1 + (a / b) * x\n"
  11011. "array([-1., -3., -5., -7.])\n"
  11012. "\n"
  11013. "It reduces to the exponential function when `a = b`.\n"
  11014. "\n"
  11015. ">>> sc.hyp1f1(2, 2, [1, 2, 3, 4])\n"
  11016. "array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003])\n"
  11017. ">>> np.exp([1, 2, 3, 4])\n"
  11018. "array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003])")
  11019. ufunc_hyp1f1_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  11020. ufunc_hyp1f1_loops[1] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ffF_F
  11021. ufunc_hyp1f1_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  11022. ufunc_hyp1f1_loops[3] = <np.PyUFuncGenericFunction>loop_D_ddD__As_ddD_D
  11023. ufunc_hyp1f1_types[0] = <char>NPY_FLOAT
  11024. ufunc_hyp1f1_types[1] = <char>NPY_FLOAT
  11025. ufunc_hyp1f1_types[2] = <char>NPY_FLOAT
  11026. ufunc_hyp1f1_types[3] = <char>NPY_FLOAT
  11027. ufunc_hyp1f1_types[4] = <char>NPY_FLOAT
  11028. ufunc_hyp1f1_types[5] = <char>NPY_FLOAT
  11029. ufunc_hyp1f1_types[6] = <char>NPY_CFLOAT
  11030. ufunc_hyp1f1_types[7] = <char>NPY_CFLOAT
  11031. ufunc_hyp1f1_types[8] = <char>NPY_DOUBLE
  11032. ufunc_hyp1f1_types[9] = <char>NPY_DOUBLE
  11033. ufunc_hyp1f1_types[10] = <char>NPY_DOUBLE
  11034. ufunc_hyp1f1_types[11] = <char>NPY_DOUBLE
  11035. ufunc_hyp1f1_types[12] = <char>NPY_DOUBLE
  11036. ufunc_hyp1f1_types[13] = <char>NPY_DOUBLE
  11037. ufunc_hyp1f1_types[14] = <char>NPY_CDOUBLE
  11038. ufunc_hyp1f1_types[15] = <char>NPY_CDOUBLE
  11039. ufunc_hyp1f1_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_hyp1f1_double
  11040. ufunc_hyp1f1_ptr[2*0+1] = <void*>(<char*>"hyp1f1")
  11041. ufunc_hyp1f1_ptr[2*1] = <void*>_func_chyp1f1_wrap
  11042. ufunc_hyp1f1_ptr[2*1+1] = <void*>(<char*>"hyp1f1")
  11043. ufunc_hyp1f1_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_hyp1f1_double
  11044. ufunc_hyp1f1_ptr[2*2+1] = <void*>(<char*>"hyp1f1")
  11045. ufunc_hyp1f1_ptr[2*3] = <void*>_func_chyp1f1_wrap
  11046. ufunc_hyp1f1_ptr[2*3+1] = <void*>(<char*>"hyp1f1")
  11047. ufunc_hyp1f1_data[0] = &ufunc_hyp1f1_ptr[2*0]
  11048. ufunc_hyp1f1_data[1] = &ufunc_hyp1f1_ptr[2*1]
  11049. ufunc_hyp1f1_data[2] = &ufunc_hyp1f1_ptr[2*2]
  11050. ufunc_hyp1f1_data[3] = &ufunc_hyp1f1_ptr[2*3]
  11051. hyp1f1 = np.PyUFunc_FromFuncAndData(ufunc_hyp1f1_loops, ufunc_hyp1f1_data, ufunc_hyp1f1_types, 4, 3, 1, 0, "hyp1f1", ufunc_hyp1f1_doc, 0)
  11052. cdef np.PyUFuncGenericFunction ufunc_hyp2f1_loops[4]
  11053. cdef void *ufunc_hyp2f1_ptr[8]
  11054. cdef void *ufunc_hyp2f1_data[4]
  11055. cdef char ufunc_hyp2f1_types[20]
  11056. cdef char *ufunc_hyp2f1_doc = (
  11057. "hyp2f1(a, b, c, z, out=None)\n"
  11058. "\n"
  11059. "Gauss hypergeometric function 2F1(a, b; c; z)\n"
  11060. "\n"
  11061. "Parameters\n"
  11062. "----------\n"
  11063. "a, b, c : array_like\n"
  11064. " Arguments, should be real-valued.\n"
  11065. "z : array_like\n"
  11066. " Argument, real or complex.\n"
  11067. "out : ndarray, optional\n"
  11068. " Optional output array for the function values\n"
  11069. "\n"
  11070. "Returns\n"
  11071. "-------\n"
  11072. "hyp2f1 : scalar or ndarray\n"
  11073. " The values of the gaussian hypergeometric function.\n"
  11074. "\n"
  11075. "See also\n"
  11076. "--------\n"
  11077. "hyp0f1 : confluent hypergeometric limit function.\n"
  11078. "hyp1f1 : Kummer's (confluent hypergeometric) function.\n"
  11079. "\n"
  11080. "Notes\n"
  11081. "-----\n"
  11082. "This function is defined for :math:`|z| < 1` as\n"
  11083. "\n"
  11084. ".. math::\n"
  11085. "\n"
  11086. " \\mathrm{hyp2f1}(a, b, c, z) = \\sum_{n=0}^\\infty\n"
  11087. " \\frac{(a)_n (b)_n}{(c)_n}\\frac{z^n}{n!},\n"
  11088. "\n"
  11089. "and defined on the rest of the complex z-plane by analytic\n"
  11090. "continuation [1]_.\n"
  11091. "Here :math:`(\\cdot)_n` is the Pochhammer symbol; see `poch`. When\n"
  11092. ":math:`n` is an integer the result is a polynomial of degree :math:`n`.\n"
  11093. "\n"
  11094. "The implementation for complex values of ``z`` is described in [2]_,\n"
  11095. "except for ``z`` in the region defined by\n"
  11096. "\n"
  11097. ".. math::\n"
  11098. "\n"
  11099. " 0.9 <= \\left|z\\right| < 1.1,\n"
  11100. " \\left|1 - z\\right| >= 0.9,\n"
  11101. " \\mathrm{real}(z) >= 0\n"
  11102. "\n"
  11103. "in which the implementation follows [4]_.\n"
  11104. "\n"
  11105. "References\n"
  11106. "----------\n"
  11107. ".. [1] NIST Digital Library of Mathematical Functions\n"
  11108. " https://dlmf.nist.gov/15.2\n"
  11109. ".. [2] S. Zhang and J.M. Jin, \"Computation of Special Functions\", Wiley 1996\n"
  11110. ".. [3] Cephes Mathematical Functions Library,\n"
  11111. " http://www.netlib.org/cephes/\n"
  11112. ".. [4] J.L. Lopez and N.M. Temme, \"New series expansions of the Gauss\n"
  11113. " hypergeometric function\", Adv Comput Math 39, 349-365 (2013).\n"
  11114. " https://doi.org/10.1007/s10444-012-9283-y\n"
  11115. "\n"
  11116. "Examples\n"
  11117. "--------\n"
  11118. ">>> import numpy as np\n"
  11119. ">>> import scipy.special as sc\n"
  11120. "\n"
  11121. "It has poles when `c` is a negative integer.\n"
  11122. "\n"
  11123. ">>> sc.hyp2f1(1, 1, -2, 1)\n"
  11124. "inf\n"
  11125. "\n"
  11126. "It is a polynomial when `a` or `b` is a negative integer.\n"
  11127. "\n"
  11128. ">>> a, b, c = -1, 1, 1.5\n"
  11129. ">>> z = np.linspace(0, 1, 5)\n"
  11130. ">>> sc.hyp2f1(a, b, c, z)\n"
  11131. "array([1. , 0.83333333, 0.66666667, 0.5 , 0.33333333])\n"
  11132. ">>> 1 + a * b * z / c\n"
  11133. "array([1. , 0.83333333, 0.66666667, 0.5 , 0.33333333])\n"
  11134. "\n"
  11135. "It is symmetric in `a` and `b`.\n"
  11136. "\n"
  11137. ">>> a = np.linspace(0, 1, 5)\n"
  11138. ">>> b = np.linspace(0, 1, 5)\n"
  11139. ">>> sc.hyp2f1(a, b, 1, 0.5)\n"
  11140. "array([1. , 1.03997334, 1.1803406 , 1.47074441, 2. ])\n"
  11141. ">>> sc.hyp2f1(b, a, 1, 0.5)\n"
  11142. "array([1. , 1.03997334, 1.1803406 , 1.47074441, 2. ])\n"
  11143. "\n"
  11144. "It contains many other functions as special cases.\n"
  11145. "\n"
  11146. ">>> z = 0.5\n"
  11147. ">>> sc.hyp2f1(1, 1, 2, z)\n"
  11148. "1.3862943611198901\n"
  11149. ">>> -np.log(1 - z) / z\n"
  11150. "1.3862943611198906\n"
  11151. "\n"
  11152. ">>> sc.hyp2f1(0.5, 1, 1.5, z**2)\n"
  11153. "1.098612288668109\n"
  11154. ">>> np.log((1 + z) / (1 - z)) / (2 * z)\n"
  11155. "1.0986122886681098\n"
  11156. "\n"
  11157. ">>> sc.hyp2f1(0.5, 1, 1.5, -z**2)\n"
  11158. "0.9272952180016117\n"
  11159. ">>> np.arctan(z) / z\n"
  11160. "0.9272952180016122")
  11161. ufunc_hyp2f1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  11162. ufunc_hyp2f1_loops[1] = <np.PyUFuncGenericFunction>loop_D_dddD__As_fffF_F
  11163. ufunc_hyp2f1_loops[2] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  11164. ufunc_hyp2f1_loops[3] = <np.PyUFuncGenericFunction>loop_D_dddD__As_dddD_D
  11165. ufunc_hyp2f1_types[0] = <char>NPY_FLOAT
  11166. ufunc_hyp2f1_types[1] = <char>NPY_FLOAT
  11167. ufunc_hyp2f1_types[2] = <char>NPY_FLOAT
  11168. ufunc_hyp2f1_types[3] = <char>NPY_FLOAT
  11169. ufunc_hyp2f1_types[4] = <char>NPY_FLOAT
  11170. ufunc_hyp2f1_types[5] = <char>NPY_FLOAT
  11171. ufunc_hyp2f1_types[6] = <char>NPY_FLOAT
  11172. ufunc_hyp2f1_types[7] = <char>NPY_FLOAT
  11173. ufunc_hyp2f1_types[8] = <char>NPY_CFLOAT
  11174. ufunc_hyp2f1_types[9] = <char>NPY_CFLOAT
  11175. ufunc_hyp2f1_types[10] = <char>NPY_DOUBLE
  11176. ufunc_hyp2f1_types[11] = <char>NPY_DOUBLE
  11177. ufunc_hyp2f1_types[12] = <char>NPY_DOUBLE
  11178. ufunc_hyp2f1_types[13] = <char>NPY_DOUBLE
  11179. ufunc_hyp2f1_types[14] = <char>NPY_DOUBLE
  11180. ufunc_hyp2f1_types[15] = <char>NPY_DOUBLE
  11181. ufunc_hyp2f1_types[16] = <char>NPY_DOUBLE
  11182. ufunc_hyp2f1_types[17] = <char>NPY_DOUBLE
  11183. ufunc_hyp2f1_types[18] = <char>NPY_CDOUBLE
  11184. ufunc_hyp2f1_types[19] = <char>NPY_CDOUBLE
  11185. ufunc_hyp2f1_ptr[2*0] = <void*>_func_hyp2f1
  11186. ufunc_hyp2f1_ptr[2*0+1] = <void*>(<char*>"hyp2f1")
  11187. ufunc_hyp2f1_ptr[2*1] = <void*>_func_hyp2f1_complex
  11188. ufunc_hyp2f1_ptr[2*1+1] = <void*>(<char*>"hyp2f1")
  11189. ufunc_hyp2f1_ptr[2*2] = <void*>_func_hyp2f1
  11190. ufunc_hyp2f1_ptr[2*2+1] = <void*>(<char*>"hyp2f1")
  11191. ufunc_hyp2f1_ptr[2*3] = <void*>_func_hyp2f1_complex
  11192. ufunc_hyp2f1_ptr[2*3+1] = <void*>(<char*>"hyp2f1")
  11193. ufunc_hyp2f1_data[0] = &ufunc_hyp2f1_ptr[2*0]
  11194. ufunc_hyp2f1_data[1] = &ufunc_hyp2f1_ptr[2*1]
  11195. ufunc_hyp2f1_data[2] = &ufunc_hyp2f1_ptr[2*2]
  11196. ufunc_hyp2f1_data[3] = &ufunc_hyp2f1_ptr[2*3]
  11197. hyp2f1 = np.PyUFunc_FromFuncAndData(ufunc_hyp2f1_loops, ufunc_hyp2f1_data, ufunc_hyp2f1_types, 4, 4, 1, 0, "hyp2f1", ufunc_hyp2f1_doc, 0)
  11198. cdef np.PyUFuncGenericFunction ufunc_hyperu_loops[2]
  11199. cdef void *ufunc_hyperu_ptr[4]
  11200. cdef void *ufunc_hyperu_data[2]
  11201. cdef char ufunc_hyperu_types[8]
  11202. cdef char *ufunc_hyperu_doc = (
  11203. "hyperu(a, b, x, out=None)\n"
  11204. "\n"
  11205. "Confluent hypergeometric function U\n"
  11206. "\n"
  11207. "It is defined as the solution to the equation\n"
  11208. "\n"
  11209. ".. math::\n"
  11210. "\n"
  11211. " x \\frac{d^2w}{dx^2} + (b - x) \\frac{dw}{dx} - aw = 0\n"
  11212. "\n"
  11213. "which satisfies the property\n"
  11214. "\n"
  11215. ".. math::\n"
  11216. "\n"
  11217. " U(a, b, x) \\sim x^{-a}\n"
  11218. "\n"
  11219. "as :math:`x \\to \\infty`. See [dlmf]_ for more details.\n"
  11220. "\n"
  11221. "Parameters\n"
  11222. "----------\n"
  11223. "a, b : array_like\n"
  11224. " Real-valued parameters\n"
  11225. "x : array_like\n"
  11226. " Real-valued argument\n"
  11227. "out : ndarray, optional\n"
  11228. " Optional output array for the function values\n"
  11229. "\n"
  11230. "Returns\n"
  11231. "-------\n"
  11232. "scalar or ndarray\n"
  11233. " Values of `U`\n"
  11234. "\n"
  11235. "References\n"
  11236. "----------\n"
  11237. ".. [dlmf] NIST Digital Library of Mathematics Functions\n"
  11238. " https://dlmf.nist.gov/13.2#E6\n"
  11239. "\n"
  11240. "Examples\n"
  11241. "--------\n"
  11242. ">>> import numpy as np\n"
  11243. ">>> import scipy.special as sc\n"
  11244. "\n"
  11245. "It has a branch cut along the negative `x` axis.\n"
  11246. "\n"
  11247. ">>> x = np.linspace(-0.1, -10, 5)\n"
  11248. ">>> sc.hyperu(1, 1, x)\n"
  11249. "array([nan, nan, nan, nan, nan])\n"
  11250. "\n"
  11251. "It approaches zero as `x` goes to infinity.\n"
  11252. "\n"
  11253. ">>> x = np.array([1, 10, 100])\n"
  11254. ">>> sc.hyperu(1, 1, x)\n"
  11255. "array([0.59634736, 0.09156333, 0.00990194])\n"
  11256. "\n"
  11257. "It satisfies Kummer's transformation.\n"
  11258. "\n"
  11259. ">>> a, b, x = 2, 1, 1\n"
  11260. ">>> sc.hyperu(a, b, x)\n"
  11261. "0.1926947246463881\n"
  11262. ">>> x**(1 - b) * sc.hyperu(a - b + 1, 2 - b, x)\n"
  11263. "0.1926947246463881")
  11264. ufunc_hyperu_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  11265. ufunc_hyperu_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  11266. ufunc_hyperu_types[0] = <char>NPY_FLOAT
  11267. ufunc_hyperu_types[1] = <char>NPY_FLOAT
  11268. ufunc_hyperu_types[2] = <char>NPY_FLOAT
  11269. ufunc_hyperu_types[3] = <char>NPY_FLOAT
  11270. ufunc_hyperu_types[4] = <char>NPY_DOUBLE
  11271. ufunc_hyperu_types[5] = <char>NPY_DOUBLE
  11272. ufunc_hyperu_types[6] = <char>NPY_DOUBLE
  11273. ufunc_hyperu_types[7] = <char>NPY_DOUBLE
  11274. ufunc_hyperu_ptr[2*0] = <void*>_func_hyperu
  11275. ufunc_hyperu_ptr[2*0+1] = <void*>(<char*>"hyperu")
  11276. ufunc_hyperu_ptr[2*1] = <void*>_func_hyperu
  11277. ufunc_hyperu_ptr[2*1+1] = <void*>(<char*>"hyperu")
  11278. ufunc_hyperu_data[0] = &ufunc_hyperu_ptr[2*0]
  11279. ufunc_hyperu_data[1] = &ufunc_hyperu_ptr[2*1]
  11280. hyperu = np.PyUFunc_FromFuncAndData(ufunc_hyperu_loops, ufunc_hyperu_data, ufunc_hyperu_types, 2, 3, 1, 0, "hyperu", ufunc_hyperu_doc, 0)
  11281. cdef np.PyUFuncGenericFunction ufunc_i0_loops[2]
  11282. cdef void *ufunc_i0_ptr[4]
  11283. cdef void *ufunc_i0_data[2]
  11284. cdef char ufunc_i0_types[4]
  11285. cdef char *ufunc_i0_doc = (
  11286. "i0(x, out=None)\n"
  11287. "\n"
  11288. "Modified Bessel function of order 0.\n"
  11289. "\n"
  11290. "Defined as,\n"
  11291. "\n"
  11292. ".. math::\n"
  11293. " I_0(x) = \\sum_{k=0}^\\infty \\frac{(x^2/4)^k}{(k!)^2} = J_0(\\imath x),\n"
  11294. "\n"
  11295. "where :math:`J_0` is the Bessel function of the first kind of order 0.\n"
  11296. "\n"
  11297. "Parameters\n"
  11298. "----------\n"
  11299. "x : array_like\n"
  11300. " Argument (float)\n"
  11301. "out : ndarray, optional\n"
  11302. " Optional output array for the function values\n"
  11303. "\n"
  11304. "Returns\n"
  11305. "-------\n"
  11306. "I : scalar or ndarray\n"
  11307. " Value of the modified Bessel function of order 0 at `x`.\n"
  11308. "\n"
  11309. "Notes\n"
  11310. "-----\n"
  11311. "The range is partitioned into the two intervals [0, 8] and (8, infinity).\n"
  11312. "Chebyshev polynomial expansions are employed in each interval.\n"
  11313. "\n"
  11314. "This function is a wrapper for the Cephes [1]_ routine `i0`.\n"
  11315. "\n"
  11316. "See also\n"
  11317. "--------\n"
  11318. "iv: Modified Bessel function of any order\n"
  11319. "i0e: Exponentially scaled modified Bessel function of order 0\n"
  11320. "\n"
  11321. "References\n"
  11322. "----------\n"
  11323. ".. [1] Cephes Mathematical Functions Library,\n"
  11324. " http://www.netlib.org/cephes/\n"
  11325. "\n"
  11326. "Examples\n"
  11327. "--------\n"
  11328. "Calculate the function at one point:\n"
  11329. "\n"
  11330. ">>> from scipy.special import i0\n"
  11331. ">>> i0(1.)\n"
  11332. "1.2660658777520082\n"
  11333. "\n"
  11334. "Calculate at several points:\n"
  11335. "\n"
  11336. ">>> import numpy as np\n"
  11337. ">>> i0(np.array([-2., 0., 3.5]))\n"
  11338. "array([2.2795853 , 1. , 7.37820343])\n"
  11339. "\n"
  11340. "Plot the function from -10 to 10.\n"
  11341. "\n"
  11342. ">>> import matplotlib.pyplot as plt\n"
  11343. ">>> fig, ax = plt.subplots()\n"
  11344. ">>> x = np.linspace(-10., 10., 1000)\n"
  11345. ">>> y = i0(x)\n"
  11346. ">>> ax.plot(x, y)\n"
  11347. ">>> plt.show()")
  11348. ufunc_i0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  11349. ufunc_i0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  11350. ufunc_i0_types[0] = <char>NPY_FLOAT
  11351. ufunc_i0_types[1] = <char>NPY_FLOAT
  11352. ufunc_i0_types[2] = <char>NPY_DOUBLE
  11353. ufunc_i0_types[3] = <char>NPY_DOUBLE
  11354. ufunc_i0_ptr[2*0] = <void*>_func_i0
  11355. ufunc_i0_ptr[2*0+1] = <void*>(<char*>"i0")
  11356. ufunc_i0_ptr[2*1] = <void*>_func_i0
  11357. ufunc_i0_ptr[2*1+1] = <void*>(<char*>"i0")
  11358. ufunc_i0_data[0] = &ufunc_i0_ptr[2*0]
  11359. ufunc_i0_data[1] = &ufunc_i0_ptr[2*1]
  11360. i0 = np.PyUFunc_FromFuncAndData(ufunc_i0_loops, ufunc_i0_data, ufunc_i0_types, 2, 1, 1, 0, "i0", ufunc_i0_doc, 0)
  11361. cdef np.PyUFuncGenericFunction ufunc_i0e_loops[2]
  11362. cdef void *ufunc_i0e_ptr[4]
  11363. cdef void *ufunc_i0e_data[2]
  11364. cdef char ufunc_i0e_types[4]
  11365. cdef char *ufunc_i0e_doc = (
  11366. "i0e(x, out=None)\n"
  11367. "\n"
  11368. "Exponentially scaled modified Bessel function of order 0.\n"
  11369. "\n"
  11370. "Defined as::\n"
  11371. "\n"
  11372. " i0e(x) = exp(-abs(x)) * i0(x).\n"
  11373. "\n"
  11374. "Parameters\n"
  11375. "----------\n"
  11376. "x : array_like\n"
  11377. " Argument (float)\n"
  11378. "out : ndarray, optional\n"
  11379. " Optional output array for the function values\n"
  11380. "\n"
  11381. "Returns\n"
  11382. "-------\n"
  11383. "I : scalar or ndarray\n"
  11384. " Value of the exponentially scaled modified Bessel function of order 0\n"
  11385. " at `x`.\n"
  11386. "\n"
  11387. "Notes\n"
  11388. "-----\n"
  11389. "The range is partitioned into the two intervals [0, 8] and (8, infinity).\n"
  11390. "Chebyshev polynomial expansions are employed in each interval. The\n"
  11391. "polynomial expansions used are the same as those in `i0`, but\n"
  11392. "they are not multiplied by the dominant exponential factor.\n"
  11393. "\n"
  11394. "This function is a wrapper for the Cephes [1]_ routine `i0e`.\n"
  11395. "\n"
  11396. "See also\n"
  11397. "--------\n"
  11398. "iv: Modified Bessel function of the first kind\n"
  11399. "i0: Modified Bessel function of order 0\n"
  11400. "\n"
  11401. "References\n"
  11402. "----------\n"
  11403. ".. [1] Cephes Mathematical Functions Library,\n"
  11404. " http://www.netlib.org/cephes/\n"
  11405. "\n"
  11406. "Examples\n"
  11407. "--------\n"
  11408. "Calculate the function at one point:\n"
  11409. "\n"
  11410. ">>> from scipy.special import i0e\n"
  11411. ">>> i0e(1.)\n"
  11412. "0.46575960759364043\n"
  11413. "\n"
  11414. "Calculate the function at several points:\n"
  11415. "\n"
  11416. ">>> import numpy as np\n"
  11417. ">>> i0e(np.array([-2., 0., 3.]))\n"
  11418. "array([0.30850832, 1. , 0.24300035])\n"
  11419. "\n"
  11420. "Plot the function from -10 to 10.\n"
  11421. "\n"
  11422. ">>> import matplotlib.pyplot as plt\n"
  11423. ">>> fig, ax = plt.subplots()\n"
  11424. ">>> x = np.linspace(-10., 10., 1000)\n"
  11425. ">>> y = i0e(x)\n"
  11426. ">>> ax.plot(x, y)\n"
  11427. ">>> plt.show()\n"
  11428. "\n"
  11429. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  11430. "which the unscaled Bessel functions overflow or lose precision. In the\n"
  11431. "following example `i0` returns infinity whereas `i0e` still returns\n"
  11432. "a finite number.\n"
  11433. "\n"
  11434. ">>> from scipy.special import i0\n"
  11435. ">>> i0(1000.), i0e(1000.)\n"
  11436. "(inf, 0.012617240455891257)")
  11437. ufunc_i0e_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  11438. ufunc_i0e_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  11439. ufunc_i0e_types[0] = <char>NPY_FLOAT
  11440. ufunc_i0e_types[1] = <char>NPY_FLOAT
  11441. ufunc_i0e_types[2] = <char>NPY_DOUBLE
  11442. ufunc_i0e_types[3] = <char>NPY_DOUBLE
  11443. ufunc_i0e_ptr[2*0] = <void*>_func_i0e
  11444. ufunc_i0e_ptr[2*0+1] = <void*>(<char*>"i0e")
  11445. ufunc_i0e_ptr[2*1] = <void*>_func_i0e
  11446. ufunc_i0e_ptr[2*1+1] = <void*>(<char*>"i0e")
  11447. ufunc_i0e_data[0] = &ufunc_i0e_ptr[2*0]
  11448. ufunc_i0e_data[1] = &ufunc_i0e_ptr[2*1]
  11449. i0e = np.PyUFunc_FromFuncAndData(ufunc_i0e_loops, ufunc_i0e_data, ufunc_i0e_types, 2, 1, 1, 0, "i0e", ufunc_i0e_doc, 0)
  11450. cdef np.PyUFuncGenericFunction ufunc_i1_loops[2]
  11451. cdef void *ufunc_i1_ptr[4]
  11452. cdef void *ufunc_i1_data[2]
  11453. cdef char ufunc_i1_types[4]
  11454. cdef char *ufunc_i1_doc = (
  11455. "i1(x, out=None)\n"
  11456. "\n"
  11457. "Modified Bessel function of order 1.\n"
  11458. "\n"
  11459. "Defined as,\n"
  11460. "\n"
  11461. ".. math::\n"
  11462. " I_1(x) = \\frac{1}{2}x \\sum_{k=0}^\\infty \\frac{(x^2/4)^k}{k! (k + 1)!}\n"
  11463. " = -\\imath J_1(\\imath x),\n"
  11464. "\n"
  11465. "where :math:`J_1` is the Bessel function of the first kind of order 1.\n"
  11466. "\n"
  11467. "Parameters\n"
  11468. "----------\n"
  11469. "x : array_like\n"
  11470. " Argument (float)\n"
  11471. "out : ndarray, optional\n"
  11472. " Optional output array for the function values\n"
  11473. "\n"
  11474. "Returns\n"
  11475. "-------\n"
  11476. "I : scalar or ndarray\n"
  11477. " Value of the modified Bessel function of order 1 at `x`.\n"
  11478. "\n"
  11479. "Notes\n"
  11480. "-----\n"
  11481. "The range is partitioned into the two intervals [0, 8] and (8, infinity).\n"
  11482. "Chebyshev polynomial expansions are employed in each interval.\n"
  11483. "\n"
  11484. "This function is a wrapper for the Cephes [1]_ routine `i1`.\n"
  11485. "\n"
  11486. "See also\n"
  11487. "--------\n"
  11488. "iv: Modified Bessel function of the first kind\n"
  11489. "i1e: Exponentially scaled modified Bessel function of order 1\n"
  11490. "\n"
  11491. "References\n"
  11492. "----------\n"
  11493. ".. [1] Cephes Mathematical Functions Library,\n"
  11494. " http://www.netlib.org/cephes/\n"
  11495. "\n"
  11496. "Examples\n"
  11497. "--------\n"
  11498. "Calculate the function at one point:\n"
  11499. "\n"
  11500. ">>> from scipy.special import i1\n"
  11501. ">>> i1(1.)\n"
  11502. "0.5651591039924851\n"
  11503. "\n"
  11504. "Calculate the function at several points:\n"
  11505. "\n"
  11506. ">>> import numpy as np\n"
  11507. ">>> i1(np.array([-2., 0., 6.]))\n"
  11508. "array([-1.59063685, 0. , 61.34193678])\n"
  11509. "\n"
  11510. "Plot the function between -10 and 10.\n"
  11511. "\n"
  11512. ">>> import matplotlib.pyplot as plt\n"
  11513. ">>> fig, ax = plt.subplots()\n"
  11514. ">>> x = np.linspace(-10., 10., 1000)\n"
  11515. ">>> y = i1(x)\n"
  11516. ">>> ax.plot(x, y)\n"
  11517. ">>> plt.show()")
  11518. ufunc_i1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  11519. ufunc_i1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  11520. ufunc_i1_types[0] = <char>NPY_FLOAT
  11521. ufunc_i1_types[1] = <char>NPY_FLOAT
  11522. ufunc_i1_types[2] = <char>NPY_DOUBLE
  11523. ufunc_i1_types[3] = <char>NPY_DOUBLE
  11524. ufunc_i1_ptr[2*0] = <void*>_func_i1
  11525. ufunc_i1_ptr[2*0+1] = <void*>(<char*>"i1")
  11526. ufunc_i1_ptr[2*1] = <void*>_func_i1
  11527. ufunc_i1_ptr[2*1+1] = <void*>(<char*>"i1")
  11528. ufunc_i1_data[0] = &ufunc_i1_ptr[2*0]
  11529. ufunc_i1_data[1] = &ufunc_i1_ptr[2*1]
  11530. i1 = np.PyUFunc_FromFuncAndData(ufunc_i1_loops, ufunc_i1_data, ufunc_i1_types, 2, 1, 1, 0, "i1", ufunc_i1_doc, 0)
  11531. cdef np.PyUFuncGenericFunction ufunc_i1e_loops[2]
  11532. cdef void *ufunc_i1e_ptr[4]
  11533. cdef void *ufunc_i1e_data[2]
  11534. cdef char ufunc_i1e_types[4]
  11535. cdef char *ufunc_i1e_doc = (
  11536. "i1e(x, out=None)\n"
  11537. "\n"
  11538. "Exponentially scaled modified Bessel function of order 1.\n"
  11539. "\n"
  11540. "Defined as::\n"
  11541. "\n"
  11542. " i1e(x) = exp(-abs(x)) * i1(x)\n"
  11543. "\n"
  11544. "Parameters\n"
  11545. "----------\n"
  11546. "x : array_like\n"
  11547. " Argument (float)\n"
  11548. "out : ndarray, optional\n"
  11549. " Optional output array for the function values\n"
  11550. "\n"
  11551. "Returns\n"
  11552. "-------\n"
  11553. "I : scalar or ndarray\n"
  11554. " Value of the exponentially scaled modified Bessel function of order 1\n"
  11555. " at `x`.\n"
  11556. "\n"
  11557. "Notes\n"
  11558. "-----\n"
  11559. "The range is partitioned into the two intervals [0, 8] and (8, infinity).\n"
  11560. "Chebyshev polynomial expansions are employed in each interval. The\n"
  11561. "polynomial expansions used are the same as those in `i1`, but\n"
  11562. "they are not multiplied by the dominant exponential factor.\n"
  11563. "\n"
  11564. "This function is a wrapper for the Cephes [1]_ routine `i1e`.\n"
  11565. "\n"
  11566. "See also\n"
  11567. "--------\n"
  11568. "iv: Modified Bessel function of the first kind\n"
  11569. "i1: Modified Bessel function of order 1\n"
  11570. "\n"
  11571. "References\n"
  11572. "----------\n"
  11573. ".. [1] Cephes Mathematical Functions Library,\n"
  11574. " http://www.netlib.org/cephes/\n"
  11575. "\n"
  11576. "Examples\n"
  11577. "--------\n"
  11578. "Calculate the function at one point:\n"
  11579. "\n"
  11580. ">>> from scipy.special import i1e\n"
  11581. ">>> i1e(1.)\n"
  11582. "0.2079104153497085\n"
  11583. "\n"
  11584. "Calculate the function at several points:\n"
  11585. "\n"
  11586. ">>> import numpy as np\n"
  11587. ">>> i1e(np.array([-2., 0., 6.]))\n"
  11588. "array([-0.21526929, 0. , 0.15205146])\n"
  11589. "\n"
  11590. "Plot the function between -10 and 10.\n"
  11591. "\n"
  11592. ">>> import matplotlib.pyplot as plt\n"
  11593. ">>> fig, ax = plt.subplots()\n"
  11594. ">>> x = np.linspace(-10., 10., 1000)\n"
  11595. ">>> y = i1e(x)\n"
  11596. ">>> ax.plot(x, y)\n"
  11597. ">>> plt.show()\n"
  11598. "\n"
  11599. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  11600. "which the unscaled Bessel functions overflow or lose precision. In the\n"
  11601. "following example `i1` returns infinity whereas `i1e` still returns a\n"
  11602. "finite number.\n"
  11603. "\n"
  11604. ">>> from scipy.special import i1\n"
  11605. ">>> i1(1000.), i1e(1000.)\n"
  11606. "(inf, 0.01261093025692863)")
  11607. ufunc_i1e_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  11608. ufunc_i1e_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  11609. ufunc_i1e_types[0] = <char>NPY_FLOAT
  11610. ufunc_i1e_types[1] = <char>NPY_FLOAT
  11611. ufunc_i1e_types[2] = <char>NPY_DOUBLE
  11612. ufunc_i1e_types[3] = <char>NPY_DOUBLE
  11613. ufunc_i1e_ptr[2*0] = <void*>_func_i1e
  11614. ufunc_i1e_ptr[2*0+1] = <void*>(<char*>"i1e")
  11615. ufunc_i1e_ptr[2*1] = <void*>_func_i1e
  11616. ufunc_i1e_ptr[2*1+1] = <void*>(<char*>"i1e")
  11617. ufunc_i1e_data[0] = &ufunc_i1e_ptr[2*0]
  11618. ufunc_i1e_data[1] = &ufunc_i1e_ptr[2*1]
  11619. i1e = np.PyUFunc_FromFuncAndData(ufunc_i1e_loops, ufunc_i1e_data, ufunc_i1e_types, 2, 1, 1, 0, "i1e", ufunc_i1e_doc, 0)
  11620. cdef np.PyUFuncGenericFunction ufunc_inv_boxcox_loops[2]
  11621. cdef void *ufunc_inv_boxcox_ptr[4]
  11622. cdef void *ufunc_inv_boxcox_data[2]
  11623. cdef char ufunc_inv_boxcox_types[6]
  11624. cdef char *ufunc_inv_boxcox_doc = (
  11625. "inv_boxcox(y, lmbda, out=None)\n"
  11626. "\n"
  11627. "Compute the inverse of the Box-Cox transformation.\n"
  11628. "\n"
  11629. "Find ``x`` such that::\n"
  11630. "\n"
  11631. " y = (x**lmbda - 1) / lmbda if lmbda != 0\n"
  11632. " log(x) if lmbda == 0\n"
  11633. "\n"
  11634. "Parameters\n"
  11635. "----------\n"
  11636. "y : array_like\n"
  11637. " Data to be transformed.\n"
  11638. "lmbda : array_like\n"
  11639. " Power parameter of the Box-Cox transform.\n"
  11640. "out : ndarray, optional\n"
  11641. " Optional output array for the function values\n"
  11642. "\n"
  11643. "Returns\n"
  11644. "-------\n"
  11645. "x : scalar or ndarray\n"
  11646. " Transformed data.\n"
  11647. "\n"
  11648. "Notes\n"
  11649. "-----\n"
  11650. "\n"
  11651. ".. versionadded:: 0.16.0\n"
  11652. "\n"
  11653. "Examples\n"
  11654. "--------\n"
  11655. ">>> from scipy.special import boxcox, inv_boxcox\n"
  11656. ">>> y = boxcox([1, 4, 10], 2.5)\n"
  11657. ">>> inv_boxcox(y, 2.5)\n"
  11658. "array([1., 4., 10.])")
  11659. ufunc_inv_boxcox_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  11660. ufunc_inv_boxcox_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  11661. ufunc_inv_boxcox_types[0] = <char>NPY_FLOAT
  11662. ufunc_inv_boxcox_types[1] = <char>NPY_FLOAT
  11663. ufunc_inv_boxcox_types[2] = <char>NPY_FLOAT
  11664. ufunc_inv_boxcox_types[3] = <char>NPY_DOUBLE
  11665. ufunc_inv_boxcox_types[4] = <char>NPY_DOUBLE
  11666. ufunc_inv_boxcox_types[5] = <char>NPY_DOUBLE
  11667. ufunc_inv_boxcox_ptr[2*0] = <void*>_func_inv_boxcox
  11668. ufunc_inv_boxcox_ptr[2*0+1] = <void*>(<char*>"inv_boxcox")
  11669. ufunc_inv_boxcox_ptr[2*1] = <void*>_func_inv_boxcox
  11670. ufunc_inv_boxcox_ptr[2*1+1] = <void*>(<char*>"inv_boxcox")
  11671. ufunc_inv_boxcox_data[0] = &ufunc_inv_boxcox_ptr[2*0]
  11672. ufunc_inv_boxcox_data[1] = &ufunc_inv_boxcox_ptr[2*1]
  11673. inv_boxcox = np.PyUFunc_FromFuncAndData(ufunc_inv_boxcox_loops, ufunc_inv_boxcox_data, ufunc_inv_boxcox_types, 2, 2, 1, 0, "inv_boxcox", ufunc_inv_boxcox_doc, 0)
  11674. cdef np.PyUFuncGenericFunction ufunc_inv_boxcox1p_loops[2]
  11675. cdef void *ufunc_inv_boxcox1p_ptr[4]
  11676. cdef void *ufunc_inv_boxcox1p_data[2]
  11677. cdef char ufunc_inv_boxcox1p_types[6]
  11678. cdef char *ufunc_inv_boxcox1p_doc = (
  11679. "inv_boxcox1p(y, lmbda, out=None)\n"
  11680. "\n"
  11681. "Compute the inverse of the Box-Cox transformation.\n"
  11682. "\n"
  11683. "Find ``x`` such that::\n"
  11684. "\n"
  11685. " y = ((1+x)**lmbda - 1) / lmbda if lmbda != 0\n"
  11686. " log(1+x) if lmbda == 0\n"
  11687. "\n"
  11688. "Parameters\n"
  11689. "----------\n"
  11690. "y : array_like\n"
  11691. " Data to be transformed.\n"
  11692. "lmbda : array_like\n"
  11693. " Power parameter of the Box-Cox transform.\n"
  11694. "out : ndarray, optional\n"
  11695. " Optional output array for the function values\n"
  11696. "\n"
  11697. "Returns\n"
  11698. "-------\n"
  11699. "x : scalar or ndarray\n"
  11700. " Transformed data.\n"
  11701. "\n"
  11702. "Notes\n"
  11703. "-----\n"
  11704. "\n"
  11705. ".. versionadded:: 0.16.0\n"
  11706. "\n"
  11707. "Examples\n"
  11708. "--------\n"
  11709. ">>> from scipy.special import boxcox1p, inv_boxcox1p\n"
  11710. ">>> y = boxcox1p([1, 4, 10], 2.5)\n"
  11711. ">>> inv_boxcox1p(y, 2.5)\n"
  11712. "array([1., 4., 10.])")
  11713. ufunc_inv_boxcox1p_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  11714. ufunc_inv_boxcox1p_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  11715. ufunc_inv_boxcox1p_types[0] = <char>NPY_FLOAT
  11716. ufunc_inv_boxcox1p_types[1] = <char>NPY_FLOAT
  11717. ufunc_inv_boxcox1p_types[2] = <char>NPY_FLOAT
  11718. ufunc_inv_boxcox1p_types[3] = <char>NPY_DOUBLE
  11719. ufunc_inv_boxcox1p_types[4] = <char>NPY_DOUBLE
  11720. ufunc_inv_boxcox1p_types[5] = <char>NPY_DOUBLE
  11721. ufunc_inv_boxcox1p_ptr[2*0] = <void*>_func_inv_boxcox1p
  11722. ufunc_inv_boxcox1p_ptr[2*0+1] = <void*>(<char*>"inv_boxcox1p")
  11723. ufunc_inv_boxcox1p_ptr[2*1] = <void*>_func_inv_boxcox1p
  11724. ufunc_inv_boxcox1p_ptr[2*1+1] = <void*>(<char*>"inv_boxcox1p")
  11725. ufunc_inv_boxcox1p_data[0] = &ufunc_inv_boxcox1p_ptr[2*0]
  11726. ufunc_inv_boxcox1p_data[1] = &ufunc_inv_boxcox1p_ptr[2*1]
  11727. inv_boxcox1p = np.PyUFunc_FromFuncAndData(ufunc_inv_boxcox1p_loops, ufunc_inv_boxcox1p_data, ufunc_inv_boxcox1p_types, 2, 2, 1, 0, "inv_boxcox1p", ufunc_inv_boxcox1p_doc, 0)
  11728. cdef np.PyUFuncGenericFunction ufunc_it2i0k0_loops[2]
  11729. cdef void *ufunc_it2i0k0_ptr[4]
  11730. cdef void *ufunc_it2i0k0_data[2]
  11731. cdef char ufunc_it2i0k0_types[6]
  11732. cdef char *ufunc_it2i0k0_doc = (
  11733. "it2i0k0(x, out=None)\n"
  11734. "\n"
  11735. "Integrals related to modified Bessel functions of order 0.\n"
  11736. "\n"
  11737. "Computes the integrals\n"
  11738. "\n"
  11739. ".. math::\n"
  11740. "\n"
  11741. " \\int_0^x \\frac{I_0(t) - 1}{t} dt \\\\\n"
  11742. " \\int_x^\\infty \\frac{K_0(t)}{t} dt.\n"
  11743. "\n"
  11744. "Parameters\n"
  11745. "----------\n"
  11746. "x : array_like\n"
  11747. " Values at which to evaluate the integrals.\n"
  11748. "out : tuple of ndarrays, optional\n"
  11749. " Optional output arrays for the function results.\n"
  11750. "\n"
  11751. "Returns\n"
  11752. "-------\n"
  11753. "ii0 : scalar or ndarray\n"
  11754. " The integral for `i0`\n"
  11755. "ik0 : scalar or ndarray\n"
  11756. " The integral for `k0`\n"
  11757. "\n"
  11758. "References\n"
  11759. "----------\n"
  11760. ".. [1] S. Zhang and J.M. Jin, \"Computation of Special Functions\",\n"
  11761. " Wiley 1996\n"
  11762. "\n"
  11763. "Examples\n"
  11764. "--------\n"
  11765. "Evaluate the functions at one point.\n"
  11766. "\n"
  11767. ">>> from scipy.special import it2i0k0\n"
  11768. ">>> int_i, int_k = it2i0k0(1.)\n"
  11769. ">>> int_i, int_k\n"
  11770. "(0.12897944249456852, 0.2085182909001295)\n"
  11771. "\n"
  11772. "Evaluate the functions at several points.\n"
  11773. "\n"
  11774. ">>> import numpy as np\n"
  11775. ">>> points = np.array([0.5, 1.5, 3.])\n"
  11776. ">>> int_i, int_k = it2i0k0(points)\n"
  11777. ">>> int_i, int_k\n"
  11778. "(array([0.03149527, 0.30187149, 1.50012461]),\n"
  11779. " array([0.66575102, 0.0823715 , 0.00823631]))\n"
  11780. "\n"
  11781. "Plot the functions from 0 to 5.\n"
  11782. "\n"
  11783. ">>> import matplotlib.pyplot as plt\n"
  11784. ">>> fig, ax = plt.subplots()\n"
  11785. ">>> x = np.linspace(0., 5., 1000)\n"
  11786. ">>> int_i, int_k = it2i0k0(x)\n"
  11787. ">>> ax.plot(x, int_i, label=r\"$\\int_0^x \\frac{I_0(t)-1}{t}\\,dt$\")\n"
  11788. ">>> ax.plot(x, int_k, label=r\"$\\int_x^{\\infty} \\frac{K_0(t)}{t}\\,dt$\")\n"
  11789. ">>> ax.legend()\n"
  11790. ">>> ax.set_ylim(0, 10)\n"
  11791. ">>> plt.show()")
  11792. ufunc_it2i0k0_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  11793. ufunc_it2i0k0_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  11794. ufunc_it2i0k0_types[0] = <char>NPY_FLOAT
  11795. ufunc_it2i0k0_types[1] = <char>NPY_FLOAT
  11796. ufunc_it2i0k0_types[2] = <char>NPY_FLOAT
  11797. ufunc_it2i0k0_types[3] = <char>NPY_DOUBLE
  11798. ufunc_it2i0k0_types[4] = <char>NPY_DOUBLE
  11799. ufunc_it2i0k0_types[5] = <char>NPY_DOUBLE
  11800. ufunc_it2i0k0_ptr[2*0] = <void*>_func_it2i0k0_wrap
  11801. ufunc_it2i0k0_ptr[2*0+1] = <void*>(<char*>"it2i0k0")
  11802. ufunc_it2i0k0_ptr[2*1] = <void*>_func_it2i0k0_wrap
  11803. ufunc_it2i0k0_ptr[2*1+1] = <void*>(<char*>"it2i0k0")
  11804. ufunc_it2i0k0_data[0] = &ufunc_it2i0k0_ptr[2*0]
  11805. ufunc_it2i0k0_data[1] = &ufunc_it2i0k0_ptr[2*1]
  11806. it2i0k0 = np.PyUFunc_FromFuncAndData(ufunc_it2i0k0_loops, ufunc_it2i0k0_data, ufunc_it2i0k0_types, 2, 1, 2, 0, "it2i0k0", ufunc_it2i0k0_doc, 0)
  11807. cdef np.PyUFuncGenericFunction ufunc_it2j0y0_loops[2]
  11808. cdef void *ufunc_it2j0y0_ptr[4]
  11809. cdef void *ufunc_it2j0y0_data[2]
  11810. cdef char ufunc_it2j0y0_types[6]
  11811. cdef char *ufunc_it2j0y0_doc = (
  11812. "it2j0y0(x, out=None)\n"
  11813. "\n"
  11814. "Integrals related to Bessel functions of the first kind of order 0.\n"
  11815. "\n"
  11816. "Computes the integrals\n"
  11817. "\n"
  11818. ".. math::\n"
  11819. "\n"
  11820. " \\int_0^x \\frac{1 - J_0(t)}{t} dt \\\\\n"
  11821. " \\int_x^\\infty \\frac{Y_0(t)}{t} dt.\n"
  11822. "\n"
  11823. "For more on :math:`J_0` and :math:`Y_0` see `j0` and `y0`.\n"
  11824. "\n"
  11825. "Parameters\n"
  11826. "----------\n"
  11827. "x : array_like\n"
  11828. " Values at which to evaluate the integrals.\n"
  11829. "out : tuple of ndarrays, optional\n"
  11830. " Optional output arrays for the function results.\n"
  11831. "\n"
  11832. "Returns\n"
  11833. "-------\n"
  11834. "ij0 : scalar or ndarray\n"
  11835. " The integral for `j0`\n"
  11836. "iy0 : scalar or ndarray\n"
  11837. " The integral for `y0`\n"
  11838. "\n"
  11839. "References\n"
  11840. "----------\n"
  11841. ".. [1] S. Zhang and J.M. Jin, \"Computation of Special Functions\",\n"
  11842. " Wiley 1996\n"
  11843. "\n"
  11844. "Examples\n"
  11845. "--------\n"
  11846. "Evaluate the functions at one point.\n"
  11847. "\n"
  11848. ">>> from scipy.special import it2j0y0\n"
  11849. ">>> int_j, int_y = it2j0y0(1.)\n"
  11850. ">>> int_j, int_y\n"
  11851. "(0.12116524699506871, 0.39527290169929336)\n"
  11852. "\n"
  11853. "Evaluate the functions at several points.\n"
  11854. "\n"
  11855. ">>> import numpy as np\n"
  11856. ">>> points = np.array([0.5, 1.5, 3.])\n"
  11857. ">>> int_j, int_y = it2j0y0(points)\n"
  11858. ">>> int_j, int_y\n"
  11859. "(array([0.03100699, 0.26227724, 0.85614669]),\n"
  11860. " array([ 0.26968854, 0.29769696, -0.02987272]))\n"
  11861. "\n"
  11862. "Plot the functions from 0 to 10.\n"
  11863. "\n"
  11864. ">>> import matplotlib.pyplot as plt\n"
  11865. ">>> fig, ax = plt.subplots()\n"
  11866. ">>> x = np.linspace(0., 10., 1000)\n"
  11867. ">>> int_j, int_y = it2j0y0(x)\n"
  11868. ">>> ax.plot(x, int_j, label=r\"$\\int_0^x \\frac{1-J_0(t)}{t}\\,dt$\")\n"
  11869. ">>> ax.plot(x, int_y, label=r\"$\\int_x^{\\infty} \\frac{Y_0(t)}{t}\\,dt$\")\n"
  11870. ">>> ax.legend()\n"
  11871. ">>> ax.set_ylim(-2.5, 2.5)\n"
  11872. ">>> plt.show()")
  11873. ufunc_it2j0y0_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  11874. ufunc_it2j0y0_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  11875. ufunc_it2j0y0_types[0] = <char>NPY_FLOAT
  11876. ufunc_it2j0y0_types[1] = <char>NPY_FLOAT
  11877. ufunc_it2j0y0_types[2] = <char>NPY_FLOAT
  11878. ufunc_it2j0y0_types[3] = <char>NPY_DOUBLE
  11879. ufunc_it2j0y0_types[4] = <char>NPY_DOUBLE
  11880. ufunc_it2j0y0_types[5] = <char>NPY_DOUBLE
  11881. ufunc_it2j0y0_ptr[2*0] = <void*>_func_it2j0y0_wrap
  11882. ufunc_it2j0y0_ptr[2*0+1] = <void*>(<char*>"it2j0y0")
  11883. ufunc_it2j0y0_ptr[2*1] = <void*>_func_it2j0y0_wrap
  11884. ufunc_it2j0y0_ptr[2*1+1] = <void*>(<char*>"it2j0y0")
  11885. ufunc_it2j0y0_data[0] = &ufunc_it2j0y0_ptr[2*0]
  11886. ufunc_it2j0y0_data[1] = &ufunc_it2j0y0_ptr[2*1]
  11887. it2j0y0 = np.PyUFunc_FromFuncAndData(ufunc_it2j0y0_loops, ufunc_it2j0y0_data, ufunc_it2j0y0_types, 2, 1, 2, 0, "it2j0y0", ufunc_it2j0y0_doc, 0)
  11888. cdef np.PyUFuncGenericFunction ufunc_it2struve0_loops[2]
  11889. cdef void *ufunc_it2struve0_ptr[4]
  11890. cdef void *ufunc_it2struve0_data[2]
  11891. cdef char ufunc_it2struve0_types[4]
  11892. cdef char *ufunc_it2struve0_doc = (
  11893. "it2struve0(x, out=None)\n"
  11894. "\n"
  11895. "Integral related to the Struve function of order 0.\n"
  11896. "\n"
  11897. "Returns the integral,\n"
  11898. "\n"
  11899. ".. math::\n"
  11900. " \\int_x^\\infty \\frac{H_0(t)}{t}\\,dt\n"
  11901. "\n"
  11902. "where :math:`H_0` is the Struve function of order 0.\n"
  11903. "\n"
  11904. "Parameters\n"
  11905. "----------\n"
  11906. "x : array_like\n"
  11907. " Lower limit of integration.\n"
  11908. "out : ndarray, optional\n"
  11909. " Optional output array for the function values\n"
  11910. "\n"
  11911. "Returns\n"
  11912. "-------\n"
  11913. "I : scalar or ndarray\n"
  11914. " The value of the integral.\n"
  11915. "\n"
  11916. "See also\n"
  11917. "--------\n"
  11918. "struve\n"
  11919. "\n"
  11920. "Notes\n"
  11921. "-----\n"
  11922. "Wrapper for a Fortran routine created by Shanjie Zhang and Jianming\n"
  11923. "Jin [1]_.\n"
  11924. "\n"
  11925. "References\n"
  11926. "----------\n"
  11927. ".. [1] Zhang, Shanjie and Jin, Jianming. \"Computation of Special\n"
  11928. " Functions\", John Wiley and Sons, 1996.\n"
  11929. " https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html\n"
  11930. "\n"
  11931. "Examples\n"
  11932. "--------\n"
  11933. "Evaluate the function at one point.\n"
  11934. "\n"
  11935. ">>> import numpy as np\n"
  11936. ">>> from scipy.special import it2struve0\n"
  11937. ">>> it2struve0(1.)\n"
  11938. "0.9571973506383524\n"
  11939. "\n"
  11940. "Evaluate the function at several points by supplying\n"
  11941. "an array for `x`.\n"
  11942. "\n"
  11943. ">>> points = np.array([1., 2., 3.5])\n"
  11944. ">>> it2struve0(points)\n"
  11945. "array([0.95719735, 0.46909296, 0.10366042])\n"
  11946. "\n"
  11947. "Plot the function from -10 to 10.\n"
  11948. "\n"
  11949. ">>> import matplotlib.pyplot as plt\n"
  11950. ">>> x = np.linspace(-10., 10., 1000)\n"
  11951. ">>> it2struve0_values = it2struve0(x)\n"
  11952. ">>> fig, ax = plt.subplots()\n"
  11953. ">>> ax.plot(x, it2struve0_values)\n"
  11954. ">>> ax.set_xlabel(r'$x$')\n"
  11955. ">>> ax.set_ylabel(r'$\\int_x^{\\infty}\\frac{H_0(t)}{t}\\,dt$')\n"
  11956. ">>> plt.show()")
  11957. ufunc_it2struve0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  11958. ufunc_it2struve0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  11959. ufunc_it2struve0_types[0] = <char>NPY_FLOAT
  11960. ufunc_it2struve0_types[1] = <char>NPY_FLOAT
  11961. ufunc_it2struve0_types[2] = <char>NPY_DOUBLE
  11962. ufunc_it2struve0_types[3] = <char>NPY_DOUBLE
  11963. ufunc_it2struve0_ptr[2*0] = <void*>_func_it2struve0_wrap
  11964. ufunc_it2struve0_ptr[2*0+1] = <void*>(<char*>"it2struve0")
  11965. ufunc_it2struve0_ptr[2*1] = <void*>_func_it2struve0_wrap
  11966. ufunc_it2struve0_ptr[2*1+1] = <void*>(<char*>"it2struve0")
  11967. ufunc_it2struve0_data[0] = &ufunc_it2struve0_ptr[2*0]
  11968. ufunc_it2struve0_data[1] = &ufunc_it2struve0_ptr[2*1]
  11969. it2struve0 = np.PyUFunc_FromFuncAndData(ufunc_it2struve0_loops, ufunc_it2struve0_data, ufunc_it2struve0_types, 2, 1, 1, 0, "it2struve0", ufunc_it2struve0_doc, 0)
  11970. cdef np.PyUFuncGenericFunction ufunc_itairy_loops[2]
  11971. cdef void *ufunc_itairy_ptr[4]
  11972. cdef void *ufunc_itairy_data[2]
  11973. cdef char ufunc_itairy_types[10]
  11974. cdef char *ufunc_itairy_doc = (
  11975. "itairy(x, out=None)\n"
  11976. "\n"
  11977. "Integrals of Airy functions\n"
  11978. "\n"
  11979. "Calculates the integrals of Airy functions from 0 to `x`.\n"
  11980. "\n"
  11981. "Parameters\n"
  11982. "----------\n"
  11983. "\n"
  11984. "x : array_like\n"
  11985. " Upper limit of integration (float).\n"
  11986. "out : tuple of ndarray, optional\n"
  11987. " Optional output arrays for the function values\n"
  11988. "\n"
  11989. "Returns\n"
  11990. "-------\n"
  11991. "Apt : scalar or ndarray\n"
  11992. " Integral of Ai(t) from 0 to x.\n"
  11993. "Bpt : scalar or ndarray\n"
  11994. " Integral of Bi(t) from 0 to x.\n"
  11995. "Ant : scalar or ndarray\n"
  11996. " Integral of Ai(-t) from 0 to x.\n"
  11997. "Bnt : scalar or ndarray\n"
  11998. " Integral of Bi(-t) from 0 to x.\n"
  11999. "\n"
  12000. "Notes\n"
  12001. "-----\n"
  12002. "\n"
  12003. "Wrapper for a Fortran routine created by Shanjie Zhang and Jianming\n"
  12004. "Jin [1]_.\n"
  12005. "\n"
  12006. "References\n"
  12007. "----------\n"
  12008. "\n"
  12009. ".. [1] Zhang, Shanjie and Jin, Jianming. \"Computation of Special\n"
  12010. " Functions\", John Wiley and Sons, 1996.\n"
  12011. " https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html\n"
  12012. "\n"
  12013. "Examples\n"
  12014. "--------\n"
  12015. "Compute the functions at ``x=1.``.\n"
  12016. "\n"
  12017. ">>> import numpy as np\n"
  12018. ">>> from scipy.special import itairy\n"
  12019. ">>> import matplotlib.pyplot as plt\n"
  12020. ">>> apt, bpt, ant, bnt = itairy(1.)\n"
  12021. ">>> apt, bpt, ant, bnt\n"
  12022. "(0.23631734191710949,\n"
  12023. " 0.8727691167380077,\n"
  12024. " 0.46567398346706845,\n"
  12025. " 0.3730050096342943)\n"
  12026. "\n"
  12027. "Compute the functions at several points by providing a NumPy array for `x`.\n"
  12028. "\n"
  12029. ">>> x = np.array([1., 1.5, 2.5, 5])\n"
  12030. ">>> apt, bpt, ant, bnt = itairy(x)\n"
  12031. ">>> apt, bpt, ant, bnt\n"
  12032. "(array([0.23631734, 0.28678675, 0.324638 , 0.33328759]),\n"
  12033. " array([ 0.87276912, 1.62470809, 5.20906691, 321.47831857]),\n"
  12034. " array([0.46567398, 0.72232876, 0.93187776, 0.7178822 ]),\n"
  12035. " array([ 0.37300501, 0.35038814, -0.02812939, 0.15873094]))\n"
  12036. "\n"
  12037. "Plot the functions from -10 to 10.\n"
  12038. "\n"
  12039. ">>> x = np.linspace(-10, 10, 500)\n"
  12040. ">>> apt, bpt, ant, bnt = itairy(x)\n"
  12041. ">>> fig, ax = plt.subplots(figsize=(6, 5))\n"
  12042. ">>> ax.plot(x, apt, label=\"$\\int_0^x\\, Ai(t)\\, dt$\")\n"
  12043. ">>> ax.plot(x, bpt, ls=\"dashed\", label=\"$\\int_0^x\\, Bi(t)\\, dt$\")\n"
  12044. ">>> ax.plot(x, ant, ls=\"dashdot\", label=\"$\\int_0^x\\, Ai(-t)\\, dt$\")\n"
  12045. ">>> ax.plot(x, bnt, ls=\"dotted\", label=\"$\\int_0^x\\, Bi(-t)\\, dt$\")\n"
  12046. ">>> ax.set_ylim(-2, 1.5)\n"
  12047. ">>> ax.legend(loc=\"lower right\")\n"
  12048. ">>> plt.show()")
  12049. ufunc_itairy_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_f_ffff
  12050. ufunc_itairy_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dddd_As_d_dddd
  12051. ufunc_itairy_types[0] = <char>NPY_FLOAT
  12052. ufunc_itairy_types[1] = <char>NPY_FLOAT
  12053. ufunc_itairy_types[2] = <char>NPY_FLOAT
  12054. ufunc_itairy_types[3] = <char>NPY_FLOAT
  12055. ufunc_itairy_types[4] = <char>NPY_FLOAT
  12056. ufunc_itairy_types[5] = <char>NPY_DOUBLE
  12057. ufunc_itairy_types[6] = <char>NPY_DOUBLE
  12058. ufunc_itairy_types[7] = <char>NPY_DOUBLE
  12059. ufunc_itairy_types[8] = <char>NPY_DOUBLE
  12060. ufunc_itairy_types[9] = <char>NPY_DOUBLE
  12061. ufunc_itairy_ptr[2*0] = <void*>_func_itairy_wrap
  12062. ufunc_itairy_ptr[2*0+1] = <void*>(<char*>"itairy")
  12063. ufunc_itairy_ptr[2*1] = <void*>_func_itairy_wrap
  12064. ufunc_itairy_ptr[2*1+1] = <void*>(<char*>"itairy")
  12065. ufunc_itairy_data[0] = &ufunc_itairy_ptr[2*0]
  12066. ufunc_itairy_data[1] = &ufunc_itairy_ptr[2*1]
  12067. itairy = np.PyUFunc_FromFuncAndData(ufunc_itairy_loops, ufunc_itairy_data, ufunc_itairy_types, 2, 1, 4, 0, "itairy", ufunc_itairy_doc, 0)
  12068. cdef np.PyUFuncGenericFunction ufunc_iti0k0_loops[2]
  12069. cdef void *ufunc_iti0k0_ptr[4]
  12070. cdef void *ufunc_iti0k0_data[2]
  12071. cdef char ufunc_iti0k0_types[6]
  12072. cdef char *ufunc_iti0k0_doc = (
  12073. "iti0k0(x, out=None)\n"
  12074. "\n"
  12075. "Integrals of modified Bessel functions of order 0.\n"
  12076. "\n"
  12077. "Computes the integrals\n"
  12078. "\n"
  12079. ".. math::\n"
  12080. "\n"
  12081. " \\int_0^x I_0(t) dt \\\\\n"
  12082. " \\int_0^x K_0(t) dt.\n"
  12083. "\n"
  12084. "For more on :math:`I_0` and :math:`K_0` see `i0` and `k0`.\n"
  12085. "\n"
  12086. "Parameters\n"
  12087. "----------\n"
  12088. "x : array_like\n"
  12089. " Values at which to evaluate the integrals.\n"
  12090. "out : tuple of ndarrays, optional\n"
  12091. " Optional output arrays for the function results.\n"
  12092. "\n"
  12093. "Returns\n"
  12094. "-------\n"
  12095. "ii0 : scalar or ndarray\n"
  12096. " The integral for `i0`\n"
  12097. "ik0 : scalar or ndarray\n"
  12098. " The integral for `k0`\n"
  12099. "\n"
  12100. "References\n"
  12101. "----------\n"
  12102. ".. [1] S. Zhang and J.M. Jin, \"Computation of Special Functions\",\n"
  12103. " Wiley 1996\n"
  12104. "\n"
  12105. "Examples\n"
  12106. "--------\n"
  12107. "Evaluate the functions at one point.\n"
  12108. "\n"
  12109. ">>> from scipy.special import iti0k0\n"
  12110. ">>> int_i, int_k = iti0k0(1.)\n"
  12111. ">>> int_i, int_k\n"
  12112. "(1.0865210970235892, 1.2425098486237771)\n"
  12113. "\n"
  12114. "Evaluate the functions at several points.\n"
  12115. "\n"
  12116. ">>> import numpy as np\n"
  12117. ">>> points = np.array([0., 1.5, 3.])\n"
  12118. ">>> int_i, int_k = iti0k0(points)\n"
  12119. ">>> int_i, int_k\n"
  12120. "(array([0. , 1.80606937, 6.16096149]),\n"
  12121. " array([0. , 1.39458246, 1.53994809]))\n"
  12122. "\n"
  12123. "Plot the functions from 0 to 5.\n"
  12124. "\n"
  12125. ">>> import matplotlib.pyplot as plt\n"
  12126. ">>> fig, ax = plt.subplots()\n"
  12127. ">>> x = np.linspace(0., 5., 1000)\n"
  12128. ">>> int_i, int_k = iti0k0(x)\n"
  12129. ">>> ax.plot(x, int_i, label=\"$\\int_0^x I_0(t)\\,dt$\")\n"
  12130. ">>> ax.plot(x, int_k, label=\"$\\int_0^x K_0(t)\\,dt$\")\n"
  12131. ">>> ax.legend()\n"
  12132. ">>> plt.show()")
  12133. ufunc_iti0k0_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  12134. ufunc_iti0k0_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  12135. ufunc_iti0k0_types[0] = <char>NPY_FLOAT
  12136. ufunc_iti0k0_types[1] = <char>NPY_FLOAT
  12137. ufunc_iti0k0_types[2] = <char>NPY_FLOAT
  12138. ufunc_iti0k0_types[3] = <char>NPY_DOUBLE
  12139. ufunc_iti0k0_types[4] = <char>NPY_DOUBLE
  12140. ufunc_iti0k0_types[5] = <char>NPY_DOUBLE
  12141. ufunc_iti0k0_ptr[2*0] = <void*>_func_it1i0k0_wrap
  12142. ufunc_iti0k0_ptr[2*0+1] = <void*>(<char*>"iti0k0")
  12143. ufunc_iti0k0_ptr[2*1] = <void*>_func_it1i0k0_wrap
  12144. ufunc_iti0k0_ptr[2*1+1] = <void*>(<char*>"iti0k0")
  12145. ufunc_iti0k0_data[0] = &ufunc_iti0k0_ptr[2*0]
  12146. ufunc_iti0k0_data[1] = &ufunc_iti0k0_ptr[2*1]
  12147. iti0k0 = np.PyUFunc_FromFuncAndData(ufunc_iti0k0_loops, ufunc_iti0k0_data, ufunc_iti0k0_types, 2, 1, 2, 0, "iti0k0", ufunc_iti0k0_doc, 0)
  12148. cdef np.PyUFuncGenericFunction ufunc_itj0y0_loops[2]
  12149. cdef void *ufunc_itj0y0_ptr[4]
  12150. cdef void *ufunc_itj0y0_data[2]
  12151. cdef char ufunc_itj0y0_types[6]
  12152. cdef char *ufunc_itj0y0_doc = (
  12153. "itj0y0(x, out=None)\n"
  12154. "\n"
  12155. "Integrals of Bessel functions of the first kind of order 0.\n"
  12156. "\n"
  12157. "Computes the integrals\n"
  12158. "\n"
  12159. ".. math::\n"
  12160. "\n"
  12161. " \\int_0^x J_0(t) dt \\\\\n"
  12162. " \\int_0^x Y_0(t) dt.\n"
  12163. "\n"
  12164. "For more on :math:`J_0` and :math:`Y_0` see `j0` and `y0`.\n"
  12165. "\n"
  12166. "Parameters\n"
  12167. "----------\n"
  12168. "x : array_like\n"
  12169. " Values at which to evaluate the integrals.\n"
  12170. "out : tuple of ndarrays, optional\n"
  12171. " Optional output arrays for the function results.\n"
  12172. "\n"
  12173. "Returns\n"
  12174. "-------\n"
  12175. "ij0 : scalar or ndarray\n"
  12176. " The integral of `j0`\n"
  12177. "iy0 : scalar or ndarray\n"
  12178. " The integral of `y0`\n"
  12179. "\n"
  12180. "References\n"
  12181. "----------\n"
  12182. ".. [1] S. Zhang and J.M. Jin, \"Computation of Special Functions\",\n"
  12183. " Wiley 1996\n"
  12184. "\n"
  12185. "Examples\n"
  12186. "--------\n"
  12187. "Evaluate the functions at one point.\n"
  12188. "\n"
  12189. ">>> from scipy.special import itj0y0\n"
  12190. ">>> int_j, int_y = itj0y0(1.)\n"
  12191. ">>> int_j, int_y\n"
  12192. "(0.9197304100897596, -0.637069376607422)\n"
  12193. "\n"
  12194. "Evaluate the functions at several points.\n"
  12195. "\n"
  12196. ">>> import numpy as np\n"
  12197. ">>> points = np.array([0., 1.5, 3.])\n"
  12198. ">>> int_j, int_y = itj0y0(points)\n"
  12199. ">>> int_j, int_y\n"
  12200. "(array([0. , 1.24144951, 1.38756725]),\n"
  12201. " array([ 0. , -0.51175903, 0.19765826]))\n"
  12202. "\n"
  12203. "Plot the functions from 0 to 10.\n"
  12204. "\n"
  12205. ">>> import matplotlib.pyplot as plt\n"
  12206. ">>> fig, ax = plt.subplots()\n"
  12207. ">>> x = np.linspace(0., 10., 1000)\n"
  12208. ">>> int_j, int_y = itj0y0(x)\n"
  12209. ">>> ax.plot(x, int_j, label=\"$\\int_0^x J_0(t)\\,dt$\")\n"
  12210. ">>> ax.plot(x, int_y, label=\"$\\int_0^x Y_0(t)\\,dt$\")\n"
  12211. ">>> ax.legend()\n"
  12212. ">>> plt.show()")
  12213. ufunc_itj0y0_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  12214. ufunc_itj0y0_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  12215. ufunc_itj0y0_types[0] = <char>NPY_FLOAT
  12216. ufunc_itj0y0_types[1] = <char>NPY_FLOAT
  12217. ufunc_itj0y0_types[2] = <char>NPY_FLOAT
  12218. ufunc_itj0y0_types[3] = <char>NPY_DOUBLE
  12219. ufunc_itj0y0_types[4] = <char>NPY_DOUBLE
  12220. ufunc_itj0y0_types[5] = <char>NPY_DOUBLE
  12221. ufunc_itj0y0_ptr[2*0] = <void*>_func_it1j0y0_wrap
  12222. ufunc_itj0y0_ptr[2*0+1] = <void*>(<char*>"itj0y0")
  12223. ufunc_itj0y0_ptr[2*1] = <void*>_func_it1j0y0_wrap
  12224. ufunc_itj0y0_ptr[2*1+1] = <void*>(<char*>"itj0y0")
  12225. ufunc_itj0y0_data[0] = &ufunc_itj0y0_ptr[2*0]
  12226. ufunc_itj0y0_data[1] = &ufunc_itj0y0_ptr[2*1]
  12227. itj0y0 = np.PyUFunc_FromFuncAndData(ufunc_itj0y0_loops, ufunc_itj0y0_data, ufunc_itj0y0_types, 2, 1, 2, 0, "itj0y0", ufunc_itj0y0_doc, 0)
  12228. cdef np.PyUFuncGenericFunction ufunc_itmodstruve0_loops[2]
  12229. cdef void *ufunc_itmodstruve0_ptr[4]
  12230. cdef void *ufunc_itmodstruve0_data[2]
  12231. cdef char ufunc_itmodstruve0_types[4]
  12232. cdef char *ufunc_itmodstruve0_doc = (
  12233. "itmodstruve0(x, out=None)\n"
  12234. "\n"
  12235. "Integral of the modified Struve function of order 0.\n"
  12236. "\n"
  12237. ".. math::\n"
  12238. " I = \\int_0^x L_0(t)\\,dt\n"
  12239. "\n"
  12240. "Parameters\n"
  12241. "----------\n"
  12242. "x : array_like\n"
  12243. " Upper limit of integration (float).\n"
  12244. "out : ndarray, optional\n"
  12245. " Optional output array for the function values\n"
  12246. "\n"
  12247. "Returns\n"
  12248. "-------\n"
  12249. "I : scalar or ndarray\n"
  12250. " The integral of :math:`L_0` from 0 to `x`.\n"
  12251. "\n"
  12252. "Notes\n"
  12253. "-----\n"
  12254. "Wrapper for a Fortran routine created by Shanjie Zhang and Jianming\n"
  12255. "Jin [1]_.\n"
  12256. "\n"
  12257. "See Also\n"
  12258. "--------\n"
  12259. "modstruve: Modified Struve function which is integrated by this function\n"
  12260. "\n"
  12261. "References\n"
  12262. "----------\n"
  12263. ".. [1] Zhang, Shanjie and Jin, Jianming. \"Computation of Special\n"
  12264. " Functions\", John Wiley and Sons, 1996.\n"
  12265. " https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html\n"
  12266. "\n"
  12267. "Examples\n"
  12268. "--------\n"
  12269. "Evaluate the function at one point.\n"
  12270. "\n"
  12271. ">>> import numpy as np\n"
  12272. ">>> from scipy.special import itmodstruve0\n"
  12273. ">>> itmodstruve0(1.)\n"
  12274. "0.3364726286440384\n"
  12275. "\n"
  12276. "Evaluate the function at several points by supplying\n"
  12277. "an array for `x`.\n"
  12278. "\n"
  12279. ">>> points = np.array([1., 2., 3.5])\n"
  12280. ">>> itmodstruve0(points)\n"
  12281. "array([0.33647263, 1.588285 , 7.60382578])\n"
  12282. "\n"
  12283. "Plot the function from -10 to 10.\n"
  12284. "\n"
  12285. ">>> import matplotlib.pyplot as plt\n"
  12286. ">>> x = np.linspace(-10., 10., 1000)\n"
  12287. ">>> itmodstruve0_values = itmodstruve0(x)\n"
  12288. ">>> fig, ax = plt.subplots()\n"
  12289. ">>> ax.plot(x, itmodstruve0_values)\n"
  12290. ">>> ax.set_xlabel(r'$x$')\n"
  12291. ">>> ax.set_ylabel(r'$\\int_0^xL_0(t)\\,dt$')\n"
  12292. ">>> plt.show()")
  12293. ufunc_itmodstruve0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  12294. ufunc_itmodstruve0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  12295. ufunc_itmodstruve0_types[0] = <char>NPY_FLOAT
  12296. ufunc_itmodstruve0_types[1] = <char>NPY_FLOAT
  12297. ufunc_itmodstruve0_types[2] = <char>NPY_DOUBLE
  12298. ufunc_itmodstruve0_types[3] = <char>NPY_DOUBLE
  12299. ufunc_itmodstruve0_ptr[2*0] = <void*>_func_itmodstruve0_wrap
  12300. ufunc_itmodstruve0_ptr[2*0+1] = <void*>(<char*>"itmodstruve0")
  12301. ufunc_itmodstruve0_ptr[2*1] = <void*>_func_itmodstruve0_wrap
  12302. ufunc_itmodstruve0_ptr[2*1+1] = <void*>(<char*>"itmodstruve0")
  12303. ufunc_itmodstruve0_data[0] = &ufunc_itmodstruve0_ptr[2*0]
  12304. ufunc_itmodstruve0_data[1] = &ufunc_itmodstruve0_ptr[2*1]
  12305. itmodstruve0 = np.PyUFunc_FromFuncAndData(ufunc_itmodstruve0_loops, ufunc_itmodstruve0_data, ufunc_itmodstruve0_types, 2, 1, 1, 0, "itmodstruve0", ufunc_itmodstruve0_doc, 0)
  12306. cdef np.PyUFuncGenericFunction ufunc_itstruve0_loops[2]
  12307. cdef void *ufunc_itstruve0_ptr[4]
  12308. cdef void *ufunc_itstruve0_data[2]
  12309. cdef char ufunc_itstruve0_types[4]
  12310. cdef char *ufunc_itstruve0_doc = (
  12311. "itstruve0(x, out=None)\n"
  12312. "\n"
  12313. "Integral of the Struve function of order 0.\n"
  12314. "\n"
  12315. ".. math::\n"
  12316. " I = \\int_0^x H_0(t)\\,dt\n"
  12317. "\n"
  12318. "Parameters\n"
  12319. "----------\n"
  12320. "x : array_like\n"
  12321. " Upper limit of integration (float).\n"
  12322. "out : ndarray, optional\n"
  12323. " Optional output array for the function values\n"
  12324. "\n"
  12325. "Returns\n"
  12326. "-------\n"
  12327. "I : scalar or ndarray\n"
  12328. " The integral of :math:`H_0` from 0 to `x`.\n"
  12329. "\n"
  12330. "See also\n"
  12331. "--------\n"
  12332. "struve: Function which is integrated by this function\n"
  12333. "\n"
  12334. "Notes\n"
  12335. "-----\n"
  12336. "Wrapper for a Fortran routine created by Shanjie Zhang and Jianming\n"
  12337. "Jin [1]_.\n"
  12338. "\n"
  12339. "References\n"
  12340. "----------\n"
  12341. ".. [1] Zhang, Shanjie and Jin, Jianming. \"Computation of Special\n"
  12342. " Functions\", John Wiley and Sons, 1996.\n"
  12343. " https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html\n"
  12344. "\n"
  12345. "Examples\n"
  12346. "--------\n"
  12347. "Evaluate the function at one point.\n"
  12348. "\n"
  12349. ">>> import numpy as np\n"
  12350. ">>> from scipy.special import itstruve0\n"
  12351. ">>> itstruve0(1.)\n"
  12352. "0.30109042670805547\n"
  12353. "\n"
  12354. "Evaluate the function at several points by supplying\n"
  12355. "an array for `x`.\n"
  12356. "\n"
  12357. ">>> points = np.array([1., 2., 3.5])\n"
  12358. ">>> itstruve0(points)\n"
  12359. "array([0.30109043, 1.01870116, 1.96804581])\n"
  12360. "\n"
  12361. "Plot the function from -20 to 20.\n"
  12362. "\n"
  12363. ">>> import matplotlib.pyplot as plt\n"
  12364. ">>> x = np.linspace(-20., 20., 1000)\n"
  12365. ">>> istruve0_values = itstruve0(x)\n"
  12366. ">>> fig, ax = plt.subplots()\n"
  12367. ">>> ax.plot(x, istruve0_values)\n"
  12368. ">>> ax.set_xlabel(r'$x$')\n"
  12369. ">>> ax.set_ylabel(r'$\\int_0^{x}H_0(t)\\,dt$')\n"
  12370. ">>> plt.show()")
  12371. ufunc_itstruve0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  12372. ufunc_itstruve0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  12373. ufunc_itstruve0_types[0] = <char>NPY_FLOAT
  12374. ufunc_itstruve0_types[1] = <char>NPY_FLOAT
  12375. ufunc_itstruve0_types[2] = <char>NPY_DOUBLE
  12376. ufunc_itstruve0_types[3] = <char>NPY_DOUBLE
  12377. ufunc_itstruve0_ptr[2*0] = <void*>_func_itstruve0_wrap
  12378. ufunc_itstruve0_ptr[2*0+1] = <void*>(<char*>"itstruve0")
  12379. ufunc_itstruve0_ptr[2*1] = <void*>_func_itstruve0_wrap
  12380. ufunc_itstruve0_ptr[2*1+1] = <void*>(<char*>"itstruve0")
  12381. ufunc_itstruve0_data[0] = &ufunc_itstruve0_ptr[2*0]
  12382. ufunc_itstruve0_data[1] = &ufunc_itstruve0_ptr[2*1]
  12383. itstruve0 = np.PyUFunc_FromFuncAndData(ufunc_itstruve0_loops, ufunc_itstruve0_data, ufunc_itstruve0_types, 2, 1, 1, 0, "itstruve0", ufunc_itstruve0_doc, 0)
  12384. cdef np.PyUFuncGenericFunction ufunc_iv_loops[4]
  12385. cdef void *ufunc_iv_ptr[8]
  12386. cdef void *ufunc_iv_data[4]
  12387. cdef char ufunc_iv_types[12]
  12388. cdef char *ufunc_iv_doc = (
  12389. "iv(v, z, out=None)\n"
  12390. "\n"
  12391. "Modified Bessel function of the first kind of real order.\n"
  12392. "\n"
  12393. "Parameters\n"
  12394. "----------\n"
  12395. "v : array_like\n"
  12396. " Order. If `z` is of real type and negative, `v` must be integer\n"
  12397. " valued.\n"
  12398. "z : array_like of float or complex\n"
  12399. " Argument.\n"
  12400. "out : ndarray, optional\n"
  12401. " Optional output array for the function values\n"
  12402. "\n"
  12403. "Returns\n"
  12404. "-------\n"
  12405. "scalar or ndarray\n"
  12406. " Values of the modified Bessel function.\n"
  12407. "\n"
  12408. "Notes\n"
  12409. "-----\n"
  12410. "For real `z` and :math:`v \\in [-50, 50]`, the evaluation is carried out\n"
  12411. "using Temme's method [1]_. For larger orders, uniform asymptotic\n"
  12412. "expansions are applied.\n"
  12413. "\n"
  12414. "For complex `z` and positive `v`, the AMOS [2]_ `zbesi` routine is\n"
  12415. "called. It uses a power series for small `z`, the asymptotic expansion\n"
  12416. "for large `abs(z)`, the Miller algorithm normalized by the Wronskian\n"
  12417. "and a Neumann series for intermediate magnitudes, and the uniform\n"
  12418. "asymptotic expansions for :math:`I_v(z)` and :math:`J_v(z)` for large\n"
  12419. "orders. Backward recurrence is used to generate sequences or reduce\n"
  12420. "orders when necessary.\n"
  12421. "\n"
  12422. "The calculations above are done in the right half plane and continued\n"
  12423. "into the left half plane by the formula,\n"
  12424. "\n"
  12425. ".. math:: I_v(z \\exp(\\pm\\imath\\pi)) = \\exp(\\pm\\pi v) I_v(z)\n"
  12426. "\n"
  12427. "(valid when the real part of `z` is positive). For negative `v`, the\n"
  12428. "formula\n"
  12429. "\n"
  12430. ".. math:: I_{-v}(z) = I_v(z) + \\frac{2}{\\pi} \\sin(\\pi v) K_v(z)\n"
  12431. "\n"
  12432. "is used, where :math:`K_v(z)` is the modified Bessel function of the\n"
  12433. "second kind, evaluated using the AMOS routine `zbesk`.\n"
  12434. "\n"
  12435. "See also\n"
  12436. "--------\n"
  12437. "ive : This function with leading exponential behavior stripped off.\n"
  12438. "i0 : Faster version of this function for order 0.\n"
  12439. "i1 : Faster version of this function for order 1.\n"
  12440. "\n"
  12441. "References\n"
  12442. "----------\n"
  12443. ".. [1] Temme, Journal of Computational Physics, vol 21, 343 (1976)\n"
  12444. ".. [2] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  12445. " of a Complex Argument and Nonnegative Order\",\n"
  12446. " http://netlib.org/amos/\n"
  12447. "\n"
  12448. "Examples\n"
  12449. "--------\n"
  12450. "Evaluate the function of order 0 at one point.\n"
  12451. "\n"
  12452. ">>> from scipy.special import iv\n"
  12453. ">>> iv(0, 1.)\n"
  12454. "1.2660658777520084\n"
  12455. "\n"
  12456. "Evaluate the function at one point for different orders.\n"
  12457. "\n"
  12458. ">>> iv(0, 1.), iv(1, 1.), iv(1.5, 1.)\n"
  12459. "(1.2660658777520084, 0.565159103992485, 0.2935253263474798)\n"
  12460. "\n"
  12461. "The evaluation for different orders can be carried out in one call by\n"
  12462. "providing a list or NumPy array as argument for the `v` parameter:\n"
  12463. "\n"
  12464. ">>> iv([0, 1, 1.5], 1.)\n"
  12465. "array([1.26606588, 0.5651591 , 0.29352533])\n"
  12466. "\n"
  12467. "Evaluate the function at several points for order 0 by providing an\n"
  12468. "array for `z`.\n"
  12469. "\n"
  12470. ">>> import numpy as np\n"
  12471. ">>> points = np.array([-2., 0., 3.])\n"
  12472. ">>> iv(0, points)\n"
  12473. "array([2.2795853 , 1. , 4.88079259])\n"
  12474. "\n"
  12475. "If `z` is an array, the order parameter `v` must be broadcastable to\n"
  12476. "the correct shape if different orders shall be computed in one call.\n"
  12477. "To calculate the orders 0 and 1 for an 1D array:\n"
  12478. "\n"
  12479. ">>> orders = np.array([[0], [1]])\n"
  12480. ">>> orders.shape\n"
  12481. "(2, 1)\n"
  12482. "\n"
  12483. ">>> iv(orders, points)\n"
  12484. "array([[ 2.2795853 , 1. , 4.88079259],\n"
  12485. " [-1.59063685, 0. , 3.95337022]])\n"
  12486. "\n"
  12487. "Plot the functions of order 0 to 3 from -5 to 5.\n"
  12488. "\n"
  12489. ">>> import matplotlib.pyplot as plt\n"
  12490. ">>> fig, ax = plt.subplots()\n"
  12491. ">>> x = np.linspace(-5., 5., 1000)\n"
  12492. ">>> for i in range(4):\n"
  12493. "... ax.plot(x, iv(i, x), label=f'$I_{i!r}$')\n"
  12494. ">>> ax.legend()\n"
  12495. ">>> plt.show()")
  12496. ufunc_iv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  12497. ufunc_iv_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  12498. ufunc_iv_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  12499. ufunc_iv_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  12500. ufunc_iv_types[0] = <char>NPY_FLOAT
  12501. ufunc_iv_types[1] = <char>NPY_FLOAT
  12502. ufunc_iv_types[2] = <char>NPY_FLOAT
  12503. ufunc_iv_types[3] = <char>NPY_FLOAT
  12504. ufunc_iv_types[4] = <char>NPY_CFLOAT
  12505. ufunc_iv_types[5] = <char>NPY_CFLOAT
  12506. ufunc_iv_types[6] = <char>NPY_DOUBLE
  12507. ufunc_iv_types[7] = <char>NPY_DOUBLE
  12508. ufunc_iv_types[8] = <char>NPY_DOUBLE
  12509. ufunc_iv_types[9] = <char>NPY_DOUBLE
  12510. ufunc_iv_types[10] = <char>NPY_CDOUBLE
  12511. ufunc_iv_types[11] = <char>NPY_CDOUBLE
  12512. ufunc_iv_ptr[2*0] = <void*>_func_iv
  12513. ufunc_iv_ptr[2*0+1] = <void*>(<char*>"iv")
  12514. ufunc_iv_ptr[2*1] = <void*>_func_cbesi_wrap
  12515. ufunc_iv_ptr[2*1+1] = <void*>(<char*>"iv")
  12516. ufunc_iv_ptr[2*2] = <void*>_func_iv
  12517. ufunc_iv_ptr[2*2+1] = <void*>(<char*>"iv")
  12518. ufunc_iv_ptr[2*3] = <void*>_func_cbesi_wrap
  12519. ufunc_iv_ptr[2*3+1] = <void*>(<char*>"iv")
  12520. ufunc_iv_data[0] = &ufunc_iv_ptr[2*0]
  12521. ufunc_iv_data[1] = &ufunc_iv_ptr[2*1]
  12522. ufunc_iv_data[2] = &ufunc_iv_ptr[2*2]
  12523. ufunc_iv_data[3] = &ufunc_iv_ptr[2*3]
  12524. iv = np.PyUFunc_FromFuncAndData(ufunc_iv_loops, ufunc_iv_data, ufunc_iv_types, 4, 2, 1, 0, "iv", ufunc_iv_doc, 0)
  12525. cdef np.PyUFuncGenericFunction ufunc_ive_loops[4]
  12526. cdef void *ufunc_ive_ptr[8]
  12527. cdef void *ufunc_ive_data[4]
  12528. cdef char ufunc_ive_types[12]
  12529. cdef char *ufunc_ive_doc = (
  12530. "ive(v, z, out=None)\n"
  12531. "\n"
  12532. "Exponentially scaled modified Bessel function of the first kind.\n"
  12533. "\n"
  12534. "Defined as::\n"
  12535. "\n"
  12536. " ive(v, z) = iv(v, z) * exp(-abs(z.real))\n"
  12537. "\n"
  12538. "For imaginary numbers without a real part, returns the unscaled\n"
  12539. "Bessel function of the first kind `iv`.\n"
  12540. "\n"
  12541. "Parameters\n"
  12542. "----------\n"
  12543. "v : array_like of float\n"
  12544. " Order.\n"
  12545. "z : array_like of float or complex\n"
  12546. " Argument.\n"
  12547. "out : ndarray, optional\n"
  12548. " Optional output array for the function values\n"
  12549. "\n"
  12550. "Returns\n"
  12551. "-------\n"
  12552. "scalar or ndarray\n"
  12553. " Values of the exponentially scaled modified Bessel function.\n"
  12554. "\n"
  12555. "Notes\n"
  12556. "-----\n"
  12557. "For positive `v`, the AMOS [1]_ `zbesi` routine is called. It uses a\n"
  12558. "power series for small `z`, the asymptotic expansion for large\n"
  12559. "`abs(z)`, the Miller algorithm normalized by the Wronskian and a\n"
  12560. "Neumann series for intermediate magnitudes, and the uniform asymptotic\n"
  12561. "expansions for :math:`I_v(z)` and :math:`J_v(z)` for large orders.\n"
  12562. "Backward recurrence is used to generate sequences or reduce orders when\n"
  12563. "necessary.\n"
  12564. "\n"
  12565. "The calculations above are done in the right half plane and continued\n"
  12566. "into the left half plane by the formula,\n"
  12567. "\n"
  12568. ".. math:: I_v(z \\exp(\\pm\\imath\\pi)) = \\exp(\\pm\\pi v) I_v(z)\n"
  12569. "\n"
  12570. "(valid when the real part of `z` is positive). For negative `v`, the\n"
  12571. "formula\n"
  12572. "\n"
  12573. ".. math:: I_{-v}(z) = I_v(z) + \\frac{2}{\\pi} \\sin(\\pi v) K_v(z)\n"
  12574. "\n"
  12575. "is used, where :math:`K_v(z)` is the modified Bessel function of the\n"
  12576. "second kind, evaluated using the AMOS routine `zbesk`.\n"
  12577. "\n"
  12578. "See also\n"
  12579. "--------\n"
  12580. "iv: Modified Bessel function of the first kind\n"
  12581. "i0e: Faster implementation of this function for order 0\n"
  12582. "i1e: Faster implementation of this function for order 1\n"
  12583. "\n"
  12584. "References\n"
  12585. "----------\n"
  12586. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  12587. " of a Complex Argument and Nonnegative Order\",\n"
  12588. " http://netlib.org/amos/\n"
  12589. "\n"
  12590. "Examples\n"
  12591. "--------\n"
  12592. "Evaluate the function of order 0 at one point.\n"
  12593. "\n"
  12594. ">>> import numpy as np\n"
  12595. ">>> from scipy.special import iv, ive\n"
  12596. ">>> import matplotlib.pyplot as plt\n"
  12597. ">>> ive(0, 1.)\n"
  12598. "0.4657596075936404\n"
  12599. "\n"
  12600. "Evaluate the function at one point for different orders by\n"
  12601. "providing a list or NumPy array as argument for the `v` parameter:\n"
  12602. "\n"
  12603. ">>> ive([0, 1, 1.5], 1.)\n"
  12604. "array([0.46575961, 0.20791042, 0.10798193])\n"
  12605. "\n"
  12606. "Evaluate the function at several points for order 0 by providing an\n"
  12607. "array for `z`.\n"
  12608. "\n"
  12609. ">>> points = np.array([-2., 0., 3.])\n"
  12610. ">>> ive(0, points)\n"
  12611. "array([0.30850832, 1. , 0.24300035])\n"
  12612. "\n"
  12613. "Evaluate the function at several points for different orders by\n"
  12614. "providing arrays for both `v` for `z`. Both arrays have to be\n"
  12615. "broadcastable to the correct shape. To calculate the orders 0, 1\n"
  12616. "and 2 for a 1D array of points:\n"
  12617. "\n"
  12618. ">>> ive([[0], [1], [2]], points)\n"
  12619. "array([[ 0.30850832, 1. , 0.24300035],\n"
  12620. " [-0.21526929, 0. , 0.19682671],\n"
  12621. " [ 0.09323903, 0. , 0.11178255]])\n"
  12622. "\n"
  12623. "Plot the functions of order 0 to 3 from -5 to 5.\n"
  12624. "\n"
  12625. ">>> fig, ax = plt.subplots()\n"
  12626. ">>> x = np.linspace(-5., 5., 1000)\n"
  12627. ">>> for i in range(4):\n"
  12628. "... ax.plot(x, ive(i, x), label=f'$I_{i!r}(z)\\cdot e^{{-|z|}}$')\n"
  12629. ">>> ax.legend()\n"
  12630. ">>> ax.set_xlabel(r\"$z$\")\n"
  12631. ">>> plt.show()\n"
  12632. "\n"
  12633. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  12634. "which the unscaled Bessel functions over- or underflow. In the\n"
  12635. "following example `iv` returns infinity whereas `ive` still returns\n"
  12636. "a finite number.\n"
  12637. "\n"
  12638. ">>> iv(3, 1000.), ive(3, 1000.)\n"
  12639. "(inf, 0.01256056218254712)")
  12640. ufunc_ive_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  12641. ufunc_ive_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  12642. ufunc_ive_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  12643. ufunc_ive_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  12644. ufunc_ive_types[0] = <char>NPY_FLOAT
  12645. ufunc_ive_types[1] = <char>NPY_FLOAT
  12646. ufunc_ive_types[2] = <char>NPY_FLOAT
  12647. ufunc_ive_types[3] = <char>NPY_FLOAT
  12648. ufunc_ive_types[4] = <char>NPY_CFLOAT
  12649. ufunc_ive_types[5] = <char>NPY_CFLOAT
  12650. ufunc_ive_types[6] = <char>NPY_DOUBLE
  12651. ufunc_ive_types[7] = <char>NPY_DOUBLE
  12652. ufunc_ive_types[8] = <char>NPY_DOUBLE
  12653. ufunc_ive_types[9] = <char>NPY_DOUBLE
  12654. ufunc_ive_types[10] = <char>NPY_CDOUBLE
  12655. ufunc_ive_types[11] = <char>NPY_CDOUBLE
  12656. ufunc_ive_ptr[2*0] = <void*>_func_cbesi_wrap_e_real
  12657. ufunc_ive_ptr[2*0+1] = <void*>(<char*>"ive")
  12658. ufunc_ive_ptr[2*1] = <void*>_func_cbesi_wrap_e
  12659. ufunc_ive_ptr[2*1+1] = <void*>(<char*>"ive")
  12660. ufunc_ive_ptr[2*2] = <void*>_func_cbesi_wrap_e_real
  12661. ufunc_ive_ptr[2*2+1] = <void*>(<char*>"ive")
  12662. ufunc_ive_ptr[2*3] = <void*>_func_cbesi_wrap_e
  12663. ufunc_ive_ptr[2*3+1] = <void*>(<char*>"ive")
  12664. ufunc_ive_data[0] = &ufunc_ive_ptr[2*0]
  12665. ufunc_ive_data[1] = &ufunc_ive_ptr[2*1]
  12666. ufunc_ive_data[2] = &ufunc_ive_ptr[2*2]
  12667. ufunc_ive_data[3] = &ufunc_ive_ptr[2*3]
  12668. ive = np.PyUFunc_FromFuncAndData(ufunc_ive_loops, ufunc_ive_data, ufunc_ive_types, 4, 2, 1, 0, "ive", ufunc_ive_doc, 0)
  12669. cdef np.PyUFuncGenericFunction ufunc_j0_loops[2]
  12670. cdef void *ufunc_j0_ptr[4]
  12671. cdef void *ufunc_j0_data[2]
  12672. cdef char ufunc_j0_types[4]
  12673. cdef char *ufunc_j0_doc = (
  12674. "j0(x, out=None)\n"
  12675. "\n"
  12676. "Bessel function of the first kind of order 0.\n"
  12677. "\n"
  12678. "Parameters\n"
  12679. "----------\n"
  12680. "x : array_like\n"
  12681. " Argument (float).\n"
  12682. "out : ndarray, optional\n"
  12683. " Optional output array for the function values\n"
  12684. "\n"
  12685. "Returns\n"
  12686. "-------\n"
  12687. "J : scalar or ndarray\n"
  12688. " Value of the Bessel function of the first kind of order 0 at `x`.\n"
  12689. "\n"
  12690. "Notes\n"
  12691. "-----\n"
  12692. "The domain is divided into the intervals [0, 5] and (5, infinity). In the\n"
  12693. "first interval the following rational approximation is used:\n"
  12694. "\n"
  12695. ".. math::\n"
  12696. "\n"
  12697. " J_0(x) \\approx (w - r_1^2)(w - r_2^2) \\frac{P_3(w)}{Q_8(w)},\n"
  12698. "\n"
  12699. "where :math:`w = x^2` and :math:`r_1`, :math:`r_2` are the zeros of\n"
  12700. ":math:`J_0`, and :math:`P_3` and :math:`Q_8` are polynomials of degrees 3\n"
  12701. "and 8, respectively.\n"
  12702. "\n"
  12703. "In the second interval, the Hankel asymptotic expansion is employed with\n"
  12704. "two rational functions of degree 6/6 and 7/7.\n"
  12705. "\n"
  12706. "This function is a wrapper for the Cephes [1]_ routine `j0`.\n"
  12707. "It should not be confused with the spherical Bessel functions (see\n"
  12708. "`spherical_jn`).\n"
  12709. "\n"
  12710. "See also\n"
  12711. "--------\n"
  12712. "jv : Bessel function of real order and complex argument.\n"
  12713. "spherical_jn : spherical Bessel functions.\n"
  12714. "\n"
  12715. "References\n"
  12716. "----------\n"
  12717. ".. [1] Cephes Mathematical Functions Library,\n"
  12718. " http://www.netlib.org/cephes/\n"
  12719. "\n"
  12720. "Examples\n"
  12721. "--------\n"
  12722. "Calculate the function at one point:\n"
  12723. "\n"
  12724. ">>> from scipy.special import j0\n"
  12725. ">>> j0(1.)\n"
  12726. "0.7651976865579665\n"
  12727. "\n"
  12728. "Calculate the function at several points:\n"
  12729. "\n"
  12730. ">>> import numpy as np\n"
  12731. ">>> j0(np.array([-2., 0., 4.]))\n"
  12732. "array([ 0.22389078, 1. , -0.39714981])\n"
  12733. "\n"
  12734. "Plot the function from -20 to 20.\n"
  12735. "\n"
  12736. ">>> import matplotlib.pyplot as plt\n"
  12737. ">>> fig, ax = plt.subplots()\n"
  12738. ">>> x = np.linspace(-20., 20., 1000)\n"
  12739. ">>> y = j0(x)\n"
  12740. ">>> ax.plot(x, y)\n"
  12741. ">>> plt.show()")
  12742. ufunc_j0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  12743. ufunc_j0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  12744. ufunc_j0_types[0] = <char>NPY_FLOAT
  12745. ufunc_j0_types[1] = <char>NPY_FLOAT
  12746. ufunc_j0_types[2] = <char>NPY_DOUBLE
  12747. ufunc_j0_types[3] = <char>NPY_DOUBLE
  12748. ufunc_j0_ptr[2*0] = <void*>_func_j0
  12749. ufunc_j0_ptr[2*0+1] = <void*>(<char*>"j0")
  12750. ufunc_j0_ptr[2*1] = <void*>_func_j0
  12751. ufunc_j0_ptr[2*1+1] = <void*>(<char*>"j0")
  12752. ufunc_j0_data[0] = &ufunc_j0_ptr[2*0]
  12753. ufunc_j0_data[1] = &ufunc_j0_ptr[2*1]
  12754. j0 = np.PyUFunc_FromFuncAndData(ufunc_j0_loops, ufunc_j0_data, ufunc_j0_types, 2, 1, 1, 0, "j0", ufunc_j0_doc, 0)
  12755. cdef np.PyUFuncGenericFunction ufunc_j1_loops[2]
  12756. cdef void *ufunc_j1_ptr[4]
  12757. cdef void *ufunc_j1_data[2]
  12758. cdef char ufunc_j1_types[4]
  12759. cdef char *ufunc_j1_doc = (
  12760. "j1(x, out=None)\n"
  12761. "\n"
  12762. "Bessel function of the first kind of order 1.\n"
  12763. "\n"
  12764. "Parameters\n"
  12765. "----------\n"
  12766. "x : array_like\n"
  12767. " Argument (float).\n"
  12768. "out : ndarray, optional\n"
  12769. " Optional output array for the function values\n"
  12770. "\n"
  12771. "Returns\n"
  12772. "-------\n"
  12773. "J : scalar or ndarray\n"
  12774. " Value of the Bessel function of the first kind of order 1 at `x`.\n"
  12775. "\n"
  12776. "Notes\n"
  12777. "-----\n"
  12778. "The domain is divided into the intervals [0, 8] and (8, infinity). In the\n"
  12779. "first interval a 24 term Chebyshev expansion is used. In the second, the\n"
  12780. "asymptotic trigonometric representation is employed using two rational\n"
  12781. "functions of degree 5/5.\n"
  12782. "\n"
  12783. "This function is a wrapper for the Cephes [1]_ routine `j1`.\n"
  12784. "It should not be confused with the spherical Bessel functions (see\n"
  12785. "`spherical_jn`).\n"
  12786. "\n"
  12787. "See also\n"
  12788. "--------\n"
  12789. "jv: Bessel function of the first kind\n"
  12790. "spherical_jn: spherical Bessel functions.\n"
  12791. "\n"
  12792. "References\n"
  12793. "----------\n"
  12794. ".. [1] Cephes Mathematical Functions Library,\n"
  12795. " http://www.netlib.org/cephes/\n"
  12796. "\n"
  12797. "Examples\n"
  12798. "--------\n"
  12799. "Calculate the function at one point:\n"
  12800. "\n"
  12801. ">>> from scipy.special import j1\n"
  12802. ">>> j1(1.)\n"
  12803. "0.44005058574493355\n"
  12804. "\n"
  12805. "Calculate the function at several points:\n"
  12806. "\n"
  12807. ">>> import numpy as np\n"
  12808. ">>> j1(np.array([-2., 0., 4.]))\n"
  12809. "array([-0.57672481, 0. , -0.06604333])\n"
  12810. "\n"
  12811. "Plot the function from -20 to 20.\n"
  12812. "\n"
  12813. ">>> import matplotlib.pyplot as plt\n"
  12814. ">>> fig, ax = plt.subplots()\n"
  12815. ">>> x = np.linspace(-20., 20., 1000)\n"
  12816. ">>> y = j1(x)\n"
  12817. ">>> ax.plot(x, y)\n"
  12818. ">>> plt.show()")
  12819. ufunc_j1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  12820. ufunc_j1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  12821. ufunc_j1_types[0] = <char>NPY_FLOAT
  12822. ufunc_j1_types[1] = <char>NPY_FLOAT
  12823. ufunc_j1_types[2] = <char>NPY_DOUBLE
  12824. ufunc_j1_types[3] = <char>NPY_DOUBLE
  12825. ufunc_j1_ptr[2*0] = <void*>_func_j1
  12826. ufunc_j1_ptr[2*0+1] = <void*>(<char*>"j1")
  12827. ufunc_j1_ptr[2*1] = <void*>_func_j1
  12828. ufunc_j1_ptr[2*1+1] = <void*>(<char*>"j1")
  12829. ufunc_j1_data[0] = &ufunc_j1_ptr[2*0]
  12830. ufunc_j1_data[1] = &ufunc_j1_ptr[2*1]
  12831. j1 = np.PyUFunc_FromFuncAndData(ufunc_j1_loops, ufunc_j1_data, ufunc_j1_types, 2, 1, 1, 0, "j1", ufunc_j1_doc, 0)
  12832. cdef np.PyUFuncGenericFunction ufunc_jv_loops[4]
  12833. cdef void *ufunc_jv_ptr[8]
  12834. cdef void *ufunc_jv_data[4]
  12835. cdef char ufunc_jv_types[12]
  12836. cdef char *ufunc_jv_doc = (
  12837. "jv(v, z, out=None)\n"
  12838. "\n"
  12839. "Bessel function of the first kind of real order and complex argument.\n"
  12840. "\n"
  12841. "Parameters\n"
  12842. "----------\n"
  12843. "v : array_like\n"
  12844. " Order (float).\n"
  12845. "z : array_like\n"
  12846. " Argument (float or complex).\n"
  12847. "out : ndarray, optional\n"
  12848. " Optional output array for the function values\n"
  12849. "\n"
  12850. "Returns\n"
  12851. "-------\n"
  12852. "J : scalar or ndarray\n"
  12853. " Value of the Bessel function, :math:`J_v(z)`.\n"
  12854. "\n"
  12855. "See also\n"
  12856. "--------\n"
  12857. "jve : :math:`J_v` with leading exponential behavior stripped off.\n"
  12858. "spherical_jn : spherical Bessel functions.\n"
  12859. "j0 : faster version of this function for order 0.\n"
  12860. "j1 : faster version of this function for order 1.\n"
  12861. "\n"
  12862. "Notes\n"
  12863. "-----\n"
  12864. "For positive `v` values, the computation is carried out using the AMOS\n"
  12865. "[1]_ `zbesj` routine, which exploits the connection to the modified\n"
  12866. "Bessel function :math:`I_v`,\n"
  12867. "\n"
  12868. ".. math::\n"
  12869. " J_v(z) = \\exp(v\\pi\\imath/2) I_v(-\\imath z)\\qquad (\\Im z > 0)\n"
  12870. "\n"
  12871. " J_v(z) = \\exp(-v\\pi\\imath/2) I_v(\\imath z)\\qquad (\\Im z < 0)\n"
  12872. "\n"
  12873. "For negative `v` values the formula,\n"
  12874. "\n"
  12875. ".. math:: J_{-v}(z) = J_v(z) \\cos(\\pi v) - Y_v(z) \\sin(\\pi v)\n"
  12876. "\n"
  12877. "is used, where :math:`Y_v(z)` is the Bessel function of the second\n"
  12878. "kind, computed using the AMOS routine `zbesy`. Note that the second\n"
  12879. "term is exactly zero for integer `v`; to improve accuracy the second\n"
  12880. "term is explicitly omitted for `v` values such that `v = floor(v)`.\n"
  12881. "\n"
  12882. "Not to be confused with the spherical Bessel functions (see `spherical_jn`).\n"
  12883. "\n"
  12884. "References\n"
  12885. "----------\n"
  12886. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  12887. " of a Complex Argument and Nonnegative Order\",\n"
  12888. " http://netlib.org/amos/\n"
  12889. "\n"
  12890. "Examples\n"
  12891. "--------\n"
  12892. "Evaluate the function of order 0 at one point.\n"
  12893. "\n"
  12894. ">>> from scipy.special import jv\n"
  12895. ">>> jv(0, 1.)\n"
  12896. "0.7651976865579666\n"
  12897. "\n"
  12898. "Evaluate the function at one point for different orders.\n"
  12899. "\n"
  12900. ">>> jv(0, 1.), jv(1, 1.), jv(1.5, 1.)\n"
  12901. "(0.7651976865579666, 0.44005058574493355, 0.24029783912342725)\n"
  12902. "\n"
  12903. "The evaluation for different orders can be carried out in one call by\n"
  12904. "providing a list or NumPy array as argument for the `v` parameter:\n"
  12905. "\n"
  12906. ">>> jv([0, 1, 1.5], 1.)\n"
  12907. "array([0.76519769, 0.44005059, 0.24029784])\n"
  12908. "\n"
  12909. "Evaluate the function at several points for order 0 by providing an\n"
  12910. "array for `z`.\n"
  12911. "\n"
  12912. ">>> import numpy as np\n"
  12913. ">>> points = np.array([-2., 0., 3.])\n"
  12914. ">>> jv(0, points)\n"
  12915. "array([ 0.22389078, 1. , -0.26005195])\n"
  12916. "\n"
  12917. "If `z` is an array, the order parameter `v` must be broadcastable to\n"
  12918. "the correct shape if different orders shall be computed in one call.\n"
  12919. "To calculate the orders 0 and 1 for an 1D array:\n"
  12920. "\n"
  12921. ">>> orders = np.array([[0], [1]])\n"
  12922. ">>> orders.shape\n"
  12923. "(2, 1)\n"
  12924. "\n"
  12925. ">>> jv(orders, points)\n"
  12926. "array([[ 0.22389078, 1. , -0.26005195],\n"
  12927. " [-0.57672481, 0. , 0.33905896]])\n"
  12928. "\n"
  12929. "Plot the functions of order 0 to 3 from -10 to 10.\n"
  12930. "\n"
  12931. ">>> import matplotlib.pyplot as plt\n"
  12932. ">>> fig, ax = plt.subplots()\n"
  12933. ">>> x = np.linspace(-10., 10., 1000)\n"
  12934. ">>> for i in range(4):\n"
  12935. "... ax.plot(x, jv(i, x), label=f'$J_{i!r}$')\n"
  12936. ">>> ax.legend()\n"
  12937. ">>> plt.show()")
  12938. ufunc_jv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  12939. ufunc_jv_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  12940. ufunc_jv_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  12941. ufunc_jv_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  12942. ufunc_jv_types[0] = <char>NPY_FLOAT
  12943. ufunc_jv_types[1] = <char>NPY_FLOAT
  12944. ufunc_jv_types[2] = <char>NPY_FLOAT
  12945. ufunc_jv_types[3] = <char>NPY_FLOAT
  12946. ufunc_jv_types[4] = <char>NPY_CFLOAT
  12947. ufunc_jv_types[5] = <char>NPY_CFLOAT
  12948. ufunc_jv_types[6] = <char>NPY_DOUBLE
  12949. ufunc_jv_types[7] = <char>NPY_DOUBLE
  12950. ufunc_jv_types[8] = <char>NPY_DOUBLE
  12951. ufunc_jv_types[9] = <char>NPY_DOUBLE
  12952. ufunc_jv_types[10] = <char>NPY_CDOUBLE
  12953. ufunc_jv_types[11] = <char>NPY_CDOUBLE
  12954. ufunc_jv_ptr[2*0] = <void*>_func_cbesj_wrap_real
  12955. ufunc_jv_ptr[2*0+1] = <void*>(<char*>"jv")
  12956. ufunc_jv_ptr[2*1] = <void*>_func_cbesj_wrap
  12957. ufunc_jv_ptr[2*1+1] = <void*>(<char*>"jv")
  12958. ufunc_jv_ptr[2*2] = <void*>_func_cbesj_wrap_real
  12959. ufunc_jv_ptr[2*2+1] = <void*>(<char*>"jv")
  12960. ufunc_jv_ptr[2*3] = <void*>_func_cbesj_wrap
  12961. ufunc_jv_ptr[2*3+1] = <void*>(<char*>"jv")
  12962. ufunc_jv_data[0] = &ufunc_jv_ptr[2*0]
  12963. ufunc_jv_data[1] = &ufunc_jv_ptr[2*1]
  12964. ufunc_jv_data[2] = &ufunc_jv_ptr[2*2]
  12965. ufunc_jv_data[3] = &ufunc_jv_ptr[2*3]
  12966. jv = np.PyUFunc_FromFuncAndData(ufunc_jv_loops, ufunc_jv_data, ufunc_jv_types, 4, 2, 1, 0, "jv", ufunc_jv_doc, 0)
  12967. cdef np.PyUFuncGenericFunction ufunc_jve_loops[4]
  12968. cdef void *ufunc_jve_ptr[8]
  12969. cdef void *ufunc_jve_data[4]
  12970. cdef char ufunc_jve_types[12]
  12971. cdef char *ufunc_jve_doc = (
  12972. "jve(v, z, out=None)\n"
  12973. "\n"
  12974. "Exponentially scaled Bessel function of the first kind of order `v`.\n"
  12975. "\n"
  12976. "Defined as::\n"
  12977. "\n"
  12978. " jve(v, z) = jv(v, z) * exp(-abs(z.imag))\n"
  12979. "\n"
  12980. "Parameters\n"
  12981. "----------\n"
  12982. "v : array_like\n"
  12983. " Order (float).\n"
  12984. "z : array_like\n"
  12985. " Argument (float or complex).\n"
  12986. "out : ndarray, optional\n"
  12987. " Optional output array for the function values\n"
  12988. "\n"
  12989. "Returns\n"
  12990. "-------\n"
  12991. "J : scalar or ndarray\n"
  12992. " Value of the exponentially scaled Bessel function.\n"
  12993. "\n"
  12994. "See also\n"
  12995. "--------\n"
  12996. "jv: Unscaled Bessel function of the first kind\n"
  12997. "\n"
  12998. "Notes\n"
  12999. "-----\n"
  13000. "For positive `v` values, the computation is carried out using the AMOS\n"
  13001. "[1]_ `zbesj` routine, which exploits the connection to the modified\n"
  13002. "Bessel function :math:`I_v`,\n"
  13003. "\n"
  13004. ".. math::\n"
  13005. " J_v(z) = \\exp(v\\pi\\imath/2) I_v(-\\imath z)\\qquad (\\Im z > 0)\n"
  13006. "\n"
  13007. " J_v(z) = \\exp(-v\\pi\\imath/2) I_v(\\imath z)\\qquad (\\Im z < 0)\n"
  13008. "\n"
  13009. "For negative `v` values the formula,\n"
  13010. "\n"
  13011. ".. math:: J_{-v}(z) = J_v(z) \\cos(\\pi v) - Y_v(z) \\sin(\\pi v)\n"
  13012. "\n"
  13013. "is used, where :math:`Y_v(z)` is the Bessel function of the second\n"
  13014. "kind, computed using the AMOS routine `zbesy`. Note that the second\n"
  13015. "term is exactly zero for integer `v`; to improve accuracy the second\n"
  13016. "term is explicitly omitted for `v` values such that `v = floor(v)`.\n"
  13017. "\n"
  13018. "Exponentially scaled Bessel functions are useful for large arguments `z`:\n"
  13019. "for these, the unscaled Bessel functions can easily under-or overflow.\n"
  13020. "\n"
  13021. "References\n"
  13022. "----------\n"
  13023. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  13024. " of a Complex Argument and Nonnegative Order\",\n"
  13025. " http://netlib.org/amos/\n"
  13026. "\n"
  13027. "Examples\n"
  13028. "--------\n"
  13029. "Compare the output of `jv` and `jve` for large complex arguments for `z`\n"
  13030. "by computing their values for order ``v=1`` at ``z=1000j``. We see that\n"
  13031. "`jv` overflows but `jve` returns a finite number:\n"
  13032. "\n"
  13033. ">>> import numpy as np\n"
  13034. ">>> from scipy.special import jv, jve\n"
  13035. ">>> v = 1\n"
  13036. ">>> z = 1000j\n"
  13037. ">>> jv(v, z), jve(v, z)\n"
  13038. "((inf+infj), (7.721967686709077e-19+0.012610930256928629j))\n"
  13039. "\n"
  13040. "For real arguments for `z`, `jve` returns the same as `jv`.\n"
  13041. "\n"
  13042. ">>> v, z = 1, 1000\n"
  13043. ">>> jv(v, z), jve(v, z)\n"
  13044. "(0.004728311907089523, 0.004728311907089523)\n"
  13045. "\n"
  13046. "The function can be evaluated for several orders at the same time by\n"
  13047. "providing a list or NumPy array for `v`:\n"
  13048. "\n"
  13049. ">>> jve([1, 3, 5], 1j)\n"
  13050. "array([1.27304208e-17+2.07910415e-01j, -4.99352086e-19-8.15530777e-03j,\n"
  13051. " 6.11480940e-21+9.98657141e-05j])\n"
  13052. "\n"
  13053. "In the same way, the function can be evaluated at several points in one\n"
  13054. "call by providing a list or NumPy array for `z`:\n"
  13055. "\n"
  13056. ">>> jve(1, np.array([1j, 2j, 3j]))\n"
  13057. "array([1.27308412e-17+0.20791042j, 1.31814423e-17+0.21526929j,\n"
  13058. " 1.20521602e-17+0.19682671j])\n"
  13059. "\n"
  13060. "It is also possible to evaluate several orders at several points\n"
  13061. "at the same time by providing arrays for `v` and `z` with\n"
  13062. "compatible shapes for broadcasting. Compute `jve` for two different orders\n"
  13063. "`v` and three points `z` resulting in a 2x3 array.\n"
  13064. "\n"
  13065. ">>> v = np.array([[1], [3]])\n"
  13066. ">>> z = np.array([1j, 2j, 3j])\n"
  13067. ">>> v.shape, z.shape\n"
  13068. "((2, 1), (3,))\n"
  13069. "\n"
  13070. ">>> jve(v, z)\n"
  13071. "array([[1.27304208e-17+0.20791042j, 1.31810070e-17+0.21526929j,\n"
  13072. " 1.20517622e-17+0.19682671j],\n"
  13073. " [-4.99352086e-19-0.00815531j, -1.76289571e-18-0.02879122j,\n"
  13074. " -2.92578784e-18-0.04778332j]])")
  13075. ufunc_jve_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  13076. ufunc_jve_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  13077. ufunc_jve_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  13078. ufunc_jve_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  13079. ufunc_jve_types[0] = <char>NPY_FLOAT
  13080. ufunc_jve_types[1] = <char>NPY_FLOAT
  13081. ufunc_jve_types[2] = <char>NPY_FLOAT
  13082. ufunc_jve_types[3] = <char>NPY_FLOAT
  13083. ufunc_jve_types[4] = <char>NPY_CFLOAT
  13084. ufunc_jve_types[5] = <char>NPY_CFLOAT
  13085. ufunc_jve_types[6] = <char>NPY_DOUBLE
  13086. ufunc_jve_types[7] = <char>NPY_DOUBLE
  13087. ufunc_jve_types[8] = <char>NPY_DOUBLE
  13088. ufunc_jve_types[9] = <char>NPY_DOUBLE
  13089. ufunc_jve_types[10] = <char>NPY_CDOUBLE
  13090. ufunc_jve_types[11] = <char>NPY_CDOUBLE
  13091. ufunc_jve_ptr[2*0] = <void*>_func_cbesj_wrap_e_real
  13092. ufunc_jve_ptr[2*0+1] = <void*>(<char*>"jve")
  13093. ufunc_jve_ptr[2*1] = <void*>_func_cbesj_wrap_e
  13094. ufunc_jve_ptr[2*1+1] = <void*>(<char*>"jve")
  13095. ufunc_jve_ptr[2*2] = <void*>_func_cbesj_wrap_e_real
  13096. ufunc_jve_ptr[2*2+1] = <void*>(<char*>"jve")
  13097. ufunc_jve_ptr[2*3] = <void*>_func_cbesj_wrap_e
  13098. ufunc_jve_ptr[2*3+1] = <void*>(<char*>"jve")
  13099. ufunc_jve_data[0] = &ufunc_jve_ptr[2*0]
  13100. ufunc_jve_data[1] = &ufunc_jve_ptr[2*1]
  13101. ufunc_jve_data[2] = &ufunc_jve_ptr[2*2]
  13102. ufunc_jve_data[3] = &ufunc_jve_ptr[2*3]
  13103. jve = np.PyUFunc_FromFuncAndData(ufunc_jve_loops, ufunc_jve_data, ufunc_jve_types, 4, 2, 1, 0, "jve", ufunc_jve_doc, 0)
  13104. cdef np.PyUFuncGenericFunction ufunc_k0_loops[2]
  13105. cdef void *ufunc_k0_ptr[4]
  13106. cdef void *ufunc_k0_data[2]
  13107. cdef char ufunc_k0_types[4]
  13108. cdef char *ufunc_k0_doc = (
  13109. "k0(x, out=None)\n"
  13110. "\n"
  13111. "Modified Bessel function of the second kind of order 0, :math:`K_0`.\n"
  13112. "\n"
  13113. "This function is also sometimes referred to as the modified Bessel\n"
  13114. "function of the third kind of order 0.\n"
  13115. "\n"
  13116. "Parameters\n"
  13117. "----------\n"
  13118. "x : array_like\n"
  13119. " Argument (float).\n"
  13120. "out : ndarray, optional\n"
  13121. " Optional output array for the function values\n"
  13122. "\n"
  13123. "Returns\n"
  13124. "-------\n"
  13125. "K : scalar or ndarray\n"
  13126. " Value of the modified Bessel function :math:`K_0` at `x`.\n"
  13127. "\n"
  13128. "Notes\n"
  13129. "-----\n"
  13130. "The range is partitioned into the two intervals [0, 2] and (2, infinity).\n"
  13131. "Chebyshev polynomial expansions are employed in each interval.\n"
  13132. "\n"
  13133. "This function is a wrapper for the Cephes [1]_ routine `k0`.\n"
  13134. "\n"
  13135. "See also\n"
  13136. "--------\n"
  13137. "kv: Modified Bessel function of the second kind of any order\n"
  13138. "k0e: Exponentially scaled modified Bessel function of the second kind\n"
  13139. "\n"
  13140. "References\n"
  13141. "----------\n"
  13142. ".. [1] Cephes Mathematical Functions Library,\n"
  13143. " http://www.netlib.org/cephes/\n"
  13144. "\n"
  13145. "Examples\n"
  13146. "--------\n"
  13147. "Calculate the function at one point:\n"
  13148. "\n"
  13149. ">>> from scipy.special import k0\n"
  13150. ">>> k0(1.)\n"
  13151. "0.42102443824070823\n"
  13152. "\n"
  13153. "Calculate the function at several points:\n"
  13154. "\n"
  13155. ">>> import numpy as np\n"
  13156. ">>> k0(np.array([0.5, 2., 3.]))\n"
  13157. "array([0.92441907, 0.11389387, 0.0347395 ])\n"
  13158. "\n"
  13159. "Plot the function from 0 to 10.\n"
  13160. "\n"
  13161. ">>> import matplotlib.pyplot as plt\n"
  13162. ">>> fig, ax = plt.subplots()\n"
  13163. ">>> x = np.linspace(0., 10., 1000)\n"
  13164. ">>> y = k0(x)\n"
  13165. ">>> ax.plot(x, y)\n"
  13166. ">>> plt.show()")
  13167. ufunc_k0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13168. ufunc_k0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13169. ufunc_k0_types[0] = <char>NPY_FLOAT
  13170. ufunc_k0_types[1] = <char>NPY_FLOAT
  13171. ufunc_k0_types[2] = <char>NPY_DOUBLE
  13172. ufunc_k0_types[3] = <char>NPY_DOUBLE
  13173. ufunc_k0_ptr[2*0] = <void*>_func_k0
  13174. ufunc_k0_ptr[2*0+1] = <void*>(<char*>"k0")
  13175. ufunc_k0_ptr[2*1] = <void*>_func_k0
  13176. ufunc_k0_ptr[2*1+1] = <void*>(<char*>"k0")
  13177. ufunc_k0_data[0] = &ufunc_k0_ptr[2*0]
  13178. ufunc_k0_data[1] = &ufunc_k0_ptr[2*1]
  13179. k0 = np.PyUFunc_FromFuncAndData(ufunc_k0_loops, ufunc_k0_data, ufunc_k0_types, 2, 1, 1, 0, "k0", ufunc_k0_doc, 0)
  13180. cdef np.PyUFuncGenericFunction ufunc_k0e_loops[2]
  13181. cdef void *ufunc_k0e_ptr[4]
  13182. cdef void *ufunc_k0e_data[2]
  13183. cdef char ufunc_k0e_types[4]
  13184. cdef char *ufunc_k0e_doc = (
  13185. "k0e(x, out=None)\n"
  13186. "\n"
  13187. "Exponentially scaled modified Bessel function K of order 0\n"
  13188. "\n"
  13189. "Defined as::\n"
  13190. "\n"
  13191. " k0e(x) = exp(x) * k0(x).\n"
  13192. "\n"
  13193. "Parameters\n"
  13194. "----------\n"
  13195. "x : array_like\n"
  13196. " Argument (float)\n"
  13197. "out : ndarray, optional\n"
  13198. " Optional output array for the function values\n"
  13199. "\n"
  13200. "Returns\n"
  13201. "-------\n"
  13202. "K : scalar or ndarray\n"
  13203. " Value of the exponentially scaled modified Bessel function K of order\n"
  13204. " 0 at `x`.\n"
  13205. "\n"
  13206. "Notes\n"
  13207. "-----\n"
  13208. "The range is partitioned into the two intervals [0, 2] and (2, infinity).\n"
  13209. "Chebyshev polynomial expansions are employed in each interval.\n"
  13210. "\n"
  13211. "This function is a wrapper for the Cephes [1]_ routine `k0e`.\n"
  13212. "\n"
  13213. "See also\n"
  13214. "--------\n"
  13215. "kv: Modified Bessel function of the second kind of any order\n"
  13216. "k0: Modified Bessel function of the second kind\n"
  13217. "\n"
  13218. "References\n"
  13219. "----------\n"
  13220. ".. [1] Cephes Mathematical Functions Library,\n"
  13221. " http://www.netlib.org/cephes/\n"
  13222. "\n"
  13223. "Examples\n"
  13224. "--------\n"
  13225. "Calculate the function at one point:\n"
  13226. "\n"
  13227. ">>> from scipy.special import k0e\n"
  13228. ">>> k0e(1.)\n"
  13229. "1.1444630798068947\n"
  13230. "\n"
  13231. "Calculate the function at several points:\n"
  13232. "\n"
  13233. ">>> import numpy as np\n"
  13234. ">>> k0e(np.array([0.5, 2., 3.]))\n"
  13235. "array([1.52410939, 0.84156822, 0.6977616 ])\n"
  13236. "\n"
  13237. "Plot the function from 0 to 10.\n"
  13238. "\n"
  13239. ">>> import matplotlib.pyplot as plt\n"
  13240. ">>> fig, ax = plt.subplots()\n"
  13241. ">>> x = np.linspace(0., 10., 1000)\n"
  13242. ">>> y = k0e(x)\n"
  13243. ">>> ax.plot(x, y)\n"
  13244. ">>> plt.show()\n"
  13245. "\n"
  13246. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  13247. "which the unscaled Bessel functions are not precise enough.\n"
  13248. "\n"
  13249. ">>> from scipy.special import k0\n"
  13250. ">>> k0(1000.)\n"
  13251. "0.\n"
  13252. "\n"
  13253. "While `k0` returns zero, `k0e` still returns a finite number:\n"
  13254. "\n"
  13255. ">>> k0e(1000.)\n"
  13256. "0.03962832160075422")
  13257. ufunc_k0e_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13258. ufunc_k0e_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13259. ufunc_k0e_types[0] = <char>NPY_FLOAT
  13260. ufunc_k0e_types[1] = <char>NPY_FLOAT
  13261. ufunc_k0e_types[2] = <char>NPY_DOUBLE
  13262. ufunc_k0e_types[3] = <char>NPY_DOUBLE
  13263. ufunc_k0e_ptr[2*0] = <void*>_func_k0e
  13264. ufunc_k0e_ptr[2*0+1] = <void*>(<char*>"k0e")
  13265. ufunc_k0e_ptr[2*1] = <void*>_func_k0e
  13266. ufunc_k0e_ptr[2*1+1] = <void*>(<char*>"k0e")
  13267. ufunc_k0e_data[0] = &ufunc_k0e_ptr[2*0]
  13268. ufunc_k0e_data[1] = &ufunc_k0e_ptr[2*1]
  13269. k0e = np.PyUFunc_FromFuncAndData(ufunc_k0e_loops, ufunc_k0e_data, ufunc_k0e_types, 2, 1, 1, 0, "k0e", ufunc_k0e_doc, 0)
  13270. cdef np.PyUFuncGenericFunction ufunc_k1_loops[2]
  13271. cdef void *ufunc_k1_ptr[4]
  13272. cdef void *ufunc_k1_data[2]
  13273. cdef char ufunc_k1_types[4]
  13274. cdef char *ufunc_k1_doc = (
  13275. "k1(x, out=None)\n"
  13276. "\n"
  13277. "Modified Bessel function of the second kind of order 1, :math:`K_1(x)`.\n"
  13278. "\n"
  13279. "Parameters\n"
  13280. "----------\n"
  13281. "x : array_like\n"
  13282. " Argument (float)\n"
  13283. "out : ndarray, optional\n"
  13284. " Optional output array for the function values\n"
  13285. "\n"
  13286. "Returns\n"
  13287. "-------\n"
  13288. "K : scalar or ndarray\n"
  13289. " Value of the modified Bessel function K of order 1 at `x`.\n"
  13290. "\n"
  13291. "Notes\n"
  13292. "-----\n"
  13293. "The range is partitioned into the two intervals [0, 2] and (2, infinity).\n"
  13294. "Chebyshev polynomial expansions are employed in each interval.\n"
  13295. "\n"
  13296. "This function is a wrapper for the Cephes [1]_ routine `k1`.\n"
  13297. "\n"
  13298. "See also\n"
  13299. "--------\n"
  13300. "kv: Modified Bessel function of the second kind of any order\n"
  13301. "k1e: Exponentially scaled modified Bessel function K of order 1\n"
  13302. "\n"
  13303. "References\n"
  13304. "----------\n"
  13305. ".. [1] Cephes Mathematical Functions Library,\n"
  13306. " http://www.netlib.org/cephes/\n"
  13307. "\n"
  13308. "Examples\n"
  13309. "--------\n"
  13310. "Calculate the function at one point:\n"
  13311. "\n"
  13312. ">>> from scipy.special import k1\n"
  13313. ">>> k1(1.)\n"
  13314. "0.6019072301972346\n"
  13315. "\n"
  13316. "Calculate the function at several points:\n"
  13317. "\n"
  13318. ">>> import numpy as np\n"
  13319. ">>> k1(np.array([0.5, 2., 3.]))\n"
  13320. "array([1.65644112, 0.13986588, 0.04015643])\n"
  13321. "\n"
  13322. "Plot the function from 0 to 10.\n"
  13323. "\n"
  13324. ">>> import matplotlib.pyplot as plt\n"
  13325. ">>> fig, ax = plt.subplots()\n"
  13326. ">>> x = np.linspace(0., 10., 1000)\n"
  13327. ">>> y = k1(x)\n"
  13328. ">>> ax.plot(x, y)\n"
  13329. ">>> plt.show()")
  13330. ufunc_k1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13331. ufunc_k1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13332. ufunc_k1_types[0] = <char>NPY_FLOAT
  13333. ufunc_k1_types[1] = <char>NPY_FLOAT
  13334. ufunc_k1_types[2] = <char>NPY_DOUBLE
  13335. ufunc_k1_types[3] = <char>NPY_DOUBLE
  13336. ufunc_k1_ptr[2*0] = <void*>_func_k1
  13337. ufunc_k1_ptr[2*0+1] = <void*>(<char*>"k1")
  13338. ufunc_k1_ptr[2*1] = <void*>_func_k1
  13339. ufunc_k1_ptr[2*1+1] = <void*>(<char*>"k1")
  13340. ufunc_k1_data[0] = &ufunc_k1_ptr[2*0]
  13341. ufunc_k1_data[1] = &ufunc_k1_ptr[2*1]
  13342. k1 = np.PyUFunc_FromFuncAndData(ufunc_k1_loops, ufunc_k1_data, ufunc_k1_types, 2, 1, 1, 0, "k1", ufunc_k1_doc, 0)
  13343. cdef np.PyUFuncGenericFunction ufunc_k1e_loops[2]
  13344. cdef void *ufunc_k1e_ptr[4]
  13345. cdef void *ufunc_k1e_data[2]
  13346. cdef char ufunc_k1e_types[4]
  13347. cdef char *ufunc_k1e_doc = (
  13348. "k1e(x, out=None)\n"
  13349. "\n"
  13350. "Exponentially scaled modified Bessel function K of order 1\n"
  13351. "\n"
  13352. "Defined as::\n"
  13353. "\n"
  13354. " k1e(x) = exp(x) * k1(x)\n"
  13355. "\n"
  13356. "Parameters\n"
  13357. "----------\n"
  13358. "x : array_like\n"
  13359. " Argument (float)\n"
  13360. "out : ndarray, optional\n"
  13361. " Optional output array for the function values\n"
  13362. "\n"
  13363. "Returns\n"
  13364. "-------\n"
  13365. "K : scalar or ndarray\n"
  13366. " Value of the exponentially scaled modified Bessel function K of order\n"
  13367. " 1 at `x`.\n"
  13368. "\n"
  13369. "Notes\n"
  13370. "-----\n"
  13371. "The range is partitioned into the two intervals [0, 2] and (2, infinity).\n"
  13372. "Chebyshev polynomial expansions are employed in each interval.\n"
  13373. "\n"
  13374. "This function is a wrapper for the Cephes [1]_ routine `k1e`.\n"
  13375. "\n"
  13376. "See also\n"
  13377. "--------\n"
  13378. "kv: Modified Bessel function of the second kind of any order\n"
  13379. "k1: Modified Bessel function of the second kind of order 1\n"
  13380. "\n"
  13381. "References\n"
  13382. "----------\n"
  13383. ".. [1] Cephes Mathematical Functions Library,\n"
  13384. " http://www.netlib.org/cephes/\n"
  13385. "\n"
  13386. "Examples\n"
  13387. "--------\n"
  13388. "Calculate the function at one point:\n"
  13389. "\n"
  13390. ">>> from scipy.special import k1e\n"
  13391. ">>> k1e(1.)\n"
  13392. "1.636153486263258\n"
  13393. "\n"
  13394. "Calculate the function at several points:\n"
  13395. "\n"
  13396. ">>> import numpy as np\n"
  13397. ">>> k1e(np.array([0.5, 2., 3.]))\n"
  13398. "array([2.73100971, 1.03347685, 0.80656348])\n"
  13399. "\n"
  13400. "Plot the function from 0 to 10.\n"
  13401. "\n"
  13402. ">>> import matplotlib.pyplot as plt\n"
  13403. ">>> fig, ax = plt.subplots()\n"
  13404. ">>> x = np.linspace(0., 10., 1000)\n"
  13405. ">>> y = k1e(x)\n"
  13406. ">>> ax.plot(x, y)\n"
  13407. ">>> plt.show()\n"
  13408. "\n"
  13409. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  13410. "which the unscaled Bessel functions are not precise enough. In the\n"
  13411. "following example `k1` returns zero whereas `k1e` still returns a\n"
  13412. "useful floating point number.\n"
  13413. "\n"
  13414. ">>> from scipy.special import k1\n"
  13415. ">>> k1(1000.), k1e(1000.)\n"
  13416. "(0., 0.03964813081296021)")
  13417. ufunc_k1e_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13418. ufunc_k1e_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13419. ufunc_k1e_types[0] = <char>NPY_FLOAT
  13420. ufunc_k1e_types[1] = <char>NPY_FLOAT
  13421. ufunc_k1e_types[2] = <char>NPY_DOUBLE
  13422. ufunc_k1e_types[3] = <char>NPY_DOUBLE
  13423. ufunc_k1e_ptr[2*0] = <void*>_func_k1e
  13424. ufunc_k1e_ptr[2*0+1] = <void*>(<char*>"k1e")
  13425. ufunc_k1e_ptr[2*1] = <void*>_func_k1e
  13426. ufunc_k1e_ptr[2*1+1] = <void*>(<char*>"k1e")
  13427. ufunc_k1e_data[0] = &ufunc_k1e_ptr[2*0]
  13428. ufunc_k1e_data[1] = &ufunc_k1e_ptr[2*1]
  13429. k1e = np.PyUFunc_FromFuncAndData(ufunc_k1e_loops, ufunc_k1e_data, ufunc_k1e_types, 2, 1, 1, 0, "k1e", ufunc_k1e_doc, 0)
  13430. cdef np.PyUFuncGenericFunction ufunc_kei_loops[2]
  13431. cdef void *ufunc_kei_ptr[4]
  13432. cdef void *ufunc_kei_data[2]
  13433. cdef char ufunc_kei_types[4]
  13434. cdef char *ufunc_kei_doc = (
  13435. "kei(x, out=None)\n"
  13436. "\n"
  13437. "Kelvin function kei.\n"
  13438. "\n"
  13439. "Defined as\n"
  13440. "\n"
  13441. ".. math::\n"
  13442. "\n"
  13443. " \\mathrm{kei}(x) = \\Im[K_0(x e^{\\pi i / 4})]\n"
  13444. "\n"
  13445. "where :math:`K_0` is the modified Bessel function of the second\n"
  13446. "kind (see `kv`). See [dlmf]_ for more details.\n"
  13447. "\n"
  13448. "Parameters\n"
  13449. "----------\n"
  13450. "x : array_like\n"
  13451. " Real argument.\n"
  13452. "out : ndarray, optional\n"
  13453. " Optional output array for the function results.\n"
  13454. "\n"
  13455. "Returns\n"
  13456. "-------\n"
  13457. "scalar or ndarray\n"
  13458. " Values of the Kelvin function.\n"
  13459. "\n"
  13460. "See Also\n"
  13461. "--------\n"
  13462. "ker : the corresponding real part\n"
  13463. "keip : the derivative of kei\n"
  13464. "kv : modified Bessel function of the second kind\n"
  13465. "\n"
  13466. "References\n"
  13467. "----------\n"
  13468. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  13469. " https://dlmf.nist.gov/10.61\n"
  13470. "\n"
  13471. "Examples\n"
  13472. "--------\n"
  13473. "It can be expressed using the modified Bessel function of the\n"
  13474. "second kind.\n"
  13475. "\n"
  13476. ">>> import numpy as np\n"
  13477. ">>> import scipy.special as sc\n"
  13478. ">>> x = np.array([1.0, 2.0, 3.0, 4.0])\n"
  13479. ">>> sc.kv(0, x * np.exp(np.pi * 1j / 4)).imag\n"
  13480. "array([-0.49499464, -0.20240007, -0.05112188, 0.0021984 ])\n"
  13481. ">>> sc.kei(x)\n"
  13482. "array([-0.49499464, -0.20240007, -0.05112188, 0.0021984 ])")
  13483. ufunc_kei_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13484. ufunc_kei_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13485. ufunc_kei_types[0] = <char>NPY_FLOAT
  13486. ufunc_kei_types[1] = <char>NPY_FLOAT
  13487. ufunc_kei_types[2] = <char>NPY_DOUBLE
  13488. ufunc_kei_types[3] = <char>NPY_DOUBLE
  13489. ufunc_kei_ptr[2*0] = <void*>_func_kei_wrap
  13490. ufunc_kei_ptr[2*0+1] = <void*>(<char*>"kei")
  13491. ufunc_kei_ptr[2*1] = <void*>_func_kei_wrap
  13492. ufunc_kei_ptr[2*1+1] = <void*>(<char*>"kei")
  13493. ufunc_kei_data[0] = &ufunc_kei_ptr[2*0]
  13494. ufunc_kei_data[1] = &ufunc_kei_ptr[2*1]
  13495. kei = np.PyUFunc_FromFuncAndData(ufunc_kei_loops, ufunc_kei_data, ufunc_kei_types, 2, 1, 1, 0, "kei", ufunc_kei_doc, 0)
  13496. cdef np.PyUFuncGenericFunction ufunc_keip_loops[2]
  13497. cdef void *ufunc_keip_ptr[4]
  13498. cdef void *ufunc_keip_data[2]
  13499. cdef char ufunc_keip_types[4]
  13500. cdef char *ufunc_keip_doc = (
  13501. "keip(x, out=None)\n"
  13502. "\n"
  13503. "Derivative of the Kelvin function kei.\n"
  13504. "\n"
  13505. "Parameters\n"
  13506. "----------\n"
  13507. "x : array_like\n"
  13508. " Real argument.\n"
  13509. "out : ndarray, optional\n"
  13510. " Optional output array for the function results.\n"
  13511. "\n"
  13512. "Returns\n"
  13513. "-------\n"
  13514. "scalar or ndarray\n"
  13515. " The values of the derivative of kei.\n"
  13516. "\n"
  13517. "See Also\n"
  13518. "--------\n"
  13519. "kei\n"
  13520. "\n"
  13521. "References\n"
  13522. "----------\n"
  13523. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  13524. " https://dlmf.nist.gov/10#PT5")
  13525. ufunc_keip_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13526. ufunc_keip_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13527. ufunc_keip_types[0] = <char>NPY_FLOAT
  13528. ufunc_keip_types[1] = <char>NPY_FLOAT
  13529. ufunc_keip_types[2] = <char>NPY_DOUBLE
  13530. ufunc_keip_types[3] = <char>NPY_DOUBLE
  13531. ufunc_keip_ptr[2*0] = <void*>_func_keip_wrap
  13532. ufunc_keip_ptr[2*0+1] = <void*>(<char*>"keip")
  13533. ufunc_keip_ptr[2*1] = <void*>_func_keip_wrap
  13534. ufunc_keip_ptr[2*1+1] = <void*>(<char*>"keip")
  13535. ufunc_keip_data[0] = &ufunc_keip_ptr[2*0]
  13536. ufunc_keip_data[1] = &ufunc_keip_ptr[2*1]
  13537. keip = np.PyUFunc_FromFuncAndData(ufunc_keip_loops, ufunc_keip_data, ufunc_keip_types, 2, 1, 1, 0, "keip", ufunc_keip_doc, 0)
  13538. cdef np.PyUFuncGenericFunction ufunc_kelvin_loops[2]
  13539. cdef void *ufunc_kelvin_ptr[4]
  13540. cdef void *ufunc_kelvin_data[2]
  13541. cdef char ufunc_kelvin_types[10]
  13542. cdef char *ufunc_kelvin_doc = (
  13543. "kelvin(x, out=None)\n"
  13544. "\n"
  13545. "Kelvin functions as complex numbers\n"
  13546. "\n"
  13547. "Parameters\n"
  13548. "----------\n"
  13549. "x : array_like\n"
  13550. " Argument\n"
  13551. "out : tuple of ndarray, optional\n"
  13552. " Optional output arrays for the function values\n"
  13553. "\n"
  13554. "Returns\n"
  13555. "-------\n"
  13556. "Be, Ke, Bep, Kep : 4-tuple of scalar or ndarray\n"
  13557. " The tuple (Be, Ke, Bep, Kep) contains complex numbers\n"
  13558. " representing the real and imaginary Kelvin functions and their\n"
  13559. " derivatives evaluated at `x`. For example, kelvin(x)[0].real =\n"
  13560. " ber x and kelvin(x)[0].imag = bei x with similar relationships\n"
  13561. " for ker and kei.")
  13562. ufunc_kelvin_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_DDDD_As_f_FFFF
  13563. ufunc_kelvin_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_DDDD_As_d_DDDD
  13564. ufunc_kelvin_types[0] = <char>NPY_FLOAT
  13565. ufunc_kelvin_types[1] = <char>NPY_CFLOAT
  13566. ufunc_kelvin_types[2] = <char>NPY_CFLOAT
  13567. ufunc_kelvin_types[3] = <char>NPY_CFLOAT
  13568. ufunc_kelvin_types[4] = <char>NPY_CFLOAT
  13569. ufunc_kelvin_types[5] = <char>NPY_DOUBLE
  13570. ufunc_kelvin_types[6] = <char>NPY_CDOUBLE
  13571. ufunc_kelvin_types[7] = <char>NPY_CDOUBLE
  13572. ufunc_kelvin_types[8] = <char>NPY_CDOUBLE
  13573. ufunc_kelvin_types[9] = <char>NPY_CDOUBLE
  13574. ufunc_kelvin_ptr[2*0] = <void*>_func_kelvin_wrap
  13575. ufunc_kelvin_ptr[2*0+1] = <void*>(<char*>"kelvin")
  13576. ufunc_kelvin_ptr[2*1] = <void*>_func_kelvin_wrap
  13577. ufunc_kelvin_ptr[2*1+1] = <void*>(<char*>"kelvin")
  13578. ufunc_kelvin_data[0] = &ufunc_kelvin_ptr[2*0]
  13579. ufunc_kelvin_data[1] = &ufunc_kelvin_ptr[2*1]
  13580. kelvin = np.PyUFunc_FromFuncAndData(ufunc_kelvin_loops, ufunc_kelvin_data, ufunc_kelvin_types, 2, 1, 4, 0, "kelvin", ufunc_kelvin_doc, 0)
  13581. cdef np.PyUFuncGenericFunction ufunc_ker_loops[2]
  13582. cdef void *ufunc_ker_ptr[4]
  13583. cdef void *ufunc_ker_data[2]
  13584. cdef char ufunc_ker_types[4]
  13585. cdef char *ufunc_ker_doc = (
  13586. "ker(x, out=None)\n"
  13587. "\n"
  13588. "Kelvin function ker.\n"
  13589. "\n"
  13590. "Defined as\n"
  13591. "\n"
  13592. ".. math::\n"
  13593. "\n"
  13594. " \\mathrm{ker}(x) = \\Re[K_0(x e^{\\pi i / 4})]\n"
  13595. "\n"
  13596. "Where :math:`K_0` is the modified Bessel function of the second\n"
  13597. "kind (see `kv`). See [dlmf]_ for more details.\n"
  13598. "\n"
  13599. "Parameters\n"
  13600. "----------\n"
  13601. "x : array_like\n"
  13602. " Real argument.\n"
  13603. "out : ndarray, optional\n"
  13604. " Optional output array for the function results.\n"
  13605. "\n"
  13606. "Returns\n"
  13607. "-------\n"
  13608. "scalar or ndarray\n"
  13609. " Values of the Kelvin function.\n"
  13610. "\n"
  13611. "See Also\n"
  13612. "--------\n"
  13613. "kei : the corresponding imaginary part\n"
  13614. "kerp : the derivative of ker\n"
  13615. "kv : modified Bessel function of the second kind\n"
  13616. "\n"
  13617. "References\n"
  13618. "----------\n"
  13619. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  13620. " https://dlmf.nist.gov/10.61\n"
  13621. "\n"
  13622. "Examples\n"
  13623. "--------\n"
  13624. "It can be expressed using the modified Bessel function of the\n"
  13625. "second kind.\n"
  13626. "\n"
  13627. ">>> import numpy as np\n"
  13628. ">>> import scipy.special as sc\n"
  13629. ">>> x = np.array([1.0, 2.0, 3.0, 4.0])\n"
  13630. ">>> sc.kv(0, x * np.exp(np.pi * 1j / 4)).real\n"
  13631. "array([ 0.28670621, -0.04166451, -0.06702923, -0.03617885])\n"
  13632. ">>> sc.ker(x)\n"
  13633. "array([ 0.28670621, -0.04166451, -0.06702923, -0.03617885])")
  13634. ufunc_ker_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13635. ufunc_ker_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13636. ufunc_ker_types[0] = <char>NPY_FLOAT
  13637. ufunc_ker_types[1] = <char>NPY_FLOAT
  13638. ufunc_ker_types[2] = <char>NPY_DOUBLE
  13639. ufunc_ker_types[3] = <char>NPY_DOUBLE
  13640. ufunc_ker_ptr[2*0] = <void*>_func_ker_wrap
  13641. ufunc_ker_ptr[2*0+1] = <void*>(<char*>"ker")
  13642. ufunc_ker_ptr[2*1] = <void*>_func_ker_wrap
  13643. ufunc_ker_ptr[2*1+1] = <void*>(<char*>"ker")
  13644. ufunc_ker_data[0] = &ufunc_ker_ptr[2*0]
  13645. ufunc_ker_data[1] = &ufunc_ker_ptr[2*1]
  13646. ker = np.PyUFunc_FromFuncAndData(ufunc_ker_loops, ufunc_ker_data, ufunc_ker_types, 2, 1, 1, 0, "ker", ufunc_ker_doc, 0)
  13647. cdef np.PyUFuncGenericFunction ufunc_kerp_loops[2]
  13648. cdef void *ufunc_kerp_ptr[4]
  13649. cdef void *ufunc_kerp_data[2]
  13650. cdef char ufunc_kerp_types[4]
  13651. cdef char *ufunc_kerp_doc = (
  13652. "kerp(x, out=None)\n"
  13653. "\n"
  13654. "Derivative of the Kelvin function ker.\n"
  13655. "\n"
  13656. "Parameters\n"
  13657. "----------\n"
  13658. "x : array_like\n"
  13659. " Real argument.\n"
  13660. "out : ndarray, optional\n"
  13661. " Optional output array for the function results.\n"
  13662. "\n"
  13663. "Returns\n"
  13664. "-------\n"
  13665. "scalar or ndarray\n"
  13666. " Values of the derivative of ker.\n"
  13667. "\n"
  13668. "See Also\n"
  13669. "--------\n"
  13670. "ker\n"
  13671. "\n"
  13672. "References\n"
  13673. "----------\n"
  13674. ".. [dlmf] NIST, Digital Library of Mathematical Functions,\n"
  13675. " https://dlmf.nist.gov/10#PT5")
  13676. ufunc_kerp_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13677. ufunc_kerp_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13678. ufunc_kerp_types[0] = <char>NPY_FLOAT
  13679. ufunc_kerp_types[1] = <char>NPY_FLOAT
  13680. ufunc_kerp_types[2] = <char>NPY_DOUBLE
  13681. ufunc_kerp_types[3] = <char>NPY_DOUBLE
  13682. ufunc_kerp_ptr[2*0] = <void*>_func_kerp_wrap
  13683. ufunc_kerp_ptr[2*0+1] = <void*>(<char*>"kerp")
  13684. ufunc_kerp_ptr[2*1] = <void*>_func_kerp_wrap
  13685. ufunc_kerp_ptr[2*1+1] = <void*>(<char*>"kerp")
  13686. ufunc_kerp_data[0] = &ufunc_kerp_ptr[2*0]
  13687. ufunc_kerp_data[1] = &ufunc_kerp_ptr[2*1]
  13688. kerp = np.PyUFunc_FromFuncAndData(ufunc_kerp_loops, ufunc_kerp_data, ufunc_kerp_types, 2, 1, 1, 0, "kerp", ufunc_kerp_doc, 0)
  13689. cdef np.PyUFuncGenericFunction ufunc_kl_div_loops[2]
  13690. cdef void *ufunc_kl_div_ptr[4]
  13691. cdef void *ufunc_kl_div_data[2]
  13692. cdef char ufunc_kl_div_types[6]
  13693. cdef char *ufunc_kl_div_doc = (
  13694. "kl_div(x, y, out=None)\n"
  13695. "\n"
  13696. "Elementwise function for computing Kullback-Leibler divergence.\n"
  13697. "\n"
  13698. ".. math::\n"
  13699. "\n"
  13700. " \\mathrm{kl\\_div}(x, y) =\n"
  13701. " \\begin{cases}\n"
  13702. " x \\log(x / y) - x + y & x > 0, y > 0 \\\\\n"
  13703. " y & x = 0, y \\ge 0 \\\\\n"
  13704. " \\infty & \\text{otherwise}\n"
  13705. " \\end{cases}\n"
  13706. "\n"
  13707. "Parameters\n"
  13708. "----------\n"
  13709. "x, y : array_like\n"
  13710. " Real arguments\n"
  13711. "out : ndarray, optional\n"
  13712. " Optional output array for the function results\n"
  13713. "\n"
  13714. "Returns\n"
  13715. "-------\n"
  13716. "scalar or ndarray\n"
  13717. " Values of the Kullback-Liebler divergence.\n"
  13718. "\n"
  13719. "See Also\n"
  13720. "--------\n"
  13721. "entr, rel_entr, scipy.stats.entropy\n"
  13722. "\n"
  13723. "Notes\n"
  13724. "-----\n"
  13725. ".. versionadded:: 0.15.0\n"
  13726. "\n"
  13727. "This function is non-negative and is jointly convex in `x` and `y`.\n"
  13728. "\n"
  13729. "The origin of this function is in convex programming; see [1]_ for\n"
  13730. "details. This is why the function contains the extra :math:`-x\n"
  13731. "+ y` terms over what might be expected from the Kullback-Leibler\n"
  13732. "divergence. For a version of the function without the extra terms,\n"
  13733. "see `rel_entr`.\n"
  13734. "\n"
  13735. "References\n"
  13736. "----------\n"
  13737. ".. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.\n"
  13738. " Cambridge University Press, 2004.\n"
  13739. " :doi:`https://doi.org/10.1017/CBO9780511804441`")
  13740. ufunc_kl_div_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  13741. ufunc_kl_div_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  13742. ufunc_kl_div_types[0] = <char>NPY_FLOAT
  13743. ufunc_kl_div_types[1] = <char>NPY_FLOAT
  13744. ufunc_kl_div_types[2] = <char>NPY_FLOAT
  13745. ufunc_kl_div_types[3] = <char>NPY_DOUBLE
  13746. ufunc_kl_div_types[4] = <char>NPY_DOUBLE
  13747. ufunc_kl_div_types[5] = <char>NPY_DOUBLE
  13748. ufunc_kl_div_ptr[2*0] = <void*>_func_kl_div
  13749. ufunc_kl_div_ptr[2*0+1] = <void*>(<char*>"kl_div")
  13750. ufunc_kl_div_ptr[2*1] = <void*>_func_kl_div
  13751. ufunc_kl_div_ptr[2*1+1] = <void*>(<char*>"kl_div")
  13752. ufunc_kl_div_data[0] = &ufunc_kl_div_ptr[2*0]
  13753. ufunc_kl_div_data[1] = &ufunc_kl_div_ptr[2*1]
  13754. kl_div = np.PyUFunc_FromFuncAndData(ufunc_kl_div_loops, ufunc_kl_div_data, ufunc_kl_div_types, 2, 2, 1, 0, "kl_div", ufunc_kl_div_doc, 0)
  13755. cdef np.PyUFuncGenericFunction ufunc_kn_loops[3]
  13756. cdef void *ufunc_kn_ptr[6]
  13757. cdef void *ufunc_kn_data[3]
  13758. cdef char ufunc_kn_types[9]
  13759. cdef char *ufunc_kn_doc = (
  13760. "kn(n, x, out=None)\n"
  13761. "\n"
  13762. "Modified Bessel function of the second kind of integer order `n`\n"
  13763. "\n"
  13764. "Returns the modified Bessel function of the second kind for integer order\n"
  13765. "`n` at real `z`.\n"
  13766. "\n"
  13767. "These are also sometimes called functions of the third kind, Basset\n"
  13768. "functions, or Macdonald functions.\n"
  13769. "\n"
  13770. "Parameters\n"
  13771. "----------\n"
  13772. "n : array_like of int\n"
  13773. " Order of Bessel functions (floats will truncate with a warning)\n"
  13774. "x : array_like of float\n"
  13775. " Argument at which to evaluate the Bessel functions\n"
  13776. "out : ndarray, optional\n"
  13777. " Optional output array for the function results.\n"
  13778. "\n"
  13779. "Returns\n"
  13780. "-------\n"
  13781. "scalar or ndarray\n"
  13782. " Value of the Modified Bessel function of the second kind,\n"
  13783. " :math:`K_n(x)`.\n"
  13784. "\n"
  13785. "Notes\n"
  13786. "-----\n"
  13787. "Wrapper for AMOS [1]_ routine `zbesk`. For a discussion of the\n"
  13788. "algorithm used, see [2]_ and the references therein.\n"
  13789. "\n"
  13790. "See Also\n"
  13791. "--------\n"
  13792. "kv : Same function, but accepts real order and complex argument\n"
  13793. "kvp : Derivative of this function\n"
  13794. "\n"
  13795. "References\n"
  13796. "----------\n"
  13797. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  13798. " of a Complex Argument and Nonnegative Order\",\n"
  13799. " http://netlib.org/amos/\n"
  13800. ".. [2] Donald E. Amos, \"Algorithm 644: A portable package for Bessel\n"
  13801. " functions of a complex argument and nonnegative order\", ACM\n"
  13802. " TOMS Vol. 12 Issue 3, Sept. 1986, p. 265\n"
  13803. "\n"
  13804. "Examples\n"
  13805. "--------\n"
  13806. "Plot the function of several orders for real input:\n"
  13807. "\n"
  13808. ">>> import numpy as np\n"
  13809. ">>> from scipy.special import kn\n"
  13810. ">>> import matplotlib.pyplot as plt\n"
  13811. ">>> x = np.linspace(0, 5, 1000)\n"
  13812. ">>> for N in range(6):\n"
  13813. "... plt.plot(x, kn(N, x), label='$K_{}(x)$'.format(N))\n"
  13814. ">>> plt.ylim(0, 10)\n"
  13815. ">>> plt.legend()\n"
  13816. ">>> plt.title(r'Modified Bessel function of the second kind $K_n(x)$')\n"
  13817. ">>> plt.show()\n"
  13818. "\n"
  13819. "Calculate for a single value at multiple orders:\n"
  13820. "\n"
  13821. ">>> kn([4, 5, 6], 1)\n"
  13822. "array([ 44.23241585, 360.9605896 , 3653.83831186])")
  13823. ufunc_kn_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  13824. ufunc_kn_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  13825. ufunc_kn_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  13826. ufunc_kn_types[0] = <char>NPY_LONG
  13827. ufunc_kn_types[1] = <char>NPY_DOUBLE
  13828. ufunc_kn_types[2] = <char>NPY_DOUBLE
  13829. ufunc_kn_types[3] = <char>NPY_FLOAT
  13830. ufunc_kn_types[4] = <char>NPY_FLOAT
  13831. ufunc_kn_types[5] = <char>NPY_FLOAT
  13832. ufunc_kn_types[6] = <char>NPY_DOUBLE
  13833. ufunc_kn_types[7] = <char>NPY_DOUBLE
  13834. ufunc_kn_types[8] = <char>NPY_DOUBLE
  13835. ufunc_kn_ptr[2*0] = <void*>_func_cbesk_wrap_real_int
  13836. ufunc_kn_ptr[2*0+1] = <void*>(<char*>"kn")
  13837. ufunc_kn_ptr[2*1] = <void*>_func_kn_unsafe
  13838. ufunc_kn_ptr[2*1+1] = <void*>(<char*>"kn")
  13839. ufunc_kn_ptr[2*2] = <void*>_func_kn_unsafe
  13840. ufunc_kn_ptr[2*2+1] = <void*>(<char*>"kn")
  13841. ufunc_kn_data[0] = &ufunc_kn_ptr[2*0]
  13842. ufunc_kn_data[1] = &ufunc_kn_ptr[2*1]
  13843. ufunc_kn_data[2] = &ufunc_kn_ptr[2*2]
  13844. kn = np.PyUFunc_FromFuncAndData(ufunc_kn_loops, ufunc_kn_data, ufunc_kn_types, 3, 2, 1, 0, "kn", ufunc_kn_doc, 0)
  13845. cdef np.PyUFuncGenericFunction ufunc_kolmogi_loops[2]
  13846. cdef void *ufunc_kolmogi_ptr[4]
  13847. cdef void *ufunc_kolmogi_data[2]
  13848. cdef char ufunc_kolmogi_types[4]
  13849. cdef char *ufunc_kolmogi_doc = (
  13850. "kolmogi(p, out=None)\n"
  13851. "\n"
  13852. "Inverse Survival Function of Kolmogorov distribution\n"
  13853. "\n"
  13854. "It is the inverse function to `kolmogorov`.\n"
  13855. "Returns y such that ``kolmogorov(y) == p``.\n"
  13856. "\n"
  13857. "Parameters\n"
  13858. "----------\n"
  13859. "p : float array_like\n"
  13860. " Probability\n"
  13861. "out : ndarray, optional\n"
  13862. " Optional output array for the function results\n"
  13863. "\n"
  13864. "Returns\n"
  13865. "-------\n"
  13866. "scalar or ndarray\n"
  13867. " The value(s) of kolmogi(p)\n"
  13868. "\n"
  13869. "Notes\n"
  13870. "-----\n"
  13871. "`kolmogorov` is used by `stats.kstest` in the application of the\n"
  13872. "Kolmogorov-Smirnov Goodness of Fit test. For historial reasons this\n"
  13873. "function is exposed in `scpy.special`, but the recommended way to achieve\n"
  13874. "the most accurate CDF/SF/PDF/PPF/ISF computations is to use the\n"
  13875. "`stats.kstwobign` distribution.\n"
  13876. "\n"
  13877. "See Also\n"
  13878. "--------\n"
  13879. "kolmogorov : The Survival Function for the distribution\n"
  13880. "scipy.stats.kstwobign : Provides the functionality as a continuous distribution\n"
  13881. "smirnov, smirnovi : Functions for the one-sided distribution\n"
  13882. "\n"
  13883. "Examples\n"
  13884. "--------\n"
  13885. ">>> from scipy.special import kolmogi\n"
  13886. ">>> kolmogi([0, 0.1, 0.25, 0.5, 0.75, 0.9, 1.0])\n"
  13887. "array([ inf, 1.22384787, 1.01918472, 0.82757356, 0.67644769,\n"
  13888. " 0.57117327, 0. ])")
  13889. ufunc_kolmogi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13890. ufunc_kolmogi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13891. ufunc_kolmogi_types[0] = <char>NPY_FLOAT
  13892. ufunc_kolmogi_types[1] = <char>NPY_FLOAT
  13893. ufunc_kolmogi_types[2] = <char>NPY_DOUBLE
  13894. ufunc_kolmogi_types[3] = <char>NPY_DOUBLE
  13895. ufunc_kolmogi_ptr[2*0] = <void*>_func_kolmogi
  13896. ufunc_kolmogi_ptr[2*0+1] = <void*>(<char*>"kolmogi")
  13897. ufunc_kolmogi_ptr[2*1] = <void*>_func_kolmogi
  13898. ufunc_kolmogi_ptr[2*1+1] = <void*>(<char*>"kolmogi")
  13899. ufunc_kolmogi_data[0] = &ufunc_kolmogi_ptr[2*0]
  13900. ufunc_kolmogi_data[1] = &ufunc_kolmogi_ptr[2*1]
  13901. kolmogi = np.PyUFunc_FromFuncAndData(ufunc_kolmogi_loops, ufunc_kolmogi_data, ufunc_kolmogi_types, 2, 1, 1, 0, "kolmogi", ufunc_kolmogi_doc, 0)
  13902. cdef np.PyUFuncGenericFunction ufunc_kolmogorov_loops[2]
  13903. cdef void *ufunc_kolmogorov_ptr[4]
  13904. cdef void *ufunc_kolmogorov_data[2]
  13905. cdef char ufunc_kolmogorov_types[4]
  13906. cdef char *ufunc_kolmogorov_doc = (
  13907. "kolmogorov(y, out=None)\n"
  13908. "\n"
  13909. "Complementary cumulative distribution (Survival Function) function of\n"
  13910. "Kolmogorov distribution.\n"
  13911. "\n"
  13912. "Returns the complementary cumulative distribution function of\n"
  13913. "Kolmogorov's limiting distribution (``D_n*\\sqrt(n)`` as n goes to infinity)\n"
  13914. "of a two-sided test for equality between an empirical and a theoretical\n"
  13915. "distribution. It is equal to the (limit as n->infinity of the)\n"
  13916. "probability that ``sqrt(n) * max absolute deviation > y``.\n"
  13917. "\n"
  13918. "Parameters\n"
  13919. "----------\n"
  13920. "y : float array_like\n"
  13921. " Absolute deviation between the Empirical CDF (ECDF) and the target CDF,\n"
  13922. " multiplied by sqrt(n).\n"
  13923. "out : ndarray, optional\n"
  13924. " Optional output array for the function results\n"
  13925. "\n"
  13926. "Returns\n"
  13927. "-------\n"
  13928. "scalar or ndarray\n"
  13929. " The value(s) of kolmogorov(y)\n"
  13930. "\n"
  13931. "Notes\n"
  13932. "-----\n"
  13933. "`kolmogorov` is used by `stats.kstest` in the application of the\n"
  13934. "Kolmogorov-Smirnov Goodness of Fit test. For historial reasons this\n"
  13935. "function is exposed in `scpy.special`, but the recommended way to achieve\n"
  13936. "the most accurate CDF/SF/PDF/PPF/ISF computations is to use the\n"
  13937. "`stats.kstwobign` distribution.\n"
  13938. "\n"
  13939. "See Also\n"
  13940. "--------\n"
  13941. "kolmogi : The Inverse Survival Function for the distribution\n"
  13942. "scipy.stats.kstwobign : Provides the functionality as a continuous distribution\n"
  13943. "smirnov, smirnovi : Functions for the one-sided distribution\n"
  13944. "\n"
  13945. "Examples\n"
  13946. "--------\n"
  13947. "Show the probability of a gap at least as big as 0, 0.5 and 1.0.\n"
  13948. "\n"
  13949. ">>> import numpy as np\n"
  13950. ">>> from scipy.special import kolmogorov\n"
  13951. ">>> from scipy.stats import kstwobign\n"
  13952. ">>> kolmogorov([0, 0.5, 1.0])\n"
  13953. "array([ 1. , 0.96394524, 0.26999967])\n"
  13954. "\n"
  13955. "Compare a sample of size 1000 drawn from a Laplace(0, 1) distribution against\n"
  13956. "the target distribution, a Normal(0, 1) distribution.\n"
  13957. "\n"
  13958. ">>> from scipy.stats import norm, laplace\n"
  13959. ">>> rng = np.random.default_rng()\n"
  13960. ">>> n = 1000\n"
  13961. ">>> lap01 = laplace(0, 1)\n"
  13962. ">>> x = np.sort(lap01.rvs(n, random_state=rng))\n"
  13963. ">>> np.mean(x), np.std(x)\n"
  13964. "(-0.05841730131499543, 1.3968109101997568)\n"
  13965. "\n"
  13966. "Construct the Empirical CDF and the K-S statistic Dn.\n"
  13967. "\n"
  13968. ">>> target = norm(0,1) # Normal mean 0, stddev 1\n"
  13969. ">>> cdfs = target.cdf(x)\n"
  13970. ">>> ecdfs = np.arange(n+1, dtype=float)/n\n"
  13971. ">>> gaps = np.column_stack([cdfs - ecdfs[:n], ecdfs[1:] - cdfs])\n"
  13972. ">>> Dn = np.max(gaps)\n"
  13973. ">>> Kn = np.sqrt(n) * Dn\n"
  13974. ">>> print('Dn=%f, sqrt(n)*Dn=%f' % (Dn, Kn))\n"
  13975. "Dn=0.043363, sqrt(n)*Dn=1.371265\n"
  13976. ">>> print(chr(10).join(['For a sample of size n drawn from a N(0, 1) distribution:',\n"
  13977. "... ' the approximate Kolmogorov probability that sqrt(n)*Dn>=%f is %f' % (Kn, kolmogorov(Kn)),\n"
  13978. "... ' the approximate Kolmogorov probability that sqrt(n)*Dn<=%f is %f' % (Kn, kstwobign.cdf(Kn))]))\n"
  13979. "For a sample of size n drawn from a N(0, 1) distribution:\n"
  13980. " the approximate Kolmogorov probability that sqrt(n)*Dn>=1.371265 is 0.046533\n"
  13981. " the approximate Kolmogorov probability that sqrt(n)*Dn<=1.371265 is 0.953467\n"
  13982. "\n"
  13983. "Plot the Empirical CDF against the target N(0, 1) CDF.\n"
  13984. "\n"
  13985. ">>> import matplotlib.pyplot as plt\n"
  13986. ">>> plt.step(np.concatenate([[-3], x]), ecdfs, where='post', label='Empirical CDF')\n"
  13987. ">>> x3 = np.linspace(-3, 3, 100)\n"
  13988. ">>> plt.plot(x3, target.cdf(x3), label='CDF for N(0, 1)')\n"
  13989. ">>> plt.ylim([0, 1]); plt.grid(True); plt.legend();\n"
  13990. ">>> # Add vertical lines marking Dn+ and Dn-\n"
  13991. ">>> iminus, iplus = np.argmax(gaps, axis=0)\n"
  13992. ">>> plt.vlines([x[iminus]], ecdfs[iminus], cdfs[iminus], color='r', linestyle='dashed', lw=4)\n"
  13993. ">>> plt.vlines([x[iplus]], cdfs[iplus], ecdfs[iplus+1], color='r', linestyle='dashed', lw=4)\n"
  13994. ">>> plt.show()")
  13995. ufunc_kolmogorov_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  13996. ufunc_kolmogorov_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  13997. ufunc_kolmogorov_types[0] = <char>NPY_FLOAT
  13998. ufunc_kolmogorov_types[1] = <char>NPY_FLOAT
  13999. ufunc_kolmogorov_types[2] = <char>NPY_DOUBLE
  14000. ufunc_kolmogorov_types[3] = <char>NPY_DOUBLE
  14001. ufunc_kolmogorov_ptr[2*0] = <void*>_func_kolmogorov
  14002. ufunc_kolmogorov_ptr[2*0+1] = <void*>(<char*>"kolmogorov")
  14003. ufunc_kolmogorov_ptr[2*1] = <void*>_func_kolmogorov
  14004. ufunc_kolmogorov_ptr[2*1+1] = <void*>(<char*>"kolmogorov")
  14005. ufunc_kolmogorov_data[0] = &ufunc_kolmogorov_ptr[2*0]
  14006. ufunc_kolmogorov_data[1] = &ufunc_kolmogorov_ptr[2*1]
  14007. kolmogorov = np.PyUFunc_FromFuncAndData(ufunc_kolmogorov_loops, ufunc_kolmogorov_data, ufunc_kolmogorov_types, 2, 1, 1, 0, "kolmogorov", ufunc_kolmogorov_doc, 0)
  14008. cdef np.PyUFuncGenericFunction ufunc_kv_loops[4]
  14009. cdef void *ufunc_kv_ptr[8]
  14010. cdef void *ufunc_kv_data[4]
  14011. cdef char ufunc_kv_types[12]
  14012. cdef char *ufunc_kv_doc = (
  14013. "kv(v, z, out=None)\n"
  14014. "\n"
  14015. "Modified Bessel function of the second kind of real order `v`\n"
  14016. "\n"
  14017. "Returns the modified Bessel function of the second kind for real order\n"
  14018. "`v` at complex `z`.\n"
  14019. "\n"
  14020. "These are also sometimes called functions of the third kind, Basset\n"
  14021. "functions, or Macdonald functions. They are defined as those solutions\n"
  14022. "of the modified Bessel equation for which,\n"
  14023. "\n"
  14024. ".. math::\n"
  14025. " K_v(x) \\sim \\sqrt{\\pi/(2x)} \\exp(-x)\n"
  14026. "\n"
  14027. "as :math:`x \\to \\infty` [3]_.\n"
  14028. "\n"
  14029. "Parameters\n"
  14030. "----------\n"
  14031. "v : array_like of float\n"
  14032. " Order of Bessel functions\n"
  14033. "z : array_like of complex\n"
  14034. " Argument at which to evaluate the Bessel functions\n"
  14035. "out : ndarray, optional\n"
  14036. " Optional output array for the function results\n"
  14037. "\n"
  14038. "Returns\n"
  14039. "-------\n"
  14040. "scalar or ndarray\n"
  14041. " The results. Note that input must be of complex type to get complex\n"
  14042. " output, e.g. ``kv(3, -2+0j)`` instead of ``kv(3, -2)``.\n"
  14043. "\n"
  14044. "Notes\n"
  14045. "-----\n"
  14046. "Wrapper for AMOS [1]_ routine `zbesk`. For a discussion of the\n"
  14047. "algorithm used, see [2]_ and the references therein.\n"
  14048. "\n"
  14049. "See Also\n"
  14050. "--------\n"
  14051. "kve : This function with leading exponential behavior stripped off.\n"
  14052. "kvp : Derivative of this function\n"
  14053. "\n"
  14054. "References\n"
  14055. "----------\n"
  14056. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  14057. " of a Complex Argument and Nonnegative Order\",\n"
  14058. " http://netlib.org/amos/\n"
  14059. ".. [2] Donald E. Amos, \"Algorithm 644: A portable package for Bessel\n"
  14060. " functions of a complex argument and nonnegative order\", ACM\n"
  14061. " TOMS Vol. 12 Issue 3, Sept. 1986, p. 265\n"
  14062. ".. [3] NIST Digital Library of Mathematical Functions,\n"
  14063. " Eq. 10.25.E3. https://dlmf.nist.gov/10.25.E3\n"
  14064. "\n"
  14065. "Examples\n"
  14066. "--------\n"
  14067. "Plot the function of several orders for real input:\n"
  14068. "\n"
  14069. ">>> import numpy as np\n"
  14070. ">>> from scipy.special import kv\n"
  14071. ">>> import matplotlib.pyplot as plt\n"
  14072. ">>> x = np.linspace(0, 5, 1000)\n"
  14073. ">>> for N in np.linspace(0, 6, 5):\n"
  14074. "... plt.plot(x, kv(N, x), label='$K_{{{}}}(x)$'.format(N))\n"
  14075. ">>> plt.ylim(0, 10)\n"
  14076. ">>> plt.legend()\n"
  14077. ">>> plt.title(r'Modified Bessel function of the second kind $K_\\nu(x)$')\n"
  14078. ">>> plt.show()\n"
  14079. "\n"
  14080. "Calculate for a single value at multiple orders:\n"
  14081. "\n"
  14082. ">>> kv([4, 4.5, 5], 1+2j)\n"
  14083. "array([ 0.1992+2.3892j, 2.3493+3.6j , 7.2827+3.8104j])")
  14084. ufunc_kv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  14085. ufunc_kv_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  14086. ufunc_kv_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  14087. ufunc_kv_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  14088. ufunc_kv_types[0] = <char>NPY_FLOAT
  14089. ufunc_kv_types[1] = <char>NPY_FLOAT
  14090. ufunc_kv_types[2] = <char>NPY_FLOAT
  14091. ufunc_kv_types[3] = <char>NPY_FLOAT
  14092. ufunc_kv_types[4] = <char>NPY_CFLOAT
  14093. ufunc_kv_types[5] = <char>NPY_CFLOAT
  14094. ufunc_kv_types[6] = <char>NPY_DOUBLE
  14095. ufunc_kv_types[7] = <char>NPY_DOUBLE
  14096. ufunc_kv_types[8] = <char>NPY_DOUBLE
  14097. ufunc_kv_types[9] = <char>NPY_DOUBLE
  14098. ufunc_kv_types[10] = <char>NPY_CDOUBLE
  14099. ufunc_kv_types[11] = <char>NPY_CDOUBLE
  14100. ufunc_kv_ptr[2*0] = <void*>_func_cbesk_wrap_real
  14101. ufunc_kv_ptr[2*0+1] = <void*>(<char*>"kv")
  14102. ufunc_kv_ptr[2*1] = <void*>_func_cbesk_wrap
  14103. ufunc_kv_ptr[2*1+1] = <void*>(<char*>"kv")
  14104. ufunc_kv_ptr[2*2] = <void*>_func_cbesk_wrap_real
  14105. ufunc_kv_ptr[2*2+1] = <void*>(<char*>"kv")
  14106. ufunc_kv_ptr[2*3] = <void*>_func_cbesk_wrap
  14107. ufunc_kv_ptr[2*3+1] = <void*>(<char*>"kv")
  14108. ufunc_kv_data[0] = &ufunc_kv_ptr[2*0]
  14109. ufunc_kv_data[1] = &ufunc_kv_ptr[2*1]
  14110. ufunc_kv_data[2] = &ufunc_kv_ptr[2*2]
  14111. ufunc_kv_data[3] = &ufunc_kv_ptr[2*3]
  14112. kv = np.PyUFunc_FromFuncAndData(ufunc_kv_loops, ufunc_kv_data, ufunc_kv_types, 4, 2, 1, 0, "kv", ufunc_kv_doc, 0)
  14113. cdef np.PyUFuncGenericFunction ufunc_kve_loops[4]
  14114. cdef void *ufunc_kve_ptr[8]
  14115. cdef void *ufunc_kve_data[4]
  14116. cdef char ufunc_kve_types[12]
  14117. cdef char *ufunc_kve_doc = (
  14118. "kve(v, z, out=None)\n"
  14119. "\n"
  14120. "Exponentially scaled modified Bessel function of the second kind.\n"
  14121. "\n"
  14122. "Returns the exponentially scaled, modified Bessel function of the\n"
  14123. "second kind (sometimes called the third kind) for real order `v` at\n"
  14124. "complex `z`::\n"
  14125. "\n"
  14126. " kve(v, z) = kv(v, z) * exp(z)\n"
  14127. "\n"
  14128. "Parameters\n"
  14129. "----------\n"
  14130. "v : array_like of float\n"
  14131. " Order of Bessel functions\n"
  14132. "z : array_like of complex\n"
  14133. " Argument at which to evaluate the Bessel functions\n"
  14134. "out : ndarray, optional\n"
  14135. " Optional output array for the function results\n"
  14136. "\n"
  14137. "Returns\n"
  14138. "-------\n"
  14139. "scalar or ndarray\n"
  14140. " The exponentially scaled modified Bessel function of the second kind.\n"
  14141. "\n"
  14142. "Notes\n"
  14143. "-----\n"
  14144. "Wrapper for AMOS [1]_ routine `zbesk`. For a discussion of the\n"
  14145. "algorithm used, see [2]_ and the references therein.\n"
  14146. "\n"
  14147. "See Also\n"
  14148. "--------\n"
  14149. "kv : This function without exponential scaling.\n"
  14150. "k0e : Faster version of this function for order 0.\n"
  14151. "k1e : Faster version of this function for order 1.\n"
  14152. "\n"
  14153. "References\n"
  14154. "----------\n"
  14155. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  14156. " of a Complex Argument and Nonnegative Order\",\n"
  14157. " http://netlib.org/amos/\n"
  14158. ".. [2] Donald E. Amos, \"Algorithm 644: A portable package for Bessel\n"
  14159. " functions of a complex argument and nonnegative order\", ACM\n"
  14160. " TOMS Vol. 12 Issue 3, Sept. 1986, p. 265\n"
  14161. "\n"
  14162. "Examples\n"
  14163. "--------\n"
  14164. "Evaluate the function of order 0 at one point.\n"
  14165. "\n"
  14166. ">>> import numpy as np\n"
  14167. ">>> from scipy.special import kv, kve\n"
  14168. ">>> import matplotlib.pyplot as plt\n"
  14169. ">>> kve(0, 1.)\n"
  14170. "1.1444630798068949\n"
  14171. "\n"
  14172. "Evaluate the function at one point for different orders by\n"
  14173. "providing a list or NumPy array as argument for the `v` parameter:\n"
  14174. "\n"
  14175. ">>> kve([0, 1, 1.5], 1.)\n"
  14176. "array([1.14446308, 1.63615349, 2.50662827])\n"
  14177. "\n"
  14178. "Evaluate the function at several points for order 0 by providing an\n"
  14179. "array for `z`.\n"
  14180. "\n"
  14181. ">>> points = np.array([1., 3., 10.])\n"
  14182. ">>> kve(0, points)\n"
  14183. "array([1.14446308, 0.6977616 , 0.39163193])\n"
  14184. "\n"
  14185. "Evaluate the function at several points for different orders by\n"
  14186. "providing arrays for both `v` for `z`. Both arrays have to be\n"
  14187. "broadcastable to the correct shape. To calculate the orders 0, 1\n"
  14188. "and 2 for a 1D array of points:\n"
  14189. "\n"
  14190. ">>> kve([[0], [1], [2]], points)\n"
  14191. "array([[1.14446308, 0.6977616 , 0.39163193],\n"
  14192. " [1.63615349, 0.80656348, 0.41076657],\n"
  14193. " [4.41677005, 1.23547058, 0.47378525]])\n"
  14194. "\n"
  14195. "Plot the functions of order 0 to 3 from 0 to 5.\n"
  14196. "\n"
  14197. ">>> fig, ax = plt.subplots()\n"
  14198. ">>> x = np.linspace(0., 5., 1000)\n"
  14199. ">>> for i in range(4):\n"
  14200. "... ax.plot(x, kve(i, x), label=f'$K_{i!r}(z)\\cdot e^z$')\n"
  14201. ">>> ax.legend()\n"
  14202. ">>> ax.set_xlabel(r\"$z$\")\n"
  14203. ">>> ax.set_ylim(0, 4)\n"
  14204. ">>> ax.set_xlim(0, 5)\n"
  14205. ">>> plt.show()\n"
  14206. "\n"
  14207. "Exponentially scaled Bessel functions are useful for large arguments for\n"
  14208. "which the unscaled Bessel functions over- or underflow. In the\n"
  14209. "following example `kv` returns 0 whereas `kve` still returns\n"
  14210. "a useful finite number.\n"
  14211. "\n"
  14212. ">>> kv(3, 1000.), kve(3, 1000.)\n"
  14213. "(0.0, 0.03980696128440973)")
  14214. ufunc_kve_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  14215. ufunc_kve_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  14216. ufunc_kve_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  14217. ufunc_kve_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  14218. ufunc_kve_types[0] = <char>NPY_FLOAT
  14219. ufunc_kve_types[1] = <char>NPY_FLOAT
  14220. ufunc_kve_types[2] = <char>NPY_FLOAT
  14221. ufunc_kve_types[3] = <char>NPY_FLOAT
  14222. ufunc_kve_types[4] = <char>NPY_CFLOAT
  14223. ufunc_kve_types[5] = <char>NPY_CFLOAT
  14224. ufunc_kve_types[6] = <char>NPY_DOUBLE
  14225. ufunc_kve_types[7] = <char>NPY_DOUBLE
  14226. ufunc_kve_types[8] = <char>NPY_DOUBLE
  14227. ufunc_kve_types[9] = <char>NPY_DOUBLE
  14228. ufunc_kve_types[10] = <char>NPY_CDOUBLE
  14229. ufunc_kve_types[11] = <char>NPY_CDOUBLE
  14230. ufunc_kve_ptr[2*0] = <void*>_func_cbesk_wrap_e_real
  14231. ufunc_kve_ptr[2*0+1] = <void*>(<char*>"kve")
  14232. ufunc_kve_ptr[2*1] = <void*>_func_cbesk_wrap_e
  14233. ufunc_kve_ptr[2*1+1] = <void*>(<char*>"kve")
  14234. ufunc_kve_ptr[2*2] = <void*>_func_cbesk_wrap_e_real
  14235. ufunc_kve_ptr[2*2+1] = <void*>(<char*>"kve")
  14236. ufunc_kve_ptr[2*3] = <void*>_func_cbesk_wrap_e
  14237. ufunc_kve_ptr[2*3+1] = <void*>(<char*>"kve")
  14238. ufunc_kve_data[0] = &ufunc_kve_ptr[2*0]
  14239. ufunc_kve_data[1] = &ufunc_kve_ptr[2*1]
  14240. ufunc_kve_data[2] = &ufunc_kve_ptr[2*2]
  14241. ufunc_kve_data[3] = &ufunc_kve_ptr[2*3]
  14242. kve = np.PyUFunc_FromFuncAndData(ufunc_kve_loops, ufunc_kve_data, ufunc_kve_types, 4, 2, 1, 0, "kve", ufunc_kve_doc, 0)
  14243. cdef np.PyUFuncGenericFunction ufunc_log1p_loops[4]
  14244. cdef void *ufunc_log1p_ptr[8]
  14245. cdef void *ufunc_log1p_data[4]
  14246. cdef char ufunc_log1p_types[8]
  14247. cdef char *ufunc_log1p_doc = (
  14248. "log1p(x, out=None)\n"
  14249. "\n"
  14250. "Calculates log(1 + x) for use when `x` is near zero.\n"
  14251. "\n"
  14252. "Parameters\n"
  14253. "----------\n"
  14254. "x : array_like\n"
  14255. " Real or complex valued input.\n"
  14256. "out : ndarray, optional\n"
  14257. " Optional output array for the function results.\n"
  14258. "\n"
  14259. "Returns\n"
  14260. "-------\n"
  14261. "scalar or ndarray\n"
  14262. " Values of ``log(1 + x)``.\n"
  14263. "\n"
  14264. "See Also\n"
  14265. "--------\n"
  14266. "expm1, cosm1\n"
  14267. "\n"
  14268. "Examples\n"
  14269. "--------\n"
  14270. ">>> import numpy as np\n"
  14271. ">>> import scipy.special as sc\n"
  14272. "\n"
  14273. "It is more accurate than using ``log(1 + x)`` directly for ``x``\n"
  14274. "near 0. Note that in the below example ``1 + 1e-17 == 1`` to\n"
  14275. "double precision.\n"
  14276. "\n"
  14277. ">>> sc.log1p(1e-17)\n"
  14278. "1e-17\n"
  14279. ">>> np.log(1 + 1e-17)\n"
  14280. "0.0")
  14281. ufunc_log1p_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  14282. ufunc_log1p_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  14283. ufunc_log1p_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  14284. ufunc_log1p_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  14285. ufunc_log1p_types[0] = <char>NPY_FLOAT
  14286. ufunc_log1p_types[1] = <char>NPY_FLOAT
  14287. ufunc_log1p_types[2] = <char>NPY_DOUBLE
  14288. ufunc_log1p_types[3] = <char>NPY_DOUBLE
  14289. ufunc_log1p_types[4] = <char>NPY_CFLOAT
  14290. ufunc_log1p_types[5] = <char>NPY_CFLOAT
  14291. ufunc_log1p_types[6] = <char>NPY_CDOUBLE
  14292. ufunc_log1p_types[7] = <char>NPY_CDOUBLE
  14293. ufunc_log1p_ptr[2*0] = <void*>_func_log1p
  14294. ufunc_log1p_ptr[2*0+1] = <void*>(<char*>"log1p")
  14295. ufunc_log1p_ptr[2*1] = <void*>_func_log1p
  14296. ufunc_log1p_ptr[2*1+1] = <void*>(<char*>"log1p")
  14297. ufunc_log1p_ptr[2*2] = <void*>_func_clog1p
  14298. ufunc_log1p_ptr[2*2+1] = <void*>(<char*>"log1p")
  14299. ufunc_log1p_ptr[2*3] = <void*>_func_clog1p
  14300. ufunc_log1p_ptr[2*3+1] = <void*>(<char*>"log1p")
  14301. ufunc_log1p_data[0] = &ufunc_log1p_ptr[2*0]
  14302. ufunc_log1p_data[1] = &ufunc_log1p_ptr[2*1]
  14303. ufunc_log1p_data[2] = &ufunc_log1p_ptr[2*2]
  14304. ufunc_log1p_data[3] = &ufunc_log1p_ptr[2*3]
  14305. log1p = np.PyUFunc_FromFuncAndData(ufunc_log1p_loops, ufunc_log1p_data, ufunc_log1p_types, 4, 1, 1, 0, "log1p", ufunc_log1p_doc, 0)
  14306. cdef np.PyUFuncGenericFunction ufunc_log_expit_loops[3]
  14307. cdef void *ufunc_log_expit_ptr[6]
  14308. cdef void *ufunc_log_expit_data[3]
  14309. cdef char ufunc_log_expit_types[6]
  14310. cdef char *ufunc_log_expit_doc = (
  14311. "log_expit(x, out=None)\n"
  14312. "\n"
  14313. "Logarithm of the logistic sigmoid function.\n"
  14314. "\n"
  14315. "The SciPy implementation of the logistic sigmoid function is\n"
  14316. "`scipy.special.expit`, so this function is called ``log_expit``.\n"
  14317. "\n"
  14318. "The function is mathematically equivalent to ``log(expit(x))``, but\n"
  14319. "is formulated to avoid loss of precision for inputs with large\n"
  14320. "(positive or negative) magnitude.\n"
  14321. "\n"
  14322. "Parameters\n"
  14323. "----------\n"
  14324. "x : array_like\n"
  14325. " The values to apply ``log_expit`` to element-wise.\n"
  14326. "out : ndarray, optional\n"
  14327. " Optional output array for the function results\n"
  14328. "\n"
  14329. "Returns\n"
  14330. "-------\n"
  14331. "out : scalar or ndarray\n"
  14332. " The computed values, an ndarray of the same shape as ``x``.\n"
  14333. "\n"
  14334. "See Also\n"
  14335. "--------\n"
  14336. "expit\n"
  14337. "\n"
  14338. "Notes\n"
  14339. "-----\n"
  14340. "As a ufunc, ``log_expit`` takes a number of optional keyword arguments.\n"
  14341. "For more information see\n"
  14342. "`ufuncs <https://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_\n"
  14343. "\n"
  14344. ".. versionadded:: 1.8.0\n"
  14345. "\n"
  14346. "Examples\n"
  14347. "--------\n"
  14348. ">>> import numpy as np\n"
  14349. ">>> from scipy.special import log_expit, expit\n"
  14350. "\n"
  14351. ">>> log_expit([-3.0, 0.25, 2.5, 5.0])\n"
  14352. "array([-3.04858735, -0.57593942, -0.07888973, -0.00671535])\n"
  14353. "\n"
  14354. "Large negative values:\n"
  14355. "\n"
  14356. ">>> log_expit([-100, -500, -1000])\n"
  14357. "array([ -100., -500., -1000.])\n"
  14358. "\n"
  14359. "Note that ``expit(-1000)`` returns 0, so the naive implementation\n"
  14360. "``log(expit(-1000))`` return ``-inf``.\n"
  14361. "\n"
  14362. "Large positive values:\n"
  14363. "\n"
  14364. ">>> log_expit([29, 120, 400])\n"
  14365. "array([-2.54366565e-013, -7.66764807e-053, -1.91516960e-174])\n"
  14366. "\n"
  14367. "Compare that to the naive implementation:\n"
  14368. "\n"
  14369. ">>> np.log(expit([29, 120, 400]))\n"
  14370. "array([-2.54463117e-13, 0.00000000e+00, 0.00000000e+00])\n"
  14371. "\n"
  14372. "The first value is accurate to only 3 digits, and the larger inputs\n"
  14373. "lose all precision and return 0.")
  14374. ufunc_log_expit_loops[0] = <np.PyUFuncGenericFunction>loop_f_f__As_f_f
  14375. ufunc_log_expit_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  14376. ufunc_log_expit_loops[2] = <np.PyUFuncGenericFunction>loop_g_g__As_g_g
  14377. ufunc_log_expit_types[0] = <char>NPY_FLOAT
  14378. ufunc_log_expit_types[1] = <char>NPY_FLOAT
  14379. ufunc_log_expit_types[2] = <char>NPY_DOUBLE
  14380. ufunc_log_expit_types[3] = <char>NPY_DOUBLE
  14381. ufunc_log_expit_types[4] = <char>NPY_LONGDOUBLE
  14382. ufunc_log_expit_types[5] = <char>NPY_LONGDOUBLE
  14383. ufunc_log_expit_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_log_expitf
  14384. ufunc_log_expit_ptr[2*0+1] = <void*>(<char*>"log_expit")
  14385. ufunc_log_expit_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_log_expit
  14386. ufunc_log_expit_ptr[2*1+1] = <void*>(<char*>"log_expit")
  14387. ufunc_log_expit_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_log_expitl
  14388. ufunc_log_expit_ptr[2*2+1] = <void*>(<char*>"log_expit")
  14389. ufunc_log_expit_data[0] = &ufunc_log_expit_ptr[2*0]
  14390. ufunc_log_expit_data[1] = &ufunc_log_expit_ptr[2*1]
  14391. ufunc_log_expit_data[2] = &ufunc_log_expit_ptr[2*2]
  14392. log_expit = np.PyUFunc_FromFuncAndData(ufunc_log_expit_loops, ufunc_log_expit_data, ufunc_log_expit_types, 3, 1, 1, 0, "log_expit", ufunc_log_expit_doc, 0)
  14393. cdef np.PyUFuncGenericFunction ufunc_log_ndtr_loops[4]
  14394. cdef void *ufunc_log_ndtr_ptr[8]
  14395. cdef void *ufunc_log_ndtr_data[4]
  14396. cdef char ufunc_log_ndtr_types[8]
  14397. cdef char *ufunc_log_ndtr_doc = (
  14398. "log_ndtr(x, out=None)\n"
  14399. "\n"
  14400. "Logarithm of Gaussian cumulative distribution function.\n"
  14401. "\n"
  14402. "Returns the log of the area under the standard Gaussian probability\n"
  14403. "density function, integrated from minus infinity to `x`::\n"
  14404. "\n"
  14405. " log(1/sqrt(2*pi) * integral(exp(-t**2 / 2), t=-inf..x))\n"
  14406. "\n"
  14407. "Parameters\n"
  14408. "----------\n"
  14409. "x : array_like, real or complex\n"
  14410. " Argument\n"
  14411. "out : ndarray, optional\n"
  14412. " Optional output array for the function results\n"
  14413. "\n"
  14414. "Returns\n"
  14415. "-------\n"
  14416. "scalar or ndarray\n"
  14417. " The value of the log of the normal CDF evaluated at `x`\n"
  14418. "\n"
  14419. "See Also\n"
  14420. "--------\n"
  14421. "erf\n"
  14422. "erfc\n"
  14423. "scipy.stats.norm\n"
  14424. "ndtr\n"
  14425. "\n"
  14426. "Examples\n"
  14427. "--------\n"
  14428. ">>> import numpy as np\n"
  14429. ">>> from scipy.special import log_ndtr, ndtr\n"
  14430. "\n"
  14431. "The benefit of ``log_ndtr(x)`` over the naive implementation\n"
  14432. "``np.log(ndtr(x))`` is most evident with moderate to large positive\n"
  14433. "values of ``x``:\n"
  14434. "\n"
  14435. ">>> x = np.array([6, 7, 9, 12, 15, 25])\n"
  14436. ">>> log_ndtr(x)\n"
  14437. "array([-9.86587646e-010, -1.27981254e-012, -1.12858841e-019,\n"
  14438. " -1.77648211e-033, -3.67096620e-051, -3.05669671e-138])\n"
  14439. "\n"
  14440. "The results of the naive calculation for the moderate ``x`` values\n"
  14441. "have only 5 or 6 correct significant digits. For values of ``x``\n"
  14442. "greater than approximately 8.3, the naive expression returns 0:\n"
  14443. "\n"
  14444. ">>> np.log(ndtr(x))\n"
  14445. "array([-9.86587701e-10, -1.27986510e-12, 0.00000000e+00,\n"
  14446. " 0.00000000e+00, 0.00000000e+00, 0.00000000e+00])")
  14447. ufunc_log_ndtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  14448. ufunc_log_ndtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  14449. ufunc_log_ndtr_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  14450. ufunc_log_ndtr_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  14451. ufunc_log_ndtr_types[0] = <char>NPY_FLOAT
  14452. ufunc_log_ndtr_types[1] = <char>NPY_FLOAT
  14453. ufunc_log_ndtr_types[2] = <char>NPY_DOUBLE
  14454. ufunc_log_ndtr_types[3] = <char>NPY_DOUBLE
  14455. ufunc_log_ndtr_types[4] = <char>NPY_CFLOAT
  14456. ufunc_log_ndtr_types[5] = <char>NPY_CFLOAT
  14457. ufunc_log_ndtr_types[6] = <char>NPY_CDOUBLE
  14458. ufunc_log_ndtr_types[7] = <char>NPY_CDOUBLE
  14459. ufunc_log_ndtr_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_log_ndtr
  14460. ufunc_log_ndtr_ptr[2*0+1] = <void*>(<char*>"log_ndtr")
  14461. ufunc_log_ndtr_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_log_ndtr
  14462. ufunc_log_ndtr_ptr[2*1+1] = <void*>(<char*>"log_ndtr")
  14463. ufunc_log_ndtr_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_log_ndtr_complex
  14464. ufunc_log_ndtr_ptr[2*2+1] = <void*>(<char*>"log_ndtr")
  14465. ufunc_log_ndtr_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_log_ndtr_complex
  14466. ufunc_log_ndtr_ptr[2*3+1] = <void*>(<char*>"log_ndtr")
  14467. ufunc_log_ndtr_data[0] = &ufunc_log_ndtr_ptr[2*0]
  14468. ufunc_log_ndtr_data[1] = &ufunc_log_ndtr_ptr[2*1]
  14469. ufunc_log_ndtr_data[2] = &ufunc_log_ndtr_ptr[2*2]
  14470. ufunc_log_ndtr_data[3] = &ufunc_log_ndtr_ptr[2*3]
  14471. log_ndtr = np.PyUFunc_FromFuncAndData(ufunc_log_ndtr_loops, ufunc_log_ndtr_data, ufunc_log_ndtr_types, 4, 1, 1, 0, "log_ndtr", ufunc_log_ndtr_doc, 0)
  14472. cdef np.PyUFuncGenericFunction ufunc_loggamma_loops[4]
  14473. cdef void *ufunc_loggamma_ptr[8]
  14474. cdef void *ufunc_loggamma_data[4]
  14475. cdef char ufunc_loggamma_types[8]
  14476. cdef char *ufunc_loggamma_doc = (
  14477. "loggamma(z, out=None)\n"
  14478. "\n"
  14479. "Principal branch of the logarithm of the gamma function.\n"
  14480. "\n"
  14481. "Defined to be :math:`\\log(\\Gamma(x))` for :math:`x > 0` and\n"
  14482. "extended to the complex plane by analytic continuation. The\n"
  14483. "function has a single branch cut on the negative real axis.\n"
  14484. "\n"
  14485. ".. versionadded:: 0.18.0\n"
  14486. "\n"
  14487. "Parameters\n"
  14488. "----------\n"
  14489. "z : array_like\n"
  14490. " Values in the complex plain at which to compute ``loggamma``\n"
  14491. "out : ndarray, optional\n"
  14492. " Output array for computed values of ``loggamma``\n"
  14493. "\n"
  14494. "Returns\n"
  14495. "-------\n"
  14496. "loggamma : scalar or ndarray\n"
  14497. " Values of ``loggamma`` at z.\n"
  14498. "\n"
  14499. "Notes\n"
  14500. "-----\n"
  14501. "It is not generally true that :math:`\\log\\Gamma(z) =\n"
  14502. "\\log(\\Gamma(z))`, though the real parts of the functions do\n"
  14503. "agree. The benefit of not defining `loggamma` as\n"
  14504. ":math:`\\log(\\Gamma(z))` is that the latter function has a\n"
  14505. "complicated branch cut structure whereas `loggamma` is analytic\n"
  14506. "except for on the negative real axis.\n"
  14507. "\n"
  14508. "The identities\n"
  14509. "\n"
  14510. ".. math::\n"
  14511. " \\exp(\\log\\Gamma(z)) &= \\Gamma(z) \\\\\n"
  14512. " \\log\\Gamma(z + 1) &= \\log(z) + \\log\\Gamma(z)\n"
  14513. "\n"
  14514. "make `loggamma` useful for working in complex logspace.\n"
  14515. "\n"
  14516. "On the real line `loggamma` is related to `gammaln` via\n"
  14517. "``exp(loggamma(x + 0j)) = gammasgn(x)*exp(gammaln(x))``, up to\n"
  14518. "rounding error.\n"
  14519. "\n"
  14520. "The implementation here is based on [hare1997]_.\n"
  14521. "\n"
  14522. "See also\n"
  14523. "--------\n"
  14524. "gammaln : logarithm of the absolute value of the gamma function\n"
  14525. "gammasgn : sign of the gamma function\n"
  14526. "\n"
  14527. "References\n"
  14528. "----------\n"
  14529. ".. [hare1997] D.E.G. Hare,\n"
  14530. " *Computing the Principal Branch of log-Gamma*,\n"
  14531. " Journal of Algorithms, Volume 25, Issue 2, November 1997, pages 221-236.")
  14532. ufunc_loggamma_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  14533. ufunc_loggamma_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  14534. ufunc_loggamma_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  14535. ufunc_loggamma_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  14536. ufunc_loggamma_types[0] = <char>NPY_FLOAT
  14537. ufunc_loggamma_types[1] = <char>NPY_FLOAT
  14538. ufunc_loggamma_types[2] = <char>NPY_DOUBLE
  14539. ufunc_loggamma_types[3] = <char>NPY_DOUBLE
  14540. ufunc_loggamma_types[4] = <char>NPY_CFLOAT
  14541. ufunc_loggamma_types[5] = <char>NPY_CFLOAT
  14542. ufunc_loggamma_types[6] = <char>NPY_CDOUBLE
  14543. ufunc_loggamma_types[7] = <char>NPY_CDOUBLE
  14544. ufunc_loggamma_ptr[2*0] = <void*>_func_loggamma_real
  14545. ufunc_loggamma_ptr[2*0+1] = <void*>(<char*>"loggamma")
  14546. ufunc_loggamma_ptr[2*1] = <void*>_func_loggamma_real
  14547. ufunc_loggamma_ptr[2*1+1] = <void*>(<char*>"loggamma")
  14548. ufunc_loggamma_ptr[2*2] = <void*>_func_loggamma
  14549. ufunc_loggamma_ptr[2*2+1] = <void*>(<char*>"loggamma")
  14550. ufunc_loggamma_ptr[2*3] = <void*>_func_loggamma
  14551. ufunc_loggamma_ptr[2*3+1] = <void*>(<char*>"loggamma")
  14552. ufunc_loggamma_data[0] = &ufunc_loggamma_ptr[2*0]
  14553. ufunc_loggamma_data[1] = &ufunc_loggamma_ptr[2*1]
  14554. ufunc_loggamma_data[2] = &ufunc_loggamma_ptr[2*2]
  14555. ufunc_loggamma_data[3] = &ufunc_loggamma_ptr[2*3]
  14556. loggamma = np.PyUFunc_FromFuncAndData(ufunc_loggamma_loops, ufunc_loggamma_data, ufunc_loggamma_types, 4, 1, 1, 0, "loggamma", ufunc_loggamma_doc, 0)
  14557. cdef np.PyUFuncGenericFunction ufunc_logit_loops[3]
  14558. cdef void *ufunc_logit_ptr[6]
  14559. cdef void *ufunc_logit_data[3]
  14560. cdef char ufunc_logit_types[6]
  14561. cdef char *ufunc_logit_doc = (
  14562. "logit(x, out=None)\n"
  14563. "\n"
  14564. "Logit ufunc for ndarrays.\n"
  14565. "\n"
  14566. "The logit function is defined as logit(p) = log(p/(1-p)).\n"
  14567. "Note that logit(0) = -inf, logit(1) = inf, and logit(p)\n"
  14568. "for p<0 or p>1 yields nan.\n"
  14569. "\n"
  14570. "Parameters\n"
  14571. "----------\n"
  14572. "x : ndarray\n"
  14573. " The ndarray to apply logit to element-wise.\n"
  14574. "out : ndarray, optional\n"
  14575. " Optional output array for the function results\n"
  14576. "\n"
  14577. "Returns\n"
  14578. "-------\n"
  14579. "scalar or ndarray\n"
  14580. " An ndarray of the same shape as x. Its entries\n"
  14581. " are logit of the corresponding entry of x.\n"
  14582. "\n"
  14583. "See Also\n"
  14584. "--------\n"
  14585. "expit\n"
  14586. "\n"
  14587. "Notes\n"
  14588. "-----\n"
  14589. "As a ufunc logit takes a number of optional\n"
  14590. "keyword arguments. For more information\n"
  14591. "see `ufuncs <https://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_\n"
  14592. "\n"
  14593. ".. versionadded:: 0.10.0\n"
  14594. "\n"
  14595. "Examples\n"
  14596. "--------\n"
  14597. ">>> import numpy as np\n"
  14598. ">>> from scipy.special import logit, expit\n"
  14599. "\n"
  14600. ">>> logit([0, 0.25, 0.5, 0.75, 1])\n"
  14601. "array([ -inf, -1.09861229, 0. , 1.09861229, inf])\n"
  14602. "\n"
  14603. "`expit` is the inverse of `logit`:\n"
  14604. "\n"
  14605. ">>> expit(logit([0.1, 0.75, 0.999]))\n"
  14606. "array([ 0.1 , 0.75 , 0.999])\n"
  14607. "\n"
  14608. "Plot logit(x) for x in [0, 1]:\n"
  14609. "\n"
  14610. ">>> import matplotlib.pyplot as plt\n"
  14611. ">>> x = np.linspace(0, 1, 501)\n"
  14612. ">>> y = logit(x)\n"
  14613. ">>> plt.plot(x, y)\n"
  14614. ">>> plt.grid()\n"
  14615. ">>> plt.ylim(-6, 6)\n"
  14616. ">>> plt.xlabel('x')\n"
  14617. ">>> plt.title('logit(x)')\n"
  14618. ">>> plt.show()")
  14619. ufunc_logit_loops[0] = <np.PyUFuncGenericFunction>loop_f_f__As_f_f
  14620. ufunc_logit_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  14621. ufunc_logit_loops[2] = <np.PyUFuncGenericFunction>loop_g_g__As_g_g
  14622. ufunc_logit_types[0] = <char>NPY_FLOAT
  14623. ufunc_logit_types[1] = <char>NPY_FLOAT
  14624. ufunc_logit_types[2] = <char>NPY_DOUBLE
  14625. ufunc_logit_types[3] = <char>NPY_DOUBLE
  14626. ufunc_logit_types[4] = <char>NPY_LONGDOUBLE
  14627. ufunc_logit_types[5] = <char>NPY_LONGDOUBLE
  14628. ufunc_logit_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_logitf
  14629. ufunc_logit_ptr[2*0+1] = <void*>(<char*>"logit")
  14630. ufunc_logit_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_logit
  14631. ufunc_logit_ptr[2*1+1] = <void*>(<char*>"logit")
  14632. ufunc_logit_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_logitl
  14633. ufunc_logit_ptr[2*2+1] = <void*>(<char*>"logit")
  14634. ufunc_logit_data[0] = &ufunc_logit_ptr[2*0]
  14635. ufunc_logit_data[1] = &ufunc_logit_ptr[2*1]
  14636. ufunc_logit_data[2] = &ufunc_logit_ptr[2*2]
  14637. logit = np.PyUFunc_FromFuncAndData(ufunc_logit_loops, ufunc_logit_data, ufunc_logit_types, 3, 1, 1, 0, "logit", ufunc_logit_doc, 0)
  14638. cdef np.PyUFuncGenericFunction ufunc_lpmv_loops[2]
  14639. cdef void *ufunc_lpmv_ptr[4]
  14640. cdef void *ufunc_lpmv_data[2]
  14641. cdef char ufunc_lpmv_types[8]
  14642. cdef char *ufunc_lpmv_doc = (
  14643. "lpmv(m, v, x, out=None)\n"
  14644. "\n"
  14645. "Associated Legendre function of integer order and real degree.\n"
  14646. "\n"
  14647. "Defined as\n"
  14648. "\n"
  14649. ".. math::\n"
  14650. "\n"
  14651. " P_v^m = (-1)^m (1 - x^2)^{m/2} \\frac{d^m}{dx^m} P_v(x)\n"
  14652. "\n"
  14653. "where\n"
  14654. "\n"
  14655. ".. math::\n"
  14656. "\n"
  14657. " P_v = \\sum_{k = 0}^\\infty \\frac{(-v)_k (v + 1)_k}{(k!)^2}\n"
  14658. " \\left(\\frac{1 - x}{2}\\right)^k\n"
  14659. "\n"
  14660. "is the Legendre function of the first kind. Here :math:`(\\cdot)_k`\n"
  14661. "is the Pochhammer symbol; see `poch`.\n"
  14662. "\n"
  14663. "Parameters\n"
  14664. "----------\n"
  14665. "m : array_like\n"
  14666. " Order (int or float). If passed a float not equal to an\n"
  14667. " integer the function returns NaN.\n"
  14668. "v : array_like\n"
  14669. " Degree (float).\n"
  14670. "x : array_like\n"
  14671. " Argument (float). Must have ``|x| <= 1``.\n"
  14672. "out : ndarray, optional\n"
  14673. " Optional output array for the function results\n"
  14674. "\n"
  14675. "Returns\n"
  14676. "-------\n"
  14677. "pmv : scalar or ndarray\n"
  14678. " Value of the associated Legendre function.\n"
  14679. "\n"
  14680. "See Also\n"
  14681. "--------\n"
  14682. "lpmn : Compute the associated Legendre function for all orders\n"
  14683. " ``0, ..., m`` and degrees ``0, ..., n``.\n"
  14684. "clpmn : Compute the associated Legendre function at complex\n"
  14685. " arguments.\n"
  14686. "\n"
  14687. "Notes\n"
  14688. "-----\n"
  14689. "Note that this implementation includes the Condon-Shortley phase.\n"
  14690. "\n"
  14691. "References\n"
  14692. "----------\n"
  14693. ".. [1] Zhang, Jin, \"Computation of Special Functions\", John Wiley\n"
  14694. " and Sons, Inc, 1996.")
  14695. ufunc_lpmv_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  14696. ufunc_lpmv_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  14697. ufunc_lpmv_types[0] = <char>NPY_FLOAT
  14698. ufunc_lpmv_types[1] = <char>NPY_FLOAT
  14699. ufunc_lpmv_types[2] = <char>NPY_FLOAT
  14700. ufunc_lpmv_types[3] = <char>NPY_FLOAT
  14701. ufunc_lpmv_types[4] = <char>NPY_DOUBLE
  14702. ufunc_lpmv_types[5] = <char>NPY_DOUBLE
  14703. ufunc_lpmv_types[6] = <char>NPY_DOUBLE
  14704. ufunc_lpmv_types[7] = <char>NPY_DOUBLE
  14705. ufunc_lpmv_ptr[2*0] = <void*>_func_pmv_wrap
  14706. ufunc_lpmv_ptr[2*0+1] = <void*>(<char*>"lpmv")
  14707. ufunc_lpmv_ptr[2*1] = <void*>_func_pmv_wrap
  14708. ufunc_lpmv_ptr[2*1+1] = <void*>(<char*>"lpmv")
  14709. ufunc_lpmv_data[0] = &ufunc_lpmv_ptr[2*0]
  14710. ufunc_lpmv_data[1] = &ufunc_lpmv_ptr[2*1]
  14711. lpmv = np.PyUFunc_FromFuncAndData(ufunc_lpmv_loops, ufunc_lpmv_data, ufunc_lpmv_types, 2, 3, 1, 0, "lpmv", ufunc_lpmv_doc, 0)
  14712. cdef np.PyUFuncGenericFunction ufunc_mathieu_a_loops[2]
  14713. cdef void *ufunc_mathieu_a_ptr[4]
  14714. cdef void *ufunc_mathieu_a_data[2]
  14715. cdef char ufunc_mathieu_a_types[6]
  14716. cdef char *ufunc_mathieu_a_doc = (
  14717. "mathieu_a(m, q, out=None)\n"
  14718. "\n"
  14719. "Characteristic value of even Mathieu functions\n"
  14720. "\n"
  14721. "Parameters\n"
  14722. "----------\n"
  14723. "m : array_like\n"
  14724. " Order of the function\n"
  14725. "q : array_like\n"
  14726. " Parameter of the function\n"
  14727. "out : ndarray, optional\n"
  14728. " Optional output array for the function results\n"
  14729. "\n"
  14730. "Returns\n"
  14731. "-------\n"
  14732. "scalar or ndarray\n"
  14733. " Characteristic value for the even solution, ``ce_m(z, q)``, of\n"
  14734. " Mathieu's equation.\n"
  14735. "\n"
  14736. "See Also\n"
  14737. "--------\n"
  14738. "mathieu_b, mathieu_cem, mathieu_sem")
  14739. ufunc_mathieu_a_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  14740. ufunc_mathieu_a_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  14741. ufunc_mathieu_a_types[0] = <char>NPY_FLOAT
  14742. ufunc_mathieu_a_types[1] = <char>NPY_FLOAT
  14743. ufunc_mathieu_a_types[2] = <char>NPY_FLOAT
  14744. ufunc_mathieu_a_types[3] = <char>NPY_DOUBLE
  14745. ufunc_mathieu_a_types[4] = <char>NPY_DOUBLE
  14746. ufunc_mathieu_a_types[5] = <char>NPY_DOUBLE
  14747. ufunc_mathieu_a_ptr[2*0] = <void*>_func_cem_cva_wrap
  14748. ufunc_mathieu_a_ptr[2*0+1] = <void*>(<char*>"mathieu_a")
  14749. ufunc_mathieu_a_ptr[2*1] = <void*>_func_cem_cva_wrap
  14750. ufunc_mathieu_a_ptr[2*1+1] = <void*>(<char*>"mathieu_a")
  14751. ufunc_mathieu_a_data[0] = &ufunc_mathieu_a_ptr[2*0]
  14752. ufunc_mathieu_a_data[1] = &ufunc_mathieu_a_ptr[2*1]
  14753. mathieu_a = np.PyUFunc_FromFuncAndData(ufunc_mathieu_a_loops, ufunc_mathieu_a_data, ufunc_mathieu_a_types, 2, 2, 1, 0, "mathieu_a", ufunc_mathieu_a_doc, 0)
  14754. cdef np.PyUFuncGenericFunction ufunc_mathieu_b_loops[2]
  14755. cdef void *ufunc_mathieu_b_ptr[4]
  14756. cdef void *ufunc_mathieu_b_data[2]
  14757. cdef char ufunc_mathieu_b_types[6]
  14758. cdef char *ufunc_mathieu_b_doc = (
  14759. "mathieu_b(m, q, out=None)\n"
  14760. "\n"
  14761. "Characteristic value of odd Mathieu functions\n"
  14762. "\n"
  14763. "Parameters\n"
  14764. "----------\n"
  14765. "m : array_like\n"
  14766. " Order of the function\n"
  14767. "q : array_like\n"
  14768. " Parameter of the function\n"
  14769. "out : ndarray, optional\n"
  14770. " Optional output array for the function results\n"
  14771. "\n"
  14772. "Returns\n"
  14773. "-------\n"
  14774. "scalar or ndarray\n"
  14775. " Characteristic value for the odd solution, ``se_m(z, q)``, of Mathieu's\n"
  14776. " equation.\n"
  14777. "\n"
  14778. "See Also\n"
  14779. "--------\n"
  14780. "mathieu_a, mathieu_cem, mathieu_sem")
  14781. ufunc_mathieu_b_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  14782. ufunc_mathieu_b_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  14783. ufunc_mathieu_b_types[0] = <char>NPY_FLOAT
  14784. ufunc_mathieu_b_types[1] = <char>NPY_FLOAT
  14785. ufunc_mathieu_b_types[2] = <char>NPY_FLOAT
  14786. ufunc_mathieu_b_types[3] = <char>NPY_DOUBLE
  14787. ufunc_mathieu_b_types[4] = <char>NPY_DOUBLE
  14788. ufunc_mathieu_b_types[5] = <char>NPY_DOUBLE
  14789. ufunc_mathieu_b_ptr[2*0] = <void*>_func_sem_cva_wrap
  14790. ufunc_mathieu_b_ptr[2*0+1] = <void*>(<char*>"mathieu_b")
  14791. ufunc_mathieu_b_ptr[2*1] = <void*>_func_sem_cva_wrap
  14792. ufunc_mathieu_b_ptr[2*1+1] = <void*>(<char*>"mathieu_b")
  14793. ufunc_mathieu_b_data[0] = &ufunc_mathieu_b_ptr[2*0]
  14794. ufunc_mathieu_b_data[1] = &ufunc_mathieu_b_ptr[2*1]
  14795. mathieu_b = np.PyUFunc_FromFuncAndData(ufunc_mathieu_b_loops, ufunc_mathieu_b_data, ufunc_mathieu_b_types, 2, 2, 1, 0, "mathieu_b", ufunc_mathieu_b_doc, 0)
  14796. cdef np.PyUFuncGenericFunction ufunc_mathieu_cem_loops[2]
  14797. cdef void *ufunc_mathieu_cem_ptr[4]
  14798. cdef void *ufunc_mathieu_cem_data[2]
  14799. cdef char ufunc_mathieu_cem_types[10]
  14800. cdef char *ufunc_mathieu_cem_doc = (
  14801. "mathieu_cem(m, q, x, out=None)\n"
  14802. "\n"
  14803. "Even Mathieu function and its derivative\n"
  14804. "\n"
  14805. "Returns the even Mathieu function, ``ce_m(x, q)``, of order `m` and\n"
  14806. "parameter `q` evaluated at `x` (given in degrees). Also returns the\n"
  14807. "derivative with respect to `x` of ce_m(x, q)\n"
  14808. "\n"
  14809. "Parameters\n"
  14810. "----------\n"
  14811. "m : array_like\n"
  14812. " Order of the function\n"
  14813. "q : array_like\n"
  14814. " Parameter of the function\n"
  14815. "x : array_like\n"
  14816. " Argument of the function, *given in degrees, not radians*\n"
  14817. "out : tuple of ndarray, optional\n"
  14818. " Optional output arrays for the function results\n"
  14819. "\n"
  14820. "Returns\n"
  14821. "-------\n"
  14822. "y : scalar or ndarray\n"
  14823. " Value of the function\n"
  14824. "yp : scalar or ndarray\n"
  14825. " Value of the derivative vs x\n"
  14826. "\n"
  14827. "See Also\n"
  14828. "--------\n"
  14829. "mathieu_a, mathieu_b, mathieu_sem")
  14830. ufunc_mathieu_cem_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  14831. ufunc_mathieu_cem_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  14832. ufunc_mathieu_cem_types[0] = <char>NPY_FLOAT
  14833. ufunc_mathieu_cem_types[1] = <char>NPY_FLOAT
  14834. ufunc_mathieu_cem_types[2] = <char>NPY_FLOAT
  14835. ufunc_mathieu_cem_types[3] = <char>NPY_FLOAT
  14836. ufunc_mathieu_cem_types[4] = <char>NPY_FLOAT
  14837. ufunc_mathieu_cem_types[5] = <char>NPY_DOUBLE
  14838. ufunc_mathieu_cem_types[6] = <char>NPY_DOUBLE
  14839. ufunc_mathieu_cem_types[7] = <char>NPY_DOUBLE
  14840. ufunc_mathieu_cem_types[8] = <char>NPY_DOUBLE
  14841. ufunc_mathieu_cem_types[9] = <char>NPY_DOUBLE
  14842. ufunc_mathieu_cem_ptr[2*0] = <void*>_func_cem_wrap
  14843. ufunc_mathieu_cem_ptr[2*0+1] = <void*>(<char*>"mathieu_cem")
  14844. ufunc_mathieu_cem_ptr[2*1] = <void*>_func_cem_wrap
  14845. ufunc_mathieu_cem_ptr[2*1+1] = <void*>(<char*>"mathieu_cem")
  14846. ufunc_mathieu_cem_data[0] = &ufunc_mathieu_cem_ptr[2*0]
  14847. ufunc_mathieu_cem_data[1] = &ufunc_mathieu_cem_ptr[2*1]
  14848. mathieu_cem = np.PyUFunc_FromFuncAndData(ufunc_mathieu_cem_loops, ufunc_mathieu_cem_data, ufunc_mathieu_cem_types, 2, 3, 2, 0, "mathieu_cem", ufunc_mathieu_cem_doc, 0)
  14849. cdef np.PyUFuncGenericFunction ufunc_mathieu_modcem1_loops[2]
  14850. cdef void *ufunc_mathieu_modcem1_ptr[4]
  14851. cdef void *ufunc_mathieu_modcem1_data[2]
  14852. cdef char ufunc_mathieu_modcem1_types[10]
  14853. cdef char *ufunc_mathieu_modcem1_doc = (
  14854. "mathieu_modcem1(m, q, x, out=None)\n"
  14855. "\n"
  14856. "Even modified Mathieu function of the first kind and its derivative\n"
  14857. "\n"
  14858. "Evaluates the even modified Mathieu function of the first kind,\n"
  14859. "``Mc1m(x, q)``, and its derivative at `x` for order `m` and parameter\n"
  14860. "`q`.\n"
  14861. "\n"
  14862. "Parameters\n"
  14863. "----------\n"
  14864. "m : array_like\n"
  14865. " Order of the function\n"
  14866. "q : array_like\n"
  14867. " Parameter of the function\n"
  14868. "x : array_like\n"
  14869. " Argument of the function, *given in degrees, not radians*\n"
  14870. "out : tuple of ndarray, optional\n"
  14871. " Optional output arrays for the function results\n"
  14872. "\n"
  14873. "Returns\n"
  14874. "-------\n"
  14875. "y : scalar or ndarray\n"
  14876. " Value of the function\n"
  14877. "yp : scalar or ndarray\n"
  14878. " Value of the derivative vs x\n"
  14879. "\n"
  14880. "See Also\n"
  14881. "--------\n"
  14882. "mathieu_modsem1")
  14883. ufunc_mathieu_modcem1_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  14884. ufunc_mathieu_modcem1_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  14885. ufunc_mathieu_modcem1_types[0] = <char>NPY_FLOAT
  14886. ufunc_mathieu_modcem1_types[1] = <char>NPY_FLOAT
  14887. ufunc_mathieu_modcem1_types[2] = <char>NPY_FLOAT
  14888. ufunc_mathieu_modcem1_types[3] = <char>NPY_FLOAT
  14889. ufunc_mathieu_modcem1_types[4] = <char>NPY_FLOAT
  14890. ufunc_mathieu_modcem1_types[5] = <char>NPY_DOUBLE
  14891. ufunc_mathieu_modcem1_types[6] = <char>NPY_DOUBLE
  14892. ufunc_mathieu_modcem1_types[7] = <char>NPY_DOUBLE
  14893. ufunc_mathieu_modcem1_types[8] = <char>NPY_DOUBLE
  14894. ufunc_mathieu_modcem1_types[9] = <char>NPY_DOUBLE
  14895. ufunc_mathieu_modcem1_ptr[2*0] = <void*>_func_mcm1_wrap
  14896. ufunc_mathieu_modcem1_ptr[2*0+1] = <void*>(<char*>"mathieu_modcem1")
  14897. ufunc_mathieu_modcem1_ptr[2*1] = <void*>_func_mcm1_wrap
  14898. ufunc_mathieu_modcem1_ptr[2*1+1] = <void*>(<char*>"mathieu_modcem1")
  14899. ufunc_mathieu_modcem1_data[0] = &ufunc_mathieu_modcem1_ptr[2*0]
  14900. ufunc_mathieu_modcem1_data[1] = &ufunc_mathieu_modcem1_ptr[2*1]
  14901. mathieu_modcem1 = np.PyUFunc_FromFuncAndData(ufunc_mathieu_modcem1_loops, ufunc_mathieu_modcem1_data, ufunc_mathieu_modcem1_types, 2, 3, 2, 0, "mathieu_modcem1", ufunc_mathieu_modcem1_doc, 0)
  14902. cdef np.PyUFuncGenericFunction ufunc_mathieu_modcem2_loops[2]
  14903. cdef void *ufunc_mathieu_modcem2_ptr[4]
  14904. cdef void *ufunc_mathieu_modcem2_data[2]
  14905. cdef char ufunc_mathieu_modcem2_types[10]
  14906. cdef char *ufunc_mathieu_modcem2_doc = (
  14907. "mathieu_modcem2(m, q, x, out=None)\n"
  14908. "\n"
  14909. "Even modified Mathieu function of the second kind and its derivative\n"
  14910. "\n"
  14911. "Evaluates the even modified Mathieu function of the second kind,\n"
  14912. "Mc2m(x, q), and its derivative at `x` (given in degrees) for order `m`\n"
  14913. "and parameter `q`.\n"
  14914. "\n"
  14915. "Parameters\n"
  14916. "----------\n"
  14917. "m : array_like\n"
  14918. " Order of the function\n"
  14919. "q : array_like\n"
  14920. " Parameter of the function\n"
  14921. "x : array_like\n"
  14922. " Argument of the function, *given in degrees, not radians*\n"
  14923. "out : tuple of ndarray, optional\n"
  14924. " Optional output arrays for the function results\n"
  14925. "\n"
  14926. "Returns\n"
  14927. "-------\n"
  14928. "y : scalar or ndarray\n"
  14929. " Value of the function\n"
  14930. "yp : scalar or ndarray\n"
  14931. " Value of the derivative vs x\n"
  14932. "\n"
  14933. "See Also\n"
  14934. "--------\n"
  14935. "mathieu_modsem2")
  14936. ufunc_mathieu_modcem2_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  14937. ufunc_mathieu_modcem2_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  14938. ufunc_mathieu_modcem2_types[0] = <char>NPY_FLOAT
  14939. ufunc_mathieu_modcem2_types[1] = <char>NPY_FLOAT
  14940. ufunc_mathieu_modcem2_types[2] = <char>NPY_FLOAT
  14941. ufunc_mathieu_modcem2_types[3] = <char>NPY_FLOAT
  14942. ufunc_mathieu_modcem2_types[4] = <char>NPY_FLOAT
  14943. ufunc_mathieu_modcem2_types[5] = <char>NPY_DOUBLE
  14944. ufunc_mathieu_modcem2_types[6] = <char>NPY_DOUBLE
  14945. ufunc_mathieu_modcem2_types[7] = <char>NPY_DOUBLE
  14946. ufunc_mathieu_modcem2_types[8] = <char>NPY_DOUBLE
  14947. ufunc_mathieu_modcem2_types[9] = <char>NPY_DOUBLE
  14948. ufunc_mathieu_modcem2_ptr[2*0] = <void*>_func_mcm2_wrap
  14949. ufunc_mathieu_modcem2_ptr[2*0+1] = <void*>(<char*>"mathieu_modcem2")
  14950. ufunc_mathieu_modcem2_ptr[2*1] = <void*>_func_mcm2_wrap
  14951. ufunc_mathieu_modcem2_ptr[2*1+1] = <void*>(<char*>"mathieu_modcem2")
  14952. ufunc_mathieu_modcem2_data[0] = &ufunc_mathieu_modcem2_ptr[2*0]
  14953. ufunc_mathieu_modcem2_data[1] = &ufunc_mathieu_modcem2_ptr[2*1]
  14954. mathieu_modcem2 = np.PyUFunc_FromFuncAndData(ufunc_mathieu_modcem2_loops, ufunc_mathieu_modcem2_data, ufunc_mathieu_modcem2_types, 2, 3, 2, 0, "mathieu_modcem2", ufunc_mathieu_modcem2_doc, 0)
  14955. cdef np.PyUFuncGenericFunction ufunc_mathieu_modsem1_loops[2]
  14956. cdef void *ufunc_mathieu_modsem1_ptr[4]
  14957. cdef void *ufunc_mathieu_modsem1_data[2]
  14958. cdef char ufunc_mathieu_modsem1_types[10]
  14959. cdef char *ufunc_mathieu_modsem1_doc = (
  14960. "mathieu_modsem1(m, q, x, out=None)\n"
  14961. "\n"
  14962. "Odd modified Mathieu function of the first kind and its derivative\n"
  14963. "\n"
  14964. "Evaluates the odd modified Mathieu function of the first kind,\n"
  14965. "Ms1m(x, q), and its derivative at `x` (given in degrees) for order `m`\n"
  14966. "and parameter `q`.\n"
  14967. "\n"
  14968. "Parameters\n"
  14969. "----------\n"
  14970. "m : array_like\n"
  14971. " Order of the function\n"
  14972. "q : array_like\n"
  14973. " Parameter of the function\n"
  14974. "x : array_like\n"
  14975. " Argument of the function, *given in degrees, not radians*\n"
  14976. "out : tuple of ndarray, optional\n"
  14977. " Optional output arrays for the function results\n"
  14978. "\n"
  14979. "Returns\n"
  14980. "-------\n"
  14981. "y : scalar or ndarray\n"
  14982. " Value of the function\n"
  14983. "yp : scalar or ndarray\n"
  14984. " Value of the derivative vs x\n"
  14985. "\n"
  14986. "See Also\n"
  14987. "--------\n"
  14988. "mathieu_modcem1")
  14989. ufunc_mathieu_modsem1_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  14990. ufunc_mathieu_modsem1_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  14991. ufunc_mathieu_modsem1_types[0] = <char>NPY_FLOAT
  14992. ufunc_mathieu_modsem1_types[1] = <char>NPY_FLOAT
  14993. ufunc_mathieu_modsem1_types[2] = <char>NPY_FLOAT
  14994. ufunc_mathieu_modsem1_types[3] = <char>NPY_FLOAT
  14995. ufunc_mathieu_modsem1_types[4] = <char>NPY_FLOAT
  14996. ufunc_mathieu_modsem1_types[5] = <char>NPY_DOUBLE
  14997. ufunc_mathieu_modsem1_types[6] = <char>NPY_DOUBLE
  14998. ufunc_mathieu_modsem1_types[7] = <char>NPY_DOUBLE
  14999. ufunc_mathieu_modsem1_types[8] = <char>NPY_DOUBLE
  15000. ufunc_mathieu_modsem1_types[9] = <char>NPY_DOUBLE
  15001. ufunc_mathieu_modsem1_ptr[2*0] = <void*>_func_msm1_wrap
  15002. ufunc_mathieu_modsem1_ptr[2*0+1] = <void*>(<char*>"mathieu_modsem1")
  15003. ufunc_mathieu_modsem1_ptr[2*1] = <void*>_func_msm1_wrap
  15004. ufunc_mathieu_modsem1_ptr[2*1+1] = <void*>(<char*>"mathieu_modsem1")
  15005. ufunc_mathieu_modsem1_data[0] = &ufunc_mathieu_modsem1_ptr[2*0]
  15006. ufunc_mathieu_modsem1_data[1] = &ufunc_mathieu_modsem1_ptr[2*1]
  15007. mathieu_modsem1 = np.PyUFunc_FromFuncAndData(ufunc_mathieu_modsem1_loops, ufunc_mathieu_modsem1_data, ufunc_mathieu_modsem1_types, 2, 3, 2, 0, "mathieu_modsem1", ufunc_mathieu_modsem1_doc, 0)
  15008. cdef np.PyUFuncGenericFunction ufunc_mathieu_modsem2_loops[2]
  15009. cdef void *ufunc_mathieu_modsem2_ptr[4]
  15010. cdef void *ufunc_mathieu_modsem2_data[2]
  15011. cdef char ufunc_mathieu_modsem2_types[10]
  15012. cdef char *ufunc_mathieu_modsem2_doc = (
  15013. "mathieu_modsem2(m, q, x, out=None)\n"
  15014. "\n"
  15015. "Odd modified Mathieu function of the second kind and its derivative\n"
  15016. "\n"
  15017. "Evaluates the odd modified Mathieu function of the second kind,\n"
  15018. "Ms2m(x, q), and its derivative at `x` (given in degrees) for order `m`\n"
  15019. "and parameter q.\n"
  15020. "\n"
  15021. "Parameters\n"
  15022. "----------\n"
  15023. "m : array_like\n"
  15024. " Order of the function\n"
  15025. "q : array_like\n"
  15026. " Parameter of the function\n"
  15027. "x : array_like\n"
  15028. " Argument of the function, *given in degrees, not radians*\n"
  15029. "out : tuple of ndarray, optional\n"
  15030. " Optional output arrays for the function results\n"
  15031. "\n"
  15032. "Returns\n"
  15033. "-------\n"
  15034. "y : scalar or ndarray\n"
  15035. " Value of the function\n"
  15036. "yp : scalar or ndarray\n"
  15037. " Value of the derivative vs x\n"
  15038. "\n"
  15039. "See Also\n"
  15040. "--------\n"
  15041. "mathieu_modcem2")
  15042. ufunc_mathieu_modsem2_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  15043. ufunc_mathieu_modsem2_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  15044. ufunc_mathieu_modsem2_types[0] = <char>NPY_FLOAT
  15045. ufunc_mathieu_modsem2_types[1] = <char>NPY_FLOAT
  15046. ufunc_mathieu_modsem2_types[2] = <char>NPY_FLOAT
  15047. ufunc_mathieu_modsem2_types[3] = <char>NPY_FLOAT
  15048. ufunc_mathieu_modsem2_types[4] = <char>NPY_FLOAT
  15049. ufunc_mathieu_modsem2_types[5] = <char>NPY_DOUBLE
  15050. ufunc_mathieu_modsem2_types[6] = <char>NPY_DOUBLE
  15051. ufunc_mathieu_modsem2_types[7] = <char>NPY_DOUBLE
  15052. ufunc_mathieu_modsem2_types[8] = <char>NPY_DOUBLE
  15053. ufunc_mathieu_modsem2_types[9] = <char>NPY_DOUBLE
  15054. ufunc_mathieu_modsem2_ptr[2*0] = <void*>_func_msm2_wrap
  15055. ufunc_mathieu_modsem2_ptr[2*0+1] = <void*>(<char*>"mathieu_modsem2")
  15056. ufunc_mathieu_modsem2_ptr[2*1] = <void*>_func_msm2_wrap
  15057. ufunc_mathieu_modsem2_ptr[2*1+1] = <void*>(<char*>"mathieu_modsem2")
  15058. ufunc_mathieu_modsem2_data[0] = &ufunc_mathieu_modsem2_ptr[2*0]
  15059. ufunc_mathieu_modsem2_data[1] = &ufunc_mathieu_modsem2_ptr[2*1]
  15060. mathieu_modsem2 = np.PyUFunc_FromFuncAndData(ufunc_mathieu_modsem2_loops, ufunc_mathieu_modsem2_data, ufunc_mathieu_modsem2_types, 2, 3, 2, 0, "mathieu_modsem2", ufunc_mathieu_modsem2_doc, 0)
  15061. cdef np.PyUFuncGenericFunction ufunc_mathieu_sem_loops[2]
  15062. cdef void *ufunc_mathieu_sem_ptr[4]
  15063. cdef void *ufunc_mathieu_sem_data[2]
  15064. cdef char ufunc_mathieu_sem_types[10]
  15065. cdef char *ufunc_mathieu_sem_doc = (
  15066. "mathieu_sem(m, q, x, out=None)\n"
  15067. "\n"
  15068. "Odd Mathieu function and its derivative\n"
  15069. "\n"
  15070. "Returns the odd Mathieu function, se_m(x, q), of order `m` and\n"
  15071. "parameter `q` evaluated at `x` (given in degrees). Also returns the\n"
  15072. "derivative with respect to `x` of se_m(x, q).\n"
  15073. "\n"
  15074. "Parameters\n"
  15075. "----------\n"
  15076. "m : array_like\n"
  15077. " Order of the function\n"
  15078. "q : array_like\n"
  15079. " Parameter of the function\n"
  15080. "x : array_like\n"
  15081. " Argument of the function, *given in degrees, not radians*.\n"
  15082. "out : tuple of ndarray, optional\n"
  15083. " Optional output arrays for the function results\n"
  15084. "\n"
  15085. "Returns\n"
  15086. "-------\n"
  15087. "y : scalar or ndarray\n"
  15088. " Value of the function\n"
  15089. "yp : scalar or ndarray\n"
  15090. " Value of the derivative vs x\n"
  15091. "\n"
  15092. "See Also\n"
  15093. "--------\n"
  15094. "mathieu_a, mathieu_b, mathieu_cem")
  15095. ufunc_mathieu_sem_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_fff_ff
  15096. ufunc_mathieu_sem_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddd_dd_As_ddd_dd
  15097. ufunc_mathieu_sem_types[0] = <char>NPY_FLOAT
  15098. ufunc_mathieu_sem_types[1] = <char>NPY_FLOAT
  15099. ufunc_mathieu_sem_types[2] = <char>NPY_FLOAT
  15100. ufunc_mathieu_sem_types[3] = <char>NPY_FLOAT
  15101. ufunc_mathieu_sem_types[4] = <char>NPY_FLOAT
  15102. ufunc_mathieu_sem_types[5] = <char>NPY_DOUBLE
  15103. ufunc_mathieu_sem_types[6] = <char>NPY_DOUBLE
  15104. ufunc_mathieu_sem_types[7] = <char>NPY_DOUBLE
  15105. ufunc_mathieu_sem_types[8] = <char>NPY_DOUBLE
  15106. ufunc_mathieu_sem_types[9] = <char>NPY_DOUBLE
  15107. ufunc_mathieu_sem_ptr[2*0] = <void*>_func_sem_wrap
  15108. ufunc_mathieu_sem_ptr[2*0+1] = <void*>(<char*>"mathieu_sem")
  15109. ufunc_mathieu_sem_ptr[2*1] = <void*>_func_sem_wrap
  15110. ufunc_mathieu_sem_ptr[2*1+1] = <void*>(<char*>"mathieu_sem")
  15111. ufunc_mathieu_sem_data[0] = &ufunc_mathieu_sem_ptr[2*0]
  15112. ufunc_mathieu_sem_data[1] = &ufunc_mathieu_sem_ptr[2*1]
  15113. mathieu_sem = np.PyUFunc_FromFuncAndData(ufunc_mathieu_sem_loops, ufunc_mathieu_sem_data, ufunc_mathieu_sem_types, 2, 3, 2, 0, "mathieu_sem", ufunc_mathieu_sem_doc, 0)
  15114. cdef np.PyUFuncGenericFunction ufunc_modfresnelm_loops[2]
  15115. cdef void *ufunc_modfresnelm_ptr[4]
  15116. cdef void *ufunc_modfresnelm_data[2]
  15117. cdef char ufunc_modfresnelm_types[6]
  15118. cdef char *ufunc_modfresnelm_doc = (
  15119. "modfresnelm(x, out=None)\n"
  15120. "\n"
  15121. "Modified Fresnel negative integrals\n"
  15122. "\n"
  15123. "Parameters\n"
  15124. "----------\n"
  15125. "x : array_like\n"
  15126. " Function argument\n"
  15127. "out : tuple of ndarray, optional\n"
  15128. " Optional output arrays for the function results\n"
  15129. "\n"
  15130. "Returns\n"
  15131. "-------\n"
  15132. "fm : scalar or ndarray\n"
  15133. " Integral ``F_-(x)``: ``integral(exp(-1j*t*t), t=x..inf)``\n"
  15134. "km : scalar or ndarray\n"
  15135. " Integral ``K_-(x)``: ``1/sqrt(pi)*exp(1j*(x*x+pi/4))*fp``\n"
  15136. "\n"
  15137. "See Also\n"
  15138. "--------\n"
  15139. "modfresnelp")
  15140. ufunc_modfresnelm_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_DD_As_f_FF
  15141. ufunc_modfresnelm_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_DD_As_d_DD
  15142. ufunc_modfresnelm_types[0] = <char>NPY_FLOAT
  15143. ufunc_modfresnelm_types[1] = <char>NPY_CFLOAT
  15144. ufunc_modfresnelm_types[2] = <char>NPY_CFLOAT
  15145. ufunc_modfresnelm_types[3] = <char>NPY_DOUBLE
  15146. ufunc_modfresnelm_types[4] = <char>NPY_CDOUBLE
  15147. ufunc_modfresnelm_types[5] = <char>NPY_CDOUBLE
  15148. ufunc_modfresnelm_ptr[2*0] = <void*>_func_modified_fresnel_minus_wrap
  15149. ufunc_modfresnelm_ptr[2*0+1] = <void*>(<char*>"modfresnelm")
  15150. ufunc_modfresnelm_ptr[2*1] = <void*>_func_modified_fresnel_minus_wrap
  15151. ufunc_modfresnelm_ptr[2*1+1] = <void*>(<char*>"modfresnelm")
  15152. ufunc_modfresnelm_data[0] = &ufunc_modfresnelm_ptr[2*0]
  15153. ufunc_modfresnelm_data[1] = &ufunc_modfresnelm_ptr[2*1]
  15154. modfresnelm = np.PyUFunc_FromFuncAndData(ufunc_modfresnelm_loops, ufunc_modfresnelm_data, ufunc_modfresnelm_types, 2, 1, 2, 0, "modfresnelm", ufunc_modfresnelm_doc, 0)
  15155. cdef np.PyUFuncGenericFunction ufunc_modfresnelp_loops[2]
  15156. cdef void *ufunc_modfresnelp_ptr[4]
  15157. cdef void *ufunc_modfresnelp_data[2]
  15158. cdef char ufunc_modfresnelp_types[6]
  15159. cdef char *ufunc_modfresnelp_doc = (
  15160. "modfresnelp(x, out=None)\n"
  15161. "\n"
  15162. "Modified Fresnel positive integrals\n"
  15163. "\n"
  15164. "Parameters\n"
  15165. "----------\n"
  15166. "x : array_like\n"
  15167. " Function argument\n"
  15168. "out : tuple of ndarray, optional\n"
  15169. " Optional output arrays for the function results\n"
  15170. "\n"
  15171. "Returns\n"
  15172. "-------\n"
  15173. "fp : scalar or ndarray\n"
  15174. " Integral ``F_+(x)``: ``integral(exp(1j*t*t), t=x..inf)``\n"
  15175. "kp : scalar or ndarray\n"
  15176. " Integral ``K_+(x)``: ``1/sqrt(pi)*exp(-1j*(x*x+pi/4))*fp``\n"
  15177. "\n"
  15178. "See Also\n"
  15179. "--------\n"
  15180. "modfresnelm")
  15181. ufunc_modfresnelp_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_DD_As_f_FF
  15182. ufunc_modfresnelp_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_DD_As_d_DD
  15183. ufunc_modfresnelp_types[0] = <char>NPY_FLOAT
  15184. ufunc_modfresnelp_types[1] = <char>NPY_CFLOAT
  15185. ufunc_modfresnelp_types[2] = <char>NPY_CFLOAT
  15186. ufunc_modfresnelp_types[3] = <char>NPY_DOUBLE
  15187. ufunc_modfresnelp_types[4] = <char>NPY_CDOUBLE
  15188. ufunc_modfresnelp_types[5] = <char>NPY_CDOUBLE
  15189. ufunc_modfresnelp_ptr[2*0] = <void*>_func_modified_fresnel_plus_wrap
  15190. ufunc_modfresnelp_ptr[2*0+1] = <void*>(<char*>"modfresnelp")
  15191. ufunc_modfresnelp_ptr[2*1] = <void*>_func_modified_fresnel_plus_wrap
  15192. ufunc_modfresnelp_ptr[2*1+1] = <void*>(<char*>"modfresnelp")
  15193. ufunc_modfresnelp_data[0] = &ufunc_modfresnelp_ptr[2*0]
  15194. ufunc_modfresnelp_data[1] = &ufunc_modfresnelp_ptr[2*1]
  15195. modfresnelp = np.PyUFunc_FromFuncAndData(ufunc_modfresnelp_loops, ufunc_modfresnelp_data, ufunc_modfresnelp_types, 2, 1, 2, 0, "modfresnelp", ufunc_modfresnelp_doc, 0)
  15196. cdef np.PyUFuncGenericFunction ufunc_modstruve_loops[2]
  15197. cdef void *ufunc_modstruve_ptr[4]
  15198. cdef void *ufunc_modstruve_data[2]
  15199. cdef char ufunc_modstruve_types[6]
  15200. cdef char *ufunc_modstruve_doc = (
  15201. "modstruve(v, x, out=None)\n"
  15202. "\n"
  15203. "Modified Struve function.\n"
  15204. "\n"
  15205. "Return the value of the modified Struve function of order `v` at `x`. The\n"
  15206. "modified Struve function is defined as,\n"
  15207. "\n"
  15208. ".. math::\n"
  15209. " L_v(x) = -\\imath \\exp(-\\pi\\imath v/2) H_v(\\imath x),\n"
  15210. "\n"
  15211. "where :math:`H_v` is the Struve function.\n"
  15212. "\n"
  15213. "Parameters\n"
  15214. "----------\n"
  15215. "v : array_like\n"
  15216. " Order of the modified Struve function (float).\n"
  15217. "x : array_like\n"
  15218. " Argument of the Struve function (float; must be positive unless `v` is\n"
  15219. " an integer).\n"
  15220. "out : ndarray, optional\n"
  15221. " Optional output array for the function results\n"
  15222. "\n"
  15223. "Returns\n"
  15224. "-------\n"
  15225. "L : scalar or ndarray\n"
  15226. " Value of the modified Struve function of order `v` at `x`.\n"
  15227. "\n"
  15228. "Notes\n"
  15229. "-----\n"
  15230. "Three methods discussed in [1]_ are used to evaluate the function:\n"
  15231. "\n"
  15232. "- power series\n"
  15233. "- expansion in Bessel functions (if :math:`|x| < |v| + 20`)\n"
  15234. "- asymptotic large-x expansion (if :math:`x \\geq 0.7v + 12`)\n"
  15235. "\n"
  15236. "Rounding errors are estimated based on the largest terms in the sums, and\n"
  15237. "the result associated with the smallest error is returned.\n"
  15238. "\n"
  15239. "See also\n"
  15240. "--------\n"
  15241. "struve\n"
  15242. "\n"
  15243. "References\n"
  15244. "----------\n"
  15245. ".. [1] NIST Digital Library of Mathematical Functions\n"
  15246. " https://dlmf.nist.gov/11\n"
  15247. "\n"
  15248. "Examples\n"
  15249. "--------\n"
  15250. "Calculate the modified Struve function of order 1 at 2.\n"
  15251. "\n"
  15252. ">>> import numpy as np\n"
  15253. ">>> from scipy.special import modstruve\n"
  15254. ">>> import matplotlib.pyplot as plt\n"
  15255. ">>> modstruve(1, 2.)\n"
  15256. "1.102759787367716\n"
  15257. "\n"
  15258. "Calculate the modified Struve function at 2 for orders 1, 2 and 3 by\n"
  15259. "providing a list for the order parameter `v`.\n"
  15260. "\n"
  15261. ">>> modstruve([1, 2, 3], 2.)\n"
  15262. "array([1.10275979, 0.41026079, 0.11247294])\n"
  15263. "\n"
  15264. "Calculate the modified Struve function of order 1 for several points\n"
  15265. "by providing an array for `x`.\n"
  15266. "\n"
  15267. ">>> points = np.array([2., 5., 8.])\n"
  15268. ">>> modstruve(1, points)\n"
  15269. "array([ 1.10275979, 23.72821578, 399.24709139])\n"
  15270. "\n"
  15271. "Compute the modified Struve function for several orders at several\n"
  15272. "points by providing arrays for `v` and `z`. The arrays have to be\n"
  15273. "broadcastable to the correct shapes.\n"
  15274. "\n"
  15275. ">>> orders = np.array([[1], [2], [3]])\n"
  15276. ">>> points.shape, orders.shape\n"
  15277. "((3,), (3, 1))\n"
  15278. "\n"
  15279. ">>> modstruve(orders, points)\n"
  15280. "array([[1.10275979e+00, 2.37282158e+01, 3.99247091e+02],\n"
  15281. " [4.10260789e-01, 1.65535979e+01, 3.25973609e+02],\n"
  15282. " [1.12472937e-01, 9.42430454e+00, 2.33544042e+02]])\n"
  15283. "\n"
  15284. "Plot the modified Struve functions of order 0 to 3 from -5 to 5.\n"
  15285. "\n"
  15286. ">>> fig, ax = plt.subplots()\n"
  15287. ">>> x = np.linspace(-5., 5., 1000)\n"
  15288. ">>> for i in range(4):\n"
  15289. "... ax.plot(x, modstruve(i, x), label=f'$L_{i!r}$')\n"
  15290. ">>> ax.legend(ncol=2)\n"
  15291. ">>> ax.set_xlim(-5, 5)\n"
  15292. ">>> ax.set_title(r\"Modified Struve functions $L_{\\nu}$\")\n"
  15293. ">>> plt.show()")
  15294. ufunc_modstruve_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  15295. ufunc_modstruve_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  15296. ufunc_modstruve_types[0] = <char>NPY_FLOAT
  15297. ufunc_modstruve_types[1] = <char>NPY_FLOAT
  15298. ufunc_modstruve_types[2] = <char>NPY_FLOAT
  15299. ufunc_modstruve_types[3] = <char>NPY_DOUBLE
  15300. ufunc_modstruve_types[4] = <char>NPY_DOUBLE
  15301. ufunc_modstruve_types[5] = <char>NPY_DOUBLE
  15302. ufunc_modstruve_ptr[2*0] = <void*>_func_struve_l
  15303. ufunc_modstruve_ptr[2*0+1] = <void*>(<char*>"modstruve")
  15304. ufunc_modstruve_ptr[2*1] = <void*>_func_struve_l
  15305. ufunc_modstruve_ptr[2*1+1] = <void*>(<char*>"modstruve")
  15306. ufunc_modstruve_data[0] = &ufunc_modstruve_ptr[2*0]
  15307. ufunc_modstruve_data[1] = &ufunc_modstruve_ptr[2*1]
  15308. modstruve = np.PyUFunc_FromFuncAndData(ufunc_modstruve_loops, ufunc_modstruve_data, ufunc_modstruve_types, 2, 2, 1, 0, "modstruve", ufunc_modstruve_doc, 0)
  15309. cdef np.PyUFuncGenericFunction ufunc_nbdtr_loops[3]
  15310. cdef void *ufunc_nbdtr_ptr[6]
  15311. cdef void *ufunc_nbdtr_data[3]
  15312. cdef char ufunc_nbdtr_types[12]
  15313. cdef char *ufunc_nbdtr_doc = (
  15314. "nbdtr(k, n, p, out=None)\n"
  15315. "\n"
  15316. "Negative binomial cumulative distribution function.\n"
  15317. "\n"
  15318. "Returns the sum of the terms 0 through `k` of the negative binomial\n"
  15319. "distribution probability mass function,\n"
  15320. "\n"
  15321. ".. math::\n"
  15322. "\n"
  15323. " F = \\sum_{j=0}^k {{n + j - 1}\\choose{j}} p^n (1 - p)^j.\n"
  15324. "\n"
  15325. "In a sequence of Bernoulli trials with individual success probabilities\n"
  15326. "`p`, this is the probability that `k` or fewer failures precede the nth\n"
  15327. "success.\n"
  15328. "\n"
  15329. "Parameters\n"
  15330. "----------\n"
  15331. "k : array_like\n"
  15332. " The maximum number of allowed failures (nonnegative int).\n"
  15333. "n : array_like\n"
  15334. " The target number of successes (positive int).\n"
  15335. "p : array_like\n"
  15336. " Probability of success in a single event (float).\n"
  15337. "out : ndarray, optional\n"
  15338. " Optional output array for the function results\n"
  15339. "\n"
  15340. "Returns\n"
  15341. "-------\n"
  15342. "F : scalar or ndarray\n"
  15343. " The probability of `k` or fewer failures before `n` successes in a\n"
  15344. " sequence of events with individual success probability `p`.\n"
  15345. "\n"
  15346. "See also\n"
  15347. "--------\n"
  15348. "nbdtrc\n"
  15349. "\n"
  15350. "Notes\n"
  15351. "-----\n"
  15352. "If floating point values are passed for `k` or `n`, they will be truncated\n"
  15353. "to integers.\n"
  15354. "\n"
  15355. "The terms are not summed directly; instead the regularized incomplete beta\n"
  15356. "function is employed, according to the formula,\n"
  15357. "\n"
  15358. ".. math::\n"
  15359. " \\mathrm{nbdtr}(k, n, p) = I_{p}(n, k + 1).\n"
  15360. "\n"
  15361. "Wrapper for the Cephes [1]_ routine `nbdtr`.\n"
  15362. "\n"
  15363. "References\n"
  15364. "----------\n"
  15365. ".. [1] Cephes Mathematical Functions Library,\n"
  15366. " http://www.netlib.org/cephes/")
  15367. ufunc_nbdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_iid__As_lld_d
  15368. ufunc_nbdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  15369. ufunc_nbdtr_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  15370. ufunc_nbdtr_types[0] = <char>NPY_LONG
  15371. ufunc_nbdtr_types[1] = <char>NPY_LONG
  15372. ufunc_nbdtr_types[2] = <char>NPY_DOUBLE
  15373. ufunc_nbdtr_types[3] = <char>NPY_DOUBLE
  15374. ufunc_nbdtr_types[4] = <char>NPY_FLOAT
  15375. ufunc_nbdtr_types[5] = <char>NPY_FLOAT
  15376. ufunc_nbdtr_types[6] = <char>NPY_FLOAT
  15377. ufunc_nbdtr_types[7] = <char>NPY_FLOAT
  15378. ufunc_nbdtr_types[8] = <char>NPY_DOUBLE
  15379. ufunc_nbdtr_types[9] = <char>NPY_DOUBLE
  15380. ufunc_nbdtr_types[10] = <char>NPY_DOUBLE
  15381. ufunc_nbdtr_types[11] = <char>NPY_DOUBLE
  15382. ufunc_nbdtr_ptr[2*0] = <void*>_func_nbdtr
  15383. ufunc_nbdtr_ptr[2*0+1] = <void*>(<char*>"nbdtr")
  15384. ufunc_nbdtr_ptr[2*1] = <void*>_func_nbdtr_unsafe
  15385. ufunc_nbdtr_ptr[2*1+1] = <void*>(<char*>"nbdtr")
  15386. ufunc_nbdtr_ptr[2*2] = <void*>_func_nbdtr_unsafe
  15387. ufunc_nbdtr_ptr[2*2+1] = <void*>(<char*>"nbdtr")
  15388. ufunc_nbdtr_data[0] = &ufunc_nbdtr_ptr[2*0]
  15389. ufunc_nbdtr_data[1] = &ufunc_nbdtr_ptr[2*1]
  15390. ufunc_nbdtr_data[2] = &ufunc_nbdtr_ptr[2*2]
  15391. nbdtr = np.PyUFunc_FromFuncAndData(ufunc_nbdtr_loops, ufunc_nbdtr_data, ufunc_nbdtr_types, 3, 3, 1, 0, "nbdtr", ufunc_nbdtr_doc, 0)
  15392. cdef np.PyUFuncGenericFunction ufunc_nbdtrc_loops[3]
  15393. cdef void *ufunc_nbdtrc_ptr[6]
  15394. cdef void *ufunc_nbdtrc_data[3]
  15395. cdef char ufunc_nbdtrc_types[12]
  15396. cdef char *ufunc_nbdtrc_doc = (
  15397. "nbdtrc(k, n, p, out=None)\n"
  15398. "\n"
  15399. "Negative binomial survival function.\n"
  15400. "\n"
  15401. "Returns the sum of the terms `k + 1` to infinity of the negative binomial\n"
  15402. "distribution probability mass function,\n"
  15403. "\n"
  15404. ".. math::\n"
  15405. "\n"
  15406. " F = \\sum_{j=k + 1}^\\infty {{n + j - 1}\\choose{j}} p^n (1 - p)^j.\n"
  15407. "\n"
  15408. "In a sequence of Bernoulli trials with individual success probabilities\n"
  15409. "`p`, this is the probability that more than `k` failures precede the nth\n"
  15410. "success.\n"
  15411. "\n"
  15412. "Parameters\n"
  15413. "----------\n"
  15414. "k : array_like\n"
  15415. " The maximum number of allowed failures (nonnegative int).\n"
  15416. "n : array_like\n"
  15417. " The target number of successes (positive int).\n"
  15418. "p : array_like\n"
  15419. " Probability of success in a single event (float).\n"
  15420. "out : ndarray, optional\n"
  15421. " Optional output array for the function results\n"
  15422. "\n"
  15423. "Returns\n"
  15424. "-------\n"
  15425. "F : scalar or ndarray\n"
  15426. " The probability of `k + 1` or more failures before `n` successes in a\n"
  15427. " sequence of events with individual success probability `p`.\n"
  15428. "\n"
  15429. "Notes\n"
  15430. "-----\n"
  15431. "If floating point values are passed for `k` or `n`, they will be truncated\n"
  15432. "to integers.\n"
  15433. "\n"
  15434. "The terms are not summed directly; instead the regularized incomplete beta\n"
  15435. "function is employed, according to the formula,\n"
  15436. "\n"
  15437. ".. math::\n"
  15438. " \\mathrm{nbdtrc}(k, n, p) = I_{1 - p}(k + 1, n).\n"
  15439. "\n"
  15440. "Wrapper for the Cephes [1]_ routine `nbdtrc`.\n"
  15441. "\n"
  15442. "References\n"
  15443. "----------\n"
  15444. ".. [1] Cephes Mathematical Functions Library,\n"
  15445. " http://www.netlib.org/cephes/")
  15446. ufunc_nbdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_iid__As_lld_d
  15447. ufunc_nbdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  15448. ufunc_nbdtrc_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  15449. ufunc_nbdtrc_types[0] = <char>NPY_LONG
  15450. ufunc_nbdtrc_types[1] = <char>NPY_LONG
  15451. ufunc_nbdtrc_types[2] = <char>NPY_DOUBLE
  15452. ufunc_nbdtrc_types[3] = <char>NPY_DOUBLE
  15453. ufunc_nbdtrc_types[4] = <char>NPY_FLOAT
  15454. ufunc_nbdtrc_types[5] = <char>NPY_FLOAT
  15455. ufunc_nbdtrc_types[6] = <char>NPY_FLOAT
  15456. ufunc_nbdtrc_types[7] = <char>NPY_FLOAT
  15457. ufunc_nbdtrc_types[8] = <char>NPY_DOUBLE
  15458. ufunc_nbdtrc_types[9] = <char>NPY_DOUBLE
  15459. ufunc_nbdtrc_types[10] = <char>NPY_DOUBLE
  15460. ufunc_nbdtrc_types[11] = <char>NPY_DOUBLE
  15461. ufunc_nbdtrc_ptr[2*0] = <void*>_func_nbdtrc
  15462. ufunc_nbdtrc_ptr[2*0+1] = <void*>(<char*>"nbdtrc")
  15463. ufunc_nbdtrc_ptr[2*1] = <void*>_func_nbdtrc_unsafe
  15464. ufunc_nbdtrc_ptr[2*1+1] = <void*>(<char*>"nbdtrc")
  15465. ufunc_nbdtrc_ptr[2*2] = <void*>_func_nbdtrc_unsafe
  15466. ufunc_nbdtrc_ptr[2*2+1] = <void*>(<char*>"nbdtrc")
  15467. ufunc_nbdtrc_data[0] = &ufunc_nbdtrc_ptr[2*0]
  15468. ufunc_nbdtrc_data[1] = &ufunc_nbdtrc_ptr[2*1]
  15469. ufunc_nbdtrc_data[2] = &ufunc_nbdtrc_ptr[2*2]
  15470. nbdtrc = np.PyUFunc_FromFuncAndData(ufunc_nbdtrc_loops, ufunc_nbdtrc_data, ufunc_nbdtrc_types, 3, 3, 1, 0, "nbdtrc", ufunc_nbdtrc_doc, 0)
  15471. cdef np.PyUFuncGenericFunction ufunc_nbdtri_loops[3]
  15472. cdef void *ufunc_nbdtri_ptr[6]
  15473. cdef void *ufunc_nbdtri_data[3]
  15474. cdef char ufunc_nbdtri_types[12]
  15475. cdef char *ufunc_nbdtri_doc = (
  15476. "nbdtri(k, n, y, out=None)\n"
  15477. "\n"
  15478. "Inverse of `nbdtr` vs `p`.\n"
  15479. "\n"
  15480. "Returns the inverse with respect to the parameter `p` of\n"
  15481. "`y = nbdtr(k, n, p)`, the negative binomial cumulative distribution\n"
  15482. "function.\n"
  15483. "\n"
  15484. "Parameters\n"
  15485. "----------\n"
  15486. "k : array_like\n"
  15487. " The maximum number of allowed failures (nonnegative int).\n"
  15488. "n : array_like\n"
  15489. " The target number of successes (positive int).\n"
  15490. "y : array_like\n"
  15491. " The probability of `k` or fewer failures before `n` successes (float).\n"
  15492. "out : ndarray, optional\n"
  15493. " Optional output array for the function results\n"
  15494. "\n"
  15495. "Returns\n"
  15496. "-------\n"
  15497. "p : scalar or ndarray\n"
  15498. " Probability of success in a single event (float) such that\n"
  15499. " `nbdtr(k, n, p) = y`.\n"
  15500. "\n"
  15501. "See also\n"
  15502. "--------\n"
  15503. "nbdtr : Cumulative distribution function of the negative binomial.\n"
  15504. "nbdtrik : Inverse with respect to `k` of `nbdtr(k, n, p)`.\n"
  15505. "nbdtrin : Inverse with respect to `n` of `nbdtr(k, n, p)`.\n"
  15506. "\n"
  15507. "Notes\n"
  15508. "-----\n"
  15509. "Wrapper for the Cephes [1]_ routine `nbdtri`.\n"
  15510. "\n"
  15511. "References\n"
  15512. "----------\n"
  15513. ".. [1] Cephes Mathematical Functions Library,\n"
  15514. " http://www.netlib.org/cephes/")
  15515. ufunc_nbdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_iid__As_lld_d
  15516. ufunc_nbdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  15517. ufunc_nbdtri_loops[2] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  15518. ufunc_nbdtri_types[0] = <char>NPY_LONG
  15519. ufunc_nbdtri_types[1] = <char>NPY_LONG
  15520. ufunc_nbdtri_types[2] = <char>NPY_DOUBLE
  15521. ufunc_nbdtri_types[3] = <char>NPY_DOUBLE
  15522. ufunc_nbdtri_types[4] = <char>NPY_FLOAT
  15523. ufunc_nbdtri_types[5] = <char>NPY_FLOAT
  15524. ufunc_nbdtri_types[6] = <char>NPY_FLOAT
  15525. ufunc_nbdtri_types[7] = <char>NPY_FLOAT
  15526. ufunc_nbdtri_types[8] = <char>NPY_DOUBLE
  15527. ufunc_nbdtri_types[9] = <char>NPY_DOUBLE
  15528. ufunc_nbdtri_types[10] = <char>NPY_DOUBLE
  15529. ufunc_nbdtri_types[11] = <char>NPY_DOUBLE
  15530. ufunc_nbdtri_ptr[2*0] = <void*>_func_nbdtri
  15531. ufunc_nbdtri_ptr[2*0+1] = <void*>(<char*>"nbdtri")
  15532. ufunc_nbdtri_ptr[2*1] = <void*>_func_nbdtri_unsafe
  15533. ufunc_nbdtri_ptr[2*1+1] = <void*>(<char*>"nbdtri")
  15534. ufunc_nbdtri_ptr[2*2] = <void*>_func_nbdtri_unsafe
  15535. ufunc_nbdtri_ptr[2*2+1] = <void*>(<char*>"nbdtri")
  15536. ufunc_nbdtri_data[0] = &ufunc_nbdtri_ptr[2*0]
  15537. ufunc_nbdtri_data[1] = &ufunc_nbdtri_ptr[2*1]
  15538. ufunc_nbdtri_data[2] = &ufunc_nbdtri_ptr[2*2]
  15539. nbdtri = np.PyUFunc_FromFuncAndData(ufunc_nbdtri_loops, ufunc_nbdtri_data, ufunc_nbdtri_types, 3, 3, 1, 0, "nbdtri", ufunc_nbdtri_doc, 0)
  15540. cdef np.PyUFuncGenericFunction ufunc_nbdtrik_loops[2]
  15541. cdef void *ufunc_nbdtrik_ptr[4]
  15542. cdef void *ufunc_nbdtrik_data[2]
  15543. cdef char ufunc_nbdtrik_types[8]
  15544. cdef char *ufunc_nbdtrik_doc = (
  15545. "nbdtrik(y, n, p, out=None)\n"
  15546. "\n"
  15547. "Inverse of `nbdtr` vs `k`.\n"
  15548. "\n"
  15549. "Returns the inverse with respect to the parameter `k` of\n"
  15550. "`y = nbdtr(k, n, p)`, the negative binomial cumulative distribution\n"
  15551. "function.\n"
  15552. "\n"
  15553. "Parameters\n"
  15554. "----------\n"
  15555. "y : array_like\n"
  15556. " The probability of `k` or fewer failures before `n` successes (float).\n"
  15557. "n : array_like\n"
  15558. " The target number of successes (positive int).\n"
  15559. "p : array_like\n"
  15560. " Probability of success in a single event (float).\n"
  15561. "out : ndarray, optional\n"
  15562. " Optional output array for the function results\n"
  15563. "\n"
  15564. "Returns\n"
  15565. "-------\n"
  15566. "k : scalar or ndarray\n"
  15567. " The maximum number of allowed failures such that `nbdtr(k, n, p) = y`.\n"
  15568. "\n"
  15569. "See also\n"
  15570. "--------\n"
  15571. "nbdtr : Cumulative distribution function of the negative binomial.\n"
  15572. "nbdtri : Inverse with respect to `p` of `nbdtr(k, n, p)`.\n"
  15573. "nbdtrin : Inverse with respect to `n` of `nbdtr(k, n, p)`.\n"
  15574. "\n"
  15575. "Notes\n"
  15576. "-----\n"
  15577. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfnbn`.\n"
  15578. "\n"
  15579. "Formula 26.5.26 of [2]_,\n"
  15580. "\n"
  15581. ".. math::\n"
  15582. " \\sum_{j=k + 1}^\\infty {{n + j - 1}\\choose{j}} p^n (1 - p)^j = I_{1 - p}(k + 1, n),\n"
  15583. "\n"
  15584. "is used to reduce calculation of the cumulative distribution function to\n"
  15585. "that of a regularized incomplete beta :math:`I`.\n"
  15586. "\n"
  15587. "Computation of `k` involves a search for a value that produces the desired\n"
  15588. "value of `y`. The search relies on the monotonicity of `y` with `k`.\n"
  15589. "\n"
  15590. "References\n"
  15591. "----------\n"
  15592. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  15593. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  15594. " Functions, Inverses, and Other Parameters.\n"
  15595. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  15596. " Handbook of Mathematical Functions with Formulas,\n"
  15597. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  15598. ufunc_nbdtrik_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  15599. ufunc_nbdtrik_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  15600. ufunc_nbdtrik_types[0] = <char>NPY_FLOAT
  15601. ufunc_nbdtrik_types[1] = <char>NPY_FLOAT
  15602. ufunc_nbdtrik_types[2] = <char>NPY_FLOAT
  15603. ufunc_nbdtrik_types[3] = <char>NPY_FLOAT
  15604. ufunc_nbdtrik_types[4] = <char>NPY_DOUBLE
  15605. ufunc_nbdtrik_types[5] = <char>NPY_DOUBLE
  15606. ufunc_nbdtrik_types[6] = <char>NPY_DOUBLE
  15607. ufunc_nbdtrik_types[7] = <char>NPY_DOUBLE
  15608. ufunc_nbdtrik_ptr[2*0] = <void*>_func_cdfnbn2_wrap
  15609. ufunc_nbdtrik_ptr[2*0+1] = <void*>(<char*>"nbdtrik")
  15610. ufunc_nbdtrik_ptr[2*1] = <void*>_func_cdfnbn2_wrap
  15611. ufunc_nbdtrik_ptr[2*1+1] = <void*>(<char*>"nbdtrik")
  15612. ufunc_nbdtrik_data[0] = &ufunc_nbdtrik_ptr[2*0]
  15613. ufunc_nbdtrik_data[1] = &ufunc_nbdtrik_ptr[2*1]
  15614. nbdtrik = np.PyUFunc_FromFuncAndData(ufunc_nbdtrik_loops, ufunc_nbdtrik_data, ufunc_nbdtrik_types, 2, 3, 1, 0, "nbdtrik", ufunc_nbdtrik_doc, 0)
  15615. cdef np.PyUFuncGenericFunction ufunc_nbdtrin_loops[2]
  15616. cdef void *ufunc_nbdtrin_ptr[4]
  15617. cdef void *ufunc_nbdtrin_data[2]
  15618. cdef char ufunc_nbdtrin_types[8]
  15619. cdef char *ufunc_nbdtrin_doc = (
  15620. "nbdtrin(k, y, p, out=None)\n"
  15621. "\n"
  15622. "Inverse of `nbdtr` vs `n`.\n"
  15623. "\n"
  15624. "Returns the inverse with respect to the parameter `n` of\n"
  15625. "`y = nbdtr(k, n, p)`, the negative binomial cumulative distribution\n"
  15626. "function.\n"
  15627. "\n"
  15628. "Parameters\n"
  15629. "----------\n"
  15630. "k : array_like\n"
  15631. " The maximum number of allowed failures (nonnegative int).\n"
  15632. "y : array_like\n"
  15633. " The probability of `k` or fewer failures before `n` successes (float).\n"
  15634. "p : array_like\n"
  15635. " Probability of success in a single event (float).\n"
  15636. "out : ndarray, optional\n"
  15637. " Optional output array for the function results\n"
  15638. "\n"
  15639. "Returns\n"
  15640. "-------\n"
  15641. "n : scalar or ndarray\n"
  15642. " The number of successes `n` such that `nbdtr(k, n, p) = y`.\n"
  15643. "\n"
  15644. "See also\n"
  15645. "--------\n"
  15646. "nbdtr : Cumulative distribution function of the negative binomial.\n"
  15647. "nbdtri : Inverse with respect to `p` of `nbdtr(k, n, p)`.\n"
  15648. "nbdtrik : Inverse with respect to `k` of `nbdtr(k, n, p)`.\n"
  15649. "\n"
  15650. "Notes\n"
  15651. "-----\n"
  15652. "Wrapper for the CDFLIB [1]_ Fortran routine `cdfnbn`.\n"
  15653. "\n"
  15654. "Formula 26.5.26 of [2]_,\n"
  15655. "\n"
  15656. ".. math::\n"
  15657. " \\sum_{j=k + 1}^\\infty {{n + j - 1}\\choose{j}} p^n (1 - p)^j = I_{1 - p}(k + 1, n),\n"
  15658. "\n"
  15659. "is used to reduce calculation of the cumulative distribution function to\n"
  15660. "that of a regularized incomplete beta :math:`I`.\n"
  15661. "\n"
  15662. "Computation of `n` involves a search for a value that produces the desired\n"
  15663. "value of `y`. The search relies on the monotonicity of `y` with `n`.\n"
  15664. "\n"
  15665. "References\n"
  15666. "----------\n"
  15667. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  15668. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  15669. " Functions, Inverses, and Other Parameters.\n"
  15670. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  15671. " Handbook of Mathematical Functions with Formulas,\n"
  15672. " Graphs, and Mathematical Tables. New York: Dover, 1972.")
  15673. ufunc_nbdtrin_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  15674. ufunc_nbdtrin_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  15675. ufunc_nbdtrin_types[0] = <char>NPY_FLOAT
  15676. ufunc_nbdtrin_types[1] = <char>NPY_FLOAT
  15677. ufunc_nbdtrin_types[2] = <char>NPY_FLOAT
  15678. ufunc_nbdtrin_types[3] = <char>NPY_FLOAT
  15679. ufunc_nbdtrin_types[4] = <char>NPY_DOUBLE
  15680. ufunc_nbdtrin_types[5] = <char>NPY_DOUBLE
  15681. ufunc_nbdtrin_types[6] = <char>NPY_DOUBLE
  15682. ufunc_nbdtrin_types[7] = <char>NPY_DOUBLE
  15683. ufunc_nbdtrin_ptr[2*0] = <void*>_func_cdfnbn3_wrap
  15684. ufunc_nbdtrin_ptr[2*0+1] = <void*>(<char*>"nbdtrin")
  15685. ufunc_nbdtrin_ptr[2*1] = <void*>_func_cdfnbn3_wrap
  15686. ufunc_nbdtrin_ptr[2*1+1] = <void*>(<char*>"nbdtrin")
  15687. ufunc_nbdtrin_data[0] = &ufunc_nbdtrin_ptr[2*0]
  15688. ufunc_nbdtrin_data[1] = &ufunc_nbdtrin_ptr[2*1]
  15689. nbdtrin = np.PyUFunc_FromFuncAndData(ufunc_nbdtrin_loops, ufunc_nbdtrin_data, ufunc_nbdtrin_types, 2, 3, 1, 0, "nbdtrin", ufunc_nbdtrin_doc, 0)
  15690. cdef np.PyUFuncGenericFunction ufunc_ncfdtr_loops[2]
  15691. cdef void *ufunc_ncfdtr_ptr[4]
  15692. cdef void *ufunc_ncfdtr_data[2]
  15693. cdef char ufunc_ncfdtr_types[10]
  15694. cdef char *ufunc_ncfdtr_doc = (
  15695. "ncfdtr(dfn, dfd, nc, f, out=None)\n"
  15696. "\n"
  15697. "Cumulative distribution function of the non-central F distribution.\n"
  15698. "\n"
  15699. "The non-central F describes the distribution of,\n"
  15700. "\n"
  15701. ".. math::\n"
  15702. " Z = \\frac{X/d_n}{Y/d_d}\n"
  15703. "\n"
  15704. "where :math:`X` and :math:`Y` are independently distributed, with\n"
  15705. ":math:`X` distributed non-central :math:`\\chi^2` with noncentrality\n"
  15706. "parameter `nc` and :math:`d_n` degrees of freedom, and :math:`Y`\n"
  15707. "distributed :math:`\\chi^2` with :math:`d_d` degrees of freedom.\n"
  15708. "\n"
  15709. "Parameters\n"
  15710. "----------\n"
  15711. "dfn : array_like\n"
  15712. " Degrees of freedom of the numerator sum of squares. Range (0, inf).\n"
  15713. "dfd : array_like\n"
  15714. " Degrees of freedom of the denominator sum of squares. Range (0, inf).\n"
  15715. "nc : array_like\n"
  15716. " Noncentrality parameter. Should be in range (0, 1e4).\n"
  15717. "f : array_like\n"
  15718. " Quantiles, i.e. the upper limit of integration.\n"
  15719. "out : ndarray, optional\n"
  15720. " Optional output array for the function results\n"
  15721. "\n"
  15722. "Returns\n"
  15723. "-------\n"
  15724. "cdf : scalar or ndarray\n"
  15725. " The calculated CDF. If all inputs are scalar, the return will be a\n"
  15726. " float. Otherwise it will be an array.\n"
  15727. "\n"
  15728. "See Also\n"
  15729. "--------\n"
  15730. "ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.\n"
  15731. "ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.\n"
  15732. "ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.\n"
  15733. "ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.\n"
  15734. "\n"
  15735. "Notes\n"
  15736. "-----\n"
  15737. "Wrapper for the CDFLIB [1]_ Fortran routine `cdffnc`.\n"
  15738. "\n"
  15739. "The cumulative distribution function is computed using Formula 26.6.20 of\n"
  15740. "[2]_:\n"
  15741. "\n"
  15742. ".. math::\n"
  15743. " F(d_n, d_d, n_c, f) = \\sum_{j=0}^\\infty e^{-n_c/2} \\frac{(n_c/2)^j}{j!} I_{x}(\\frac{d_n}{2} + j, \\frac{d_d}{2}),\n"
  15744. "\n"
  15745. "where :math:`I` is the regularized incomplete beta function, and\n"
  15746. ":math:`x = f d_n/(f d_n + d_d)`.\n"
  15747. "\n"
  15748. "The computation time required for this routine is proportional to the\n"
  15749. "noncentrality parameter `nc`. Very large values of this parameter can\n"
  15750. "consume immense computer resources. This is why the search range is\n"
  15751. "bounded by 10,000.\n"
  15752. "\n"
  15753. "References\n"
  15754. "----------\n"
  15755. ".. [1] Barry Brown, James Lovato, and Kathy Russell,\n"
  15756. " CDFLIB: Library of Fortran Routines for Cumulative Distribution\n"
  15757. " Functions, Inverses, and Other Parameters.\n"
  15758. ".. [2] Milton Abramowitz and Irene A. Stegun, eds.\n"
  15759. " Handbook of Mathematical Functions with Formulas,\n"
  15760. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  15761. "\n"
  15762. "Examples\n"
  15763. "--------\n"
  15764. ">>> import numpy as np\n"
  15765. ">>> from scipy import special\n"
  15766. ">>> from scipy import stats\n"
  15767. ">>> import matplotlib.pyplot as plt\n"
  15768. "\n"
  15769. "Plot the CDF of the non-central F distribution, for nc=0. Compare with the\n"
  15770. "F-distribution from scipy.stats:\n"
  15771. "\n"
  15772. ">>> x = np.linspace(-1, 8, num=500)\n"
  15773. ">>> dfn = 3\n"
  15774. ">>> dfd = 2\n"
  15775. ">>> ncf_stats = stats.f.cdf(x, dfn, dfd)\n"
  15776. ">>> ncf_special = special.ncfdtr(dfn, dfd, 0, x)\n"
  15777. "\n"
  15778. ">>> fig = plt.figure()\n"
  15779. ">>> ax = fig.add_subplot(111)\n"
  15780. ">>> ax.plot(x, ncf_stats, 'b-', lw=3)\n"
  15781. ">>> ax.plot(x, ncf_special, 'r-')\n"
  15782. ">>> plt.show()")
  15783. ufunc_ncfdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  15784. ufunc_ncfdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  15785. ufunc_ncfdtr_types[0] = <char>NPY_FLOAT
  15786. ufunc_ncfdtr_types[1] = <char>NPY_FLOAT
  15787. ufunc_ncfdtr_types[2] = <char>NPY_FLOAT
  15788. ufunc_ncfdtr_types[3] = <char>NPY_FLOAT
  15789. ufunc_ncfdtr_types[4] = <char>NPY_FLOAT
  15790. ufunc_ncfdtr_types[5] = <char>NPY_DOUBLE
  15791. ufunc_ncfdtr_types[6] = <char>NPY_DOUBLE
  15792. ufunc_ncfdtr_types[7] = <char>NPY_DOUBLE
  15793. ufunc_ncfdtr_types[8] = <char>NPY_DOUBLE
  15794. ufunc_ncfdtr_types[9] = <char>NPY_DOUBLE
  15795. ufunc_ncfdtr_ptr[2*0] = <void*>_func_cdffnc1_wrap
  15796. ufunc_ncfdtr_ptr[2*0+1] = <void*>(<char*>"ncfdtr")
  15797. ufunc_ncfdtr_ptr[2*1] = <void*>_func_cdffnc1_wrap
  15798. ufunc_ncfdtr_ptr[2*1+1] = <void*>(<char*>"ncfdtr")
  15799. ufunc_ncfdtr_data[0] = &ufunc_ncfdtr_ptr[2*0]
  15800. ufunc_ncfdtr_data[1] = &ufunc_ncfdtr_ptr[2*1]
  15801. ncfdtr = np.PyUFunc_FromFuncAndData(ufunc_ncfdtr_loops, ufunc_ncfdtr_data, ufunc_ncfdtr_types, 2, 4, 1, 0, "ncfdtr", ufunc_ncfdtr_doc, 0)
  15802. cdef np.PyUFuncGenericFunction ufunc_ncfdtri_loops[2]
  15803. cdef void *ufunc_ncfdtri_ptr[4]
  15804. cdef void *ufunc_ncfdtri_data[2]
  15805. cdef char ufunc_ncfdtri_types[10]
  15806. cdef char *ufunc_ncfdtri_doc = (
  15807. "ncfdtri(dfn, dfd, nc, p, out=None)\n"
  15808. "\n"
  15809. "Inverse with respect to `f` of the CDF of the non-central F distribution.\n"
  15810. "\n"
  15811. "See `ncfdtr` for more details.\n"
  15812. "\n"
  15813. "Parameters\n"
  15814. "----------\n"
  15815. "dfn : array_like\n"
  15816. " Degrees of freedom of the numerator sum of squares. Range (0, inf).\n"
  15817. "dfd : array_like\n"
  15818. " Degrees of freedom of the denominator sum of squares. Range (0, inf).\n"
  15819. "nc : array_like\n"
  15820. " Noncentrality parameter. Should be in range (0, 1e4).\n"
  15821. "p : array_like\n"
  15822. " Value of the cumulative distribution function. Must be in the\n"
  15823. " range [0, 1].\n"
  15824. "out : ndarray, optional\n"
  15825. " Optional output array for the function results\n"
  15826. "\n"
  15827. "Returns\n"
  15828. "-------\n"
  15829. "f : scalar or ndarray\n"
  15830. " Quantiles, i.e., the upper limit of integration.\n"
  15831. "\n"
  15832. "See Also\n"
  15833. "--------\n"
  15834. "ncfdtr : CDF of the non-central F distribution.\n"
  15835. "ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.\n"
  15836. "ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.\n"
  15837. "ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.\n"
  15838. "\n"
  15839. "Examples\n"
  15840. "--------\n"
  15841. ">>> from scipy.special import ncfdtr, ncfdtri\n"
  15842. "\n"
  15843. "Compute the CDF for several values of `f`:\n"
  15844. "\n"
  15845. ">>> f = [0.5, 1, 1.5]\n"
  15846. ">>> p = ncfdtr(2, 3, 1.5, f)\n"
  15847. ">>> p\n"
  15848. "array([ 0.20782291, 0.36107392, 0.47345752])\n"
  15849. "\n"
  15850. "Compute the inverse. We recover the values of `f`, as expected:\n"
  15851. "\n"
  15852. ">>> ncfdtri(2, 3, 1.5, p)\n"
  15853. "array([ 0.5, 1. , 1.5])")
  15854. ufunc_ncfdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  15855. ufunc_ncfdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  15856. ufunc_ncfdtri_types[0] = <char>NPY_FLOAT
  15857. ufunc_ncfdtri_types[1] = <char>NPY_FLOAT
  15858. ufunc_ncfdtri_types[2] = <char>NPY_FLOAT
  15859. ufunc_ncfdtri_types[3] = <char>NPY_FLOAT
  15860. ufunc_ncfdtri_types[4] = <char>NPY_FLOAT
  15861. ufunc_ncfdtri_types[5] = <char>NPY_DOUBLE
  15862. ufunc_ncfdtri_types[6] = <char>NPY_DOUBLE
  15863. ufunc_ncfdtri_types[7] = <char>NPY_DOUBLE
  15864. ufunc_ncfdtri_types[8] = <char>NPY_DOUBLE
  15865. ufunc_ncfdtri_types[9] = <char>NPY_DOUBLE
  15866. ufunc_ncfdtri_ptr[2*0] = <void*>_func_cdffnc2_wrap
  15867. ufunc_ncfdtri_ptr[2*0+1] = <void*>(<char*>"ncfdtri")
  15868. ufunc_ncfdtri_ptr[2*1] = <void*>_func_cdffnc2_wrap
  15869. ufunc_ncfdtri_ptr[2*1+1] = <void*>(<char*>"ncfdtri")
  15870. ufunc_ncfdtri_data[0] = &ufunc_ncfdtri_ptr[2*0]
  15871. ufunc_ncfdtri_data[1] = &ufunc_ncfdtri_ptr[2*1]
  15872. ncfdtri = np.PyUFunc_FromFuncAndData(ufunc_ncfdtri_loops, ufunc_ncfdtri_data, ufunc_ncfdtri_types, 2, 4, 1, 0, "ncfdtri", ufunc_ncfdtri_doc, 0)
  15873. cdef np.PyUFuncGenericFunction ufunc_ncfdtridfd_loops[2]
  15874. cdef void *ufunc_ncfdtridfd_ptr[4]
  15875. cdef void *ufunc_ncfdtridfd_data[2]
  15876. cdef char ufunc_ncfdtridfd_types[10]
  15877. cdef char *ufunc_ncfdtridfd_doc = (
  15878. "ncfdtridfd(dfn, p, nc, f, out=None)\n"
  15879. "\n"
  15880. "Calculate degrees of freedom (denominator) for the noncentral F-distribution.\n"
  15881. "\n"
  15882. "This is the inverse with respect to `dfd` of `ncfdtr`.\n"
  15883. "See `ncfdtr` for more details.\n"
  15884. "\n"
  15885. "Parameters\n"
  15886. "----------\n"
  15887. "dfn : array_like\n"
  15888. " Degrees of freedom of the numerator sum of squares. Range (0, inf).\n"
  15889. "p : array_like\n"
  15890. " Value of the cumulative distribution function. Must be in the\n"
  15891. " range [0, 1].\n"
  15892. "nc : array_like\n"
  15893. " Noncentrality parameter. Should be in range (0, 1e4).\n"
  15894. "f : array_like\n"
  15895. " Quantiles, i.e., the upper limit of integration.\n"
  15896. "out : ndarray, optional\n"
  15897. " Optional output array for the function results\n"
  15898. "\n"
  15899. "Returns\n"
  15900. "-------\n"
  15901. "dfd : scalar or ndarray\n"
  15902. " Degrees of freedom of the denominator sum of squares.\n"
  15903. "\n"
  15904. "See Also\n"
  15905. "--------\n"
  15906. "ncfdtr : CDF of the non-central F distribution.\n"
  15907. "ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.\n"
  15908. "ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.\n"
  15909. "ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.\n"
  15910. "\n"
  15911. "Notes\n"
  15912. "-----\n"
  15913. "The value of the cumulative noncentral F distribution is not necessarily\n"
  15914. "monotone in either degrees of freedom. There thus may be two values that\n"
  15915. "provide a given CDF value. This routine assumes monotonicity and will\n"
  15916. "find an arbitrary one of the two values.\n"
  15917. "\n"
  15918. "Examples\n"
  15919. "--------\n"
  15920. ">>> from scipy.special import ncfdtr, ncfdtridfd\n"
  15921. "\n"
  15922. "Compute the CDF for several values of `dfd`:\n"
  15923. "\n"
  15924. ">>> dfd = [1, 2, 3]\n"
  15925. ">>> p = ncfdtr(2, dfd, 0.25, 15)\n"
  15926. ">>> p\n"
  15927. "array([ 0.8097138 , 0.93020416, 0.96787852])\n"
  15928. "\n"
  15929. "Compute the inverse. We recover the values of `dfd`, as expected:\n"
  15930. "\n"
  15931. ">>> ncfdtridfd(2, p, 0.25, 15)\n"
  15932. "array([ 1., 2., 3.])")
  15933. ufunc_ncfdtridfd_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  15934. ufunc_ncfdtridfd_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  15935. ufunc_ncfdtridfd_types[0] = <char>NPY_FLOAT
  15936. ufunc_ncfdtridfd_types[1] = <char>NPY_FLOAT
  15937. ufunc_ncfdtridfd_types[2] = <char>NPY_FLOAT
  15938. ufunc_ncfdtridfd_types[3] = <char>NPY_FLOAT
  15939. ufunc_ncfdtridfd_types[4] = <char>NPY_FLOAT
  15940. ufunc_ncfdtridfd_types[5] = <char>NPY_DOUBLE
  15941. ufunc_ncfdtridfd_types[6] = <char>NPY_DOUBLE
  15942. ufunc_ncfdtridfd_types[7] = <char>NPY_DOUBLE
  15943. ufunc_ncfdtridfd_types[8] = <char>NPY_DOUBLE
  15944. ufunc_ncfdtridfd_types[9] = <char>NPY_DOUBLE
  15945. ufunc_ncfdtridfd_ptr[2*0] = <void*>_func_cdffnc4_wrap
  15946. ufunc_ncfdtridfd_ptr[2*0+1] = <void*>(<char*>"ncfdtridfd")
  15947. ufunc_ncfdtridfd_ptr[2*1] = <void*>_func_cdffnc4_wrap
  15948. ufunc_ncfdtridfd_ptr[2*1+1] = <void*>(<char*>"ncfdtridfd")
  15949. ufunc_ncfdtridfd_data[0] = &ufunc_ncfdtridfd_ptr[2*0]
  15950. ufunc_ncfdtridfd_data[1] = &ufunc_ncfdtridfd_ptr[2*1]
  15951. ncfdtridfd = np.PyUFunc_FromFuncAndData(ufunc_ncfdtridfd_loops, ufunc_ncfdtridfd_data, ufunc_ncfdtridfd_types, 2, 4, 1, 0, "ncfdtridfd", ufunc_ncfdtridfd_doc, 0)
  15952. cdef np.PyUFuncGenericFunction ufunc_ncfdtridfn_loops[2]
  15953. cdef void *ufunc_ncfdtridfn_ptr[4]
  15954. cdef void *ufunc_ncfdtridfn_data[2]
  15955. cdef char ufunc_ncfdtridfn_types[10]
  15956. cdef char *ufunc_ncfdtridfn_doc = (
  15957. "ncfdtridfn(p, dfd, nc, f, out=None)\n"
  15958. "\n"
  15959. "Calculate degrees of freedom (numerator) for the noncentral F-distribution.\n"
  15960. "\n"
  15961. "This is the inverse with respect to `dfn` of `ncfdtr`.\n"
  15962. "See `ncfdtr` for more details.\n"
  15963. "\n"
  15964. "Parameters\n"
  15965. "----------\n"
  15966. "p : array_like\n"
  15967. " Value of the cumulative distribution function. Must be in the\n"
  15968. " range [0, 1].\n"
  15969. "dfd : array_like\n"
  15970. " Degrees of freedom of the denominator sum of squares. Range (0, inf).\n"
  15971. "nc : array_like\n"
  15972. " Noncentrality parameter. Should be in range (0, 1e4).\n"
  15973. "f : float\n"
  15974. " Quantiles, i.e., the upper limit of integration.\n"
  15975. "out : ndarray, optional\n"
  15976. " Optional output array for the function results\n"
  15977. "\n"
  15978. "Returns\n"
  15979. "-------\n"
  15980. "dfn : scalar or ndarray\n"
  15981. " Degrees of freedom of the numerator sum of squares.\n"
  15982. "\n"
  15983. "See Also\n"
  15984. "--------\n"
  15985. "ncfdtr : CDF of the non-central F distribution.\n"
  15986. "ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.\n"
  15987. "ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.\n"
  15988. "ncfdtrinc : Inverse of `ncfdtr` with respect to `nc`.\n"
  15989. "\n"
  15990. "Notes\n"
  15991. "-----\n"
  15992. "The value of the cumulative noncentral F distribution is not necessarily\n"
  15993. "monotone in either degrees of freedom. There thus may be two values that\n"
  15994. "provide a given CDF value. This routine assumes monotonicity and will\n"
  15995. "find an arbitrary one of the two values.\n"
  15996. "\n"
  15997. "Examples\n"
  15998. "--------\n"
  15999. ">>> from scipy.special import ncfdtr, ncfdtridfn\n"
  16000. "\n"
  16001. "Compute the CDF for several values of `dfn`:\n"
  16002. "\n"
  16003. ">>> dfn = [1, 2, 3]\n"
  16004. ">>> p = ncfdtr(dfn, 2, 0.25, 15)\n"
  16005. ">>> p\n"
  16006. "array([ 0.92562363, 0.93020416, 0.93188394])\n"
  16007. "\n"
  16008. "Compute the inverse. We recover the values of `dfn`, as expected:\n"
  16009. "\n"
  16010. ">>> ncfdtridfn(p, 2, 0.25, 15)\n"
  16011. "array([ 1., 2., 3.])")
  16012. ufunc_ncfdtridfn_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  16013. ufunc_ncfdtridfn_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  16014. ufunc_ncfdtridfn_types[0] = <char>NPY_FLOAT
  16015. ufunc_ncfdtridfn_types[1] = <char>NPY_FLOAT
  16016. ufunc_ncfdtridfn_types[2] = <char>NPY_FLOAT
  16017. ufunc_ncfdtridfn_types[3] = <char>NPY_FLOAT
  16018. ufunc_ncfdtridfn_types[4] = <char>NPY_FLOAT
  16019. ufunc_ncfdtridfn_types[5] = <char>NPY_DOUBLE
  16020. ufunc_ncfdtridfn_types[6] = <char>NPY_DOUBLE
  16021. ufunc_ncfdtridfn_types[7] = <char>NPY_DOUBLE
  16022. ufunc_ncfdtridfn_types[8] = <char>NPY_DOUBLE
  16023. ufunc_ncfdtridfn_types[9] = <char>NPY_DOUBLE
  16024. ufunc_ncfdtridfn_ptr[2*0] = <void*>_func_cdffnc3_wrap
  16025. ufunc_ncfdtridfn_ptr[2*0+1] = <void*>(<char*>"ncfdtridfn")
  16026. ufunc_ncfdtridfn_ptr[2*1] = <void*>_func_cdffnc3_wrap
  16027. ufunc_ncfdtridfn_ptr[2*1+1] = <void*>(<char*>"ncfdtridfn")
  16028. ufunc_ncfdtridfn_data[0] = &ufunc_ncfdtridfn_ptr[2*0]
  16029. ufunc_ncfdtridfn_data[1] = &ufunc_ncfdtridfn_ptr[2*1]
  16030. ncfdtridfn = np.PyUFunc_FromFuncAndData(ufunc_ncfdtridfn_loops, ufunc_ncfdtridfn_data, ufunc_ncfdtridfn_types, 2, 4, 1, 0, "ncfdtridfn", ufunc_ncfdtridfn_doc, 0)
  16031. cdef np.PyUFuncGenericFunction ufunc_ncfdtrinc_loops[2]
  16032. cdef void *ufunc_ncfdtrinc_ptr[4]
  16033. cdef void *ufunc_ncfdtrinc_data[2]
  16034. cdef char ufunc_ncfdtrinc_types[10]
  16035. cdef char *ufunc_ncfdtrinc_doc = (
  16036. "ncfdtrinc(dfn, dfd, p, f, out=None)\n"
  16037. "\n"
  16038. "Calculate non-centrality parameter for non-central F distribution.\n"
  16039. "\n"
  16040. "This is the inverse with respect to `nc` of `ncfdtr`.\n"
  16041. "See `ncfdtr` for more details.\n"
  16042. "\n"
  16043. "Parameters\n"
  16044. "----------\n"
  16045. "dfn : array_like\n"
  16046. " Degrees of freedom of the numerator sum of squares. Range (0, inf).\n"
  16047. "dfd : array_like\n"
  16048. " Degrees of freedom of the denominator sum of squares. Range (0, inf).\n"
  16049. "p : array_like\n"
  16050. " Value of the cumulative distribution function. Must be in the\n"
  16051. " range [0, 1].\n"
  16052. "f : array_like\n"
  16053. " Quantiles, i.e., the upper limit of integration.\n"
  16054. "out : ndarray, optional\n"
  16055. " Optional output array for the function results\n"
  16056. "\n"
  16057. "Returns\n"
  16058. "-------\n"
  16059. "nc : scalar or ndarray\n"
  16060. " Noncentrality parameter.\n"
  16061. "\n"
  16062. "See Also\n"
  16063. "--------\n"
  16064. "ncfdtr : CDF of the non-central F distribution.\n"
  16065. "ncfdtri : Quantile function; inverse of `ncfdtr` with respect to `f`.\n"
  16066. "ncfdtridfd : Inverse of `ncfdtr` with respect to `dfd`.\n"
  16067. "ncfdtridfn : Inverse of `ncfdtr` with respect to `dfn`.\n"
  16068. "\n"
  16069. "Examples\n"
  16070. "--------\n"
  16071. ">>> from scipy.special import ncfdtr, ncfdtrinc\n"
  16072. "\n"
  16073. "Compute the CDF for several values of `nc`:\n"
  16074. "\n"
  16075. ">>> nc = [0.5, 1.5, 2.0]\n"
  16076. ">>> p = ncfdtr(2, 3, nc, 15)\n"
  16077. ">>> p\n"
  16078. "array([ 0.96309246, 0.94327955, 0.93304098])\n"
  16079. "\n"
  16080. "Compute the inverse. We recover the values of `nc`, as expected:\n"
  16081. "\n"
  16082. ">>> ncfdtrinc(2, 3, p, 15)\n"
  16083. "array([ 0.5, 1.5, 2. ])")
  16084. ufunc_ncfdtrinc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd__As_ffff_f
  16085. ufunc_ncfdtrinc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd__As_dddd_d
  16086. ufunc_ncfdtrinc_types[0] = <char>NPY_FLOAT
  16087. ufunc_ncfdtrinc_types[1] = <char>NPY_FLOAT
  16088. ufunc_ncfdtrinc_types[2] = <char>NPY_FLOAT
  16089. ufunc_ncfdtrinc_types[3] = <char>NPY_FLOAT
  16090. ufunc_ncfdtrinc_types[4] = <char>NPY_FLOAT
  16091. ufunc_ncfdtrinc_types[5] = <char>NPY_DOUBLE
  16092. ufunc_ncfdtrinc_types[6] = <char>NPY_DOUBLE
  16093. ufunc_ncfdtrinc_types[7] = <char>NPY_DOUBLE
  16094. ufunc_ncfdtrinc_types[8] = <char>NPY_DOUBLE
  16095. ufunc_ncfdtrinc_types[9] = <char>NPY_DOUBLE
  16096. ufunc_ncfdtrinc_ptr[2*0] = <void*>_func_cdffnc5_wrap
  16097. ufunc_ncfdtrinc_ptr[2*0+1] = <void*>(<char*>"ncfdtrinc")
  16098. ufunc_ncfdtrinc_ptr[2*1] = <void*>_func_cdffnc5_wrap
  16099. ufunc_ncfdtrinc_ptr[2*1+1] = <void*>(<char*>"ncfdtrinc")
  16100. ufunc_ncfdtrinc_data[0] = &ufunc_ncfdtrinc_ptr[2*0]
  16101. ufunc_ncfdtrinc_data[1] = &ufunc_ncfdtrinc_ptr[2*1]
  16102. ncfdtrinc = np.PyUFunc_FromFuncAndData(ufunc_ncfdtrinc_loops, ufunc_ncfdtrinc_data, ufunc_ncfdtrinc_types, 2, 4, 1, 0, "ncfdtrinc", ufunc_ncfdtrinc_doc, 0)
  16103. cdef np.PyUFuncGenericFunction ufunc_nctdtr_loops[2]
  16104. cdef void *ufunc_nctdtr_ptr[4]
  16105. cdef void *ufunc_nctdtr_data[2]
  16106. cdef char ufunc_nctdtr_types[8]
  16107. cdef char *ufunc_nctdtr_doc = (
  16108. "nctdtr(df, nc, t, out=None)\n"
  16109. "\n"
  16110. "Cumulative distribution function of the non-central `t` distribution.\n"
  16111. "\n"
  16112. "Parameters\n"
  16113. "----------\n"
  16114. "df : array_like\n"
  16115. " Degrees of freedom of the distribution. Should be in range (0, inf).\n"
  16116. "nc : array_like\n"
  16117. " Noncentrality parameter. Should be in range (-1e6, 1e6).\n"
  16118. "t : array_like\n"
  16119. " Quantiles, i.e., the upper limit of integration.\n"
  16120. "out : ndarray, optional\n"
  16121. " Optional output array for the function results\n"
  16122. "\n"
  16123. "Returns\n"
  16124. "-------\n"
  16125. "cdf : scalar or ndarray\n"
  16126. " The calculated CDF. If all inputs are scalar, the return will be a\n"
  16127. " float. Otherwise, it will be an array.\n"
  16128. "\n"
  16129. "See Also\n"
  16130. "--------\n"
  16131. "nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.\n"
  16132. "nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.\n"
  16133. "nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.\n"
  16134. "\n"
  16135. "Examples\n"
  16136. "--------\n"
  16137. ">>> import numpy as np\n"
  16138. ">>> from scipy import special\n"
  16139. ">>> from scipy import stats\n"
  16140. ">>> import matplotlib.pyplot as plt\n"
  16141. "\n"
  16142. "Plot the CDF of the non-central t distribution, for nc=0. Compare with the\n"
  16143. "t-distribution from scipy.stats:\n"
  16144. "\n"
  16145. ">>> x = np.linspace(-5, 5, num=500)\n"
  16146. ">>> df = 3\n"
  16147. ">>> nct_stats = stats.t.cdf(x, df)\n"
  16148. ">>> nct_special = special.nctdtr(df, 0, x)\n"
  16149. "\n"
  16150. ">>> fig = plt.figure()\n"
  16151. ">>> ax = fig.add_subplot(111)\n"
  16152. ">>> ax.plot(x, nct_stats, 'b-', lw=3)\n"
  16153. ">>> ax.plot(x, nct_special, 'r-')\n"
  16154. ">>> plt.show()")
  16155. ufunc_nctdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16156. ufunc_nctdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16157. ufunc_nctdtr_types[0] = <char>NPY_FLOAT
  16158. ufunc_nctdtr_types[1] = <char>NPY_FLOAT
  16159. ufunc_nctdtr_types[2] = <char>NPY_FLOAT
  16160. ufunc_nctdtr_types[3] = <char>NPY_FLOAT
  16161. ufunc_nctdtr_types[4] = <char>NPY_DOUBLE
  16162. ufunc_nctdtr_types[5] = <char>NPY_DOUBLE
  16163. ufunc_nctdtr_types[6] = <char>NPY_DOUBLE
  16164. ufunc_nctdtr_types[7] = <char>NPY_DOUBLE
  16165. ufunc_nctdtr_ptr[2*0] = <void*>_func_cdftnc1_wrap
  16166. ufunc_nctdtr_ptr[2*0+1] = <void*>(<char*>"nctdtr")
  16167. ufunc_nctdtr_ptr[2*1] = <void*>_func_cdftnc1_wrap
  16168. ufunc_nctdtr_ptr[2*1+1] = <void*>(<char*>"nctdtr")
  16169. ufunc_nctdtr_data[0] = &ufunc_nctdtr_ptr[2*0]
  16170. ufunc_nctdtr_data[1] = &ufunc_nctdtr_ptr[2*1]
  16171. nctdtr = np.PyUFunc_FromFuncAndData(ufunc_nctdtr_loops, ufunc_nctdtr_data, ufunc_nctdtr_types, 2, 3, 1, 0, "nctdtr", ufunc_nctdtr_doc, 0)
  16172. cdef np.PyUFuncGenericFunction ufunc_nctdtridf_loops[2]
  16173. cdef void *ufunc_nctdtridf_ptr[4]
  16174. cdef void *ufunc_nctdtridf_data[2]
  16175. cdef char ufunc_nctdtridf_types[8]
  16176. cdef char *ufunc_nctdtridf_doc = (
  16177. "nctdtridf(p, nc, t, out=None)\n"
  16178. "\n"
  16179. "Calculate degrees of freedom for non-central t distribution.\n"
  16180. "\n"
  16181. "See `nctdtr` for more details.\n"
  16182. "\n"
  16183. "Parameters\n"
  16184. "----------\n"
  16185. "p : array_like\n"
  16186. " CDF values, in range (0, 1].\n"
  16187. "nc : array_like\n"
  16188. " Noncentrality parameter. Should be in range (-1e6, 1e6).\n"
  16189. "t : array_like\n"
  16190. " Quantiles, i.e., the upper limit of integration.\n"
  16191. "out : ndarray, optional\n"
  16192. " Optional output array for the function results\n"
  16193. "\n"
  16194. "Returns\n"
  16195. "-------\n"
  16196. "cdf : scalar or ndarray\n"
  16197. " The calculated CDF. If all inputs are scalar, the return will be a\n"
  16198. " float. Otherwise, it will be an array.\n"
  16199. "\n"
  16200. "See Also\n"
  16201. "--------\n"
  16202. "nctdtr : CDF of the non-central `t` distribution.\n"
  16203. "nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.\n"
  16204. "nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.")
  16205. ufunc_nctdtridf_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16206. ufunc_nctdtridf_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16207. ufunc_nctdtridf_types[0] = <char>NPY_FLOAT
  16208. ufunc_nctdtridf_types[1] = <char>NPY_FLOAT
  16209. ufunc_nctdtridf_types[2] = <char>NPY_FLOAT
  16210. ufunc_nctdtridf_types[3] = <char>NPY_FLOAT
  16211. ufunc_nctdtridf_types[4] = <char>NPY_DOUBLE
  16212. ufunc_nctdtridf_types[5] = <char>NPY_DOUBLE
  16213. ufunc_nctdtridf_types[6] = <char>NPY_DOUBLE
  16214. ufunc_nctdtridf_types[7] = <char>NPY_DOUBLE
  16215. ufunc_nctdtridf_ptr[2*0] = <void*>_func_cdftnc3_wrap
  16216. ufunc_nctdtridf_ptr[2*0+1] = <void*>(<char*>"nctdtridf")
  16217. ufunc_nctdtridf_ptr[2*1] = <void*>_func_cdftnc3_wrap
  16218. ufunc_nctdtridf_ptr[2*1+1] = <void*>(<char*>"nctdtridf")
  16219. ufunc_nctdtridf_data[0] = &ufunc_nctdtridf_ptr[2*0]
  16220. ufunc_nctdtridf_data[1] = &ufunc_nctdtridf_ptr[2*1]
  16221. nctdtridf = np.PyUFunc_FromFuncAndData(ufunc_nctdtridf_loops, ufunc_nctdtridf_data, ufunc_nctdtridf_types, 2, 3, 1, 0, "nctdtridf", ufunc_nctdtridf_doc, 0)
  16222. cdef np.PyUFuncGenericFunction ufunc_nctdtrinc_loops[2]
  16223. cdef void *ufunc_nctdtrinc_ptr[4]
  16224. cdef void *ufunc_nctdtrinc_data[2]
  16225. cdef char ufunc_nctdtrinc_types[8]
  16226. cdef char *ufunc_nctdtrinc_doc = (
  16227. "nctdtrinc(df, p, t, out=None)\n"
  16228. "\n"
  16229. "Calculate non-centrality parameter for non-central t distribution.\n"
  16230. "\n"
  16231. "See `nctdtr` for more details.\n"
  16232. "\n"
  16233. "Parameters\n"
  16234. "----------\n"
  16235. "df : array_like\n"
  16236. " Degrees of freedom of the distribution. Should be in range (0, inf).\n"
  16237. "p : array_like\n"
  16238. " CDF values, in range (0, 1].\n"
  16239. "t : array_like\n"
  16240. " Quantiles, i.e., the upper limit of integration.\n"
  16241. "out : ndarray, optional\n"
  16242. " Optional output array for the function results\n"
  16243. "\n"
  16244. "Returns\n"
  16245. "-------\n"
  16246. "nc : scalar or ndarray\n"
  16247. " Noncentrality parameter\n"
  16248. "\n"
  16249. "See Also\n"
  16250. "--------\n"
  16251. "nctdtr : CDF of the non-central `t` distribution.\n"
  16252. "nctdtrit : Inverse CDF (iCDF) of the non-central t distribution.\n"
  16253. "nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.")
  16254. ufunc_nctdtrinc_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16255. ufunc_nctdtrinc_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16256. ufunc_nctdtrinc_types[0] = <char>NPY_FLOAT
  16257. ufunc_nctdtrinc_types[1] = <char>NPY_FLOAT
  16258. ufunc_nctdtrinc_types[2] = <char>NPY_FLOAT
  16259. ufunc_nctdtrinc_types[3] = <char>NPY_FLOAT
  16260. ufunc_nctdtrinc_types[4] = <char>NPY_DOUBLE
  16261. ufunc_nctdtrinc_types[5] = <char>NPY_DOUBLE
  16262. ufunc_nctdtrinc_types[6] = <char>NPY_DOUBLE
  16263. ufunc_nctdtrinc_types[7] = <char>NPY_DOUBLE
  16264. ufunc_nctdtrinc_ptr[2*0] = <void*>_func_cdftnc4_wrap
  16265. ufunc_nctdtrinc_ptr[2*0+1] = <void*>(<char*>"nctdtrinc")
  16266. ufunc_nctdtrinc_ptr[2*1] = <void*>_func_cdftnc4_wrap
  16267. ufunc_nctdtrinc_ptr[2*1+1] = <void*>(<char*>"nctdtrinc")
  16268. ufunc_nctdtrinc_data[0] = &ufunc_nctdtrinc_ptr[2*0]
  16269. ufunc_nctdtrinc_data[1] = &ufunc_nctdtrinc_ptr[2*1]
  16270. nctdtrinc = np.PyUFunc_FromFuncAndData(ufunc_nctdtrinc_loops, ufunc_nctdtrinc_data, ufunc_nctdtrinc_types, 2, 3, 1, 0, "nctdtrinc", ufunc_nctdtrinc_doc, 0)
  16271. cdef np.PyUFuncGenericFunction ufunc_nctdtrit_loops[2]
  16272. cdef void *ufunc_nctdtrit_ptr[4]
  16273. cdef void *ufunc_nctdtrit_data[2]
  16274. cdef char ufunc_nctdtrit_types[8]
  16275. cdef char *ufunc_nctdtrit_doc = (
  16276. "nctdtrit(df, nc, p, out=None)\n"
  16277. "\n"
  16278. "Inverse cumulative distribution function of the non-central t distribution.\n"
  16279. "\n"
  16280. "See `nctdtr` for more details.\n"
  16281. "\n"
  16282. "Parameters\n"
  16283. "----------\n"
  16284. "df : array_like\n"
  16285. " Degrees of freedom of the distribution. Should be in range (0, inf).\n"
  16286. "nc : array_like\n"
  16287. " Noncentrality parameter. Should be in range (-1e6, 1e6).\n"
  16288. "p : array_like\n"
  16289. " CDF values, in range (0, 1].\n"
  16290. "out : ndarray, optional\n"
  16291. " Optional output array for the function results\n"
  16292. "\n"
  16293. "Returns\n"
  16294. "-------\n"
  16295. "t : scalar or ndarray\n"
  16296. " Quantiles\n"
  16297. "\n"
  16298. "See Also\n"
  16299. "--------\n"
  16300. "nctdtr : CDF of the non-central `t` distribution.\n"
  16301. "nctdtridf : Calculate degrees of freedom, given CDF and iCDF values.\n"
  16302. "nctdtrinc : Calculate non-centrality parameter, given CDF iCDF values.")
  16303. ufunc_nctdtrit_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16304. ufunc_nctdtrit_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16305. ufunc_nctdtrit_types[0] = <char>NPY_FLOAT
  16306. ufunc_nctdtrit_types[1] = <char>NPY_FLOAT
  16307. ufunc_nctdtrit_types[2] = <char>NPY_FLOAT
  16308. ufunc_nctdtrit_types[3] = <char>NPY_FLOAT
  16309. ufunc_nctdtrit_types[4] = <char>NPY_DOUBLE
  16310. ufunc_nctdtrit_types[5] = <char>NPY_DOUBLE
  16311. ufunc_nctdtrit_types[6] = <char>NPY_DOUBLE
  16312. ufunc_nctdtrit_types[7] = <char>NPY_DOUBLE
  16313. ufunc_nctdtrit_ptr[2*0] = <void*>_func_cdftnc2_wrap
  16314. ufunc_nctdtrit_ptr[2*0+1] = <void*>(<char*>"nctdtrit")
  16315. ufunc_nctdtrit_ptr[2*1] = <void*>_func_cdftnc2_wrap
  16316. ufunc_nctdtrit_ptr[2*1+1] = <void*>(<char*>"nctdtrit")
  16317. ufunc_nctdtrit_data[0] = &ufunc_nctdtrit_ptr[2*0]
  16318. ufunc_nctdtrit_data[1] = &ufunc_nctdtrit_ptr[2*1]
  16319. nctdtrit = np.PyUFunc_FromFuncAndData(ufunc_nctdtrit_loops, ufunc_nctdtrit_data, ufunc_nctdtrit_types, 2, 3, 1, 0, "nctdtrit", ufunc_nctdtrit_doc, 0)
  16320. cdef np.PyUFuncGenericFunction ufunc_ndtr_loops[4]
  16321. cdef void *ufunc_ndtr_ptr[8]
  16322. cdef void *ufunc_ndtr_data[4]
  16323. cdef char ufunc_ndtr_types[8]
  16324. cdef char *ufunc_ndtr_doc = (
  16325. "ndtr(x, out=None)\n"
  16326. "\n"
  16327. "Gaussian cumulative distribution function.\n"
  16328. "\n"
  16329. "Returns the area under the standard Gaussian probability\n"
  16330. "density function, integrated from minus infinity to `x`\n"
  16331. "\n"
  16332. ".. math::\n"
  16333. "\n"
  16334. " \\frac{1}{\\sqrt{2\\pi}} \\int_{-\\infty}^x \\exp(-t^2/2) dt\n"
  16335. "\n"
  16336. "Parameters\n"
  16337. "----------\n"
  16338. "x : array_like, real or complex\n"
  16339. " Argument\n"
  16340. "out : ndarray, optional\n"
  16341. " Optional output array for the function results\n"
  16342. "\n"
  16343. "Returns\n"
  16344. "-------\n"
  16345. "scalar or ndarray\n"
  16346. " The value of the normal CDF evaluated at `x`\n"
  16347. "\n"
  16348. "See Also\n"
  16349. "--------\n"
  16350. "erf, erfc, scipy.stats.norm, log_ndtr")
  16351. ufunc_ndtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  16352. ufunc_ndtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  16353. ufunc_ndtr_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  16354. ufunc_ndtr_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  16355. ufunc_ndtr_types[0] = <char>NPY_FLOAT
  16356. ufunc_ndtr_types[1] = <char>NPY_FLOAT
  16357. ufunc_ndtr_types[2] = <char>NPY_DOUBLE
  16358. ufunc_ndtr_types[3] = <char>NPY_DOUBLE
  16359. ufunc_ndtr_types[4] = <char>NPY_CFLOAT
  16360. ufunc_ndtr_types[5] = <char>NPY_CFLOAT
  16361. ufunc_ndtr_types[6] = <char>NPY_CDOUBLE
  16362. ufunc_ndtr_types[7] = <char>NPY_CDOUBLE
  16363. ufunc_ndtr_ptr[2*0] = <void*>_func_ndtr
  16364. ufunc_ndtr_ptr[2*0+1] = <void*>(<char*>"ndtr")
  16365. ufunc_ndtr_ptr[2*1] = <void*>_func_ndtr
  16366. ufunc_ndtr_ptr[2*1+1] = <void*>(<char*>"ndtr")
  16367. ufunc_ndtr_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_ndtr
  16368. ufunc_ndtr_ptr[2*2+1] = <void*>(<char*>"ndtr")
  16369. ufunc_ndtr_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_ndtr
  16370. ufunc_ndtr_ptr[2*3+1] = <void*>(<char*>"ndtr")
  16371. ufunc_ndtr_data[0] = &ufunc_ndtr_ptr[2*0]
  16372. ufunc_ndtr_data[1] = &ufunc_ndtr_ptr[2*1]
  16373. ufunc_ndtr_data[2] = &ufunc_ndtr_ptr[2*2]
  16374. ufunc_ndtr_data[3] = &ufunc_ndtr_ptr[2*3]
  16375. ndtr = np.PyUFunc_FromFuncAndData(ufunc_ndtr_loops, ufunc_ndtr_data, ufunc_ndtr_types, 4, 1, 1, 0, "ndtr", ufunc_ndtr_doc, 0)
  16376. cdef np.PyUFuncGenericFunction ufunc_ndtri_loops[2]
  16377. cdef void *ufunc_ndtri_ptr[4]
  16378. cdef void *ufunc_ndtri_data[2]
  16379. cdef char ufunc_ndtri_types[4]
  16380. cdef char *ufunc_ndtri_doc = (
  16381. "ndtri(y, out=None)\n"
  16382. "\n"
  16383. "Inverse of `ndtr` vs x\n"
  16384. "\n"
  16385. "Returns the argument x for which the area under the Gaussian\n"
  16386. "probability density function (integrated from minus infinity to `x`)\n"
  16387. "is equal to y.\n"
  16388. "\n"
  16389. "Parameters\n"
  16390. "----------\n"
  16391. "p : array_like\n"
  16392. " Probability\n"
  16393. "out : ndarray, optional\n"
  16394. " Optional output array for the function results\n"
  16395. "\n"
  16396. "Returns\n"
  16397. "-------\n"
  16398. "x : scalar or ndarray\n"
  16399. " Value of x such that ``ndtr(x) == p``.\n"
  16400. "\n"
  16401. "See Also\n"
  16402. "--------\n"
  16403. "ndtr")
  16404. ufunc_ndtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  16405. ufunc_ndtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  16406. ufunc_ndtri_types[0] = <char>NPY_FLOAT
  16407. ufunc_ndtri_types[1] = <char>NPY_FLOAT
  16408. ufunc_ndtri_types[2] = <char>NPY_DOUBLE
  16409. ufunc_ndtri_types[3] = <char>NPY_DOUBLE
  16410. ufunc_ndtri_ptr[2*0] = <void*>_func_ndtri
  16411. ufunc_ndtri_ptr[2*0+1] = <void*>(<char*>"ndtri")
  16412. ufunc_ndtri_ptr[2*1] = <void*>_func_ndtri
  16413. ufunc_ndtri_ptr[2*1+1] = <void*>(<char*>"ndtri")
  16414. ufunc_ndtri_data[0] = &ufunc_ndtri_ptr[2*0]
  16415. ufunc_ndtri_data[1] = &ufunc_ndtri_ptr[2*1]
  16416. ndtri = np.PyUFunc_FromFuncAndData(ufunc_ndtri_loops, ufunc_ndtri_data, ufunc_ndtri_types, 2, 1, 1, 0, "ndtri", ufunc_ndtri_doc, 0)
  16417. cdef np.PyUFuncGenericFunction ufunc_ndtri_exp_loops[2]
  16418. cdef void *ufunc_ndtri_exp_ptr[4]
  16419. cdef void *ufunc_ndtri_exp_data[2]
  16420. cdef char ufunc_ndtri_exp_types[4]
  16421. cdef char *ufunc_ndtri_exp_doc = (
  16422. "ndtri_exp(y, out=None)\n"
  16423. "\n"
  16424. "Inverse of `log_ndtr` vs x. Allows for greater precision than\n"
  16425. "`ndtri` composed with `numpy.exp` for very small values of y and for\n"
  16426. "y close to 0.\n"
  16427. "\n"
  16428. "Parameters\n"
  16429. "----------\n"
  16430. "y : array_like of float\n"
  16431. " Function argument\n"
  16432. "out : ndarray, optional\n"
  16433. " Optional output array for the function results\n"
  16434. "\n"
  16435. "Returns\n"
  16436. "-------\n"
  16437. "scalar or ndarray\n"
  16438. " Inverse of the log CDF of the standard normal distribution, evaluated\n"
  16439. " at y.\n"
  16440. "\n"
  16441. "Examples\n"
  16442. "--------\n"
  16443. ">>> import numpy as np\n"
  16444. ">>> import scipy.special as sc\n"
  16445. "\n"
  16446. "`ndtri_exp` agrees with the naive implementation when the latter does\n"
  16447. "not suffer from underflow.\n"
  16448. "\n"
  16449. ">>> sc.ndtri_exp(-1)\n"
  16450. "-0.33747496376420244\n"
  16451. ">>> sc.ndtri(np.exp(-1))\n"
  16452. "-0.33747496376420244\n"
  16453. "\n"
  16454. "For extreme values of y, the naive approach fails\n"
  16455. "\n"
  16456. ">>> sc.ndtri(np.exp(-800))\n"
  16457. "-inf\n"
  16458. ">>> sc.ndtri(np.exp(-1e-20))\n"
  16459. "inf\n"
  16460. "\n"
  16461. "whereas `ndtri_exp` is still able to compute the result to high precision.\n"
  16462. "\n"
  16463. ">>> sc.ndtri_exp(-800)\n"
  16464. "-39.88469483825668\n"
  16465. ">>> sc.ndtri_exp(-1e-20)\n"
  16466. "9.262340089798409\n"
  16467. "\n"
  16468. "See Also\n"
  16469. "--------\n"
  16470. "log_ndtr, ndtri, ndtr")
  16471. ufunc_ndtri_exp_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  16472. ufunc_ndtri_exp_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  16473. ufunc_ndtri_exp_types[0] = <char>NPY_FLOAT
  16474. ufunc_ndtri_exp_types[1] = <char>NPY_FLOAT
  16475. ufunc_ndtri_exp_types[2] = <char>NPY_DOUBLE
  16476. ufunc_ndtri_exp_types[3] = <char>NPY_DOUBLE
  16477. ufunc_ndtri_exp_ptr[2*0] = <void*>_func_ndtri_exp
  16478. ufunc_ndtri_exp_ptr[2*0+1] = <void*>(<char*>"ndtri_exp")
  16479. ufunc_ndtri_exp_ptr[2*1] = <void*>_func_ndtri_exp
  16480. ufunc_ndtri_exp_ptr[2*1+1] = <void*>(<char*>"ndtri_exp")
  16481. ufunc_ndtri_exp_data[0] = &ufunc_ndtri_exp_ptr[2*0]
  16482. ufunc_ndtri_exp_data[1] = &ufunc_ndtri_exp_ptr[2*1]
  16483. ndtri_exp = np.PyUFunc_FromFuncAndData(ufunc_ndtri_exp_loops, ufunc_ndtri_exp_data, ufunc_ndtri_exp_types, 2, 1, 1, 0, "ndtri_exp", ufunc_ndtri_exp_doc, 0)
  16484. cdef np.PyUFuncGenericFunction ufunc_nrdtrimn_loops[2]
  16485. cdef void *ufunc_nrdtrimn_ptr[4]
  16486. cdef void *ufunc_nrdtrimn_data[2]
  16487. cdef char ufunc_nrdtrimn_types[8]
  16488. cdef char *ufunc_nrdtrimn_doc = (
  16489. "nrdtrimn(p, x, std, out=None)\n"
  16490. "\n"
  16491. "Calculate mean of normal distribution given other params.\n"
  16492. "\n"
  16493. "Parameters\n"
  16494. "----------\n"
  16495. "p : array_like\n"
  16496. " CDF values, in range (0, 1].\n"
  16497. "x : array_like\n"
  16498. " Quantiles, i.e. the upper limit of integration.\n"
  16499. "std : array_like\n"
  16500. " Standard deviation.\n"
  16501. "out : ndarray, optional\n"
  16502. " Optional output array for the function results\n"
  16503. "\n"
  16504. "Returns\n"
  16505. "-------\n"
  16506. "mn : scalar or ndarray\n"
  16507. " The mean of the normal distribution.\n"
  16508. "\n"
  16509. "See Also\n"
  16510. "--------\n"
  16511. "nrdtrimn, ndtr")
  16512. ufunc_nrdtrimn_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16513. ufunc_nrdtrimn_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16514. ufunc_nrdtrimn_types[0] = <char>NPY_FLOAT
  16515. ufunc_nrdtrimn_types[1] = <char>NPY_FLOAT
  16516. ufunc_nrdtrimn_types[2] = <char>NPY_FLOAT
  16517. ufunc_nrdtrimn_types[3] = <char>NPY_FLOAT
  16518. ufunc_nrdtrimn_types[4] = <char>NPY_DOUBLE
  16519. ufunc_nrdtrimn_types[5] = <char>NPY_DOUBLE
  16520. ufunc_nrdtrimn_types[6] = <char>NPY_DOUBLE
  16521. ufunc_nrdtrimn_types[7] = <char>NPY_DOUBLE
  16522. ufunc_nrdtrimn_ptr[2*0] = <void*>_func_cdfnor3_wrap
  16523. ufunc_nrdtrimn_ptr[2*0+1] = <void*>(<char*>"nrdtrimn")
  16524. ufunc_nrdtrimn_ptr[2*1] = <void*>_func_cdfnor3_wrap
  16525. ufunc_nrdtrimn_ptr[2*1+1] = <void*>(<char*>"nrdtrimn")
  16526. ufunc_nrdtrimn_data[0] = &ufunc_nrdtrimn_ptr[2*0]
  16527. ufunc_nrdtrimn_data[1] = &ufunc_nrdtrimn_ptr[2*1]
  16528. nrdtrimn = np.PyUFunc_FromFuncAndData(ufunc_nrdtrimn_loops, ufunc_nrdtrimn_data, ufunc_nrdtrimn_types, 2, 3, 1, 0, "nrdtrimn", ufunc_nrdtrimn_doc, 0)
  16529. cdef np.PyUFuncGenericFunction ufunc_nrdtrisd_loops[2]
  16530. cdef void *ufunc_nrdtrisd_ptr[4]
  16531. cdef void *ufunc_nrdtrisd_data[2]
  16532. cdef char ufunc_nrdtrisd_types[8]
  16533. cdef char *ufunc_nrdtrisd_doc = (
  16534. "nrdtrisd(p, x, mn, out=None)\n"
  16535. "\n"
  16536. "Calculate standard deviation of normal distribution given other params.\n"
  16537. "\n"
  16538. "Parameters\n"
  16539. "----------\n"
  16540. "p : array_like\n"
  16541. " CDF values, in range (0, 1].\n"
  16542. "x : array_like\n"
  16543. " Quantiles, i.e. the upper limit of integration.\n"
  16544. "mn : scalar or ndarray\n"
  16545. " The mean of the normal distribution.\n"
  16546. "out : ndarray, optional\n"
  16547. " Optional output array for the function results\n"
  16548. "\n"
  16549. "Returns\n"
  16550. "-------\n"
  16551. "std : scalar or ndarray\n"
  16552. " Standard deviation.\n"
  16553. "\n"
  16554. "See Also\n"
  16555. "--------\n"
  16556. "ndtr")
  16557. ufunc_nrdtrisd_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16558. ufunc_nrdtrisd_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16559. ufunc_nrdtrisd_types[0] = <char>NPY_FLOAT
  16560. ufunc_nrdtrisd_types[1] = <char>NPY_FLOAT
  16561. ufunc_nrdtrisd_types[2] = <char>NPY_FLOAT
  16562. ufunc_nrdtrisd_types[3] = <char>NPY_FLOAT
  16563. ufunc_nrdtrisd_types[4] = <char>NPY_DOUBLE
  16564. ufunc_nrdtrisd_types[5] = <char>NPY_DOUBLE
  16565. ufunc_nrdtrisd_types[6] = <char>NPY_DOUBLE
  16566. ufunc_nrdtrisd_types[7] = <char>NPY_DOUBLE
  16567. ufunc_nrdtrisd_ptr[2*0] = <void*>_func_cdfnor4_wrap
  16568. ufunc_nrdtrisd_ptr[2*0+1] = <void*>(<char*>"nrdtrisd")
  16569. ufunc_nrdtrisd_ptr[2*1] = <void*>_func_cdfnor4_wrap
  16570. ufunc_nrdtrisd_ptr[2*1+1] = <void*>(<char*>"nrdtrisd")
  16571. ufunc_nrdtrisd_data[0] = &ufunc_nrdtrisd_ptr[2*0]
  16572. ufunc_nrdtrisd_data[1] = &ufunc_nrdtrisd_ptr[2*1]
  16573. nrdtrisd = np.PyUFunc_FromFuncAndData(ufunc_nrdtrisd_loops, ufunc_nrdtrisd_data, ufunc_nrdtrisd_types, 2, 3, 1, 0, "nrdtrisd", ufunc_nrdtrisd_doc, 0)
  16574. cdef np.PyUFuncGenericFunction ufunc_obl_ang1_loops[2]
  16575. cdef void *ufunc_obl_ang1_ptr[4]
  16576. cdef void *ufunc_obl_ang1_data[2]
  16577. cdef char ufunc_obl_ang1_types[12]
  16578. cdef char *ufunc_obl_ang1_doc = (
  16579. "obl_ang1(m, n, c, x, out=None)\n"
  16580. "\n"
  16581. "Oblate spheroidal angular function of the first kind and its derivative\n"
  16582. "\n"
  16583. "Computes the oblate spheroidal angular function of the first kind\n"
  16584. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16585. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  16586. "\n"
  16587. "Parameters\n"
  16588. "----------\n"
  16589. "m : array_like\n"
  16590. " Mode parameter m (nonnegative)\n"
  16591. "n : array_like\n"
  16592. " Mode parameter n (>= m)\n"
  16593. "c : array_like\n"
  16594. " Spheroidal parameter\n"
  16595. "x : array_like\n"
  16596. " Parameter x (``|x| < 1.0``)\n"
  16597. "out : ndarray, optional\n"
  16598. " Optional output array for the function results\n"
  16599. "\n"
  16600. "Returns\n"
  16601. "-------\n"
  16602. "s : scalar or ndarray\n"
  16603. " Value of the function\n"
  16604. "sp : scalar or ndarray\n"
  16605. " Value of the derivative vs x\n"
  16606. "\n"
  16607. "See Also\n"
  16608. "--------\n"
  16609. "obl_ang1_cv")
  16610. ufunc_obl_ang1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  16611. ufunc_obl_ang1_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  16612. ufunc_obl_ang1_types[0] = <char>NPY_FLOAT
  16613. ufunc_obl_ang1_types[1] = <char>NPY_FLOAT
  16614. ufunc_obl_ang1_types[2] = <char>NPY_FLOAT
  16615. ufunc_obl_ang1_types[3] = <char>NPY_FLOAT
  16616. ufunc_obl_ang1_types[4] = <char>NPY_FLOAT
  16617. ufunc_obl_ang1_types[5] = <char>NPY_FLOAT
  16618. ufunc_obl_ang1_types[6] = <char>NPY_DOUBLE
  16619. ufunc_obl_ang1_types[7] = <char>NPY_DOUBLE
  16620. ufunc_obl_ang1_types[8] = <char>NPY_DOUBLE
  16621. ufunc_obl_ang1_types[9] = <char>NPY_DOUBLE
  16622. ufunc_obl_ang1_types[10] = <char>NPY_DOUBLE
  16623. ufunc_obl_ang1_types[11] = <char>NPY_DOUBLE
  16624. ufunc_obl_ang1_ptr[2*0] = <void*>_func_oblate_aswfa_nocv_wrap
  16625. ufunc_obl_ang1_ptr[2*0+1] = <void*>(<char*>"obl_ang1")
  16626. ufunc_obl_ang1_ptr[2*1] = <void*>_func_oblate_aswfa_nocv_wrap
  16627. ufunc_obl_ang1_ptr[2*1+1] = <void*>(<char*>"obl_ang1")
  16628. ufunc_obl_ang1_data[0] = &ufunc_obl_ang1_ptr[2*0]
  16629. ufunc_obl_ang1_data[1] = &ufunc_obl_ang1_ptr[2*1]
  16630. obl_ang1 = np.PyUFunc_FromFuncAndData(ufunc_obl_ang1_loops, ufunc_obl_ang1_data, ufunc_obl_ang1_types, 2, 4, 2, 0, "obl_ang1", ufunc_obl_ang1_doc, 0)
  16631. cdef np.PyUFuncGenericFunction ufunc_obl_ang1_cv_loops[2]
  16632. cdef void *ufunc_obl_ang1_cv_ptr[4]
  16633. cdef void *ufunc_obl_ang1_cv_data[2]
  16634. cdef char ufunc_obl_ang1_cv_types[14]
  16635. cdef char *ufunc_obl_ang1_cv_doc = (
  16636. "obl_ang1_cv(m, n, c, cv, x, out=None)\n"
  16637. "\n"
  16638. "Oblate spheroidal angular function obl_ang1 for precomputed characteristic value\n"
  16639. "\n"
  16640. "Computes the oblate spheroidal angular function of the first kind\n"
  16641. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16642. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  16643. "pre-computed characteristic value.\n"
  16644. "\n"
  16645. "Parameters\n"
  16646. "----------\n"
  16647. "m : array_like\n"
  16648. " Mode parameter m (nonnegative)\n"
  16649. "n : array_like\n"
  16650. " Mode parameter n (>= m)\n"
  16651. "c : array_like\n"
  16652. " Spheroidal parameter\n"
  16653. "cv : array_like\n"
  16654. " Characteristic value\n"
  16655. "x : array_like\n"
  16656. " Parameter x (``|x| < 1.0``)\n"
  16657. "out : ndarray, optional\n"
  16658. " Optional output array for the function results\n"
  16659. "\n"
  16660. "Returns\n"
  16661. "-------\n"
  16662. "s : scalar or ndarray\n"
  16663. " Value of the function\n"
  16664. "sp : scalar or ndarray\n"
  16665. " Value of the derivative vs x\n"
  16666. "\n"
  16667. "See Also\n"
  16668. "--------\n"
  16669. "obl_ang1")
  16670. ufunc_obl_ang1_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  16671. ufunc_obl_ang1_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  16672. ufunc_obl_ang1_cv_types[0] = <char>NPY_FLOAT
  16673. ufunc_obl_ang1_cv_types[1] = <char>NPY_FLOAT
  16674. ufunc_obl_ang1_cv_types[2] = <char>NPY_FLOAT
  16675. ufunc_obl_ang1_cv_types[3] = <char>NPY_FLOAT
  16676. ufunc_obl_ang1_cv_types[4] = <char>NPY_FLOAT
  16677. ufunc_obl_ang1_cv_types[5] = <char>NPY_FLOAT
  16678. ufunc_obl_ang1_cv_types[6] = <char>NPY_FLOAT
  16679. ufunc_obl_ang1_cv_types[7] = <char>NPY_DOUBLE
  16680. ufunc_obl_ang1_cv_types[8] = <char>NPY_DOUBLE
  16681. ufunc_obl_ang1_cv_types[9] = <char>NPY_DOUBLE
  16682. ufunc_obl_ang1_cv_types[10] = <char>NPY_DOUBLE
  16683. ufunc_obl_ang1_cv_types[11] = <char>NPY_DOUBLE
  16684. ufunc_obl_ang1_cv_types[12] = <char>NPY_DOUBLE
  16685. ufunc_obl_ang1_cv_types[13] = <char>NPY_DOUBLE
  16686. ufunc_obl_ang1_cv_ptr[2*0] = <void*>_func_oblate_aswfa_wrap
  16687. ufunc_obl_ang1_cv_ptr[2*0+1] = <void*>(<char*>"obl_ang1_cv")
  16688. ufunc_obl_ang1_cv_ptr[2*1] = <void*>_func_oblate_aswfa_wrap
  16689. ufunc_obl_ang1_cv_ptr[2*1+1] = <void*>(<char*>"obl_ang1_cv")
  16690. ufunc_obl_ang1_cv_data[0] = &ufunc_obl_ang1_cv_ptr[2*0]
  16691. ufunc_obl_ang1_cv_data[1] = &ufunc_obl_ang1_cv_ptr[2*1]
  16692. obl_ang1_cv = np.PyUFunc_FromFuncAndData(ufunc_obl_ang1_cv_loops, ufunc_obl_ang1_cv_data, ufunc_obl_ang1_cv_types, 2, 5, 2, 0, "obl_ang1_cv", ufunc_obl_ang1_cv_doc, 0)
  16693. cdef np.PyUFuncGenericFunction ufunc_obl_cv_loops[2]
  16694. cdef void *ufunc_obl_cv_ptr[4]
  16695. cdef void *ufunc_obl_cv_data[2]
  16696. cdef char ufunc_obl_cv_types[8]
  16697. cdef char *ufunc_obl_cv_doc = (
  16698. "obl_cv(m, n, c, out=None)\n"
  16699. "\n"
  16700. "Characteristic value of oblate spheroidal function\n"
  16701. "\n"
  16702. "Computes the characteristic value of oblate spheroidal wave\n"
  16703. "functions of order `m`, `n` (n>=m) and spheroidal parameter `c`.\n"
  16704. "\n"
  16705. "Parameters\n"
  16706. "----------\n"
  16707. "m : array_like\n"
  16708. " Mode parameter m (nonnegative)\n"
  16709. "n : array_like\n"
  16710. " Mode parameter n (>= m)\n"
  16711. "c : array_like\n"
  16712. " Spheroidal parameter\n"
  16713. "out : ndarray, optional\n"
  16714. " Optional output array for the function results\n"
  16715. "\n"
  16716. "Returns\n"
  16717. "-------\n"
  16718. "cv : scalar or ndarray\n"
  16719. " Characteristic value")
  16720. ufunc_obl_cv_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  16721. ufunc_obl_cv_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  16722. ufunc_obl_cv_types[0] = <char>NPY_FLOAT
  16723. ufunc_obl_cv_types[1] = <char>NPY_FLOAT
  16724. ufunc_obl_cv_types[2] = <char>NPY_FLOAT
  16725. ufunc_obl_cv_types[3] = <char>NPY_FLOAT
  16726. ufunc_obl_cv_types[4] = <char>NPY_DOUBLE
  16727. ufunc_obl_cv_types[5] = <char>NPY_DOUBLE
  16728. ufunc_obl_cv_types[6] = <char>NPY_DOUBLE
  16729. ufunc_obl_cv_types[7] = <char>NPY_DOUBLE
  16730. ufunc_obl_cv_ptr[2*0] = <void*>_func_oblate_segv_wrap
  16731. ufunc_obl_cv_ptr[2*0+1] = <void*>(<char*>"obl_cv")
  16732. ufunc_obl_cv_ptr[2*1] = <void*>_func_oblate_segv_wrap
  16733. ufunc_obl_cv_ptr[2*1+1] = <void*>(<char*>"obl_cv")
  16734. ufunc_obl_cv_data[0] = &ufunc_obl_cv_ptr[2*0]
  16735. ufunc_obl_cv_data[1] = &ufunc_obl_cv_ptr[2*1]
  16736. obl_cv = np.PyUFunc_FromFuncAndData(ufunc_obl_cv_loops, ufunc_obl_cv_data, ufunc_obl_cv_types, 2, 3, 1, 0, "obl_cv", ufunc_obl_cv_doc, 0)
  16737. cdef np.PyUFuncGenericFunction ufunc_obl_rad1_loops[2]
  16738. cdef void *ufunc_obl_rad1_ptr[4]
  16739. cdef void *ufunc_obl_rad1_data[2]
  16740. cdef char ufunc_obl_rad1_types[12]
  16741. cdef char *ufunc_obl_rad1_doc = (
  16742. "obl_rad1(m, n, c, x, out=None)\n"
  16743. "\n"
  16744. "Oblate spheroidal radial function of the first kind and its derivative\n"
  16745. "\n"
  16746. "Computes the oblate spheroidal radial function of the first kind\n"
  16747. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16748. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  16749. "\n"
  16750. "Parameters\n"
  16751. "----------\n"
  16752. "m : array_like\n"
  16753. " Mode parameter m (nonnegative)\n"
  16754. "n : array_like\n"
  16755. " Mode parameter n (>= m)\n"
  16756. "c : array_like\n"
  16757. " Spheroidal parameter\n"
  16758. "x : array_like\n"
  16759. " Parameter x (``|x| < 1.0``)\n"
  16760. "out : ndarray, optional\n"
  16761. " Optional output array for the function results\n"
  16762. "\n"
  16763. "Returns\n"
  16764. "-------\n"
  16765. "s : scalar or ndarray\n"
  16766. " Value of the function\n"
  16767. "sp : scalar or ndarray\n"
  16768. " Value of the derivative vs x\n"
  16769. "\n"
  16770. "See Also\n"
  16771. "--------\n"
  16772. "obl_rad1_cv")
  16773. ufunc_obl_rad1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  16774. ufunc_obl_rad1_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  16775. ufunc_obl_rad1_types[0] = <char>NPY_FLOAT
  16776. ufunc_obl_rad1_types[1] = <char>NPY_FLOAT
  16777. ufunc_obl_rad1_types[2] = <char>NPY_FLOAT
  16778. ufunc_obl_rad1_types[3] = <char>NPY_FLOAT
  16779. ufunc_obl_rad1_types[4] = <char>NPY_FLOAT
  16780. ufunc_obl_rad1_types[5] = <char>NPY_FLOAT
  16781. ufunc_obl_rad1_types[6] = <char>NPY_DOUBLE
  16782. ufunc_obl_rad1_types[7] = <char>NPY_DOUBLE
  16783. ufunc_obl_rad1_types[8] = <char>NPY_DOUBLE
  16784. ufunc_obl_rad1_types[9] = <char>NPY_DOUBLE
  16785. ufunc_obl_rad1_types[10] = <char>NPY_DOUBLE
  16786. ufunc_obl_rad1_types[11] = <char>NPY_DOUBLE
  16787. ufunc_obl_rad1_ptr[2*0] = <void*>_func_oblate_radial1_nocv_wrap
  16788. ufunc_obl_rad1_ptr[2*0+1] = <void*>(<char*>"obl_rad1")
  16789. ufunc_obl_rad1_ptr[2*1] = <void*>_func_oblate_radial1_nocv_wrap
  16790. ufunc_obl_rad1_ptr[2*1+1] = <void*>(<char*>"obl_rad1")
  16791. ufunc_obl_rad1_data[0] = &ufunc_obl_rad1_ptr[2*0]
  16792. ufunc_obl_rad1_data[1] = &ufunc_obl_rad1_ptr[2*1]
  16793. obl_rad1 = np.PyUFunc_FromFuncAndData(ufunc_obl_rad1_loops, ufunc_obl_rad1_data, ufunc_obl_rad1_types, 2, 4, 2, 0, "obl_rad1", ufunc_obl_rad1_doc, 0)
  16794. cdef np.PyUFuncGenericFunction ufunc_obl_rad1_cv_loops[2]
  16795. cdef void *ufunc_obl_rad1_cv_ptr[4]
  16796. cdef void *ufunc_obl_rad1_cv_data[2]
  16797. cdef char ufunc_obl_rad1_cv_types[14]
  16798. cdef char *ufunc_obl_rad1_cv_doc = (
  16799. "obl_rad1_cv(m, n, c, cv, x, out=None)\n"
  16800. "\n"
  16801. "Oblate spheroidal radial function obl_rad1 for precomputed characteristic value\n"
  16802. "\n"
  16803. "Computes the oblate spheroidal radial function of the first kind\n"
  16804. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16805. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  16806. "pre-computed characteristic value.\n"
  16807. "\n"
  16808. "Parameters\n"
  16809. "----------\n"
  16810. "m : array_like\n"
  16811. " Mode parameter m (nonnegative)\n"
  16812. "n : array_like\n"
  16813. " Mode parameter n (>= m)\n"
  16814. "c : array_like\n"
  16815. " Spheroidal parameter\n"
  16816. "cv : array_like\n"
  16817. " Characteristic value\n"
  16818. "x : array_like\n"
  16819. " Parameter x (``|x| < 1.0``)\n"
  16820. "out : ndarray, optional\n"
  16821. " Optional output array for the function results\n"
  16822. "\n"
  16823. "Returns\n"
  16824. "-------\n"
  16825. "s : scalar or ndarray\n"
  16826. " Value of the function\n"
  16827. "sp : scalar or ndarray\n"
  16828. " Value of the derivative vs x\n"
  16829. "\n"
  16830. "See Also\n"
  16831. "--------\n"
  16832. "obl_rad1")
  16833. ufunc_obl_rad1_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  16834. ufunc_obl_rad1_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  16835. ufunc_obl_rad1_cv_types[0] = <char>NPY_FLOAT
  16836. ufunc_obl_rad1_cv_types[1] = <char>NPY_FLOAT
  16837. ufunc_obl_rad1_cv_types[2] = <char>NPY_FLOAT
  16838. ufunc_obl_rad1_cv_types[3] = <char>NPY_FLOAT
  16839. ufunc_obl_rad1_cv_types[4] = <char>NPY_FLOAT
  16840. ufunc_obl_rad1_cv_types[5] = <char>NPY_FLOAT
  16841. ufunc_obl_rad1_cv_types[6] = <char>NPY_FLOAT
  16842. ufunc_obl_rad1_cv_types[7] = <char>NPY_DOUBLE
  16843. ufunc_obl_rad1_cv_types[8] = <char>NPY_DOUBLE
  16844. ufunc_obl_rad1_cv_types[9] = <char>NPY_DOUBLE
  16845. ufunc_obl_rad1_cv_types[10] = <char>NPY_DOUBLE
  16846. ufunc_obl_rad1_cv_types[11] = <char>NPY_DOUBLE
  16847. ufunc_obl_rad1_cv_types[12] = <char>NPY_DOUBLE
  16848. ufunc_obl_rad1_cv_types[13] = <char>NPY_DOUBLE
  16849. ufunc_obl_rad1_cv_ptr[2*0] = <void*>_func_oblate_radial1_wrap
  16850. ufunc_obl_rad1_cv_ptr[2*0+1] = <void*>(<char*>"obl_rad1_cv")
  16851. ufunc_obl_rad1_cv_ptr[2*1] = <void*>_func_oblate_radial1_wrap
  16852. ufunc_obl_rad1_cv_ptr[2*1+1] = <void*>(<char*>"obl_rad1_cv")
  16853. ufunc_obl_rad1_cv_data[0] = &ufunc_obl_rad1_cv_ptr[2*0]
  16854. ufunc_obl_rad1_cv_data[1] = &ufunc_obl_rad1_cv_ptr[2*1]
  16855. obl_rad1_cv = np.PyUFunc_FromFuncAndData(ufunc_obl_rad1_cv_loops, ufunc_obl_rad1_cv_data, ufunc_obl_rad1_cv_types, 2, 5, 2, 0, "obl_rad1_cv", ufunc_obl_rad1_cv_doc, 0)
  16856. cdef np.PyUFuncGenericFunction ufunc_obl_rad2_loops[2]
  16857. cdef void *ufunc_obl_rad2_ptr[4]
  16858. cdef void *ufunc_obl_rad2_data[2]
  16859. cdef char ufunc_obl_rad2_types[12]
  16860. cdef char *ufunc_obl_rad2_doc = (
  16861. "obl_rad2(m, n, c, x, out=None)\n"
  16862. "\n"
  16863. "Oblate spheroidal radial function of the second kind and its derivative.\n"
  16864. "\n"
  16865. "Computes the oblate spheroidal radial function of the second kind\n"
  16866. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16867. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  16868. "\n"
  16869. "Parameters\n"
  16870. "----------\n"
  16871. "m : array_like\n"
  16872. " Mode parameter m (nonnegative)\n"
  16873. "n : array_like\n"
  16874. " Mode parameter n (>= m)\n"
  16875. "c : array_like\n"
  16876. " Spheroidal parameter\n"
  16877. "x : array_like\n"
  16878. " Parameter x (``|x| < 1.0``)\n"
  16879. "out : ndarray, optional\n"
  16880. " Optional output array for the function results\n"
  16881. "\n"
  16882. "Returns\n"
  16883. "-------\n"
  16884. "s : scalar or ndarray\n"
  16885. " Value of the function\n"
  16886. "sp : scalar or ndarray\n"
  16887. " Value of the derivative vs x\n"
  16888. "\n"
  16889. "See Also\n"
  16890. "--------\n"
  16891. "obl_rad2_cv")
  16892. ufunc_obl_rad2_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  16893. ufunc_obl_rad2_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  16894. ufunc_obl_rad2_types[0] = <char>NPY_FLOAT
  16895. ufunc_obl_rad2_types[1] = <char>NPY_FLOAT
  16896. ufunc_obl_rad2_types[2] = <char>NPY_FLOAT
  16897. ufunc_obl_rad2_types[3] = <char>NPY_FLOAT
  16898. ufunc_obl_rad2_types[4] = <char>NPY_FLOAT
  16899. ufunc_obl_rad2_types[5] = <char>NPY_FLOAT
  16900. ufunc_obl_rad2_types[6] = <char>NPY_DOUBLE
  16901. ufunc_obl_rad2_types[7] = <char>NPY_DOUBLE
  16902. ufunc_obl_rad2_types[8] = <char>NPY_DOUBLE
  16903. ufunc_obl_rad2_types[9] = <char>NPY_DOUBLE
  16904. ufunc_obl_rad2_types[10] = <char>NPY_DOUBLE
  16905. ufunc_obl_rad2_types[11] = <char>NPY_DOUBLE
  16906. ufunc_obl_rad2_ptr[2*0] = <void*>_func_oblate_radial2_nocv_wrap
  16907. ufunc_obl_rad2_ptr[2*0+1] = <void*>(<char*>"obl_rad2")
  16908. ufunc_obl_rad2_ptr[2*1] = <void*>_func_oblate_radial2_nocv_wrap
  16909. ufunc_obl_rad2_ptr[2*1+1] = <void*>(<char*>"obl_rad2")
  16910. ufunc_obl_rad2_data[0] = &ufunc_obl_rad2_ptr[2*0]
  16911. ufunc_obl_rad2_data[1] = &ufunc_obl_rad2_ptr[2*1]
  16912. obl_rad2 = np.PyUFunc_FromFuncAndData(ufunc_obl_rad2_loops, ufunc_obl_rad2_data, ufunc_obl_rad2_types, 2, 4, 2, 0, "obl_rad2", ufunc_obl_rad2_doc, 0)
  16913. cdef np.PyUFuncGenericFunction ufunc_obl_rad2_cv_loops[2]
  16914. cdef void *ufunc_obl_rad2_cv_ptr[4]
  16915. cdef void *ufunc_obl_rad2_cv_data[2]
  16916. cdef char ufunc_obl_rad2_cv_types[14]
  16917. cdef char *ufunc_obl_rad2_cv_doc = (
  16918. "obl_rad2_cv(m, n, c, cv, x, out=None)\n"
  16919. "\n"
  16920. "Oblate spheroidal radial function obl_rad2 for precomputed characteristic value\n"
  16921. "\n"
  16922. "Computes the oblate spheroidal radial function of the second kind\n"
  16923. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  16924. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  16925. "pre-computed characteristic value.\n"
  16926. "\n"
  16927. "Parameters\n"
  16928. "----------\n"
  16929. "m : array_like\n"
  16930. " Mode parameter m (nonnegative)\n"
  16931. "n : array_like\n"
  16932. " Mode parameter n (>= m)\n"
  16933. "c : array_like\n"
  16934. " Spheroidal parameter\n"
  16935. "cv : array_like\n"
  16936. " Characteristic value\n"
  16937. "x : array_like\n"
  16938. " Parameter x (``|x| < 1.0``)\n"
  16939. "out : ndarray, optional\n"
  16940. " Optional output array for the function results\n"
  16941. "\n"
  16942. "Returns\n"
  16943. "-------\n"
  16944. "s : scalar or ndarray\n"
  16945. " Value of the function\n"
  16946. "sp : scalar or ndarray\n"
  16947. " Value of the derivative vs x\n"
  16948. "\n"
  16949. "See Also\n"
  16950. "--------\n"
  16951. "obl_rad2")
  16952. ufunc_obl_rad2_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  16953. ufunc_obl_rad2_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  16954. ufunc_obl_rad2_cv_types[0] = <char>NPY_FLOAT
  16955. ufunc_obl_rad2_cv_types[1] = <char>NPY_FLOAT
  16956. ufunc_obl_rad2_cv_types[2] = <char>NPY_FLOAT
  16957. ufunc_obl_rad2_cv_types[3] = <char>NPY_FLOAT
  16958. ufunc_obl_rad2_cv_types[4] = <char>NPY_FLOAT
  16959. ufunc_obl_rad2_cv_types[5] = <char>NPY_FLOAT
  16960. ufunc_obl_rad2_cv_types[6] = <char>NPY_FLOAT
  16961. ufunc_obl_rad2_cv_types[7] = <char>NPY_DOUBLE
  16962. ufunc_obl_rad2_cv_types[8] = <char>NPY_DOUBLE
  16963. ufunc_obl_rad2_cv_types[9] = <char>NPY_DOUBLE
  16964. ufunc_obl_rad2_cv_types[10] = <char>NPY_DOUBLE
  16965. ufunc_obl_rad2_cv_types[11] = <char>NPY_DOUBLE
  16966. ufunc_obl_rad2_cv_types[12] = <char>NPY_DOUBLE
  16967. ufunc_obl_rad2_cv_types[13] = <char>NPY_DOUBLE
  16968. ufunc_obl_rad2_cv_ptr[2*0] = <void*>_func_oblate_radial2_wrap
  16969. ufunc_obl_rad2_cv_ptr[2*0+1] = <void*>(<char*>"obl_rad2_cv")
  16970. ufunc_obl_rad2_cv_ptr[2*1] = <void*>_func_oblate_radial2_wrap
  16971. ufunc_obl_rad2_cv_ptr[2*1+1] = <void*>(<char*>"obl_rad2_cv")
  16972. ufunc_obl_rad2_cv_data[0] = &ufunc_obl_rad2_cv_ptr[2*0]
  16973. ufunc_obl_rad2_cv_data[1] = &ufunc_obl_rad2_cv_ptr[2*1]
  16974. obl_rad2_cv = np.PyUFunc_FromFuncAndData(ufunc_obl_rad2_cv_loops, ufunc_obl_rad2_cv_data, ufunc_obl_rad2_cv_types, 2, 5, 2, 0, "obl_rad2_cv", ufunc_obl_rad2_cv_doc, 0)
  16975. cdef np.PyUFuncGenericFunction ufunc_owens_t_loops[2]
  16976. cdef void *ufunc_owens_t_ptr[4]
  16977. cdef void *ufunc_owens_t_data[2]
  16978. cdef char ufunc_owens_t_types[6]
  16979. cdef char *ufunc_owens_t_doc = (
  16980. "owens_t(h, a, out=None)\n"
  16981. "\n"
  16982. "Owen's T Function.\n"
  16983. "\n"
  16984. "The function T(h, a) gives the probability of the event\n"
  16985. "(X > h and 0 < Y < a * X) where X and Y are independent\n"
  16986. "standard normal random variables.\n"
  16987. "\n"
  16988. "Parameters\n"
  16989. "----------\n"
  16990. "h: array_like\n"
  16991. " Input value.\n"
  16992. "a: array_like\n"
  16993. " Input value.\n"
  16994. "out : ndarray, optional\n"
  16995. " Optional output array for the function results\n"
  16996. "\n"
  16997. "Returns\n"
  16998. "-------\n"
  16999. "t: scalar or ndarray\n"
  17000. " Probability of the event (X > h and 0 < Y < a * X),\n"
  17001. " where X and Y are independent standard normal random variables.\n"
  17002. "\n"
  17003. "Examples\n"
  17004. "--------\n"
  17005. ">>> from scipy import special\n"
  17006. ">>> a = 3.5\n"
  17007. ">>> h = 0.78\n"
  17008. ">>> special.owens_t(h, a)\n"
  17009. "0.10877216734852274\n"
  17010. "\n"
  17011. "References\n"
  17012. "----------\n"
  17013. ".. [1] M. Patefield and D. Tandy, \"Fast and accurate calculation of\n"
  17014. " Owen's T Function\", Statistical Software vol. 5, pp. 1-25, 2000.")
  17015. ufunc_owens_t_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17016. ufunc_owens_t_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17017. ufunc_owens_t_types[0] = <char>NPY_FLOAT
  17018. ufunc_owens_t_types[1] = <char>NPY_FLOAT
  17019. ufunc_owens_t_types[2] = <char>NPY_FLOAT
  17020. ufunc_owens_t_types[3] = <char>NPY_DOUBLE
  17021. ufunc_owens_t_types[4] = <char>NPY_DOUBLE
  17022. ufunc_owens_t_types[5] = <char>NPY_DOUBLE
  17023. ufunc_owens_t_ptr[2*0] = <void*>_func_owens_t
  17024. ufunc_owens_t_ptr[2*0+1] = <void*>(<char*>"owens_t")
  17025. ufunc_owens_t_ptr[2*1] = <void*>_func_owens_t
  17026. ufunc_owens_t_ptr[2*1+1] = <void*>(<char*>"owens_t")
  17027. ufunc_owens_t_data[0] = &ufunc_owens_t_ptr[2*0]
  17028. ufunc_owens_t_data[1] = &ufunc_owens_t_ptr[2*1]
  17029. owens_t = np.PyUFunc_FromFuncAndData(ufunc_owens_t_loops, ufunc_owens_t_data, ufunc_owens_t_types, 2, 2, 1, 0, "owens_t", ufunc_owens_t_doc, 0)
  17030. cdef np.PyUFuncGenericFunction ufunc_pbdv_loops[2]
  17031. cdef void *ufunc_pbdv_ptr[4]
  17032. cdef void *ufunc_pbdv_data[2]
  17033. cdef char ufunc_pbdv_types[8]
  17034. cdef char *ufunc_pbdv_doc = (
  17035. "pbdv(v, x, out=None)\n"
  17036. "\n"
  17037. "Parabolic cylinder function D\n"
  17038. "\n"
  17039. "Returns (d, dp) the parabolic cylinder function Dv(x) in d and the\n"
  17040. "derivative, Dv'(x) in dp.\n"
  17041. "\n"
  17042. "Parameters\n"
  17043. "----------\n"
  17044. "v : array_like\n"
  17045. " Real parameter\n"
  17046. "x : array_like\n"
  17047. " Real argument\n"
  17048. "out : ndarray, optional\n"
  17049. " Optional output array for the function results\n"
  17050. "\n"
  17051. "Returns\n"
  17052. "-------\n"
  17053. "d : scalar or ndarray\n"
  17054. " Value of the function\n"
  17055. "dp : scalar or ndarray\n"
  17056. " Value of the derivative vs x")
  17057. ufunc_pbdv_loops[0] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_ff_ff
  17058. ufunc_pbdv_loops[1] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_dd_dd
  17059. ufunc_pbdv_types[0] = <char>NPY_FLOAT
  17060. ufunc_pbdv_types[1] = <char>NPY_FLOAT
  17061. ufunc_pbdv_types[2] = <char>NPY_FLOAT
  17062. ufunc_pbdv_types[3] = <char>NPY_FLOAT
  17063. ufunc_pbdv_types[4] = <char>NPY_DOUBLE
  17064. ufunc_pbdv_types[5] = <char>NPY_DOUBLE
  17065. ufunc_pbdv_types[6] = <char>NPY_DOUBLE
  17066. ufunc_pbdv_types[7] = <char>NPY_DOUBLE
  17067. ufunc_pbdv_ptr[2*0] = <void*>_func_pbdv_wrap
  17068. ufunc_pbdv_ptr[2*0+1] = <void*>(<char*>"pbdv")
  17069. ufunc_pbdv_ptr[2*1] = <void*>_func_pbdv_wrap
  17070. ufunc_pbdv_ptr[2*1+1] = <void*>(<char*>"pbdv")
  17071. ufunc_pbdv_data[0] = &ufunc_pbdv_ptr[2*0]
  17072. ufunc_pbdv_data[1] = &ufunc_pbdv_ptr[2*1]
  17073. pbdv = np.PyUFunc_FromFuncAndData(ufunc_pbdv_loops, ufunc_pbdv_data, ufunc_pbdv_types, 2, 2, 2, 0, "pbdv", ufunc_pbdv_doc, 0)
  17074. cdef np.PyUFuncGenericFunction ufunc_pbvv_loops[2]
  17075. cdef void *ufunc_pbvv_ptr[4]
  17076. cdef void *ufunc_pbvv_data[2]
  17077. cdef char ufunc_pbvv_types[8]
  17078. cdef char *ufunc_pbvv_doc = (
  17079. "pbvv(v, x, out=None)\n"
  17080. "\n"
  17081. "Parabolic cylinder function V\n"
  17082. "\n"
  17083. "Returns the parabolic cylinder function Vv(x) in v and the\n"
  17084. "derivative, Vv'(x) in vp.\n"
  17085. "\n"
  17086. "Parameters\n"
  17087. "----------\n"
  17088. "v : array_like\n"
  17089. " Real parameter\n"
  17090. "x : array_like\n"
  17091. " Real argument\n"
  17092. "out : ndarray, optional\n"
  17093. " Optional output array for the function results\n"
  17094. "\n"
  17095. "Returns\n"
  17096. "-------\n"
  17097. "v : scalar or ndarray\n"
  17098. " Value of the function\n"
  17099. "vp : scalar or ndarray\n"
  17100. " Value of the derivative vs x")
  17101. ufunc_pbvv_loops[0] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_ff_ff
  17102. ufunc_pbvv_loops[1] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_dd_dd
  17103. ufunc_pbvv_types[0] = <char>NPY_FLOAT
  17104. ufunc_pbvv_types[1] = <char>NPY_FLOAT
  17105. ufunc_pbvv_types[2] = <char>NPY_FLOAT
  17106. ufunc_pbvv_types[3] = <char>NPY_FLOAT
  17107. ufunc_pbvv_types[4] = <char>NPY_DOUBLE
  17108. ufunc_pbvv_types[5] = <char>NPY_DOUBLE
  17109. ufunc_pbvv_types[6] = <char>NPY_DOUBLE
  17110. ufunc_pbvv_types[7] = <char>NPY_DOUBLE
  17111. ufunc_pbvv_ptr[2*0] = <void*>_func_pbvv_wrap
  17112. ufunc_pbvv_ptr[2*0+1] = <void*>(<char*>"pbvv")
  17113. ufunc_pbvv_ptr[2*1] = <void*>_func_pbvv_wrap
  17114. ufunc_pbvv_ptr[2*1+1] = <void*>(<char*>"pbvv")
  17115. ufunc_pbvv_data[0] = &ufunc_pbvv_ptr[2*0]
  17116. ufunc_pbvv_data[1] = &ufunc_pbvv_ptr[2*1]
  17117. pbvv = np.PyUFunc_FromFuncAndData(ufunc_pbvv_loops, ufunc_pbvv_data, ufunc_pbvv_types, 2, 2, 2, 0, "pbvv", ufunc_pbvv_doc, 0)
  17118. cdef np.PyUFuncGenericFunction ufunc_pbwa_loops[2]
  17119. cdef void *ufunc_pbwa_ptr[4]
  17120. cdef void *ufunc_pbwa_data[2]
  17121. cdef char ufunc_pbwa_types[8]
  17122. cdef char *ufunc_pbwa_doc = (
  17123. "pbwa(a, x, out=None)\n"
  17124. "\n"
  17125. "Parabolic cylinder function W.\n"
  17126. "\n"
  17127. "The function is a particular solution to the differential equation\n"
  17128. "\n"
  17129. ".. math::\n"
  17130. "\n"
  17131. " y'' + \\left(\\frac{1}{4}x^2 - a\\right)y = 0,\n"
  17132. "\n"
  17133. "for a full definition see section 12.14 in [1]_.\n"
  17134. "\n"
  17135. "Parameters\n"
  17136. "----------\n"
  17137. "a : array_like\n"
  17138. " Real parameter\n"
  17139. "x : array_like\n"
  17140. " Real argument\n"
  17141. "out : ndarray, optional\n"
  17142. " Optional output array for the function results\n"
  17143. "\n"
  17144. "Returns\n"
  17145. "-------\n"
  17146. "w : scalar or ndarray\n"
  17147. " Value of the function\n"
  17148. "wp : scalar or ndarray\n"
  17149. " Value of the derivative in x\n"
  17150. "\n"
  17151. "Notes\n"
  17152. "-----\n"
  17153. "The function is a wrapper for a Fortran routine by Zhang and Jin\n"
  17154. "[2]_. The implementation is accurate only for ``|a|, |x| < 5`` and\n"
  17155. "returns NaN outside that range.\n"
  17156. "\n"
  17157. "References\n"
  17158. "----------\n"
  17159. ".. [1] Digital Library of Mathematical Functions, 14.30.\n"
  17160. " https://dlmf.nist.gov/14.30\n"
  17161. ".. [2] Zhang, Shanjie and Jin, Jianming. \"Computation of Special\n"
  17162. " Functions\", John Wiley and Sons, 1996.\n"
  17163. " https://people.sc.fsu.edu/~jburkardt/f_src/special_functions/special_functions.html")
  17164. ufunc_pbwa_loops[0] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_ff_ff
  17165. ufunc_pbwa_loops[1] = <np.PyUFuncGenericFunction>loop_i_dd_dd_As_dd_dd
  17166. ufunc_pbwa_types[0] = <char>NPY_FLOAT
  17167. ufunc_pbwa_types[1] = <char>NPY_FLOAT
  17168. ufunc_pbwa_types[2] = <char>NPY_FLOAT
  17169. ufunc_pbwa_types[3] = <char>NPY_FLOAT
  17170. ufunc_pbwa_types[4] = <char>NPY_DOUBLE
  17171. ufunc_pbwa_types[5] = <char>NPY_DOUBLE
  17172. ufunc_pbwa_types[6] = <char>NPY_DOUBLE
  17173. ufunc_pbwa_types[7] = <char>NPY_DOUBLE
  17174. ufunc_pbwa_ptr[2*0] = <void*>_func_pbwa_wrap
  17175. ufunc_pbwa_ptr[2*0+1] = <void*>(<char*>"pbwa")
  17176. ufunc_pbwa_ptr[2*1] = <void*>_func_pbwa_wrap
  17177. ufunc_pbwa_ptr[2*1+1] = <void*>(<char*>"pbwa")
  17178. ufunc_pbwa_data[0] = &ufunc_pbwa_ptr[2*0]
  17179. ufunc_pbwa_data[1] = &ufunc_pbwa_ptr[2*1]
  17180. pbwa = np.PyUFunc_FromFuncAndData(ufunc_pbwa_loops, ufunc_pbwa_data, ufunc_pbwa_types, 2, 2, 2, 0, "pbwa", ufunc_pbwa_doc, 0)
  17181. cdef np.PyUFuncGenericFunction ufunc_pdtr_loops[2]
  17182. cdef void *ufunc_pdtr_ptr[4]
  17183. cdef void *ufunc_pdtr_data[2]
  17184. cdef char ufunc_pdtr_types[6]
  17185. cdef char *ufunc_pdtr_doc = (
  17186. "pdtr(k, m, out=None)\n"
  17187. "\n"
  17188. "Poisson cumulative distribution function.\n"
  17189. "\n"
  17190. "Defined as the probability that a Poisson-distributed random\n"
  17191. "variable with event rate :math:`m` is less than or equal to\n"
  17192. ":math:`k`. More concretely, this works out to be [1]_\n"
  17193. "\n"
  17194. ".. math::\n"
  17195. "\n"
  17196. " \\exp(-m) \\sum_{j = 0}^{\\lfloor{k}\\rfloor} \\frac{m^j}{j!}.\n"
  17197. "\n"
  17198. "Parameters\n"
  17199. "----------\n"
  17200. "k : array_like\n"
  17201. " Number of occurrences (nonnegative, real)\n"
  17202. "m : array_like\n"
  17203. " Shape parameter (nonnegative, real)\n"
  17204. "out : ndarray, optional\n"
  17205. " Optional output array for the function results\n"
  17206. "\n"
  17207. "Returns\n"
  17208. "-------\n"
  17209. "scalar or ndarray\n"
  17210. " Values of the Poisson cumulative distribution function\n"
  17211. "\n"
  17212. "See Also\n"
  17213. "--------\n"
  17214. "pdtrc : Poisson survival function\n"
  17215. "pdtrik : inverse of `pdtr` with respect to `k`\n"
  17216. "pdtri : inverse of `pdtr` with respect to `m`\n"
  17217. "\n"
  17218. "References\n"
  17219. "----------\n"
  17220. ".. [1] https://en.wikipedia.org/wiki/Poisson_distribution\n"
  17221. "\n"
  17222. "Examples\n"
  17223. "--------\n"
  17224. ">>> import numpy as np\n"
  17225. ">>> import scipy.special as sc\n"
  17226. "\n"
  17227. "It is a cumulative distribution function, so it converges to 1\n"
  17228. "monotonically as `k` goes to infinity.\n"
  17229. "\n"
  17230. ">>> sc.pdtr([1, 10, 100, np.inf], 1)\n"
  17231. "array([0.73575888, 0.99999999, 1. , 1. ])\n"
  17232. "\n"
  17233. "It is discontinuous at integers and constant between integers.\n"
  17234. "\n"
  17235. ">>> sc.pdtr([1, 1.5, 1.9, 2], 1)\n"
  17236. "array([0.73575888, 0.73575888, 0.73575888, 0.9196986 ])")
  17237. ufunc_pdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17238. ufunc_pdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17239. ufunc_pdtr_types[0] = <char>NPY_FLOAT
  17240. ufunc_pdtr_types[1] = <char>NPY_FLOAT
  17241. ufunc_pdtr_types[2] = <char>NPY_FLOAT
  17242. ufunc_pdtr_types[3] = <char>NPY_DOUBLE
  17243. ufunc_pdtr_types[4] = <char>NPY_DOUBLE
  17244. ufunc_pdtr_types[5] = <char>NPY_DOUBLE
  17245. ufunc_pdtr_ptr[2*0] = <void*>_func_pdtr
  17246. ufunc_pdtr_ptr[2*0+1] = <void*>(<char*>"pdtr")
  17247. ufunc_pdtr_ptr[2*1] = <void*>_func_pdtr
  17248. ufunc_pdtr_ptr[2*1+1] = <void*>(<char*>"pdtr")
  17249. ufunc_pdtr_data[0] = &ufunc_pdtr_ptr[2*0]
  17250. ufunc_pdtr_data[1] = &ufunc_pdtr_ptr[2*1]
  17251. pdtr = np.PyUFunc_FromFuncAndData(ufunc_pdtr_loops, ufunc_pdtr_data, ufunc_pdtr_types, 2, 2, 1, 0, "pdtr", ufunc_pdtr_doc, 0)
  17252. cdef np.PyUFuncGenericFunction ufunc_pdtrc_loops[2]
  17253. cdef void *ufunc_pdtrc_ptr[4]
  17254. cdef void *ufunc_pdtrc_data[2]
  17255. cdef char ufunc_pdtrc_types[6]
  17256. cdef char *ufunc_pdtrc_doc = (
  17257. "pdtrc(k, m, out=None)\n"
  17258. "\n"
  17259. "Poisson survival function\n"
  17260. "\n"
  17261. "Returns the sum of the terms from k+1 to infinity of the Poisson\n"
  17262. "distribution: sum(exp(-m) * m**j / j!, j=k+1..inf) = gammainc(\n"
  17263. "k+1, m). Arguments must both be non-negative doubles.\n"
  17264. "\n"
  17265. "Parameters\n"
  17266. "----------\n"
  17267. "k : array_like\n"
  17268. " Number of occurrences (nonnegative, real)\n"
  17269. "m : array_like\n"
  17270. " Shape parameter (nonnegative, real)\n"
  17271. "out : ndarray, optional\n"
  17272. " Optional output array for the function results\n"
  17273. "\n"
  17274. "Returns\n"
  17275. "-------\n"
  17276. "scalar or ndarray\n"
  17277. " Values of the Poisson survival function\n"
  17278. "\n"
  17279. "See Also\n"
  17280. "--------\n"
  17281. "pdtr : Poisson cumulative distribution function\n"
  17282. "pdtrik : inverse of `pdtr` with respect to `k`\n"
  17283. "pdtri : inverse of `pdtr` with respect to `m`")
  17284. ufunc_pdtrc_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17285. ufunc_pdtrc_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17286. ufunc_pdtrc_types[0] = <char>NPY_FLOAT
  17287. ufunc_pdtrc_types[1] = <char>NPY_FLOAT
  17288. ufunc_pdtrc_types[2] = <char>NPY_FLOAT
  17289. ufunc_pdtrc_types[3] = <char>NPY_DOUBLE
  17290. ufunc_pdtrc_types[4] = <char>NPY_DOUBLE
  17291. ufunc_pdtrc_types[5] = <char>NPY_DOUBLE
  17292. ufunc_pdtrc_ptr[2*0] = <void*>_func_pdtrc
  17293. ufunc_pdtrc_ptr[2*0+1] = <void*>(<char*>"pdtrc")
  17294. ufunc_pdtrc_ptr[2*1] = <void*>_func_pdtrc
  17295. ufunc_pdtrc_ptr[2*1+1] = <void*>(<char*>"pdtrc")
  17296. ufunc_pdtrc_data[0] = &ufunc_pdtrc_ptr[2*0]
  17297. ufunc_pdtrc_data[1] = &ufunc_pdtrc_ptr[2*1]
  17298. pdtrc = np.PyUFunc_FromFuncAndData(ufunc_pdtrc_loops, ufunc_pdtrc_data, ufunc_pdtrc_types, 2, 2, 1, 0, "pdtrc", ufunc_pdtrc_doc, 0)
  17299. cdef np.PyUFuncGenericFunction ufunc_pdtri_loops[3]
  17300. cdef void *ufunc_pdtri_ptr[6]
  17301. cdef void *ufunc_pdtri_data[3]
  17302. cdef char ufunc_pdtri_types[9]
  17303. cdef char *ufunc_pdtri_doc = (
  17304. "pdtri(k, y, out=None)\n"
  17305. "\n"
  17306. "Inverse to `pdtr` vs m\n"
  17307. "\n"
  17308. "Returns the Poisson variable `m` such that the sum from 0 to `k` of\n"
  17309. "the Poisson density is equal to the given probability `y`:\n"
  17310. "calculated by ``gammaincinv(k + 1, y)``. `k` must be a nonnegative\n"
  17311. "integer and `y` between 0 and 1.\n"
  17312. "\n"
  17313. "Parameters\n"
  17314. "----------\n"
  17315. "k : array_like\n"
  17316. " Number of occurrences (nonnegative, real)\n"
  17317. "y : array_like\n"
  17318. " Probability\n"
  17319. "out : ndarray, optional\n"
  17320. " Optional output array for the function results\n"
  17321. "\n"
  17322. "Returns\n"
  17323. "-------\n"
  17324. "scalar or ndarray\n"
  17325. " Values of the shape paramter `m` such that ``pdtr(k, m) = p``\n"
  17326. "\n"
  17327. "See Also\n"
  17328. "--------\n"
  17329. "pdtr : Poisson cumulative distribution function\n"
  17330. "pdtrc : Poisson survival function\n"
  17331. "pdtrik : inverse of `pdtr` with respect to `k`")
  17332. ufunc_pdtri_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  17333. ufunc_pdtri_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17334. ufunc_pdtri_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17335. ufunc_pdtri_types[0] = <char>NPY_LONG
  17336. ufunc_pdtri_types[1] = <char>NPY_DOUBLE
  17337. ufunc_pdtri_types[2] = <char>NPY_DOUBLE
  17338. ufunc_pdtri_types[3] = <char>NPY_FLOAT
  17339. ufunc_pdtri_types[4] = <char>NPY_FLOAT
  17340. ufunc_pdtri_types[5] = <char>NPY_FLOAT
  17341. ufunc_pdtri_types[6] = <char>NPY_DOUBLE
  17342. ufunc_pdtri_types[7] = <char>NPY_DOUBLE
  17343. ufunc_pdtri_types[8] = <char>NPY_DOUBLE
  17344. ufunc_pdtri_ptr[2*0] = <void*>_func_pdtri
  17345. ufunc_pdtri_ptr[2*0+1] = <void*>(<char*>"pdtri")
  17346. ufunc_pdtri_ptr[2*1] = <void*>_func_pdtri_unsafe
  17347. ufunc_pdtri_ptr[2*1+1] = <void*>(<char*>"pdtri")
  17348. ufunc_pdtri_ptr[2*2] = <void*>_func_pdtri_unsafe
  17349. ufunc_pdtri_ptr[2*2+1] = <void*>(<char*>"pdtri")
  17350. ufunc_pdtri_data[0] = &ufunc_pdtri_ptr[2*0]
  17351. ufunc_pdtri_data[1] = &ufunc_pdtri_ptr[2*1]
  17352. ufunc_pdtri_data[2] = &ufunc_pdtri_ptr[2*2]
  17353. pdtri = np.PyUFunc_FromFuncAndData(ufunc_pdtri_loops, ufunc_pdtri_data, ufunc_pdtri_types, 3, 2, 1, 0, "pdtri", ufunc_pdtri_doc, 0)
  17354. cdef np.PyUFuncGenericFunction ufunc_pdtrik_loops[2]
  17355. cdef void *ufunc_pdtrik_ptr[4]
  17356. cdef void *ufunc_pdtrik_data[2]
  17357. cdef char ufunc_pdtrik_types[6]
  17358. cdef char *ufunc_pdtrik_doc = (
  17359. "pdtrik(p, m, out=None)\n"
  17360. "\n"
  17361. "Inverse to `pdtr` vs `m`.\n"
  17362. "\n"
  17363. "Parameters\n"
  17364. "----------\n"
  17365. "m : array_like\n"
  17366. " Shape parameter (nonnegative, real)\n"
  17367. "p : array_like\n"
  17368. " Probability\n"
  17369. "out : ndarray, optional\n"
  17370. " Optional output array for the function results\n"
  17371. "\n"
  17372. "Returns\n"
  17373. "-------\n"
  17374. "scalar or ndarray\n"
  17375. " The number of occurrences `k` such that ``pdtr(k, m) = p``\n"
  17376. "\n"
  17377. "See Also\n"
  17378. "--------\n"
  17379. "pdtr : Poisson cumulative distribution function\n"
  17380. "pdtrc : Poisson survival function\n"
  17381. "pdtri : inverse of `pdtr` with respect to `m`")
  17382. ufunc_pdtrik_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17383. ufunc_pdtrik_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17384. ufunc_pdtrik_types[0] = <char>NPY_FLOAT
  17385. ufunc_pdtrik_types[1] = <char>NPY_FLOAT
  17386. ufunc_pdtrik_types[2] = <char>NPY_FLOAT
  17387. ufunc_pdtrik_types[3] = <char>NPY_DOUBLE
  17388. ufunc_pdtrik_types[4] = <char>NPY_DOUBLE
  17389. ufunc_pdtrik_types[5] = <char>NPY_DOUBLE
  17390. ufunc_pdtrik_ptr[2*0] = <void*>_func_cdfpoi2_wrap
  17391. ufunc_pdtrik_ptr[2*0+1] = <void*>(<char*>"pdtrik")
  17392. ufunc_pdtrik_ptr[2*1] = <void*>_func_cdfpoi2_wrap
  17393. ufunc_pdtrik_ptr[2*1+1] = <void*>(<char*>"pdtrik")
  17394. ufunc_pdtrik_data[0] = &ufunc_pdtrik_ptr[2*0]
  17395. ufunc_pdtrik_data[1] = &ufunc_pdtrik_ptr[2*1]
  17396. pdtrik = np.PyUFunc_FromFuncAndData(ufunc_pdtrik_loops, ufunc_pdtrik_data, ufunc_pdtrik_types, 2, 2, 1, 0, "pdtrik", ufunc_pdtrik_doc, 0)
  17397. cdef np.PyUFuncGenericFunction ufunc_poch_loops[2]
  17398. cdef void *ufunc_poch_ptr[4]
  17399. cdef void *ufunc_poch_data[2]
  17400. cdef char ufunc_poch_types[6]
  17401. cdef char *ufunc_poch_doc = (
  17402. "poch(z, m, out=None)\n"
  17403. "\n"
  17404. "Pochhammer symbol.\n"
  17405. "\n"
  17406. "The Pochhammer symbol (rising factorial) is defined as\n"
  17407. "\n"
  17408. ".. math::\n"
  17409. "\n"
  17410. " (z)_m = \\frac{\\Gamma(z + m)}{\\Gamma(z)}\n"
  17411. "\n"
  17412. "For positive integer `m` it reads\n"
  17413. "\n"
  17414. ".. math::\n"
  17415. "\n"
  17416. " (z)_m = z (z + 1) ... (z + m - 1)\n"
  17417. "\n"
  17418. "See [dlmf]_ for more details.\n"
  17419. "\n"
  17420. "Parameters\n"
  17421. "----------\n"
  17422. "z, m : array_like\n"
  17423. " Real-valued arguments.\n"
  17424. "out : ndarray, optional\n"
  17425. " Optional output array for the function results\n"
  17426. "\n"
  17427. "Returns\n"
  17428. "-------\n"
  17429. "scalar or ndarray\n"
  17430. " The value of the function.\n"
  17431. "\n"
  17432. "References\n"
  17433. "----------\n"
  17434. ".. [dlmf] Nist, Digital Library of Mathematical Functions\n"
  17435. " https://dlmf.nist.gov/5.2#iii\n"
  17436. "\n"
  17437. "Examples\n"
  17438. "--------\n"
  17439. ">>> import scipy.special as sc\n"
  17440. "\n"
  17441. "It is 1 when m is 0.\n"
  17442. "\n"
  17443. ">>> sc.poch([1, 2, 3, 4], 0)\n"
  17444. "array([1., 1., 1., 1.])\n"
  17445. "\n"
  17446. "For z equal to 1 it reduces to the factorial function.\n"
  17447. "\n"
  17448. ">>> sc.poch(1, 5)\n"
  17449. "120.0\n"
  17450. ">>> 1 * 2 * 3 * 4 * 5\n"
  17451. "120\n"
  17452. "\n"
  17453. "It can be expressed in terms of the gamma function.\n"
  17454. "\n"
  17455. ">>> z, m = 3.7, 2.1\n"
  17456. ">>> sc.poch(z, m)\n"
  17457. "20.529581933776953\n"
  17458. ">>> sc.gamma(z + m) / sc.gamma(z)\n"
  17459. "20.52958193377696")
  17460. ufunc_poch_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  17461. ufunc_poch_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17462. ufunc_poch_types[0] = <char>NPY_FLOAT
  17463. ufunc_poch_types[1] = <char>NPY_FLOAT
  17464. ufunc_poch_types[2] = <char>NPY_FLOAT
  17465. ufunc_poch_types[3] = <char>NPY_DOUBLE
  17466. ufunc_poch_types[4] = <char>NPY_DOUBLE
  17467. ufunc_poch_types[5] = <char>NPY_DOUBLE
  17468. ufunc_poch_ptr[2*0] = <void*>_func_poch
  17469. ufunc_poch_ptr[2*0+1] = <void*>(<char*>"poch")
  17470. ufunc_poch_ptr[2*1] = <void*>_func_poch
  17471. ufunc_poch_ptr[2*1+1] = <void*>(<char*>"poch")
  17472. ufunc_poch_data[0] = &ufunc_poch_ptr[2*0]
  17473. ufunc_poch_data[1] = &ufunc_poch_ptr[2*1]
  17474. poch = np.PyUFunc_FromFuncAndData(ufunc_poch_loops, ufunc_poch_data, ufunc_poch_types, 2, 2, 1, 0, "poch", ufunc_poch_doc, 0)
  17475. cdef np.PyUFuncGenericFunction ufunc_powm1_loops[2]
  17476. cdef void *ufunc_powm1_ptr[4]
  17477. cdef void *ufunc_powm1_data[2]
  17478. cdef char ufunc_powm1_types[6]
  17479. cdef char *ufunc_powm1_doc = (
  17480. "powm1(x, y, out=None)\n"
  17481. "\n"
  17482. "Computes ``x**y - 1``.\n"
  17483. "\n"
  17484. "This function is useful when `y` is near 0, or when `x` is near 1.\n"
  17485. "\n"
  17486. "The function is implemented for real types only (unlike ``numpy.power``,\n"
  17487. "which accepts complex inputs).\n"
  17488. "\n"
  17489. "Parameters\n"
  17490. "----------\n"
  17491. "x : array_like\n"
  17492. " The base. Must be a real type (i.e. integer or float, not complex).\n"
  17493. "y : array_like\n"
  17494. " The exponent. Must be a real type (i.e. integer or float, not complex).\n"
  17495. "\n"
  17496. "Returns\n"
  17497. "-------\n"
  17498. "array_like\n"
  17499. " Result of the calculation\n"
  17500. "\n"
  17501. "Notes\n"
  17502. "-----\n"
  17503. ".. versionadded:: 1.10.0\n"
  17504. "\n"
  17505. "The underlying code is implemented for single precision and double\n"
  17506. "precision floats only. Unlike `numpy.power`, integer inputs to\n"
  17507. "`powm1` are converted to floating point, and complex inputs are\n"
  17508. "not accepted.\n"
  17509. "\n"
  17510. "Note the following edge cases:\n"
  17511. "\n"
  17512. "* ``powm1(x, 0)`` returns 0 for any ``x``, including 0, ``inf``\n"
  17513. " and ``nan``.\n"
  17514. "* ``powm1(1, y)`` returns 0 for any ``y``, including ``nan``\n"
  17515. " and ``inf``.\n"
  17516. "\n"
  17517. "Examples\n"
  17518. "--------\n"
  17519. ">>> import numpy as np\n"
  17520. ">>> from scipy.special import powm1\n"
  17521. "\n"
  17522. ">>> x = np.array([1.2, 10.0, 0.9999999975])\n"
  17523. ">>> y = np.array([1e-9, 1e-11, 0.1875])\n"
  17524. ">>> powm1(x, y)\n"
  17525. "array([ 1.82321557e-10, 2.30258509e-11, -4.68749998e-10])\n"
  17526. "\n"
  17527. "It can be verified that the relative errors in those results\n"
  17528. "are less than 2.5e-16.\n"
  17529. "\n"
  17530. "Compare that to the result of ``x**y - 1``, where the\n"
  17531. "relative errors are all larger than 8e-8:\n"
  17532. "\n"
  17533. ">>> x**y - 1\n"
  17534. "array([ 1.82321491e-10, 2.30258035e-11, -4.68750039e-10])")
  17535. ufunc_powm1_loops[0] = <np.PyUFuncGenericFunction>loop_f_ff__As_ff_f
  17536. ufunc_powm1_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  17537. ufunc_powm1_types[0] = <char>NPY_FLOAT
  17538. ufunc_powm1_types[1] = <char>NPY_FLOAT
  17539. ufunc_powm1_types[2] = <char>NPY_FLOAT
  17540. ufunc_powm1_types[3] = <char>NPY_DOUBLE
  17541. ufunc_powm1_types[4] = <char>NPY_DOUBLE
  17542. ufunc_powm1_types[5] = <char>NPY_DOUBLE
  17543. ufunc_powm1_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_powm1_float
  17544. ufunc_powm1_ptr[2*0+1] = <void*>(<char*>"powm1")
  17545. ufunc_powm1_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_powm1_double
  17546. ufunc_powm1_ptr[2*1+1] = <void*>(<char*>"powm1")
  17547. ufunc_powm1_data[0] = &ufunc_powm1_ptr[2*0]
  17548. ufunc_powm1_data[1] = &ufunc_powm1_ptr[2*1]
  17549. powm1 = np.PyUFunc_FromFuncAndData(ufunc_powm1_loops, ufunc_powm1_data, ufunc_powm1_types, 2, 2, 1, 0, "powm1", ufunc_powm1_doc, 0)
  17550. cdef np.PyUFuncGenericFunction ufunc_pro_ang1_loops[2]
  17551. cdef void *ufunc_pro_ang1_ptr[4]
  17552. cdef void *ufunc_pro_ang1_data[2]
  17553. cdef char ufunc_pro_ang1_types[12]
  17554. cdef char *ufunc_pro_ang1_doc = (
  17555. "pro_ang1(m, n, c, x, out=None)\n"
  17556. "\n"
  17557. "Prolate spheroidal angular function of the first kind and its derivative\n"
  17558. "\n"
  17559. "Computes the prolate spheroidal angular function of the first kind\n"
  17560. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17561. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  17562. "\n"
  17563. "Parameters\n"
  17564. "----------\n"
  17565. "m : array_like\n"
  17566. " Nonnegative mode parameter m\n"
  17567. "n : array_like\n"
  17568. " Mode parameter n (>= m)\n"
  17569. "c : array_like\n"
  17570. " Spheroidal parameter\n"
  17571. "x : array_like\n"
  17572. " Real parameter (``|x| < 1.0``)\n"
  17573. "out : ndarray, optional\n"
  17574. " Optional output array for the function results\n"
  17575. "\n"
  17576. "Returns\n"
  17577. "-------\n"
  17578. "s : scalar or ndarray\n"
  17579. " Value of the function\n"
  17580. "sp : scalar or ndarray\n"
  17581. " Value of the derivative vs x")
  17582. ufunc_pro_ang1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  17583. ufunc_pro_ang1_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  17584. ufunc_pro_ang1_types[0] = <char>NPY_FLOAT
  17585. ufunc_pro_ang1_types[1] = <char>NPY_FLOAT
  17586. ufunc_pro_ang1_types[2] = <char>NPY_FLOAT
  17587. ufunc_pro_ang1_types[3] = <char>NPY_FLOAT
  17588. ufunc_pro_ang1_types[4] = <char>NPY_FLOAT
  17589. ufunc_pro_ang1_types[5] = <char>NPY_FLOAT
  17590. ufunc_pro_ang1_types[6] = <char>NPY_DOUBLE
  17591. ufunc_pro_ang1_types[7] = <char>NPY_DOUBLE
  17592. ufunc_pro_ang1_types[8] = <char>NPY_DOUBLE
  17593. ufunc_pro_ang1_types[9] = <char>NPY_DOUBLE
  17594. ufunc_pro_ang1_types[10] = <char>NPY_DOUBLE
  17595. ufunc_pro_ang1_types[11] = <char>NPY_DOUBLE
  17596. ufunc_pro_ang1_ptr[2*0] = <void*>_func_prolate_aswfa_nocv_wrap
  17597. ufunc_pro_ang1_ptr[2*0+1] = <void*>(<char*>"pro_ang1")
  17598. ufunc_pro_ang1_ptr[2*1] = <void*>_func_prolate_aswfa_nocv_wrap
  17599. ufunc_pro_ang1_ptr[2*1+1] = <void*>(<char*>"pro_ang1")
  17600. ufunc_pro_ang1_data[0] = &ufunc_pro_ang1_ptr[2*0]
  17601. ufunc_pro_ang1_data[1] = &ufunc_pro_ang1_ptr[2*1]
  17602. pro_ang1 = np.PyUFunc_FromFuncAndData(ufunc_pro_ang1_loops, ufunc_pro_ang1_data, ufunc_pro_ang1_types, 2, 4, 2, 0, "pro_ang1", ufunc_pro_ang1_doc, 0)
  17603. cdef np.PyUFuncGenericFunction ufunc_pro_ang1_cv_loops[2]
  17604. cdef void *ufunc_pro_ang1_cv_ptr[4]
  17605. cdef void *ufunc_pro_ang1_cv_data[2]
  17606. cdef char ufunc_pro_ang1_cv_types[14]
  17607. cdef char *ufunc_pro_ang1_cv_doc = (
  17608. "pro_ang1_cv(m, n, c, cv, x, out=None)\n"
  17609. "\n"
  17610. "Prolate spheroidal angular function pro_ang1 for precomputed characteristic value\n"
  17611. "\n"
  17612. "Computes the prolate spheroidal angular function of the first kind\n"
  17613. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17614. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  17615. "pre-computed characteristic value.\n"
  17616. "\n"
  17617. "Parameters\n"
  17618. "----------\n"
  17619. "m : array_like\n"
  17620. " Nonnegative mode parameter m\n"
  17621. "n : array_like\n"
  17622. " Mode parameter n (>= m)\n"
  17623. "c : array_like\n"
  17624. " Spheroidal parameter\n"
  17625. "cv : array_like\n"
  17626. " Characteristic value\n"
  17627. "x : array_like\n"
  17628. " Real parameter (``|x| < 1.0``)\n"
  17629. "out : ndarray, optional\n"
  17630. " Optional output array for the function results\n"
  17631. "\n"
  17632. "Returns\n"
  17633. "-------\n"
  17634. "s : scalar or ndarray\n"
  17635. " Value of the function\n"
  17636. "sp : scalar or ndarray\n"
  17637. " Value of the derivative vs x")
  17638. ufunc_pro_ang1_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  17639. ufunc_pro_ang1_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  17640. ufunc_pro_ang1_cv_types[0] = <char>NPY_FLOAT
  17641. ufunc_pro_ang1_cv_types[1] = <char>NPY_FLOAT
  17642. ufunc_pro_ang1_cv_types[2] = <char>NPY_FLOAT
  17643. ufunc_pro_ang1_cv_types[3] = <char>NPY_FLOAT
  17644. ufunc_pro_ang1_cv_types[4] = <char>NPY_FLOAT
  17645. ufunc_pro_ang1_cv_types[5] = <char>NPY_FLOAT
  17646. ufunc_pro_ang1_cv_types[6] = <char>NPY_FLOAT
  17647. ufunc_pro_ang1_cv_types[7] = <char>NPY_DOUBLE
  17648. ufunc_pro_ang1_cv_types[8] = <char>NPY_DOUBLE
  17649. ufunc_pro_ang1_cv_types[9] = <char>NPY_DOUBLE
  17650. ufunc_pro_ang1_cv_types[10] = <char>NPY_DOUBLE
  17651. ufunc_pro_ang1_cv_types[11] = <char>NPY_DOUBLE
  17652. ufunc_pro_ang1_cv_types[12] = <char>NPY_DOUBLE
  17653. ufunc_pro_ang1_cv_types[13] = <char>NPY_DOUBLE
  17654. ufunc_pro_ang1_cv_ptr[2*0] = <void*>_func_prolate_aswfa_wrap
  17655. ufunc_pro_ang1_cv_ptr[2*0+1] = <void*>(<char*>"pro_ang1_cv")
  17656. ufunc_pro_ang1_cv_ptr[2*1] = <void*>_func_prolate_aswfa_wrap
  17657. ufunc_pro_ang1_cv_ptr[2*1+1] = <void*>(<char*>"pro_ang1_cv")
  17658. ufunc_pro_ang1_cv_data[0] = &ufunc_pro_ang1_cv_ptr[2*0]
  17659. ufunc_pro_ang1_cv_data[1] = &ufunc_pro_ang1_cv_ptr[2*1]
  17660. pro_ang1_cv = np.PyUFunc_FromFuncAndData(ufunc_pro_ang1_cv_loops, ufunc_pro_ang1_cv_data, ufunc_pro_ang1_cv_types, 2, 5, 2, 0, "pro_ang1_cv", ufunc_pro_ang1_cv_doc, 0)
  17661. cdef np.PyUFuncGenericFunction ufunc_pro_cv_loops[2]
  17662. cdef void *ufunc_pro_cv_ptr[4]
  17663. cdef void *ufunc_pro_cv_data[2]
  17664. cdef char ufunc_pro_cv_types[8]
  17665. cdef char *ufunc_pro_cv_doc = (
  17666. "pro_cv(m, n, c, out=None)\n"
  17667. "\n"
  17668. "Characteristic value of prolate spheroidal function\n"
  17669. "\n"
  17670. "Computes the characteristic value of prolate spheroidal wave\n"
  17671. "functions of order `m`, `n` (n>=m) and spheroidal parameter `c`.\n"
  17672. "\n"
  17673. "Parameters\n"
  17674. "----------\n"
  17675. "m : array_like\n"
  17676. " Nonnegative mode parameter m\n"
  17677. "n : array_like\n"
  17678. " Mode parameter n (>= m)\n"
  17679. "c : array_like\n"
  17680. " Spheroidal parameter\n"
  17681. "out : ndarray, optional\n"
  17682. " Optional output array for the function results\n"
  17683. "\n"
  17684. "Returns\n"
  17685. "-------\n"
  17686. "cv : scalar or ndarray\n"
  17687. " Characteristic value")
  17688. ufunc_pro_cv_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  17689. ufunc_pro_cv_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  17690. ufunc_pro_cv_types[0] = <char>NPY_FLOAT
  17691. ufunc_pro_cv_types[1] = <char>NPY_FLOAT
  17692. ufunc_pro_cv_types[2] = <char>NPY_FLOAT
  17693. ufunc_pro_cv_types[3] = <char>NPY_FLOAT
  17694. ufunc_pro_cv_types[4] = <char>NPY_DOUBLE
  17695. ufunc_pro_cv_types[5] = <char>NPY_DOUBLE
  17696. ufunc_pro_cv_types[6] = <char>NPY_DOUBLE
  17697. ufunc_pro_cv_types[7] = <char>NPY_DOUBLE
  17698. ufunc_pro_cv_ptr[2*0] = <void*>_func_prolate_segv_wrap
  17699. ufunc_pro_cv_ptr[2*0+1] = <void*>(<char*>"pro_cv")
  17700. ufunc_pro_cv_ptr[2*1] = <void*>_func_prolate_segv_wrap
  17701. ufunc_pro_cv_ptr[2*1+1] = <void*>(<char*>"pro_cv")
  17702. ufunc_pro_cv_data[0] = &ufunc_pro_cv_ptr[2*0]
  17703. ufunc_pro_cv_data[1] = &ufunc_pro_cv_ptr[2*1]
  17704. pro_cv = np.PyUFunc_FromFuncAndData(ufunc_pro_cv_loops, ufunc_pro_cv_data, ufunc_pro_cv_types, 2, 3, 1, 0, "pro_cv", ufunc_pro_cv_doc, 0)
  17705. cdef np.PyUFuncGenericFunction ufunc_pro_rad1_loops[2]
  17706. cdef void *ufunc_pro_rad1_ptr[4]
  17707. cdef void *ufunc_pro_rad1_data[2]
  17708. cdef char ufunc_pro_rad1_types[12]
  17709. cdef char *ufunc_pro_rad1_doc = (
  17710. "pro_rad1(m, n, c, x, out=None)\n"
  17711. "\n"
  17712. "Prolate spheroidal radial function of the first kind and its derivative\n"
  17713. "\n"
  17714. "Computes the prolate spheroidal radial function of the first kind\n"
  17715. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17716. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  17717. "\n"
  17718. "Parameters\n"
  17719. "----------\n"
  17720. "m : array_like\n"
  17721. " Nonnegative mode parameter m\n"
  17722. "n : array_like\n"
  17723. " Mode parameter n (>= m)\n"
  17724. "c : array_like\n"
  17725. " Spheroidal parameter\n"
  17726. "x : array_like\n"
  17727. " Real parameter (``|x| < 1.0``)\n"
  17728. "out : ndarray, optional\n"
  17729. " Optional output array for the function results\n"
  17730. "\n"
  17731. "Returns\n"
  17732. "-------\n"
  17733. "s : scalar or ndarray\n"
  17734. " Value of the function\n"
  17735. "sp : scalar or ndarray\n"
  17736. " Value of the derivative vs x")
  17737. ufunc_pro_rad1_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  17738. ufunc_pro_rad1_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  17739. ufunc_pro_rad1_types[0] = <char>NPY_FLOAT
  17740. ufunc_pro_rad1_types[1] = <char>NPY_FLOAT
  17741. ufunc_pro_rad1_types[2] = <char>NPY_FLOAT
  17742. ufunc_pro_rad1_types[3] = <char>NPY_FLOAT
  17743. ufunc_pro_rad1_types[4] = <char>NPY_FLOAT
  17744. ufunc_pro_rad1_types[5] = <char>NPY_FLOAT
  17745. ufunc_pro_rad1_types[6] = <char>NPY_DOUBLE
  17746. ufunc_pro_rad1_types[7] = <char>NPY_DOUBLE
  17747. ufunc_pro_rad1_types[8] = <char>NPY_DOUBLE
  17748. ufunc_pro_rad1_types[9] = <char>NPY_DOUBLE
  17749. ufunc_pro_rad1_types[10] = <char>NPY_DOUBLE
  17750. ufunc_pro_rad1_types[11] = <char>NPY_DOUBLE
  17751. ufunc_pro_rad1_ptr[2*0] = <void*>_func_prolate_radial1_nocv_wrap
  17752. ufunc_pro_rad1_ptr[2*0+1] = <void*>(<char*>"pro_rad1")
  17753. ufunc_pro_rad1_ptr[2*1] = <void*>_func_prolate_radial1_nocv_wrap
  17754. ufunc_pro_rad1_ptr[2*1+1] = <void*>(<char*>"pro_rad1")
  17755. ufunc_pro_rad1_data[0] = &ufunc_pro_rad1_ptr[2*0]
  17756. ufunc_pro_rad1_data[1] = &ufunc_pro_rad1_ptr[2*1]
  17757. pro_rad1 = np.PyUFunc_FromFuncAndData(ufunc_pro_rad1_loops, ufunc_pro_rad1_data, ufunc_pro_rad1_types, 2, 4, 2, 0, "pro_rad1", ufunc_pro_rad1_doc, 0)
  17758. cdef np.PyUFuncGenericFunction ufunc_pro_rad1_cv_loops[2]
  17759. cdef void *ufunc_pro_rad1_cv_ptr[4]
  17760. cdef void *ufunc_pro_rad1_cv_data[2]
  17761. cdef char ufunc_pro_rad1_cv_types[14]
  17762. cdef char *ufunc_pro_rad1_cv_doc = (
  17763. "pro_rad1_cv(m, n, c, cv, x, out=None)\n"
  17764. "\n"
  17765. "Prolate spheroidal radial function pro_rad1 for precomputed characteristic value\n"
  17766. "\n"
  17767. "Computes the prolate spheroidal radial function of the first kind\n"
  17768. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17769. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  17770. "pre-computed characteristic value.\n"
  17771. "\n"
  17772. "Parameters\n"
  17773. "----------\n"
  17774. "m : array_like\n"
  17775. " Nonnegative mode parameter m\n"
  17776. "n : array_like\n"
  17777. " Mode parameter n (>= m)\n"
  17778. "c : array_like\n"
  17779. " Spheroidal parameter\n"
  17780. "cv : array_like\n"
  17781. " Characteristic value\n"
  17782. "x : array_like\n"
  17783. " Real parameter (``|x| < 1.0``)\n"
  17784. "out : ndarray, optional\n"
  17785. " Optional output array for the function results\n"
  17786. "\n"
  17787. "Returns\n"
  17788. "-------\n"
  17789. "s : scalar or ndarray\n"
  17790. " Value of the function\n"
  17791. "sp : scalar or ndarray\n"
  17792. " Value of the derivative vs x")
  17793. ufunc_pro_rad1_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  17794. ufunc_pro_rad1_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  17795. ufunc_pro_rad1_cv_types[0] = <char>NPY_FLOAT
  17796. ufunc_pro_rad1_cv_types[1] = <char>NPY_FLOAT
  17797. ufunc_pro_rad1_cv_types[2] = <char>NPY_FLOAT
  17798. ufunc_pro_rad1_cv_types[3] = <char>NPY_FLOAT
  17799. ufunc_pro_rad1_cv_types[4] = <char>NPY_FLOAT
  17800. ufunc_pro_rad1_cv_types[5] = <char>NPY_FLOAT
  17801. ufunc_pro_rad1_cv_types[6] = <char>NPY_FLOAT
  17802. ufunc_pro_rad1_cv_types[7] = <char>NPY_DOUBLE
  17803. ufunc_pro_rad1_cv_types[8] = <char>NPY_DOUBLE
  17804. ufunc_pro_rad1_cv_types[9] = <char>NPY_DOUBLE
  17805. ufunc_pro_rad1_cv_types[10] = <char>NPY_DOUBLE
  17806. ufunc_pro_rad1_cv_types[11] = <char>NPY_DOUBLE
  17807. ufunc_pro_rad1_cv_types[12] = <char>NPY_DOUBLE
  17808. ufunc_pro_rad1_cv_types[13] = <char>NPY_DOUBLE
  17809. ufunc_pro_rad1_cv_ptr[2*0] = <void*>_func_prolate_radial1_wrap
  17810. ufunc_pro_rad1_cv_ptr[2*0+1] = <void*>(<char*>"pro_rad1_cv")
  17811. ufunc_pro_rad1_cv_ptr[2*1] = <void*>_func_prolate_radial1_wrap
  17812. ufunc_pro_rad1_cv_ptr[2*1+1] = <void*>(<char*>"pro_rad1_cv")
  17813. ufunc_pro_rad1_cv_data[0] = &ufunc_pro_rad1_cv_ptr[2*0]
  17814. ufunc_pro_rad1_cv_data[1] = &ufunc_pro_rad1_cv_ptr[2*1]
  17815. pro_rad1_cv = np.PyUFunc_FromFuncAndData(ufunc_pro_rad1_cv_loops, ufunc_pro_rad1_cv_data, ufunc_pro_rad1_cv_types, 2, 5, 2, 0, "pro_rad1_cv", ufunc_pro_rad1_cv_doc, 0)
  17816. cdef np.PyUFuncGenericFunction ufunc_pro_rad2_loops[2]
  17817. cdef void *ufunc_pro_rad2_ptr[4]
  17818. cdef void *ufunc_pro_rad2_data[2]
  17819. cdef char ufunc_pro_rad2_types[12]
  17820. cdef char *ufunc_pro_rad2_doc = (
  17821. "pro_rad2(m, n, c, x, out=None)\n"
  17822. "\n"
  17823. "Prolate spheroidal radial function of the second kind and its derivative\n"
  17824. "\n"
  17825. "Computes the prolate spheroidal radial function of the second kind\n"
  17826. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17827. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``.\n"
  17828. "\n"
  17829. "Parameters\n"
  17830. "----------\n"
  17831. "m : array_like\n"
  17832. " Nonnegative mode parameter m\n"
  17833. "n : array_like\n"
  17834. " Mode parameter n (>= m)\n"
  17835. "c : array_like\n"
  17836. " Spheroidal parameter\n"
  17837. "cv : array_like\n"
  17838. " Characteristic value\n"
  17839. "x : array_like\n"
  17840. " Real parameter (``|x| < 1.0``)\n"
  17841. "out : ndarray, optional\n"
  17842. " Optional output array for the function results\n"
  17843. "\n"
  17844. "Returns\n"
  17845. "-------\n"
  17846. "s : scalar or ndarray\n"
  17847. " Value of the function\n"
  17848. "sp : scalar or ndarray\n"
  17849. " Value of the derivative vs x")
  17850. ufunc_pro_rad2_loops[0] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_ffff_ff
  17851. ufunc_pro_rad2_loops[1] = <np.PyUFuncGenericFunction>loop_d_dddd_d_As_dddd_dd
  17852. ufunc_pro_rad2_types[0] = <char>NPY_FLOAT
  17853. ufunc_pro_rad2_types[1] = <char>NPY_FLOAT
  17854. ufunc_pro_rad2_types[2] = <char>NPY_FLOAT
  17855. ufunc_pro_rad2_types[3] = <char>NPY_FLOAT
  17856. ufunc_pro_rad2_types[4] = <char>NPY_FLOAT
  17857. ufunc_pro_rad2_types[5] = <char>NPY_FLOAT
  17858. ufunc_pro_rad2_types[6] = <char>NPY_DOUBLE
  17859. ufunc_pro_rad2_types[7] = <char>NPY_DOUBLE
  17860. ufunc_pro_rad2_types[8] = <char>NPY_DOUBLE
  17861. ufunc_pro_rad2_types[9] = <char>NPY_DOUBLE
  17862. ufunc_pro_rad2_types[10] = <char>NPY_DOUBLE
  17863. ufunc_pro_rad2_types[11] = <char>NPY_DOUBLE
  17864. ufunc_pro_rad2_ptr[2*0] = <void*>_func_prolate_radial2_nocv_wrap
  17865. ufunc_pro_rad2_ptr[2*0+1] = <void*>(<char*>"pro_rad2")
  17866. ufunc_pro_rad2_ptr[2*1] = <void*>_func_prolate_radial2_nocv_wrap
  17867. ufunc_pro_rad2_ptr[2*1+1] = <void*>(<char*>"pro_rad2")
  17868. ufunc_pro_rad2_data[0] = &ufunc_pro_rad2_ptr[2*0]
  17869. ufunc_pro_rad2_data[1] = &ufunc_pro_rad2_ptr[2*1]
  17870. pro_rad2 = np.PyUFunc_FromFuncAndData(ufunc_pro_rad2_loops, ufunc_pro_rad2_data, ufunc_pro_rad2_types, 2, 4, 2, 0, "pro_rad2", ufunc_pro_rad2_doc, 0)
  17871. cdef np.PyUFuncGenericFunction ufunc_pro_rad2_cv_loops[2]
  17872. cdef void *ufunc_pro_rad2_cv_ptr[4]
  17873. cdef void *ufunc_pro_rad2_cv_data[2]
  17874. cdef char ufunc_pro_rad2_cv_types[14]
  17875. cdef char *ufunc_pro_rad2_cv_doc = (
  17876. "pro_rad2_cv(m, n, c, cv, x, out=None)\n"
  17877. "\n"
  17878. "Prolate spheroidal radial function pro_rad2 for precomputed characteristic value\n"
  17879. "\n"
  17880. "Computes the prolate spheroidal radial function of the second kind\n"
  17881. "and its derivative (with respect to `x`) for mode parameters m>=0\n"
  17882. "and n>=m, spheroidal parameter `c` and ``|x| < 1.0``. Requires\n"
  17883. "pre-computed characteristic value.\n"
  17884. "\n"
  17885. "Parameters\n"
  17886. "----------\n"
  17887. "m : array_like\n"
  17888. " Nonnegative mode parameter m\n"
  17889. "n : array_like\n"
  17890. " Mode parameter n (>= m)\n"
  17891. "c : array_like\n"
  17892. " Spheroidal parameter\n"
  17893. "cv : array_like\n"
  17894. " Characteristic value\n"
  17895. "x : array_like\n"
  17896. " Real parameter (``|x| < 1.0``)\n"
  17897. "out : ndarray, optional\n"
  17898. " Optional output array for the function results\n"
  17899. "\n"
  17900. "Returns\n"
  17901. "-------\n"
  17902. "s : scalar or ndarray\n"
  17903. " Value of the function\n"
  17904. "sp : scalar or ndarray\n"
  17905. " Value of the derivative vs x")
  17906. ufunc_pro_rad2_cv_loops[0] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_fffff_ff
  17907. ufunc_pro_rad2_cv_loops[1] = <np.PyUFuncGenericFunction>loop_i_ddddd_dd_As_ddddd_dd
  17908. ufunc_pro_rad2_cv_types[0] = <char>NPY_FLOAT
  17909. ufunc_pro_rad2_cv_types[1] = <char>NPY_FLOAT
  17910. ufunc_pro_rad2_cv_types[2] = <char>NPY_FLOAT
  17911. ufunc_pro_rad2_cv_types[3] = <char>NPY_FLOAT
  17912. ufunc_pro_rad2_cv_types[4] = <char>NPY_FLOAT
  17913. ufunc_pro_rad2_cv_types[5] = <char>NPY_FLOAT
  17914. ufunc_pro_rad2_cv_types[6] = <char>NPY_FLOAT
  17915. ufunc_pro_rad2_cv_types[7] = <char>NPY_DOUBLE
  17916. ufunc_pro_rad2_cv_types[8] = <char>NPY_DOUBLE
  17917. ufunc_pro_rad2_cv_types[9] = <char>NPY_DOUBLE
  17918. ufunc_pro_rad2_cv_types[10] = <char>NPY_DOUBLE
  17919. ufunc_pro_rad2_cv_types[11] = <char>NPY_DOUBLE
  17920. ufunc_pro_rad2_cv_types[12] = <char>NPY_DOUBLE
  17921. ufunc_pro_rad2_cv_types[13] = <char>NPY_DOUBLE
  17922. ufunc_pro_rad2_cv_ptr[2*0] = <void*>_func_prolate_radial2_wrap
  17923. ufunc_pro_rad2_cv_ptr[2*0+1] = <void*>(<char*>"pro_rad2_cv")
  17924. ufunc_pro_rad2_cv_ptr[2*1] = <void*>_func_prolate_radial2_wrap
  17925. ufunc_pro_rad2_cv_ptr[2*1+1] = <void*>(<char*>"pro_rad2_cv")
  17926. ufunc_pro_rad2_cv_data[0] = &ufunc_pro_rad2_cv_ptr[2*0]
  17927. ufunc_pro_rad2_cv_data[1] = &ufunc_pro_rad2_cv_ptr[2*1]
  17928. pro_rad2_cv = np.PyUFunc_FromFuncAndData(ufunc_pro_rad2_cv_loops, ufunc_pro_rad2_cv_data, ufunc_pro_rad2_cv_types, 2, 5, 2, 0, "pro_rad2_cv", ufunc_pro_rad2_cv_doc, 0)
  17929. cdef np.PyUFuncGenericFunction ufunc_pseudo_huber_loops[2]
  17930. cdef void *ufunc_pseudo_huber_ptr[4]
  17931. cdef void *ufunc_pseudo_huber_data[2]
  17932. cdef char ufunc_pseudo_huber_types[6]
  17933. cdef char *ufunc_pseudo_huber_doc = (
  17934. "pseudo_huber(delta, r, out=None)\n"
  17935. "\n"
  17936. "Pseudo-Huber loss function.\n"
  17937. "\n"
  17938. ".. math:: \\mathrm{pseudo\\_huber}(\\delta, r) = \\delta^2 \\left( \\sqrt{ 1 + \\left( \\frac{r}{\\delta} \\right)^2 } - 1 \\right)\n"
  17939. "\n"
  17940. "Parameters\n"
  17941. "----------\n"
  17942. "delta : array_like\n"
  17943. " Input array, indicating the soft quadratic vs. linear loss changepoint.\n"
  17944. "r : array_like\n"
  17945. " Input array, possibly representing residuals.\n"
  17946. "out : ndarray, optional\n"
  17947. " Optional output array for the function results\n"
  17948. "\n"
  17949. "Returns\n"
  17950. "-------\n"
  17951. "res : scalar or ndarray\n"
  17952. " The computed Pseudo-Huber loss function values.\n"
  17953. "\n"
  17954. "See also\n"
  17955. "--------\n"
  17956. "huber: Similar function which this function approximates\n"
  17957. "\n"
  17958. "Notes\n"
  17959. "-----\n"
  17960. "Like `huber`, `pseudo_huber` often serves as a robust loss function\n"
  17961. "in statistics or machine learning to reduce the influence of outliers.\n"
  17962. "Unlike `huber`, `pseudo_huber` is smooth.\n"
  17963. "\n"
  17964. "Typically, `r` represents residuals, the difference\n"
  17965. "between a model prediction and data. Then, for :math:`|r|\\leq\\delta`,\n"
  17966. "`pseudo_huber` resembles the squared error and for :math:`|r|>\\delta` the\n"
  17967. "absolute error. This way, the Pseudo-Huber loss often achieves\n"
  17968. "a fast convergence in model fitting for small residuals like the squared\n"
  17969. "error loss function and still reduces the influence of outliers\n"
  17970. "(:math:`|r|>\\delta`) like the absolute error loss. As :math:`\\delta` is\n"
  17971. "the cutoff between squared and absolute error regimes, it has\n"
  17972. "to be tuned carefully for each problem. `pseudo_huber` is also\n"
  17973. "convex, making it suitable for gradient based optimization. [1]_ [2]_\n"
  17974. "\n"
  17975. ".. versionadded:: 0.15.0\n"
  17976. "\n"
  17977. "References\n"
  17978. "----------\n"
  17979. ".. [1] Hartley, Zisserman, \"Multiple View Geometry in Computer Vision\".\n"
  17980. " 2003. Cambridge University Press. p. 619\n"
  17981. ".. [2] Charbonnier et al. \"Deterministic edge-preserving regularization\n"
  17982. " in computed imaging\". 1997. IEEE Trans. Image Processing.\n"
  17983. " 6 (2): 298 - 311.\n"
  17984. "\n"
  17985. "Examples\n"
  17986. "--------\n"
  17987. "Import all necessary modules.\n"
  17988. "\n"
  17989. ">>> import numpy as np\n"
  17990. ">>> from scipy.special import pseudo_huber, huber\n"
  17991. ">>> import matplotlib.pyplot as plt\n"
  17992. "\n"
  17993. "Calculate the function for ``delta=1`` at ``r=2``.\n"
  17994. "\n"
  17995. ">>> pseudo_huber(1., 2.)\n"
  17996. "1.2360679774997898\n"
  17997. "\n"
  17998. "Calculate the function at ``r=2`` for different `delta` by providing\n"
  17999. "a list or NumPy array for `delta`.\n"
  18000. "\n"
  18001. ">>> pseudo_huber([1., 2., 4.], 3.)\n"
  18002. "array([2.16227766, 3.21110255, 4. ])\n"
  18003. "\n"
  18004. "Calculate the function for ``delta=1`` at several points by providing\n"
  18005. "a list or NumPy array for `r`.\n"
  18006. "\n"
  18007. ">>> pseudo_huber(2., np.array([1., 1.5, 3., 4.]))\n"
  18008. "array([0.47213595, 1. , 3.21110255, 4.94427191])\n"
  18009. "\n"
  18010. "The function can be calculated for different `delta` and `r` by\n"
  18011. "providing arrays for both with compatible shapes for broadcasting.\n"
  18012. "\n"
  18013. ">>> r = np.array([1., 2.5, 8., 10.])\n"
  18014. ">>> deltas = np.array([[1.], [5.], [9.]])\n"
  18015. ">>> print(r.shape, deltas.shape)\n"
  18016. "(4,) (3, 1)\n"
  18017. "\n"
  18018. ">>> pseudo_huber(deltas, r)\n"
  18019. "array([[ 0.41421356, 1.6925824 , 7.06225775, 9.04987562],\n"
  18020. " [ 0.49509757, 2.95084972, 22.16990566, 30.90169944],\n"
  18021. " [ 0.49846624, 3.06693762, 27.37435121, 40.08261642]])\n"
  18022. "\n"
  18023. "Plot the function for different `delta`.\n"
  18024. "\n"
  18025. ">>> x = np.linspace(-4, 4, 500)\n"
  18026. ">>> deltas = [1, 2, 3]\n"
  18027. ">>> linestyles = [\"dashed\", \"dotted\", \"dashdot\"]\n"
  18028. ">>> fig, ax = plt.subplots()\n"
  18029. ">>> combined_plot_parameters = list(zip(deltas, linestyles))\n"
  18030. ">>> for delta, style in combined_plot_parameters:\n"
  18031. "... ax.plot(x, pseudo_huber(delta, x), label=f\"$\\delta={delta}$\",\n"
  18032. "... ls=style)\n"
  18033. ">>> ax.legend(loc=\"upper center\")\n"
  18034. ">>> ax.set_xlabel(\"$x$\")\n"
  18035. ">>> ax.set_title(\"Pseudo-Huber loss function $h_{\\delta}(x)$\")\n"
  18036. ">>> ax.set_xlim(-4, 4)\n"
  18037. ">>> ax.set_ylim(0, 8)\n"
  18038. ">>> plt.show()\n"
  18039. "\n"
  18040. "Finally, illustrate the difference between `huber` and `pseudo_huber` by\n"
  18041. "plotting them and their gradients with respect to `r`. The plot shows\n"
  18042. "that `pseudo_huber` is continuously differentiable while `huber` is not\n"
  18043. "at the points :math:`\\pm\\delta`.\n"
  18044. "\n"
  18045. ">>> def huber_grad(delta, x):\n"
  18046. "... grad = np.copy(x)\n"
  18047. "... linear_area = np.argwhere(np.abs(x) > delta)\n"
  18048. "... grad[linear_area]=delta*np.sign(x[linear_area])\n"
  18049. "... return grad\n"
  18050. ">>> def pseudo_huber_grad(delta, x):\n"
  18051. "... return x* (1+(x/delta)**2)**(-0.5)\n"
  18052. ">>> x=np.linspace(-3, 3, 500)\n"
  18053. ">>> delta = 1.\n"
  18054. ">>> fig, ax = plt.subplots(figsize=(7, 7))\n"
  18055. ">>> ax.plot(x, huber(delta, x), label=\"Huber\", ls=\"dashed\")\n"
  18056. ">>> ax.plot(x, huber_grad(delta, x), label=\"Huber Gradient\", ls=\"dashdot\")\n"
  18057. ">>> ax.plot(x, pseudo_huber(delta, x), label=\"Pseudo-Huber\", ls=\"dotted\")\n"
  18058. ">>> ax.plot(x, pseudo_huber_grad(delta, x), label=\"Pseudo-Huber Gradient\",\n"
  18059. "... ls=\"solid\")\n"
  18060. ">>> ax.legend(loc=\"upper center\")\n"
  18061. ">>> plt.show()")
  18062. ufunc_pseudo_huber_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  18063. ufunc_pseudo_huber_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  18064. ufunc_pseudo_huber_types[0] = <char>NPY_FLOAT
  18065. ufunc_pseudo_huber_types[1] = <char>NPY_FLOAT
  18066. ufunc_pseudo_huber_types[2] = <char>NPY_FLOAT
  18067. ufunc_pseudo_huber_types[3] = <char>NPY_DOUBLE
  18068. ufunc_pseudo_huber_types[4] = <char>NPY_DOUBLE
  18069. ufunc_pseudo_huber_types[5] = <char>NPY_DOUBLE
  18070. ufunc_pseudo_huber_ptr[2*0] = <void*>_func_pseudo_huber
  18071. ufunc_pseudo_huber_ptr[2*0+1] = <void*>(<char*>"pseudo_huber")
  18072. ufunc_pseudo_huber_ptr[2*1] = <void*>_func_pseudo_huber
  18073. ufunc_pseudo_huber_ptr[2*1+1] = <void*>(<char*>"pseudo_huber")
  18074. ufunc_pseudo_huber_data[0] = &ufunc_pseudo_huber_ptr[2*0]
  18075. ufunc_pseudo_huber_data[1] = &ufunc_pseudo_huber_ptr[2*1]
  18076. pseudo_huber = np.PyUFunc_FromFuncAndData(ufunc_pseudo_huber_loops, ufunc_pseudo_huber_data, ufunc_pseudo_huber_types, 2, 2, 1, 0, "pseudo_huber", ufunc_pseudo_huber_doc, 0)
  18077. cdef np.PyUFuncGenericFunction ufunc_psi_loops[4]
  18078. cdef void *ufunc_psi_ptr[8]
  18079. cdef void *ufunc_psi_data[4]
  18080. cdef char ufunc_psi_types[8]
  18081. cdef char *ufunc_psi_doc = (
  18082. "psi(z, out=None)\n"
  18083. "\n"
  18084. "The digamma function.\n"
  18085. "\n"
  18086. "The logarithmic derivative of the gamma function evaluated at ``z``.\n"
  18087. "\n"
  18088. "Parameters\n"
  18089. "----------\n"
  18090. "z : array_like\n"
  18091. " Real or complex argument.\n"
  18092. "out : ndarray, optional\n"
  18093. " Array for the computed values of ``psi``.\n"
  18094. "\n"
  18095. "Returns\n"
  18096. "-------\n"
  18097. "digamma : scalar or ndarray\n"
  18098. " Computed values of ``psi``.\n"
  18099. "\n"
  18100. "Notes\n"
  18101. "-----\n"
  18102. "For large values not close to the negative real axis, ``psi`` is\n"
  18103. "computed using the asymptotic series (5.11.2) from [1]_. For small\n"
  18104. "arguments not close to the negative real axis, the recurrence\n"
  18105. "relation (5.5.2) from [1]_ is used until the argument is large\n"
  18106. "enough to use the asymptotic series. For values close to the\n"
  18107. "negative real axis, the reflection formula (5.5.4) from [1]_ is\n"
  18108. "used first. Note that ``psi`` has a family of zeros on the\n"
  18109. "negative real axis which occur between the poles at nonpositive\n"
  18110. "integers. Around the zeros the reflection formula suffers from\n"
  18111. "cancellation and the implementation loses precision. The sole\n"
  18112. "positive zero and the first negative zero, however, are handled\n"
  18113. "separately by precomputing series expansions using [2]_, so the\n"
  18114. "function should maintain full accuracy around the origin.\n"
  18115. "\n"
  18116. "References\n"
  18117. "----------\n"
  18118. ".. [1] NIST Digital Library of Mathematical Functions\n"
  18119. " https://dlmf.nist.gov/5\n"
  18120. ".. [2] Fredrik Johansson and others.\n"
  18121. " \"mpmath: a Python library for arbitrary-precision floating-point arithmetic\"\n"
  18122. " (Version 0.19) http://mpmath.org/\n"
  18123. "\n"
  18124. "Examples\n"
  18125. "--------\n"
  18126. ">>> from scipy.special import psi\n"
  18127. ">>> z = 3 + 4j\n"
  18128. ">>> psi(z)\n"
  18129. "(1.55035981733341+1.0105022091860445j)\n"
  18130. "\n"
  18131. "Verify psi(z) = psi(z + 1) - 1/z:\n"
  18132. "\n"
  18133. ">>> psi(z + 1) - 1/z\n"
  18134. "(1.55035981733341+1.0105022091860445j)")
  18135. ufunc_psi_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  18136. ufunc_psi_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  18137. ufunc_psi_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  18138. ufunc_psi_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  18139. ufunc_psi_types[0] = <char>NPY_FLOAT
  18140. ufunc_psi_types[1] = <char>NPY_FLOAT
  18141. ufunc_psi_types[2] = <char>NPY_DOUBLE
  18142. ufunc_psi_types[3] = <char>NPY_DOUBLE
  18143. ufunc_psi_types[4] = <char>NPY_CFLOAT
  18144. ufunc_psi_types[5] = <char>NPY_CFLOAT
  18145. ufunc_psi_types[6] = <char>NPY_CDOUBLE
  18146. ufunc_psi_types[7] = <char>NPY_CDOUBLE
  18147. ufunc_psi_ptr[2*0] = <void*>_func_digamma
  18148. ufunc_psi_ptr[2*0+1] = <void*>(<char*>"psi")
  18149. ufunc_psi_ptr[2*1] = <void*>_func_digamma
  18150. ufunc_psi_ptr[2*1+1] = <void*>(<char*>"psi")
  18151. ufunc_psi_ptr[2*2] = <void*>_func_cdigamma
  18152. ufunc_psi_ptr[2*2+1] = <void*>(<char*>"psi")
  18153. ufunc_psi_ptr[2*3] = <void*>_func_cdigamma
  18154. ufunc_psi_ptr[2*3+1] = <void*>(<char*>"psi")
  18155. ufunc_psi_data[0] = &ufunc_psi_ptr[2*0]
  18156. ufunc_psi_data[1] = &ufunc_psi_ptr[2*1]
  18157. ufunc_psi_data[2] = &ufunc_psi_ptr[2*2]
  18158. ufunc_psi_data[3] = &ufunc_psi_ptr[2*3]
  18159. psi = np.PyUFunc_FromFuncAndData(ufunc_psi_loops, ufunc_psi_data, ufunc_psi_types, 4, 1, 1, 0, "psi", ufunc_psi_doc, 0)
  18160. cdef np.PyUFuncGenericFunction ufunc_radian_loops[2]
  18161. cdef void *ufunc_radian_ptr[4]
  18162. cdef void *ufunc_radian_data[2]
  18163. cdef char ufunc_radian_types[8]
  18164. cdef char *ufunc_radian_doc = (
  18165. "radian(d, m, s, out=None)\n"
  18166. "\n"
  18167. "Convert from degrees to radians.\n"
  18168. "\n"
  18169. "Returns the angle given in (d)egrees, (m)inutes, and (s)econds in\n"
  18170. "radians.\n"
  18171. "\n"
  18172. "Parameters\n"
  18173. "----------\n"
  18174. "d : array_like\n"
  18175. " Degrees, can be real-valued.\n"
  18176. "m : array_like\n"
  18177. " Minutes, can be real-valued.\n"
  18178. "s : array_like\n"
  18179. " Seconds, can be real-valued.\n"
  18180. "out : ndarray, optional\n"
  18181. " Optional output array for the function results.\n"
  18182. "\n"
  18183. "Returns\n"
  18184. "-------\n"
  18185. "scalar or ndarray\n"
  18186. " Values of the inputs in radians.\n"
  18187. "\n"
  18188. "Examples\n"
  18189. "--------\n"
  18190. ">>> import scipy.special as sc\n"
  18191. "\n"
  18192. "There are many ways to specify an angle.\n"
  18193. "\n"
  18194. ">>> sc.radian(90, 0, 0)\n"
  18195. "1.5707963267948966\n"
  18196. ">>> sc.radian(0, 60 * 90, 0)\n"
  18197. "1.5707963267948966\n"
  18198. ">>> sc.radian(0, 0, 60**2 * 90)\n"
  18199. "1.5707963267948966\n"
  18200. "\n"
  18201. "The inputs can be real-valued.\n"
  18202. "\n"
  18203. ">>> sc.radian(1.5, 0, 0)\n"
  18204. "0.02617993877991494\n"
  18205. ">>> sc.radian(1, 30, 0)\n"
  18206. "0.02617993877991494")
  18207. ufunc_radian_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  18208. ufunc_radian_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  18209. ufunc_radian_types[0] = <char>NPY_FLOAT
  18210. ufunc_radian_types[1] = <char>NPY_FLOAT
  18211. ufunc_radian_types[2] = <char>NPY_FLOAT
  18212. ufunc_radian_types[3] = <char>NPY_FLOAT
  18213. ufunc_radian_types[4] = <char>NPY_DOUBLE
  18214. ufunc_radian_types[5] = <char>NPY_DOUBLE
  18215. ufunc_radian_types[6] = <char>NPY_DOUBLE
  18216. ufunc_radian_types[7] = <char>NPY_DOUBLE
  18217. ufunc_radian_ptr[2*0] = <void*>_func_radian
  18218. ufunc_radian_ptr[2*0+1] = <void*>(<char*>"radian")
  18219. ufunc_radian_ptr[2*1] = <void*>_func_radian
  18220. ufunc_radian_ptr[2*1+1] = <void*>(<char*>"radian")
  18221. ufunc_radian_data[0] = &ufunc_radian_ptr[2*0]
  18222. ufunc_radian_data[1] = &ufunc_radian_ptr[2*1]
  18223. radian = np.PyUFunc_FromFuncAndData(ufunc_radian_loops, ufunc_radian_data, ufunc_radian_types, 2, 3, 1, 0, "radian", ufunc_radian_doc, 0)
  18224. cdef np.PyUFuncGenericFunction ufunc_rel_entr_loops[2]
  18225. cdef void *ufunc_rel_entr_ptr[4]
  18226. cdef void *ufunc_rel_entr_data[2]
  18227. cdef char ufunc_rel_entr_types[6]
  18228. cdef char *ufunc_rel_entr_doc = (
  18229. "rel_entr(x, y, out=None)\n"
  18230. "\n"
  18231. "Elementwise function for computing relative entropy.\n"
  18232. "\n"
  18233. ".. math::\n"
  18234. "\n"
  18235. " \\mathrm{rel\\_entr}(x, y) =\n"
  18236. " \\begin{cases}\n"
  18237. " x \\log(x / y) & x > 0, y > 0 \\\\\n"
  18238. " 0 & x = 0, y \\ge 0 \\\\\n"
  18239. " \\infty & \\text{otherwise}\n"
  18240. " \\end{cases}\n"
  18241. "\n"
  18242. "Parameters\n"
  18243. "----------\n"
  18244. "x, y : array_like\n"
  18245. " Input arrays\n"
  18246. "out : ndarray, optional\n"
  18247. " Optional output array for the function results\n"
  18248. "\n"
  18249. "Returns\n"
  18250. "-------\n"
  18251. "scalar or ndarray\n"
  18252. " Relative entropy of the inputs\n"
  18253. "\n"
  18254. "See Also\n"
  18255. "--------\n"
  18256. "entr, kl_div, scipy.stats.entropy\n"
  18257. "\n"
  18258. "Notes\n"
  18259. "-----\n"
  18260. ".. versionadded:: 0.15.0\n"
  18261. "\n"
  18262. "This function is jointly convex in x and y.\n"
  18263. "\n"
  18264. "The origin of this function is in convex programming; see\n"
  18265. "[1]_. Given two discrete probability distributions :math:`p_1,\n"
  18266. "\\ldots, p_n` and :math:`q_1, \\ldots, q_n`, the definition of relative\n"
  18267. "entropy in the context of *information theory* is\n"
  18268. "\n"
  18269. ".. math::\n"
  18270. "\n"
  18271. " \\sum_{i = 1}^n \\mathrm{rel\\_entr}(p_i, q_i).\n"
  18272. "\n"
  18273. "To compute the latter quantity, use `scipy.stats.entropy`.\n"
  18274. "\n"
  18275. "See [2]_ for details.\n"
  18276. "\n"
  18277. "References\n"
  18278. "----------\n"
  18279. ".. [1] Boyd, Stephen and Lieven Vandenberghe. *Convex optimization*.\n"
  18280. " Cambridge University Press, 2004.\n"
  18281. " :doi:`https://doi.org/10.1017/CBO9780511804441`\n"
  18282. ".. [2] Kullback-Leibler divergence,\n"
  18283. " https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence")
  18284. ufunc_rel_entr_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  18285. ufunc_rel_entr_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  18286. ufunc_rel_entr_types[0] = <char>NPY_FLOAT
  18287. ufunc_rel_entr_types[1] = <char>NPY_FLOAT
  18288. ufunc_rel_entr_types[2] = <char>NPY_FLOAT
  18289. ufunc_rel_entr_types[3] = <char>NPY_DOUBLE
  18290. ufunc_rel_entr_types[4] = <char>NPY_DOUBLE
  18291. ufunc_rel_entr_types[5] = <char>NPY_DOUBLE
  18292. ufunc_rel_entr_ptr[2*0] = <void*>_func_rel_entr
  18293. ufunc_rel_entr_ptr[2*0+1] = <void*>(<char*>"rel_entr")
  18294. ufunc_rel_entr_ptr[2*1] = <void*>_func_rel_entr
  18295. ufunc_rel_entr_ptr[2*1+1] = <void*>(<char*>"rel_entr")
  18296. ufunc_rel_entr_data[0] = &ufunc_rel_entr_ptr[2*0]
  18297. ufunc_rel_entr_data[1] = &ufunc_rel_entr_ptr[2*1]
  18298. rel_entr = np.PyUFunc_FromFuncAndData(ufunc_rel_entr_loops, ufunc_rel_entr_data, ufunc_rel_entr_types, 2, 2, 1, 0, "rel_entr", ufunc_rel_entr_doc, 0)
  18299. cdef np.PyUFuncGenericFunction ufunc_rgamma_loops[4]
  18300. cdef void *ufunc_rgamma_ptr[8]
  18301. cdef void *ufunc_rgamma_data[4]
  18302. cdef char ufunc_rgamma_types[8]
  18303. cdef char *ufunc_rgamma_doc = (
  18304. "rgamma(z, out=None)\n"
  18305. "\n"
  18306. "Reciprocal of the gamma function.\n"
  18307. "\n"
  18308. "Defined as :math:`1 / \\Gamma(z)`, where :math:`\\Gamma` is the\n"
  18309. "gamma function. For more on the gamma function see `gamma`.\n"
  18310. "\n"
  18311. "Parameters\n"
  18312. "----------\n"
  18313. "z : array_like\n"
  18314. " Real or complex valued input\n"
  18315. "out : ndarray, optional\n"
  18316. " Optional output array for the function results\n"
  18317. "\n"
  18318. "Returns\n"
  18319. "-------\n"
  18320. "scalar or ndarray\n"
  18321. " Function results\n"
  18322. "\n"
  18323. "Notes\n"
  18324. "-----\n"
  18325. "The gamma function has no zeros and has simple poles at\n"
  18326. "nonpositive integers, so `rgamma` is an entire function with zeros\n"
  18327. "at the nonpositive integers. See the discussion in [dlmf]_ for\n"
  18328. "more details.\n"
  18329. "\n"
  18330. "See Also\n"
  18331. "--------\n"
  18332. "gamma, gammaln, loggamma\n"
  18333. "\n"
  18334. "References\n"
  18335. "----------\n"
  18336. ".. [dlmf] Nist, Digital Library of Mathematical functions,\n"
  18337. " https://dlmf.nist.gov/5.2#i\n"
  18338. "\n"
  18339. "Examples\n"
  18340. "--------\n"
  18341. ">>> import scipy.special as sc\n"
  18342. "\n"
  18343. "It is the reciprocal of the gamma function.\n"
  18344. "\n"
  18345. ">>> sc.rgamma([1, 2, 3, 4])\n"
  18346. "array([1. , 1. , 0.5 , 0.16666667])\n"
  18347. ">>> 1 / sc.gamma([1, 2, 3, 4])\n"
  18348. "array([1. , 1. , 0.5 , 0.16666667])\n"
  18349. "\n"
  18350. "It is zero at nonpositive integers.\n"
  18351. "\n"
  18352. ">>> sc.rgamma([0, -1, -2, -3])\n"
  18353. "array([0., 0., 0., 0.])\n"
  18354. "\n"
  18355. "It rapidly underflows to zero along the positive real axis.\n"
  18356. "\n"
  18357. ">>> sc.rgamma([10, 100, 179])\n"
  18358. "array([2.75573192e-006, 1.07151029e-156, 0.00000000e+000])")
  18359. ufunc_rgamma_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  18360. ufunc_rgamma_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  18361. ufunc_rgamma_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  18362. ufunc_rgamma_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  18363. ufunc_rgamma_types[0] = <char>NPY_FLOAT
  18364. ufunc_rgamma_types[1] = <char>NPY_FLOAT
  18365. ufunc_rgamma_types[2] = <char>NPY_DOUBLE
  18366. ufunc_rgamma_types[3] = <char>NPY_DOUBLE
  18367. ufunc_rgamma_types[4] = <char>NPY_CFLOAT
  18368. ufunc_rgamma_types[5] = <char>NPY_CFLOAT
  18369. ufunc_rgamma_types[6] = <char>NPY_CDOUBLE
  18370. ufunc_rgamma_types[7] = <char>NPY_CDOUBLE
  18371. ufunc_rgamma_ptr[2*0] = <void*>_func_rgamma
  18372. ufunc_rgamma_ptr[2*0+1] = <void*>(<char*>"rgamma")
  18373. ufunc_rgamma_ptr[2*1] = <void*>_func_rgamma
  18374. ufunc_rgamma_ptr[2*1+1] = <void*>(<char*>"rgamma")
  18375. ufunc_rgamma_ptr[2*2] = <void*>_func_crgamma
  18376. ufunc_rgamma_ptr[2*2+1] = <void*>(<char*>"rgamma")
  18377. ufunc_rgamma_ptr[2*3] = <void*>_func_crgamma
  18378. ufunc_rgamma_ptr[2*3+1] = <void*>(<char*>"rgamma")
  18379. ufunc_rgamma_data[0] = &ufunc_rgamma_ptr[2*0]
  18380. ufunc_rgamma_data[1] = &ufunc_rgamma_ptr[2*1]
  18381. ufunc_rgamma_data[2] = &ufunc_rgamma_ptr[2*2]
  18382. ufunc_rgamma_data[3] = &ufunc_rgamma_ptr[2*3]
  18383. rgamma = np.PyUFunc_FromFuncAndData(ufunc_rgamma_loops, ufunc_rgamma_data, ufunc_rgamma_types, 4, 1, 1, 0, "rgamma", ufunc_rgamma_doc, 0)
  18384. cdef np.PyUFuncGenericFunction ufunc_round_loops[2]
  18385. cdef void *ufunc_round_ptr[4]
  18386. cdef void *ufunc_round_data[2]
  18387. cdef char ufunc_round_types[4]
  18388. cdef char *ufunc_round_doc = (
  18389. "round(x, out=None)\n"
  18390. "\n"
  18391. "Round to the nearest integer.\n"
  18392. "\n"
  18393. "Returns the nearest integer to `x`. If `x` ends in 0.5 exactly,\n"
  18394. "the nearest even integer is chosen.\n"
  18395. "\n"
  18396. "Parameters\n"
  18397. "----------\n"
  18398. "x : array_like\n"
  18399. " Real valued input.\n"
  18400. "out : ndarray, optional\n"
  18401. " Optional output array for the function results.\n"
  18402. "\n"
  18403. "Returns\n"
  18404. "-------\n"
  18405. "scalar or ndarray\n"
  18406. " The nearest integers to the elements of `x`. The result is of\n"
  18407. " floating type, not integer type.\n"
  18408. "\n"
  18409. "Examples\n"
  18410. "--------\n"
  18411. ">>> import scipy.special as sc\n"
  18412. "\n"
  18413. "It rounds to even.\n"
  18414. "\n"
  18415. ">>> sc.round([0.5, 1.5])\n"
  18416. "array([0., 2.])")
  18417. ufunc_round_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  18418. ufunc_round_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  18419. ufunc_round_types[0] = <char>NPY_FLOAT
  18420. ufunc_round_types[1] = <char>NPY_FLOAT
  18421. ufunc_round_types[2] = <char>NPY_DOUBLE
  18422. ufunc_round_types[3] = <char>NPY_DOUBLE
  18423. ufunc_round_ptr[2*0] = <void*>_func_round
  18424. ufunc_round_ptr[2*0+1] = <void*>(<char*>"round")
  18425. ufunc_round_ptr[2*1] = <void*>_func_round
  18426. ufunc_round_ptr[2*1+1] = <void*>(<char*>"round")
  18427. ufunc_round_data[0] = &ufunc_round_ptr[2*0]
  18428. ufunc_round_data[1] = &ufunc_round_ptr[2*1]
  18429. round = np.PyUFunc_FromFuncAndData(ufunc_round_loops, ufunc_round_data, ufunc_round_types, 2, 1, 1, 0, "round", ufunc_round_doc, 0)
  18430. cdef np.PyUFuncGenericFunction ufunc_shichi_loops[4]
  18431. cdef void *ufunc_shichi_ptr[8]
  18432. cdef void *ufunc_shichi_data[4]
  18433. cdef char ufunc_shichi_types[12]
  18434. cdef char *ufunc_shichi_doc = (
  18435. "shichi(x, out=None)\n"
  18436. "\n"
  18437. "Hyperbolic sine and cosine integrals.\n"
  18438. "\n"
  18439. "The hyperbolic sine integral is\n"
  18440. "\n"
  18441. ".. math::\n"
  18442. "\n"
  18443. " \\int_0^x \\frac{\\sinh{t}}{t}dt\n"
  18444. "\n"
  18445. "and the hyperbolic cosine integral is\n"
  18446. "\n"
  18447. ".. math::\n"
  18448. "\n"
  18449. " \\gamma + \\log(x) + \\int_0^x \\frac{\\cosh{t} - 1}{t} dt\n"
  18450. "\n"
  18451. "where :math:`\\gamma` is Euler's constant and :math:`\\log` is the\n"
  18452. "principal branch of the logarithm [1]_.\n"
  18453. "\n"
  18454. "Parameters\n"
  18455. "----------\n"
  18456. "x : array_like\n"
  18457. " Real or complex points at which to compute the hyperbolic sine\n"
  18458. " and cosine integrals.\n"
  18459. "out : tuple of ndarray, optional\n"
  18460. " Optional output arrays for the function results\n"
  18461. "\n"
  18462. "Returns\n"
  18463. "-------\n"
  18464. "si : scalar or ndarray\n"
  18465. " Hyperbolic sine integral at ``x``\n"
  18466. "ci : scalar or ndarray\n"
  18467. " Hyperbolic cosine integral at ``x``\n"
  18468. "\n"
  18469. "See Also\n"
  18470. "--------\n"
  18471. "sici : Sine and cosine integrals.\n"
  18472. "exp1 : Exponential integral E1.\n"
  18473. "expi : Exponential integral Ei.\n"
  18474. "\n"
  18475. "Notes\n"
  18476. "-----\n"
  18477. "For real arguments with ``x < 0``, ``chi`` is the real part of the\n"
  18478. "hyperbolic cosine integral. For such points ``chi(x)`` and ``chi(x\n"
  18479. "+ 0j)`` differ by a factor of ``1j*pi``.\n"
  18480. "\n"
  18481. "For real arguments the function is computed by calling Cephes'\n"
  18482. "[2]_ *shichi* routine. For complex arguments the algorithm is based\n"
  18483. "on Mpmath's [3]_ *shi* and *chi* routines.\n"
  18484. "\n"
  18485. "References\n"
  18486. "----------\n"
  18487. ".. [1] Milton Abramowitz and Irene A. Stegun, eds.\n"
  18488. " Handbook of Mathematical Functions with Formulas,\n"
  18489. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  18490. " (See Section 5.2.)\n"
  18491. ".. [2] Cephes Mathematical Functions Library,\n"
  18492. " http://www.netlib.org/cephes/\n"
  18493. ".. [3] Fredrik Johansson and others.\n"
  18494. " \"mpmath: a Python library for arbitrary-precision floating-point\n"
  18495. " arithmetic\" (Version 0.19) http://mpmath.org/\n"
  18496. "\n"
  18497. "Examples\n"
  18498. "--------\n"
  18499. ">>> import numpy as np\n"
  18500. ">>> import matplotlib.pyplot as plt\n"
  18501. ">>> from scipy.special import shichi, sici\n"
  18502. "\n"
  18503. "`shichi` accepts real or complex input:\n"
  18504. "\n"
  18505. ">>> shichi(0.5)\n"
  18506. "(0.5069967498196671, -0.05277684495649357)\n"
  18507. ">>> shichi(0.5 + 2.5j)\n"
  18508. "((0.11772029666668238+1.831091777729851j),\n"
  18509. " (0.29912435887648825+1.7395351121166562j))\n"
  18510. "\n"
  18511. "The hyperbolic sine and cosine integrals Shi(z) and Chi(z) are\n"
  18512. "related to the sine and cosine integrals Si(z) and Ci(z) by\n"
  18513. "\n"
  18514. "* Shi(z) = -i*Si(i*z)\n"
  18515. "* Chi(z) = Ci(-i*z) + i*pi/2\n"
  18516. "\n"
  18517. ">>> z = 0.25 + 5j\n"
  18518. ">>> shi, chi = shichi(z)\n"
  18519. ">>> shi, -1j*sici(1j*z)[0] # Should be the same.\n"
  18520. "((-0.04834719325101729+1.5469354086921228j),\n"
  18521. " (-0.04834719325101729+1.5469354086921228j))\n"
  18522. ">>> chi, sici(-1j*z)[1] + 1j*np.pi/2 # Should be the same.\n"
  18523. "((-0.19568708973868087+1.556276312103824j),\n"
  18524. " (-0.19568708973868087+1.556276312103824j))\n"
  18525. "\n"
  18526. "Plot the functions evaluated on the real axis:\n"
  18527. "\n"
  18528. ">>> xp = np.geomspace(1e-8, 4.0, 250)\n"
  18529. ">>> x = np.concatenate((-xp[::-1], xp))\n"
  18530. ">>> shi, chi = shichi(x)\n"
  18531. "\n"
  18532. ">>> fig, ax = plt.subplots()\n"
  18533. ">>> ax.plot(x, shi, label='Shi(x)')\n"
  18534. ">>> ax.plot(x, chi, '--', label='Chi(x)')\n"
  18535. ">>> ax.set_xlabel('x')\n"
  18536. ">>> ax.set_title('Hyperbolic Sine and Cosine Integrals')\n"
  18537. ">>> ax.legend(shadow=True, framealpha=1, loc='lower right')\n"
  18538. ">>> ax.grid(True)\n"
  18539. ">>> plt.show()")
  18540. ufunc_shichi_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  18541. ufunc_shichi_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  18542. ufunc_shichi_loops[2] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_F_FF
  18543. ufunc_shichi_loops[3] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_D_DD
  18544. ufunc_shichi_types[0] = <char>NPY_FLOAT
  18545. ufunc_shichi_types[1] = <char>NPY_FLOAT
  18546. ufunc_shichi_types[2] = <char>NPY_FLOAT
  18547. ufunc_shichi_types[3] = <char>NPY_DOUBLE
  18548. ufunc_shichi_types[4] = <char>NPY_DOUBLE
  18549. ufunc_shichi_types[5] = <char>NPY_DOUBLE
  18550. ufunc_shichi_types[6] = <char>NPY_CFLOAT
  18551. ufunc_shichi_types[7] = <char>NPY_CFLOAT
  18552. ufunc_shichi_types[8] = <char>NPY_CFLOAT
  18553. ufunc_shichi_types[9] = <char>NPY_CDOUBLE
  18554. ufunc_shichi_types[10] = <char>NPY_CDOUBLE
  18555. ufunc_shichi_types[11] = <char>NPY_CDOUBLE
  18556. ufunc_shichi_ptr[2*0] = <void*>_func_shichi
  18557. ufunc_shichi_ptr[2*0+1] = <void*>(<char*>"shichi")
  18558. ufunc_shichi_ptr[2*1] = <void*>_func_shichi
  18559. ufunc_shichi_ptr[2*1+1] = <void*>(<char*>"shichi")
  18560. ufunc_shichi_ptr[2*2] = <void*>_func_cshichi
  18561. ufunc_shichi_ptr[2*2+1] = <void*>(<char*>"shichi")
  18562. ufunc_shichi_ptr[2*3] = <void*>_func_cshichi
  18563. ufunc_shichi_ptr[2*3+1] = <void*>(<char*>"shichi")
  18564. ufunc_shichi_data[0] = &ufunc_shichi_ptr[2*0]
  18565. ufunc_shichi_data[1] = &ufunc_shichi_ptr[2*1]
  18566. ufunc_shichi_data[2] = &ufunc_shichi_ptr[2*2]
  18567. ufunc_shichi_data[3] = &ufunc_shichi_ptr[2*3]
  18568. shichi = np.PyUFunc_FromFuncAndData(ufunc_shichi_loops, ufunc_shichi_data, ufunc_shichi_types, 4, 1, 2, 0, "shichi", ufunc_shichi_doc, 0)
  18569. cdef np.PyUFuncGenericFunction ufunc_sici_loops[4]
  18570. cdef void *ufunc_sici_ptr[8]
  18571. cdef void *ufunc_sici_data[4]
  18572. cdef char ufunc_sici_types[12]
  18573. cdef char *ufunc_sici_doc = (
  18574. "sici(x, out=None)\n"
  18575. "\n"
  18576. "Sine and cosine integrals.\n"
  18577. "\n"
  18578. "The sine integral is\n"
  18579. "\n"
  18580. ".. math::\n"
  18581. "\n"
  18582. " \\int_0^x \\frac{\\sin{t}}{t}dt\n"
  18583. "\n"
  18584. "and the cosine integral is\n"
  18585. "\n"
  18586. ".. math::\n"
  18587. "\n"
  18588. " \\gamma + \\log(x) + \\int_0^x \\frac{\\cos{t} - 1}{t}dt\n"
  18589. "\n"
  18590. "where :math:`\\gamma` is Euler's constant and :math:`\\log` is the\n"
  18591. "principal branch of the logarithm [1]_.\n"
  18592. "\n"
  18593. "Parameters\n"
  18594. "----------\n"
  18595. "x : array_like\n"
  18596. " Real or complex points at which to compute the sine and cosine\n"
  18597. " integrals.\n"
  18598. "out : tuple of ndarray, optional\n"
  18599. " Optional output arrays for the function results\n"
  18600. "\n"
  18601. "Returns\n"
  18602. "-------\n"
  18603. "si : scalar or ndarray\n"
  18604. " Sine integral at ``x``\n"
  18605. "ci : scalar or ndarray\n"
  18606. " Cosine integral at ``x``\n"
  18607. "\n"
  18608. "See Also\n"
  18609. "--------\n"
  18610. "shichi : Hyperbolic sine and cosine integrals.\n"
  18611. "exp1 : Exponential integral E1.\n"
  18612. "expi : Exponential integral Ei.\n"
  18613. "\n"
  18614. "Notes\n"
  18615. "-----\n"
  18616. "For real arguments with ``x < 0``, ``ci`` is the real part of the\n"
  18617. "cosine integral. For such points ``ci(x)`` and ``ci(x + 0j)``\n"
  18618. "differ by a factor of ``1j*pi``.\n"
  18619. "\n"
  18620. "For real arguments the function is computed by calling Cephes'\n"
  18621. "[2]_ *sici* routine. For complex arguments the algorithm is based\n"
  18622. "on Mpmath's [3]_ *si* and *ci* routines.\n"
  18623. "\n"
  18624. "References\n"
  18625. "----------\n"
  18626. ".. [1] Milton Abramowitz and Irene A. Stegun, eds.\n"
  18627. " Handbook of Mathematical Functions with Formulas,\n"
  18628. " Graphs, and Mathematical Tables. New York: Dover, 1972.\n"
  18629. " (See Section 5.2.)\n"
  18630. ".. [2] Cephes Mathematical Functions Library,\n"
  18631. " http://www.netlib.org/cephes/\n"
  18632. ".. [3] Fredrik Johansson and others.\n"
  18633. " \"mpmath: a Python library for arbitrary-precision floating-point\n"
  18634. " arithmetic\" (Version 0.19) http://mpmath.org/\n"
  18635. "\n"
  18636. "Examples\n"
  18637. "--------\n"
  18638. ">>> import numpy as np\n"
  18639. ">>> import matplotlib.pyplot as plt\n"
  18640. ">>> from scipy.special import sici, exp1\n"
  18641. "\n"
  18642. "`sici` accepts real or complex input:\n"
  18643. "\n"
  18644. ">>> sici(2.5)\n"
  18645. "(1.7785201734438267, 0.2858711963653835)\n"
  18646. ">>> sici(2.5 + 3j)\n"
  18647. "((4.505735874563953+0.06863305018999577j),\n"
  18648. "(0.0793644206906966-2.935510262937543j))\n"
  18649. "\n"
  18650. "For z in the right half plane, the sine and cosine integrals are\n"
  18651. "related to the exponential integral E1 (implemented in SciPy as\n"
  18652. "`scipy.special.exp1`) by\n"
  18653. "\n"
  18654. "* Si(z) = (E1(i*z) - E1(-i*z))/2i + pi/2\n"
  18655. "* Ci(z) = -(E1(i*z) + E1(-i*z))/2\n"
  18656. "\n"
  18657. "See [1]_ (equations 5.2.21 and 5.2.23).\n"
  18658. "\n"
  18659. "We can verify these relations:\n"
  18660. "\n"
  18661. ">>> z = 2 - 3j\n"
  18662. ">>> sici(z)\n"
  18663. "((4.54751388956229-1.3991965806460565j),\n"
  18664. "(1.408292501520851+2.9836177420296055j))\n"
  18665. "\n"
  18666. ">>> (exp1(1j*z) - exp1(-1j*z))/2j + np.pi/2 # Same as sine integral\n"
  18667. "(4.54751388956229-1.3991965806460565j)\n"
  18668. "\n"
  18669. ">>> -(exp1(1j*z) + exp1(-1j*z))/2 # Same as cosine integral\n"
  18670. "(1.408292501520851+2.9836177420296055j)\n"
  18671. "\n"
  18672. "Plot the functions evaluated on the real axis; the dotted horizontal\n"
  18673. "lines are at pi/2 and -pi/2:\n"
  18674. "\n"
  18675. ">>> x = np.linspace(-16, 16, 150)\n"
  18676. ">>> si, ci = sici(x)\n"
  18677. "\n"
  18678. ">>> fig, ax = plt.subplots()\n"
  18679. ">>> ax.plot(x, si, label='Si(x)')\n"
  18680. ">>> ax.plot(x, ci, '--', label='Ci(x)')\n"
  18681. ">>> ax.legend(shadow=True, framealpha=1, loc='upper left')\n"
  18682. ">>> ax.set_xlabel('x')\n"
  18683. ">>> ax.set_title('Sine and Cosine Integrals')\n"
  18684. ">>> ax.axhline(np.pi/2, linestyle=':', alpha=0.5, color='k')\n"
  18685. ">>> ax.axhline(-np.pi/2, linestyle=':', alpha=0.5, color='k')\n"
  18686. ">>> ax.grid(True)\n"
  18687. ">>> plt.show()")
  18688. ufunc_sici_loops[0] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_f_ff
  18689. ufunc_sici_loops[1] = <np.PyUFuncGenericFunction>loop_i_d_dd_As_d_dd
  18690. ufunc_sici_loops[2] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_F_FF
  18691. ufunc_sici_loops[3] = <np.PyUFuncGenericFunction>loop_i_D_DD_As_D_DD
  18692. ufunc_sici_types[0] = <char>NPY_FLOAT
  18693. ufunc_sici_types[1] = <char>NPY_FLOAT
  18694. ufunc_sici_types[2] = <char>NPY_FLOAT
  18695. ufunc_sici_types[3] = <char>NPY_DOUBLE
  18696. ufunc_sici_types[4] = <char>NPY_DOUBLE
  18697. ufunc_sici_types[5] = <char>NPY_DOUBLE
  18698. ufunc_sici_types[6] = <char>NPY_CFLOAT
  18699. ufunc_sici_types[7] = <char>NPY_CFLOAT
  18700. ufunc_sici_types[8] = <char>NPY_CFLOAT
  18701. ufunc_sici_types[9] = <char>NPY_CDOUBLE
  18702. ufunc_sici_types[10] = <char>NPY_CDOUBLE
  18703. ufunc_sici_types[11] = <char>NPY_CDOUBLE
  18704. ufunc_sici_ptr[2*0] = <void*>_func_sici
  18705. ufunc_sici_ptr[2*0+1] = <void*>(<char*>"sici")
  18706. ufunc_sici_ptr[2*1] = <void*>_func_sici
  18707. ufunc_sici_ptr[2*1+1] = <void*>(<char*>"sici")
  18708. ufunc_sici_ptr[2*2] = <void*>_func_csici
  18709. ufunc_sici_ptr[2*2+1] = <void*>(<char*>"sici")
  18710. ufunc_sici_ptr[2*3] = <void*>_func_csici
  18711. ufunc_sici_ptr[2*3+1] = <void*>(<char*>"sici")
  18712. ufunc_sici_data[0] = &ufunc_sici_ptr[2*0]
  18713. ufunc_sici_data[1] = &ufunc_sici_ptr[2*1]
  18714. ufunc_sici_data[2] = &ufunc_sici_ptr[2*2]
  18715. ufunc_sici_data[3] = &ufunc_sici_ptr[2*3]
  18716. sici = np.PyUFunc_FromFuncAndData(ufunc_sici_loops, ufunc_sici_data, ufunc_sici_types, 4, 1, 2, 0, "sici", ufunc_sici_doc, 0)
  18717. cdef np.PyUFuncGenericFunction ufunc_sindg_loops[2]
  18718. cdef void *ufunc_sindg_ptr[4]
  18719. cdef void *ufunc_sindg_data[2]
  18720. cdef char ufunc_sindg_types[4]
  18721. cdef char *ufunc_sindg_doc = (
  18722. "sindg(x, out=None)\n"
  18723. "\n"
  18724. "Sine of the angle `x` given in degrees.\n"
  18725. "\n"
  18726. "Parameters\n"
  18727. "----------\n"
  18728. "x : array_like\n"
  18729. " Angle, given in degrees.\n"
  18730. "out : ndarray, optional\n"
  18731. " Optional output array for the function results.\n"
  18732. "\n"
  18733. "Returns\n"
  18734. "-------\n"
  18735. "scalar or ndarray\n"
  18736. " Sine at the input.\n"
  18737. "\n"
  18738. "See Also\n"
  18739. "--------\n"
  18740. "cosdg, tandg, cotdg\n"
  18741. "\n"
  18742. "Examples\n"
  18743. "--------\n"
  18744. ">>> import numpy as np\n"
  18745. ">>> import scipy.special as sc\n"
  18746. "\n"
  18747. "It is more accurate than using sine directly.\n"
  18748. "\n"
  18749. ">>> x = 180 * np.arange(3)\n"
  18750. ">>> sc.sindg(x)\n"
  18751. "array([ 0., -0., 0.])\n"
  18752. ">>> np.sin(x * np.pi / 180)\n"
  18753. "array([ 0.0000000e+00, 1.2246468e-16, -2.4492936e-16])")
  18754. ufunc_sindg_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  18755. ufunc_sindg_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  18756. ufunc_sindg_types[0] = <char>NPY_FLOAT
  18757. ufunc_sindg_types[1] = <char>NPY_FLOAT
  18758. ufunc_sindg_types[2] = <char>NPY_DOUBLE
  18759. ufunc_sindg_types[3] = <char>NPY_DOUBLE
  18760. ufunc_sindg_ptr[2*0] = <void*>_func_sindg
  18761. ufunc_sindg_ptr[2*0+1] = <void*>(<char*>"sindg")
  18762. ufunc_sindg_ptr[2*1] = <void*>_func_sindg
  18763. ufunc_sindg_ptr[2*1+1] = <void*>(<char*>"sindg")
  18764. ufunc_sindg_data[0] = &ufunc_sindg_ptr[2*0]
  18765. ufunc_sindg_data[1] = &ufunc_sindg_ptr[2*1]
  18766. sindg = np.PyUFunc_FromFuncAndData(ufunc_sindg_loops, ufunc_sindg_data, ufunc_sindg_types, 2, 1, 1, 0, "sindg", ufunc_sindg_doc, 0)
  18767. cdef np.PyUFuncGenericFunction ufunc_smirnov_loops[3]
  18768. cdef void *ufunc_smirnov_ptr[6]
  18769. cdef void *ufunc_smirnov_data[3]
  18770. cdef char ufunc_smirnov_types[9]
  18771. cdef char *ufunc_smirnov_doc = (
  18772. "smirnov(n, d, out=None)\n"
  18773. "\n"
  18774. "Kolmogorov-Smirnov complementary cumulative distribution function\n"
  18775. "\n"
  18776. "Returns the exact Kolmogorov-Smirnov complementary cumulative\n"
  18777. "distribution function,(aka the Survival Function) of Dn+ (or Dn-)\n"
  18778. "for a one-sided test of equality between an empirical and a\n"
  18779. "theoretical distribution. It is equal to the probability that the\n"
  18780. "maximum difference between a theoretical distribution and an empirical\n"
  18781. "one based on `n` samples is greater than d.\n"
  18782. "\n"
  18783. "Parameters\n"
  18784. "----------\n"
  18785. "n : int\n"
  18786. " Number of samples\n"
  18787. "d : float array_like\n"
  18788. " Deviation between the Empirical CDF (ECDF) and the target CDF.\n"
  18789. "out : ndarray, optional\n"
  18790. " Optional output array for the function results\n"
  18791. "\n"
  18792. "Returns\n"
  18793. "-------\n"
  18794. "scalar or ndarray\n"
  18795. " The value(s) of smirnov(n, d), Prob(Dn+ >= d) (Also Prob(Dn- >= d))\n"
  18796. "\n"
  18797. "See Also\n"
  18798. "--------\n"
  18799. "smirnovi : The Inverse Survival Function for the distribution\n"
  18800. "scipy.stats.ksone : Provides the functionality as a continuous distribution\n"
  18801. "kolmogorov, kolmogi : Functions for the two-sided distribution\n"
  18802. "\n"
  18803. "Notes\n"
  18804. "-----\n"
  18805. "`smirnov` is used by `stats.kstest` in the application of the\n"
  18806. "Kolmogorov-Smirnov Goodness of Fit test. For historial reasons this\n"
  18807. "function is exposed in `scpy.special`, but the recommended way to achieve\n"
  18808. "the most accurate CDF/SF/PDF/PPF/ISF computations is to use the\n"
  18809. "`stats.ksone` distribution.\n"
  18810. "\n"
  18811. "Examples\n"
  18812. "--------\n"
  18813. ">>> import numpy as np\n"
  18814. ">>> from scipy.special import smirnov\n"
  18815. ">>> from scipy.stats import norm\n"
  18816. "\n"
  18817. "Show the probability of a gap at least as big as 0, 0.5 and 1.0 for a\n"
  18818. "sample of size 5.\n"
  18819. "\n"
  18820. ">>> smirnov(5, [0, 0.5, 1.0])\n"
  18821. "array([ 1. , 0.056, 0. ])\n"
  18822. "\n"
  18823. "Compare a sample of size 5 against N(0, 1), the standard normal\n"
  18824. "distribution with mean 0 and standard deviation 1.\n"
  18825. "\n"
  18826. "`x` is the sample.\n"
  18827. "\n"
  18828. ">>> x = np.array([-1.392, -0.135, 0.114, 0.190, 1.82])\n"
  18829. "\n"
  18830. ">>> target = norm(0, 1)\n"
  18831. ">>> cdfs = target.cdf(x)\n"
  18832. ">>> cdfs\n"
  18833. "array([0.0819612 , 0.44630594, 0.5453811 , 0.57534543, 0.9656205 ])\n"
  18834. "\n"
  18835. "Construct the empirical CDF and the K-S statistics (Dn+, Dn-, Dn).\n"
  18836. "\n"
  18837. ">>> n = len(x)\n"
  18838. ">>> ecdfs = np.arange(n+1, dtype=float)/n\n"
  18839. ">>> cols = np.column_stack([x, ecdfs[1:], cdfs, cdfs - ecdfs[:n],\n"
  18840. "... ecdfs[1:] - cdfs])\n"
  18841. ">>> with np.printoptions(precision=3):\n"
  18842. "... print(cols)\n"
  18843. "[[-1.392 0.2 0.082 0.082 0.118]\n"
  18844. " [-0.135 0.4 0.446 0.246 -0.046]\n"
  18845. " [ 0.114 0.6 0.545 0.145 0.055]\n"
  18846. " [ 0.19 0.8 0.575 -0.025 0.225]\n"
  18847. " [ 1.82 1. 0.966 0.166 0.034]]\n"
  18848. ">>> gaps = cols[:, -2:]\n"
  18849. ">>> Dnpm = np.max(gaps, axis=0)\n"
  18850. ">>> print(f'Dn-={Dnpm[0]:f}, Dn+={Dnpm[1]:f}')\n"
  18851. "Dn-=0.246306, Dn+=0.224655\n"
  18852. ">>> probs = smirnov(n, Dnpm)\n"
  18853. ">>> print(f'For a sample of size {n} drawn from N(0, 1):',\n"
  18854. "... f' Smirnov n={n}: Prob(Dn- >= {Dnpm[0]:f}) = {probs[0]:.4f}',\n"
  18855. "... f' Smirnov n={n}: Prob(Dn+ >= {Dnpm[1]:f}) = {probs[1]:.4f}',\n"
  18856. "... sep='\\n')\n"
  18857. "For a sample of size 5 drawn from N(0, 1):\n"
  18858. " Smirnov n=5: Prob(Dn- >= 0.246306) = 0.4711\n"
  18859. " Smirnov n=5: Prob(Dn+ >= 0.224655) = 0.5245\n"
  18860. "\n"
  18861. "Plot the empirical CDF and the standard normal CDF.\n"
  18862. "\n"
  18863. ">>> import matplotlib.pyplot as plt\n"
  18864. ">>> plt.step(np.concatenate(([-2.5], x, [2.5])),\n"
  18865. "... np.concatenate((ecdfs, [1])),\n"
  18866. "... where='post', label='Empirical CDF')\n"
  18867. ">>> xx = np.linspace(-2.5, 2.5, 100)\n"
  18868. ">>> plt.plot(xx, target.cdf(xx), '--', label='CDF for N(0, 1)')\n"
  18869. "\n"
  18870. "Add vertical lines marking Dn+ and Dn-.\n"
  18871. "\n"
  18872. ">>> iminus, iplus = np.argmax(gaps, axis=0)\n"
  18873. ">>> plt.vlines([x[iminus]], ecdfs[iminus], cdfs[iminus], color='r',\n"
  18874. "... alpha=0.5, lw=4)\n"
  18875. ">>> plt.vlines([x[iplus]], cdfs[iplus], ecdfs[iplus+1], color='m',\n"
  18876. "... alpha=0.5, lw=4)\n"
  18877. "\n"
  18878. ">>> plt.grid(True)\n"
  18879. ">>> plt.legend(framealpha=1, shadow=True)\n"
  18880. ">>> plt.show()")
  18881. ufunc_smirnov_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  18882. ufunc_smirnov_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  18883. ufunc_smirnov_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  18884. ufunc_smirnov_types[0] = <char>NPY_LONG
  18885. ufunc_smirnov_types[1] = <char>NPY_DOUBLE
  18886. ufunc_smirnov_types[2] = <char>NPY_DOUBLE
  18887. ufunc_smirnov_types[3] = <char>NPY_FLOAT
  18888. ufunc_smirnov_types[4] = <char>NPY_FLOAT
  18889. ufunc_smirnov_types[5] = <char>NPY_FLOAT
  18890. ufunc_smirnov_types[6] = <char>NPY_DOUBLE
  18891. ufunc_smirnov_types[7] = <char>NPY_DOUBLE
  18892. ufunc_smirnov_types[8] = <char>NPY_DOUBLE
  18893. ufunc_smirnov_ptr[2*0] = <void*>_func_smirnov
  18894. ufunc_smirnov_ptr[2*0+1] = <void*>(<char*>"smirnov")
  18895. ufunc_smirnov_ptr[2*1] = <void*>_func_smirnov_unsafe
  18896. ufunc_smirnov_ptr[2*1+1] = <void*>(<char*>"smirnov")
  18897. ufunc_smirnov_ptr[2*2] = <void*>_func_smirnov_unsafe
  18898. ufunc_smirnov_ptr[2*2+1] = <void*>(<char*>"smirnov")
  18899. ufunc_smirnov_data[0] = &ufunc_smirnov_ptr[2*0]
  18900. ufunc_smirnov_data[1] = &ufunc_smirnov_ptr[2*1]
  18901. ufunc_smirnov_data[2] = &ufunc_smirnov_ptr[2*2]
  18902. smirnov = np.PyUFunc_FromFuncAndData(ufunc_smirnov_loops, ufunc_smirnov_data, ufunc_smirnov_types, 3, 2, 1, 0, "smirnov", ufunc_smirnov_doc, 0)
  18903. cdef np.PyUFuncGenericFunction ufunc_smirnovi_loops[3]
  18904. cdef void *ufunc_smirnovi_ptr[6]
  18905. cdef void *ufunc_smirnovi_data[3]
  18906. cdef char ufunc_smirnovi_types[9]
  18907. cdef char *ufunc_smirnovi_doc = (
  18908. "smirnovi(n, p, out=None)\n"
  18909. "\n"
  18910. "Inverse to `smirnov`\n"
  18911. "\n"
  18912. "Returns `d` such that ``smirnov(n, d) == p``, the critical value\n"
  18913. "corresponding to `p`.\n"
  18914. "\n"
  18915. "Parameters\n"
  18916. "----------\n"
  18917. "n : int\n"
  18918. " Number of samples\n"
  18919. "p : float array_like\n"
  18920. " Probability\n"
  18921. "out : ndarray, optional\n"
  18922. " Optional output array for the function results\n"
  18923. "\n"
  18924. "Returns\n"
  18925. "-------\n"
  18926. "scalar or ndarray\n"
  18927. " The value(s) of smirnovi(n, p), the critical values.\n"
  18928. "\n"
  18929. "See Also\n"
  18930. "--------\n"
  18931. "smirnov : The Survival Function (SF) for the distribution\n"
  18932. "scipy.stats.ksone : Provides the functionality as a continuous distribution\n"
  18933. "kolmogorov, kolmogi : Functions for the two-sided distribution\n"
  18934. "scipy.stats.kstwobign : Two-sided Kolmogorov-Smirnov distribution, large n\n"
  18935. "\n"
  18936. "Notes\n"
  18937. "-----\n"
  18938. "`smirnov` is used by `stats.kstest` in the application of the\n"
  18939. "Kolmogorov-Smirnov Goodness of Fit test. For historial reasons this\n"
  18940. "function is exposed in `scpy.special`, but the recommended way to achieve\n"
  18941. "the most accurate CDF/SF/PDF/PPF/ISF computations is to use the\n"
  18942. "`stats.ksone` distribution.\n"
  18943. "\n"
  18944. "Examples\n"
  18945. "--------\n"
  18946. ">>> from scipy.special import smirnovi, smirnov\n"
  18947. "\n"
  18948. ">>> n = 24\n"
  18949. ">>> deviations = [0.1, 0.2, 0.3]\n"
  18950. "\n"
  18951. "Use `smirnov` to compute the complementary CDF of the Smirnov\n"
  18952. "distribution for the given number of samples and deviations.\n"
  18953. "\n"
  18954. ">>> p = smirnov(n, deviations)\n"
  18955. ">>> p\n"
  18956. "array([0.58105083, 0.12826832, 0.01032231])\n"
  18957. "\n"
  18958. "The inverse function ``smirnovi(n, p)`` returns ``deviations``.\n"
  18959. "\n"
  18960. ">>> smirnovi(n, p)\n"
  18961. "array([0.1, 0.2, 0.3])")
  18962. ufunc_smirnovi_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  18963. ufunc_smirnovi_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  18964. ufunc_smirnovi_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  18965. ufunc_smirnovi_types[0] = <char>NPY_LONG
  18966. ufunc_smirnovi_types[1] = <char>NPY_DOUBLE
  18967. ufunc_smirnovi_types[2] = <char>NPY_DOUBLE
  18968. ufunc_smirnovi_types[3] = <char>NPY_FLOAT
  18969. ufunc_smirnovi_types[4] = <char>NPY_FLOAT
  18970. ufunc_smirnovi_types[5] = <char>NPY_FLOAT
  18971. ufunc_smirnovi_types[6] = <char>NPY_DOUBLE
  18972. ufunc_smirnovi_types[7] = <char>NPY_DOUBLE
  18973. ufunc_smirnovi_types[8] = <char>NPY_DOUBLE
  18974. ufunc_smirnovi_ptr[2*0] = <void*>_func_smirnovi
  18975. ufunc_smirnovi_ptr[2*0+1] = <void*>(<char*>"smirnovi")
  18976. ufunc_smirnovi_ptr[2*1] = <void*>_func_smirnovi_unsafe
  18977. ufunc_smirnovi_ptr[2*1+1] = <void*>(<char*>"smirnovi")
  18978. ufunc_smirnovi_ptr[2*2] = <void*>_func_smirnovi_unsafe
  18979. ufunc_smirnovi_ptr[2*2+1] = <void*>(<char*>"smirnovi")
  18980. ufunc_smirnovi_data[0] = &ufunc_smirnovi_ptr[2*0]
  18981. ufunc_smirnovi_data[1] = &ufunc_smirnovi_ptr[2*1]
  18982. ufunc_smirnovi_data[2] = &ufunc_smirnovi_ptr[2*2]
  18983. smirnovi = np.PyUFunc_FromFuncAndData(ufunc_smirnovi_loops, ufunc_smirnovi_data, ufunc_smirnovi_types, 3, 2, 1, 0, "smirnovi", ufunc_smirnovi_doc, 0)
  18984. cdef np.PyUFuncGenericFunction ufunc_spence_loops[4]
  18985. cdef void *ufunc_spence_ptr[8]
  18986. cdef void *ufunc_spence_data[4]
  18987. cdef char ufunc_spence_types[8]
  18988. cdef char *ufunc_spence_doc = (
  18989. "spence(z, out=None)\n"
  18990. "\n"
  18991. "Spence's function, also known as the dilogarithm.\n"
  18992. "\n"
  18993. "It is defined to be\n"
  18994. "\n"
  18995. ".. math::\n"
  18996. " \\int_1^z \\frac{\\log(t)}{1 - t}dt\n"
  18997. "\n"
  18998. "for complex :math:`z`, where the contour of integration is taken\n"
  18999. "to avoid the branch cut of the logarithm. Spence's function is\n"
  19000. "analytic everywhere except the negative real axis where it has a\n"
  19001. "branch cut.\n"
  19002. "\n"
  19003. "Parameters\n"
  19004. "----------\n"
  19005. "z : array_like\n"
  19006. " Points at which to evaluate Spence's function\n"
  19007. "out : ndarray, optional\n"
  19008. " Optional output array for the function results\n"
  19009. "\n"
  19010. "Returns\n"
  19011. "-------\n"
  19012. "s : scalar or ndarray\n"
  19013. " Computed values of Spence's function\n"
  19014. "\n"
  19015. "Notes\n"
  19016. "-----\n"
  19017. "There is a different convention which defines Spence's function by\n"
  19018. "the integral\n"
  19019. "\n"
  19020. ".. math::\n"
  19021. " -\\int_0^z \\frac{\\log(1 - t)}{t}dt;\n"
  19022. "\n"
  19023. "this is our ``spence(1 - z)``.\n"
  19024. "\n"
  19025. "Examples\n"
  19026. "--------\n"
  19027. ">>> import numpy as np\n"
  19028. ">>> from scipy.special import spence\n"
  19029. ">>> import matplotlib.pyplot as plt\n"
  19030. "\n"
  19031. "The function is defined for complex inputs:\n"
  19032. "\n"
  19033. ">>> spence([1-1j, 1.5+2j, 3j, -10-5j])\n"
  19034. "array([-0.20561676+0.91596559j, -0.86766909-1.39560134j,\n"
  19035. " -0.59422064-2.49129918j, -1.14044398+6.80075924j])\n"
  19036. "\n"
  19037. "For complex inputs on the branch cut, which is the negative real axis,\n"
  19038. "the function returns the limit for ``z`` with positive imaginary part.\n"
  19039. "For example, in the following, note the sign change of the imaginary\n"
  19040. "part of the output for ``z = -2`` and ``z = -2 - 1e-8j``:\n"
  19041. "\n"
  19042. ">>> spence([-2 + 1e-8j, -2, -2 - 1e-8j])\n"
  19043. "array([2.32018041-3.45139229j, 2.32018042-3.4513923j ,\n"
  19044. " 2.32018041+3.45139229j])\n"
  19045. "\n"
  19046. "The function returns ``nan`` for real inputs on the branch cut:\n"
  19047. "\n"
  19048. ">>> spence(-1.5)\n"
  19049. "nan\n"
  19050. "\n"
  19051. "Verify some particular values: ``spence(0) = pi**2/6``,\n"
  19052. "``spence(1) = 0`` and ``spence(2) = -pi**2/12``.\n"
  19053. "\n"
  19054. ">>> spence([0, 1, 2])\n"
  19055. "array([ 1.64493407, 0. , -0.82246703])\n"
  19056. ">>> np.pi**2/6, -np.pi**2/12\n"
  19057. "(1.6449340668482264, -0.8224670334241132)\n"
  19058. "\n"
  19059. "Verify the identity::\n"
  19060. "\n"
  19061. " spence(z) + spence(1 - z) = pi**2/6 - log(z)*log(1 - z)\n"
  19062. "\n"
  19063. ">>> z = 3 + 4j\n"
  19064. ">>> spence(z) + spence(1 - z)\n"
  19065. "(-2.6523186143876067+1.8853470951513935j)\n"
  19066. ">>> np.pi**2/6 - np.log(z)*np.log(1 - z)\n"
  19067. "(-2.652318614387606+1.885347095151394j)\n"
  19068. "\n"
  19069. "Plot the function for positive real input.\n"
  19070. "\n"
  19071. ">>> fig, ax = plt.subplots()\n"
  19072. ">>> x = np.linspace(0, 6, 400)\n"
  19073. ">>> ax.plot(x, spence(x))\n"
  19074. ">>> ax.grid()\n"
  19075. ">>> ax.set_xlabel('x')\n"
  19076. ">>> ax.set_title('spence(x)')\n"
  19077. ">>> plt.show()")
  19078. ufunc_spence_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  19079. ufunc_spence_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  19080. ufunc_spence_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  19081. ufunc_spence_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  19082. ufunc_spence_types[0] = <char>NPY_FLOAT
  19083. ufunc_spence_types[1] = <char>NPY_FLOAT
  19084. ufunc_spence_types[2] = <char>NPY_DOUBLE
  19085. ufunc_spence_types[3] = <char>NPY_DOUBLE
  19086. ufunc_spence_types[4] = <char>NPY_CFLOAT
  19087. ufunc_spence_types[5] = <char>NPY_CFLOAT
  19088. ufunc_spence_types[6] = <char>NPY_CDOUBLE
  19089. ufunc_spence_types[7] = <char>NPY_CDOUBLE
  19090. ufunc_spence_ptr[2*0] = <void*>_func_spence
  19091. ufunc_spence_ptr[2*0+1] = <void*>(<char*>"spence")
  19092. ufunc_spence_ptr[2*1] = <void*>_func_spence
  19093. ufunc_spence_ptr[2*1+1] = <void*>(<char*>"spence")
  19094. ufunc_spence_ptr[2*2] = <void*>_func_cspence
  19095. ufunc_spence_ptr[2*2+1] = <void*>(<char*>"spence")
  19096. ufunc_spence_ptr[2*3] = <void*>_func_cspence
  19097. ufunc_spence_ptr[2*3+1] = <void*>(<char*>"spence")
  19098. ufunc_spence_data[0] = &ufunc_spence_ptr[2*0]
  19099. ufunc_spence_data[1] = &ufunc_spence_ptr[2*1]
  19100. ufunc_spence_data[2] = &ufunc_spence_ptr[2*2]
  19101. ufunc_spence_data[3] = &ufunc_spence_ptr[2*3]
  19102. spence = np.PyUFunc_FromFuncAndData(ufunc_spence_loops, ufunc_spence_data, ufunc_spence_types, 4, 1, 1, 0, "spence", ufunc_spence_doc, 0)
  19103. cdef np.PyUFuncGenericFunction ufunc_sph_harm_loops[3]
  19104. cdef void *ufunc_sph_harm_ptr[6]
  19105. cdef void *ufunc_sph_harm_data[3]
  19106. cdef char ufunc_sph_harm_types[15]
  19107. cdef char *ufunc_sph_harm_doc = (
  19108. "sph_harm(m, n, theta, phi, out=None)\n"
  19109. "\n"
  19110. "Compute spherical harmonics.\n"
  19111. "\n"
  19112. "The spherical harmonics are defined as\n"
  19113. "\n"
  19114. ".. math::\n"
  19115. "\n"
  19116. " Y^m_n(\\theta,\\phi) = \\sqrt{\\frac{2n+1}{4\\pi} \\frac{(n-m)!}{(n+m)!}}\n"
  19117. " e^{i m \\theta} P^m_n(\\cos(\\phi))\n"
  19118. "\n"
  19119. "where :math:`P_n^m` are the associated Legendre functions; see `lpmv`.\n"
  19120. "\n"
  19121. "Parameters\n"
  19122. "----------\n"
  19123. "m : array_like\n"
  19124. " Order of the harmonic (int); must have ``|m| <= n``.\n"
  19125. "n : array_like\n"
  19126. " Degree of the harmonic (int); must have ``n >= 0``. This is\n"
  19127. " often denoted by ``l`` (lower case L) in descriptions of\n"
  19128. " spherical harmonics.\n"
  19129. "theta : array_like\n"
  19130. " Azimuthal (longitudinal) coordinate; must be in ``[0, 2*pi]``.\n"
  19131. "phi : array_like\n"
  19132. " Polar (colatitudinal) coordinate; must be in ``[0, pi]``.\n"
  19133. "out : ndarray, optional\n"
  19134. " Optional output array for the function values\n"
  19135. "\n"
  19136. "Returns\n"
  19137. "-------\n"
  19138. "y_mn : complex scalar or ndarray\n"
  19139. " The harmonic :math:`Y^m_n` sampled at ``theta`` and ``phi``.\n"
  19140. "\n"
  19141. "Notes\n"
  19142. "-----\n"
  19143. "There are different conventions for the meanings of the input\n"
  19144. "arguments ``theta`` and ``phi``. In SciPy ``theta`` is the\n"
  19145. "azimuthal angle and ``phi`` is the polar angle. It is common to\n"
  19146. "see the opposite convention, that is, ``theta`` as the polar angle\n"
  19147. "and ``phi`` as the azimuthal angle.\n"
  19148. "\n"
  19149. "Note that SciPy's spherical harmonics include the Condon-Shortley\n"
  19150. "phase [2]_ because it is part of `lpmv`.\n"
  19151. "\n"
  19152. "With SciPy's conventions, the first several spherical harmonics\n"
  19153. "are\n"
  19154. "\n"
  19155. ".. math::\n"
  19156. "\n"
  19157. " Y_0^0(\\theta, \\phi) &= \\frac{1}{2} \\sqrt{\\frac{1}{\\pi}} \\\\\n"
  19158. " Y_1^{-1}(\\theta, \\phi) &= \\frac{1}{2} \\sqrt{\\frac{3}{2\\pi}}\n"
  19159. " e^{-i\\theta} \\sin(\\phi) \\\\\n"
  19160. " Y_1^0(\\theta, \\phi) &= \\frac{1}{2} \\sqrt{\\frac{3}{\\pi}}\n"
  19161. " \\cos(\\phi) \\\\\n"
  19162. " Y_1^1(\\theta, \\phi) &= -\\frac{1}{2} \\sqrt{\\frac{3}{2\\pi}}\n"
  19163. " e^{i\\theta} \\sin(\\phi).\n"
  19164. "\n"
  19165. "References\n"
  19166. "----------\n"
  19167. ".. [1] Digital Library of Mathematical Functions, 14.30.\n"
  19168. " https://dlmf.nist.gov/14.30\n"
  19169. ".. [2] https://en.wikipedia.org/wiki/Spherical_harmonics#Condon.E2.80.93Shortley_phase")
  19170. ufunc_sph_harm_loops[0] = <np.PyUFuncGenericFunction>loop_D_iidd__As_lldd_D
  19171. ufunc_sph_harm_loops[1] = <np.PyUFuncGenericFunction>loop_D_dddd__As_ffff_F
  19172. ufunc_sph_harm_loops[2] = <np.PyUFuncGenericFunction>loop_D_dddd__As_dddd_D
  19173. ufunc_sph_harm_types[0] = <char>NPY_LONG
  19174. ufunc_sph_harm_types[1] = <char>NPY_LONG
  19175. ufunc_sph_harm_types[2] = <char>NPY_DOUBLE
  19176. ufunc_sph_harm_types[3] = <char>NPY_DOUBLE
  19177. ufunc_sph_harm_types[4] = <char>NPY_CDOUBLE
  19178. ufunc_sph_harm_types[5] = <char>NPY_FLOAT
  19179. ufunc_sph_harm_types[6] = <char>NPY_FLOAT
  19180. ufunc_sph_harm_types[7] = <char>NPY_FLOAT
  19181. ufunc_sph_harm_types[8] = <char>NPY_FLOAT
  19182. ufunc_sph_harm_types[9] = <char>NPY_CFLOAT
  19183. ufunc_sph_harm_types[10] = <char>NPY_DOUBLE
  19184. ufunc_sph_harm_types[11] = <char>NPY_DOUBLE
  19185. ufunc_sph_harm_types[12] = <char>NPY_DOUBLE
  19186. ufunc_sph_harm_types[13] = <char>NPY_DOUBLE
  19187. ufunc_sph_harm_types[14] = <char>NPY_CDOUBLE
  19188. ufunc_sph_harm_ptr[2*0] = <void*>_func_sph_harmonic
  19189. ufunc_sph_harm_ptr[2*0+1] = <void*>(<char*>"sph_harm")
  19190. ufunc_sph_harm_ptr[2*1] = <void*>_func_sph_harmonic_unsafe
  19191. ufunc_sph_harm_ptr[2*1+1] = <void*>(<char*>"sph_harm")
  19192. ufunc_sph_harm_ptr[2*2] = <void*>_func_sph_harmonic_unsafe
  19193. ufunc_sph_harm_ptr[2*2+1] = <void*>(<char*>"sph_harm")
  19194. ufunc_sph_harm_data[0] = &ufunc_sph_harm_ptr[2*0]
  19195. ufunc_sph_harm_data[1] = &ufunc_sph_harm_ptr[2*1]
  19196. ufunc_sph_harm_data[2] = &ufunc_sph_harm_ptr[2*2]
  19197. sph_harm = np.PyUFunc_FromFuncAndData(ufunc_sph_harm_loops, ufunc_sph_harm_data, ufunc_sph_harm_types, 3, 4, 1, 0, "sph_harm", ufunc_sph_harm_doc, 0)
  19198. cdef np.PyUFuncGenericFunction ufunc_stdtr_loops[2]
  19199. cdef void *ufunc_stdtr_ptr[4]
  19200. cdef void *ufunc_stdtr_data[2]
  19201. cdef char ufunc_stdtr_types[6]
  19202. cdef char *ufunc_stdtr_doc = (
  19203. "stdtr(df, t, out=None)\n"
  19204. "\n"
  19205. "Student t distribution cumulative distribution function\n"
  19206. "\n"
  19207. "Returns the integral from minus infinity to t of the Student t\n"
  19208. "distribution with df > 0 degrees of freedom::\n"
  19209. "\n"
  19210. " gamma((df+1)/2)/(sqrt(df*pi)*gamma(df/2)) *\n"
  19211. " integral((1+x**2/df)**(-df/2-1/2), x=-inf..t)\n"
  19212. "\n"
  19213. "Parameters\n"
  19214. "----------\n"
  19215. "df : array_like\n"
  19216. " Degrees of freedom\n"
  19217. "t : array_like\n"
  19218. " Upper bound of the integral\n"
  19219. "out : ndarray, optional\n"
  19220. " Optional output array for the function results\n"
  19221. "\n"
  19222. "Returns\n"
  19223. "-------\n"
  19224. "scalar or ndarray\n"
  19225. " Value of the Student t CDF at t\n"
  19226. "\n"
  19227. "See Also\n"
  19228. "--------\n"
  19229. "stdtridf : inverse of stdtr with respect to `df`\n"
  19230. "stdtrit : inverse of stdtr with respect to `t`")
  19231. ufunc_stdtr_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19232. ufunc_stdtr_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19233. ufunc_stdtr_types[0] = <char>NPY_FLOAT
  19234. ufunc_stdtr_types[1] = <char>NPY_FLOAT
  19235. ufunc_stdtr_types[2] = <char>NPY_FLOAT
  19236. ufunc_stdtr_types[3] = <char>NPY_DOUBLE
  19237. ufunc_stdtr_types[4] = <char>NPY_DOUBLE
  19238. ufunc_stdtr_types[5] = <char>NPY_DOUBLE
  19239. ufunc_stdtr_ptr[2*0] = <void*>_func_cdft1_wrap
  19240. ufunc_stdtr_ptr[2*0+1] = <void*>(<char*>"stdtr")
  19241. ufunc_stdtr_ptr[2*1] = <void*>_func_cdft1_wrap
  19242. ufunc_stdtr_ptr[2*1+1] = <void*>(<char*>"stdtr")
  19243. ufunc_stdtr_data[0] = &ufunc_stdtr_ptr[2*0]
  19244. ufunc_stdtr_data[1] = &ufunc_stdtr_ptr[2*1]
  19245. stdtr = np.PyUFunc_FromFuncAndData(ufunc_stdtr_loops, ufunc_stdtr_data, ufunc_stdtr_types, 2, 2, 1, 0, "stdtr", ufunc_stdtr_doc, 0)
  19246. cdef np.PyUFuncGenericFunction ufunc_stdtridf_loops[2]
  19247. cdef void *ufunc_stdtridf_ptr[4]
  19248. cdef void *ufunc_stdtridf_data[2]
  19249. cdef char ufunc_stdtridf_types[6]
  19250. cdef char *ufunc_stdtridf_doc = (
  19251. "stdtridf(p, t, out=None)\n"
  19252. "\n"
  19253. "Inverse of `stdtr` vs df\n"
  19254. "\n"
  19255. "Returns the argument df such that stdtr(df, t) is equal to `p`.\n"
  19256. "\n"
  19257. "Parameters\n"
  19258. "----------\n"
  19259. "p : array_like\n"
  19260. " Probability\n"
  19261. "t : array_like\n"
  19262. " Upper bound of the integral\n"
  19263. "out : ndarray, optional\n"
  19264. " Optional output array for the function results\n"
  19265. "\n"
  19266. "Returns\n"
  19267. "-------\n"
  19268. "df : scalar or ndarray\n"
  19269. " Value of `df` such that ``stdtr(df, t) == p``\n"
  19270. "\n"
  19271. "See Also\n"
  19272. "--------\n"
  19273. "stdtr : Student t CDF\n"
  19274. "stdtrit : inverse of stdtr with respect to `t`")
  19275. ufunc_stdtridf_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19276. ufunc_stdtridf_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19277. ufunc_stdtridf_types[0] = <char>NPY_FLOAT
  19278. ufunc_stdtridf_types[1] = <char>NPY_FLOAT
  19279. ufunc_stdtridf_types[2] = <char>NPY_FLOAT
  19280. ufunc_stdtridf_types[3] = <char>NPY_DOUBLE
  19281. ufunc_stdtridf_types[4] = <char>NPY_DOUBLE
  19282. ufunc_stdtridf_types[5] = <char>NPY_DOUBLE
  19283. ufunc_stdtridf_ptr[2*0] = <void*>_func_cdft3_wrap
  19284. ufunc_stdtridf_ptr[2*0+1] = <void*>(<char*>"stdtridf")
  19285. ufunc_stdtridf_ptr[2*1] = <void*>_func_cdft3_wrap
  19286. ufunc_stdtridf_ptr[2*1+1] = <void*>(<char*>"stdtridf")
  19287. ufunc_stdtridf_data[0] = &ufunc_stdtridf_ptr[2*0]
  19288. ufunc_stdtridf_data[1] = &ufunc_stdtridf_ptr[2*1]
  19289. stdtridf = np.PyUFunc_FromFuncAndData(ufunc_stdtridf_loops, ufunc_stdtridf_data, ufunc_stdtridf_types, 2, 2, 1, 0, "stdtridf", ufunc_stdtridf_doc, 0)
  19290. cdef np.PyUFuncGenericFunction ufunc_stdtrit_loops[2]
  19291. cdef void *ufunc_stdtrit_ptr[4]
  19292. cdef void *ufunc_stdtrit_data[2]
  19293. cdef char ufunc_stdtrit_types[6]
  19294. cdef char *ufunc_stdtrit_doc = (
  19295. "stdtrit(df, p, out=None)\n"
  19296. "\n"
  19297. "Inverse of `stdtr` vs `t`\n"
  19298. "\n"
  19299. "Returns the argument `t` such that stdtr(df, t) is equal to `p`.\n"
  19300. "\n"
  19301. "Parameters\n"
  19302. "----------\n"
  19303. "df : array_like\n"
  19304. " Degrees of freedom\n"
  19305. "p : array_like\n"
  19306. " Probability\n"
  19307. "out : ndarray, optional\n"
  19308. " Optional output array for the function results\n"
  19309. "\n"
  19310. "Returns\n"
  19311. "-------\n"
  19312. "t : scalar or ndarray\n"
  19313. " Value of `t` such that ``stdtr(df, t) == p``\n"
  19314. "\n"
  19315. "See Also\n"
  19316. "--------\n"
  19317. "stdtr : Student t CDF\n"
  19318. "stdtridf : inverse of stdtr with respect to `df`")
  19319. ufunc_stdtrit_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19320. ufunc_stdtrit_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19321. ufunc_stdtrit_types[0] = <char>NPY_FLOAT
  19322. ufunc_stdtrit_types[1] = <char>NPY_FLOAT
  19323. ufunc_stdtrit_types[2] = <char>NPY_FLOAT
  19324. ufunc_stdtrit_types[3] = <char>NPY_DOUBLE
  19325. ufunc_stdtrit_types[4] = <char>NPY_DOUBLE
  19326. ufunc_stdtrit_types[5] = <char>NPY_DOUBLE
  19327. ufunc_stdtrit_ptr[2*0] = <void*>_func_cdft2_wrap
  19328. ufunc_stdtrit_ptr[2*0+1] = <void*>(<char*>"stdtrit")
  19329. ufunc_stdtrit_ptr[2*1] = <void*>_func_cdft2_wrap
  19330. ufunc_stdtrit_ptr[2*1+1] = <void*>(<char*>"stdtrit")
  19331. ufunc_stdtrit_data[0] = &ufunc_stdtrit_ptr[2*0]
  19332. ufunc_stdtrit_data[1] = &ufunc_stdtrit_ptr[2*1]
  19333. stdtrit = np.PyUFunc_FromFuncAndData(ufunc_stdtrit_loops, ufunc_stdtrit_data, ufunc_stdtrit_types, 2, 2, 1, 0, "stdtrit", ufunc_stdtrit_doc, 0)
  19334. cdef np.PyUFuncGenericFunction ufunc_struve_loops[2]
  19335. cdef void *ufunc_struve_ptr[4]
  19336. cdef void *ufunc_struve_data[2]
  19337. cdef char ufunc_struve_types[6]
  19338. cdef char *ufunc_struve_doc = (
  19339. "struve(v, x, out=None)\n"
  19340. "\n"
  19341. "Struve function.\n"
  19342. "\n"
  19343. "Return the value of the Struve function of order `v` at `x`. The Struve\n"
  19344. "function is defined as,\n"
  19345. "\n"
  19346. ".. math::\n"
  19347. " H_v(x) = (z/2)^{v + 1} \\sum_{n=0}^\\infty \\frac{(-1)^n (z/2)^{2n}}{\\Gamma(n + \\frac{3}{2}) \\Gamma(n + v + \\frac{3}{2})},\n"
  19348. "\n"
  19349. "where :math:`\\Gamma` is the gamma function.\n"
  19350. "\n"
  19351. "Parameters\n"
  19352. "----------\n"
  19353. "v : array_like\n"
  19354. " Order of the Struve function (float).\n"
  19355. "x : array_like\n"
  19356. " Argument of the Struve function (float; must be positive unless `v` is\n"
  19357. " an integer).\n"
  19358. "out : ndarray, optional\n"
  19359. " Optional output array for the function results\n"
  19360. "\n"
  19361. "Returns\n"
  19362. "-------\n"
  19363. "H : scalar or ndarray\n"
  19364. " Value of the Struve function of order `v` at `x`.\n"
  19365. "\n"
  19366. "Notes\n"
  19367. "-----\n"
  19368. "Three methods discussed in [1]_ are used to evaluate the Struve function:\n"
  19369. "\n"
  19370. "- power series\n"
  19371. "- expansion in Bessel functions (if :math:`|z| < |v| + 20`)\n"
  19372. "- asymptotic large-z expansion (if :math:`z \\geq 0.7v + 12`)\n"
  19373. "\n"
  19374. "Rounding errors are estimated based on the largest terms in the sums, and\n"
  19375. "the result associated with the smallest error is returned.\n"
  19376. "\n"
  19377. "See also\n"
  19378. "--------\n"
  19379. "modstruve: Modified Struve function\n"
  19380. "\n"
  19381. "References\n"
  19382. "----------\n"
  19383. ".. [1] NIST Digital Library of Mathematical Functions\n"
  19384. " https://dlmf.nist.gov/11\n"
  19385. "\n"
  19386. "Examples\n"
  19387. "--------\n"
  19388. "Calculate the Struve function of order 1 at 2.\n"
  19389. "\n"
  19390. ">>> import numpy as np\n"
  19391. ">>> from scipy.special import struve\n"
  19392. ">>> import matplotlib.pyplot as plt\n"
  19393. ">>> struve(1, 2.)\n"
  19394. "0.6467637282835622\n"
  19395. "\n"
  19396. "Calculate the Struve function at 2 for orders 1, 2 and 3 by providing\n"
  19397. "a list for the order parameter `v`.\n"
  19398. "\n"
  19399. ">>> struve([1, 2, 3], 2.)\n"
  19400. "array([0.64676373, 0.28031806, 0.08363767])\n"
  19401. "\n"
  19402. "Calculate the Struve function of order 1 for several points by providing\n"
  19403. "an array for `x`.\n"
  19404. "\n"
  19405. ">>> points = np.array([2., 5., 8.])\n"
  19406. ">>> struve(1, points)\n"
  19407. "array([0.64676373, 0.80781195, 0.48811605])\n"
  19408. "\n"
  19409. "Compute the Struve function for several orders at several points by\n"
  19410. "providing arrays for `v` and `z`. The arrays have to be broadcastable\n"
  19411. "to the correct shapes.\n"
  19412. "\n"
  19413. ">>> orders = np.array([[1], [2], [3]])\n"
  19414. ">>> points.shape, orders.shape\n"
  19415. "((3,), (3, 1))\n"
  19416. "\n"
  19417. ">>> struve(orders, points)\n"
  19418. "array([[0.64676373, 0.80781195, 0.48811605],\n"
  19419. " [0.28031806, 1.56937455, 1.51769363],\n"
  19420. " [0.08363767, 1.50872065, 2.98697513]])\n"
  19421. "\n"
  19422. "Plot the Struve functions of order 0 to 3 from -10 to 10.\n"
  19423. "\n"
  19424. ">>> fig, ax = plt.subplots()\n"
  19425. ">>> x = np.linspace(-10., 10., 1000)\n"
  19426. ">>> for i in range(4):\n"
  19427. "... ax.plot(x, struve(i, x), label=f'$H_{i!r}$')\n"
  19428. ">>> ax.legend(ncol=2)\n"
  19429. ">>> ax.set_xlim(-10, 10)\n"
  19430. ">>> ax.set_title(r\"Struve functions $H_{\\nu}$\")\n"
  19431. ">>> plt.show()")
  19432. ufunc_struve_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19433. ufunc_struve_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19434. ufunc_struve_types[0] = <char>NPY_FLOAT
  19435. ufunc_struve_types[1] = <char>NPY_FLOAT
  19436. ufunc_struve_types[2] = <char>NPY_FLOAT
  19437. ufunc_struve_types[3] = <char>NPY_DOUBLE
  19438. ufunc_struve_types[4] = <char>NPY_DOUBLE
  19439. ufunc_struve_types[5] = <char>NPY_DOUBLE
  19440. ufunc_struve_ptr[2*0] = <void*>_func_struve_h
  19441. ufunc_struve_ptr[2*0+1] = <void*>(<char*>"struve")
  19442. ufunc_struve_ptr[2*1] = <void*>_func_struve_h
  19443. ufunc_struve_ptr[2*1+1] = <void*>(<char*>"struve")
  19444. ufunc_struve_data[0] = &ufunc_struve_ptr[2*0]
  19445. ufunc_struve_data[1] = &ufunc_struve_ptr[2*1]
  19446. struve = np.PyUFunc_FromFuncAndData(ufunc_struve_loops, ufunc_struve_data, ufunc_struve_types, 2, 2, 1, 0, "struve", ufunc_struve_doc, 0)
  19447. cdef np.PyUFuncGenericFunction ufunc_tandg_loops[2]
  19448. cdef void *ufunc_tandg_ptr[4]
  19449. cdef void *ufunc_tandg_data[2]
  19450. cdef char ufunc_tandg_types[4]
  19451. cdef char *ufunc_tandg_doc = (
  19452. "tandg(x, out=None)\n"
  19453. "\n"
  19454. "Tangent of angle `x` given in degrees.\n"
  19455. "\n"
  19456. "Parameters\n"
  19457. "----------\n"
  19458. "x : array_like\n"
  19459. " Angle, given in degrees.\n"
  19460. "out : ndarray, optional\n"
  19461. " Optional output array for the function results.\n"
  19462. "\n"
  19463. "Returns\n"
  19464. "-------\n"
  19465. "scalar or ndarray\n"
  19466. " Tangent at the input.\n"
  19467. "\n"
  19468. "See Also\n"
  19469. "--------\n"
  19470. "sindg, cosdg, cotdg\n"
  19471. "\n"
  19472. "Examples\n"
  19473. "--------\n"
  19474. ">>> import numpy as np\n"
  19475. ">>> import scipy.special as sc\n"
  19476. "\n"
  19477. "It is more accurate than using tangent directly.\n"
  19478. "\n"
  19479. ">>> x = 180 * np.arange(3)\n"
  19480. ">>> sc.tandg(x)\n"
  19481. "array([0., 0., 0.])\n"
  19482. ">>> np.tan(x * np.pi / 180)\n"
  19483. "array([ 0.0000000e+00, -1.2246468e-16, -2.4492936e-16])")
  19484. ufunc_tandg_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  19485. ufunc_tandg_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  19486. ufunc_tandg_types[0] = <char>NPY_FLOAT
  19487. ufunc_tandg_types[1] = <char>NPY_FLOAT
  19488. ufunc_tandg_types[2] = <char>NPY_DOUBLE
  19489. ufunc_tandg_types[3] = <char>NPY_DOUBLE
  19490. ufunc_tandg_ptr[2*0] = <void*>_func_tandg
  19491. ufunc_tandg_ptr[2*0+1] = <void*>(<char*>"tandg")
  19492. ufunc_tandg_ptr[2*1] = <void*>_func_tandg
  19493. ufunc_tandg_ptr[2*1+1] = <void*>(<char*>"tandg")
  19494. ufunc_tandg_data[0] = &ufunc_tandg_ptr[2*0]
  19495. ufunc_tandg_data[1] = &ufunc_tandg_ptr[2*1]
  19496. tandg = np.PyUFunc_FromFuncAndData(ufunc_tandg_loops, ufunc_tandg_data, ufunc_tandg_types, 2, 1, 1, 0, "tandg", ufunc_tandg_doc, 0)
  19497. cdef np.PyUFuncGenericFunction ufunc_tklmbda_loops[2]
  19498. cdef void *ufunc_tklmbda_ptr[4]
  19499. cdef void *ufunc_tklmbda_data[2]
  19500. cdef char ufunc_tklmbda_types[6]
  19501. cdef char *ufunc_tklmbda_doc = (
  19502. "tklmbda(x, lmbda, out=None)\n"
  19503. "\n"
  19504. "Tukey-Lambda cumulative distribution function\n"
  19505. "\n"
  19506. "Parameters\n"
  19507. "----------\n"
  19508. "x, lmbda : array_like\n"
  19509. " Parameters\n"
  19510. "out : ndarray, optional\n"
  19511. " Optional output array for the function results\n"
  19512. "\n"
  19513. "Returns\n"
  19514. "-------\n"
  19515. "cdf : scalar or ndarray\n"
  19516. " Value of the Tukey-Lambda CDF")
  19517. ufunc_tklmbda_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19518. ufunc_tklmbda_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19519. ufunc_tklmbda_types[0] = <char>NPY_FLOAT
  19520. ufunc_tklmbda_types[1] = <char>NPY_FLOAT
  19521. ufunc_tklmbda_types[2] = <char>NPY_FLOAT
  19522. ufunc_tklmbda_types[3] = <char>NPY_DOUBLE
  19523. ufunc_tklmbda_types[4] = <char>NPY_DOUBLE
  19524. ufunc_tklmbda_types[5] = <char>NPY_DOUBLE
  19525. ufunc_tklmbda_ptr[2*0] = <void*>_func_tukeylambdacdf
  19526. ufunc_tklmbda_ptr[2*0+1] = <void*>(<char*>"tklmbda")
  19527. ufunc_tklmbda_ptr[2*1] = <void*>_func_tukeylambdacdf
  19528. ufunc_tklmbda_ptr[2*1+1] = <void*>(<char*>"tklmbda")
  19529. ufunc_tklmbda_data[0] = &ufunc_tklmbda_ptr[2*0]
  19530. ufunc_tklmbda_data[1] = &ufunc_tklmbda_ptr[2*1]
  19531. tklmbda = np.PyUFunc_FromFuncAndData(ufunc_tklmbda_loops, ufunc_tklmbda_data, ufunc_tklmbda_types, 2, 2, 1, 0, "tklmbda", ufunc_tklmbda_doc, 0)
  19532. cdef np.PyUFuncGenericFunction ufunc_voigt_profile_loops[2]
  19533. cdef void *ufunc_voigt_profile_ptr[4]
  19534. cdef void *ufunc_voigt_profile_data[2]
  19535. cdef char ufunc_voigt_profile_types[8]
  19536. cdef char *ufunc_voigt_profile_doc = (
  19537. "voigt_profile(x, sigma, gamma, out=None)\n"
  19538. "\n"
  19539. "Voigt profile.\n"
  19540. "\n"
  19541. "The Voigt profile is a convolution of a 1-D Normal distribution with\n"
  19542. "standard deviation ``sigma`` and a 1-D Cauchy distribution with half-width at\n"
  19543. "half-maximum ``gamma``.\n"
  19544. "\n"
  19545. "If ``sigma = 0``, PDF of Cauchy distribution is returned.\n"
  19546. "Conversely, if ``gamma = 0``, PDF of Normal distribution is returned.\n"
  19547. "If ``sigma = gamma = 0``, the return value is ``Inf`` for ``x = 0``, and ``0`` for all other ``x``.\n"
  19548. "\n"
  19549. "Parameters\n"
  19550. "----------\n"
  19551. "x : array_like\n"
  19552. " Real argument\n"
  19553. "sigma : array_like\n"
  19554. " The standard deviation of the Normal distribution part\n"
  19555. "gamma : array_like\n"
  19556. " The half-width at half-maximum of the Cauchy distribution part\n"
  19557. "out : ndarray, optional\n"
  19558. " Optional output array for the function values\n"
  19559. "\n"
  19560. "Returns\n"
  19561. "-------\n"
  19562. "scalar or ndarray\n"
  19563. " The Voigt profile at the given arguments\n"
  19564. "\n"
  19565. "Notes\n"
  19566. "-----\n"
  19567. "It can be expressed in terms of Faddeeva function\n"
  19568. "\n"
  19569. ".. math:: V(x; \\sigma, \\gamma) = \\frac{Re[w(z)]}{\\sigma\\sqrt{2\\pi}},\n"
  19570. ".. math:: z = \\frac{x + i\\gamma}{\\sqrt{2}\\sigma}\n"
  19571. "\n"
  19572. "where :math:`w(z)` is the Faddeeva function.\n"
  19573. "\n"
  19574. "See Also\n"
  19575. "--------\n"
  19576. "wofz : Faddeeva function\n"
  19577. "\n"
  19578. "References\n"
  19579. "----------\n"
  19580. ".. [1] https://en.wikipedia.org/wiki/Voigt_profile\n"
  19581. "\n"
  19582. "Examples\n"
  19583. "--------\n"
  19584. "Calculate the function at point 2 for ``sigma=1`` and ``gamma=1``.\n"
  19585. "\n"
  19586. ">>> from scipy.special import voigt_profile\n"
  19587. ">>> import numpy as np\n"
  19588. ">>> import matplotlib.pyplot as plt\n"
  19589. ">>> voigt_profile(2, 1., 1.)\n"
  19590. "0.09071519942627544\n"
  19591. "\n"
  19592. "Calculate the function at several points by providing a NumPy array\n"
  19593. "for `x`.\n"
  19594. "\n"
  19595. ">>> values = np.array([-2., 0., 5])\n"
  19596. ">>> voigt_profile(values, 1., 1.)\n"
  19597. "array([0.0907152 , 0.20870928, 0.01388492])\n"
  19598. "\n"
  19599. "Plot the function for different parameter sets.\n"
  19600. "\n"
  19601. ">>> fig, ax = plt.subplots(figsize=(8, 8))\n"
  19602. ">>> x = np.linspace(-10, 10, 500)\n"
  19603. ">>> parameters_list = [(1.5, 0., \"solid\"), (1.3, 0.5, \"dashed\"),\n"
  19604. "... (0., 1.8, \"dotted\"), (1., 1., \"dashdot\")]\n"
  19605. ">>> for params in parameters_list:\n"
  19606. "... sigma, gamma, linestyle = params\n"
  19607. "... voigt = voigt_profile(x, sigma, gamma)\n"
  19608. "... ax.plot(x, voigt, label=rf\"$\\sigma={sigma},\\, \\gamma={gamma}$\",\n"
  19609. "... ls=linestyle)\n"
  19610. ">>> ax.legend()\n"
  19611. ">>> plt.show()\n"
  19612. "\n"
  19613. "Verify visually that the Voigt profile indeed arises as the convolution\n"
  19614. "of a normal and a Cauchy distribution.\n"
  19615. "\n"
  19616. ">>> from scipy.signal import convolve\n"
  19617. ">>> x, dx = np.linspace(-10, 10, 500, retstep=True)\n"
  19618. ">>> def gaussian(x, sigma):\n"
  19619. "... return np.exp(-0.5 * x**2/sigma**2)/(sigma * np.sqrt(2*np.pi))\n"
  19620. ">>> def cauchy(x, gamma):\n"
  19621. "... return gamma/(np.pi * (np.square(x)+gamma**2))\n"
  19622. ">>> sigma = 2\n"
  19623. ">>> gamma = 1\n"
  19624. ">>> gauss_profile = gaussian(x, sigma)\n"
  19625. ">>> cauchy_profile = cauchy(x, gamma)\n"
  19626. ">>> convolved = dx * convolve(cauchy_profile, gauss_profile, mode=\"same\")\n"
  19627. ">>> voigt = voigt_profile(x, sigma, gamma)\n"
  19628. ">>> fig, ax = plt.subplots(figsize=(8, 8))\n"
  19629. ">>> ax.plot(x, gauss_profile, label=\"Gauss: $G$\", c='b')\n"
  19630. ">>> ax.plot(x, cauchy_profile, label=\"Cauchy: $C$\", c='y', ls=\"dashed\")\n"
  19631. ">>> xx = 0.5*(x[1:] + x[:-1]) # midpoints\n"
  19632. ">>> ax.plot(xx, convolved[1:], label=\"Convolution: $G * C$\", ls='dashdot',\n"
  19633. "... c='k')\n"
  19634. ">>> ax.plot(x, voigt, label=\"Voigt\", ls='dotted', c='r')\n"
  19635. ">>> ax.legend()\n"
  19636. ">>> plt.show()")
  19637. ufunc_voigt_profile_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  19638. ufunc_voigt_profile_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  19639. ufunc_voigt_profile_types[0] = <char>NPY_FLOAT
  19640. ufunc_voigt_profile_types[1] = <char>NPY_FLOAT
  19641. ufunc_voigt_profile_types[2] = <char>NPY_FLOAT
  19642. ufunc_voigt_profile_types[3] = <char>NPY_FLOAT
  19643. ufunc_voigt_profile_types[4] = <char>NPY_DOUBLE
  19644. ufunc_voigt_profile_types[5] = <char>NPY_DOUBLE
  19645. ufunc_voigt_profile_types[6] = <char>NPY_DOUBLE
  19646. ufunc_voigt_profile_types[7] = <char>NPY_DOUBLE
  19647. ufunc_voigt_profile_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_voigt_profile
  19648. ufunc_voigt_profile_ptr[2*0+1] = <void*>(<char*>"voigt_profile")
  19649. ufunc_voigt_profile_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_voigt_profile
  19650. ufunc_voigt_profile_ptr[2*1+1] = <void*>(<char*>"voigt_profile")
  19651. ufunc_voigt_profile_data[0] = &ufunc_voigt_profile_ptr[2*0]
  19652. ufunc_voigt_profile_data[1] = &ufunc_voigt_profile_ptr[2*1]
  19653. voigt_profile = np.PyUFunc_FromFuncAndData(ufunc_voigt_profile_loops, ufunc_voigt_profile_data, ufunc_voigt_profile_types, 2, 3, 1, 0, "voigt_profile", ufunc_voigt_profile_doc, 0)
  19654. cdef np.PyUFuncGenericFunction ufunc_wofz_loops[2]
  19655. cdef void *ufunc_wofz_ptr[4]
  19656. cdef void *ufunc_wofz_data[2]
  19657. cdef char ufunc_wofz_types[4]
  19658. cdef char *ufunc_wofz_doc = (
  19659. "wofz(z, out=None)\n"
  19660. "\n"
  19661. "Faddeeva function\n"
  19662. "\n"
  19663. "Returns the value of the Faddeeva function for complex argument::\n"
  19664. "\n"
  19665. " exp(-z**2) * erfc(-i*z)\n"
  19666. "\n"
  19667. "Parameters\n"
  19668. "----------\n"
  19669. "z : array_like\n"
  19670. " complex argument\n"
  19671. "out : ndarray, optional\n"
  19672. " Optional output array for the function results\n"
  19673. "\n"
  19674. "Returns\n"
  19675. "-------\n"
  19676. "scalar or ndarray\n"
  19677. " Value of the Faddeeva function\n"
  19678. "\n"
  19679. "See Also\n"
  19680. "--------\n"
  19681. "dawsn, erf, erfc, erfcx, erfi\n"
  19682. "\n"
  19683. "References\n"
  19684. "----------\n"
  19685. ".. [1] Steven G. Johnson, Faddeeva W function implementation.\n"
  19686. " http://ab-initio.mit.edu/Faddeeva\n"
  19687. "\n"
  19688. "Examples\n"
  19689. "--------\n"
  19690. ">>> import numpy as np\n"
  19691. ">>> from scipy import special\n"
  19692. ">>> import matplotlib.pyplot as plt\n"
  19693. "\n"
  19694. ">>> x = np.linspace(-3, 3)\n"
  19695. ">>> z = special.wofz(x)\n"
  19696. "\n"
  19697. ">>> plt.plot(x, z.real, label='wofz(x).real')\n"
  19698. ">>> plt.plot(x, z.imag, label='wofz(x).imag')\n"
  19699. ">>> plt.xlabel('$x$')\n"
  19700. ">>> plt.legend(framealpha=1, shadow=True)\n"
  19701. ">>> plt.grid(alpha=0.25)\n"
  19702. ">>> plt.show()")
  19703. ufunc_wofz_loops[0] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  19704. ufunc_wofz_loops[1] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  19705. ufunc_wofz_types[0] = <char>NPY_CFLOAT
  19706. ufunc_wofz_types[1] = <char>NPY_CFLOAT
  19707. ufunc_wofz_types[2] = <char>NPY_CDOUBLE
  19708. ufunc_wofz_types[3] = <char>NPY_CDOUBLE
  19709. ufunc_wofz_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_w
  19710. ufunc_wofz_ptr[2*0+1] = <void*>(<char*>"wofz")
  19711. ufunc_wofz_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_faddeeva_w
  19712. ufunc_wofz_ptr[2*1+1] = <void*>(<char*>"wofz")
  19713. ufunc_wofz_data[0] = &ufunc_wofz_ptr[2*0]
  19714. ufunc_wofz_data[1] = &ufunc_wofz_ptr[2*1]
  19715. wofz = np.PyUFunc_FromFuncAndData(ufunc_wofz_loops, ufunc_wofz_data, ufunc_wofz_types, 2, 1, 1, 0, "wofz", ufunc_wofz_doc, 0)
  19716. cdef np.PyUFuncGenericFunction ufunc_wright_bessel_loops[2]
  19717. cdef void *ufunc_wright_bessel_ptr[4]
  19718. cdef void *ufunc_wright_bessel_data[2]
  19719. cdef char ufunc_wright_bessel_types[8]
  19720. cdef char *ufunc_wright_bessel_doc = (
  19721. "wright_bessel(a, b, x, out=None)\n"
  19722. "\n"
  19723. "Wright's generalized Bessel function.\n"
  19724. "\n"
  19725. "Wright's generalized Bessel function is an entire function and defined as\n"
  19726. "\n"
  19727. ".. math:: \\Phi(a, b; x) = \\sum_{k=0}^\\infty \\frac{x^k}{k! \\Gamma(a k + b)}\n"
  19728. "\n"
  19729. "See also [1].\n"
  19730. "\n"
  19731. "Parameters\n"
  19732. "----------\n"
  19733. "a : array_like of float\n"
  19734. " a >= 0\n"
  19735. "b : array_like of float\n"
  19736. " b >= 0\n"
  19737. "x : array_like of float\n"
  19738. " x >= 0\n"
  19739. "out : ndarray, optional\n"
  19740. " Optional output array for the function results\n"
  19741. "\n"
  19742. "Returns\n"
  19743. "-------\n"
  19744. "scalar or ndarray\n"
  19745. " Value of the Wright's generalized Bessel function\n"
  19746. "\n"
  19747. "Notes\n"
  19748. "-----\n"
  19749. "Due to the compexity of the function with its three parameters, only\n"
  19750. "non-negative arguments are implemented.\n"
  19751. "\n"
  19752. "Examples\n"
  19753. "--------\n"
  19754. ">>> from scipy.special import wright_bessel\n"
  19755. ">>> a, b, x = 1.5, 1.1, 2.5\n"
  19756. ">>> wright_bessel(a, b-1, x)\n"
  19757. "4.5314465939443025\n"
  19758. "\n"
  19759. "Now, let us verify the relation\n"
  19760. "\n"
  19761. ".. math:: \\Phi(a, b-1; x) = a x \\Phi(a, b+a; x) + (b-1) \\Phi(a, b; x)\n"
  19762. "\n"
  19763. ">>> a * x * wright_bessel(a, b+a, x) + (b-1) * wright_bessel(a, b, x)\n"
  19764. "4.5314465939443025\n"
  19765. "\n"
  19766. "References\n"
  19767. "----------\n"
  19768. ".. [1] Digital Library of Mathematical Functions, 10.46.\n"
  19769. " https://dlmf.nist.gov/10.46.E1")
  19770. ufunc_wright_bessel_loops[0] = <np.PyUFuncGenericFunction>loop_d_ddd__As_fff_f
  19771. ufunc_wright_bessel_loops[1] = <np.PyUFuncGenericFunction>loop_d_ddd__As_ddd_d
  19772. ufunc_wright_bessel_types[0] = <char>NPY_FLOAT
  19773. ufunc_wright_bessel_types[1] = <char>NPY_FLOAT
  19774. ufunc_wright_bessel_types[2] = <char>NPY_FLOAT
  19775. ufunc_wright_bessel_types[3] = <char>NPY_FLOAT
  19776. ufunc_wright_bessel_types[4] = <char>NPY_DOUBLE
  19777. ufunc_wright_bessel_types[5] = <char>NPY_DOUBLE
  19778. ufunc_wright_bessel_types[6] = <char>NPY_DOUBLE
  19779. ufunc_wright_bessel_types[7] = <char>NPY_DOUBLE
  19780. ufunc_wright_bessel_ptr[2*0] = <void*>_func_wright_bessel_scalar
  19781. ufunc_wright_bessel_ptr[2*0+1] = <void*>(<char*>"wright_bessel")
  19782. ufunc_wright_bessel_ptr[2*1] = <void*>_func_wright_bessel_scalar
  19783. ufunc_wright_bessel_ptr[2*1+1] = <void*>(<char*>"wright_bessel")
  19784. ufunc_wright_bessel_data[0] = &ufunc_wright_bessel_ptr[2*0]
  19785. ufunc_wright_bessel_data[1] = &ufunc_wright_bessel_ptr[2*1]
  19786. wright_bessel = np.PyUFunc_FromFuncAndData(ufunc_wright_bessel_loops, ufunc_wright_bessel_data, ufunc_wright_bessel_types, 2, 3, 1, 0, "wright_bessel", ufunc_wright_bessel_doc, 0)
  19787. cdef np.PyUFuncGenericFunction ufunc_wrightomega_loops[4]
  19788. cdef void *ufunc_wrightomega_ptr[8]
  19789. cdef void *ufunc_wrightomega_data[4]
  19790. cdef char ufunc_wrightomega_types[8]
  19791. cdef char *ufunc_wrightomega_doc = (
  19792. "wrightomega(z, out=None)\n"
  19793. "\n"
  19794. "Wright Omega function.\n"
  19795. "\n"
  19796. "Defined as the solution to\n"
  19797. "\n"
  19798. ".. math::\n"
  19799. "\n"
  19800. " \\omega + \\log(\\omega) = z\n"
  19801. "\n"
  19802. "where :math:`\\log` is the principal branch of the complex logarithm.\n"
  19803. "\n"
  19804. "Parameters\n"
  19805. "----------\n"
  19806. "z : array_like\n"
  19807. " Points at which to evaluate the Wright Omega function\n"
  19808. "out : ndarray, optional\n"
  19809. " Optional output array for the function values\n"
  19810. "\n"
  19811. "Returns\n"
  19812. "-------\n"
  19813. "omega : scalar or ndarray\n"
  19814. " Values of the Wright Omega function\n"
  19815. "\n"
  19816. "Notes\n"
  19817. "-----\n"
  19818. ".. versionadded:: 0.19.0\n"
  19819. "\n"
  19820. "The function can also be defined as\n"
  19821. "\n"
  19822. ".. math::\n"
  19823. "\n"
  19824. " \\omega(z) = W_{K(z)}(e^z)\n"
  19825. "\n"
  19826. "where :math:`K(z) = \\lceil (\\Im(z) - \\pi)/(2\\pi) \\rceil` is the\n"
  19827. "unwinding number and :math:`W` is the Lambert W function.\n"
  19828. "\n"
  19829. "The implementation here is taken from [1]_.\n"
  19830. "\n"
  19831. "See Also\n"
  19832. "--------\n"
  19833. "lambertw : The Lambert W function\n"
  19834. "\n"
  19835. "References\n"
  19836. "----------\n"
  19837. ".. [1] Lawrence, Corless, and Jeffrey, \"Algorithm 917: Complex\n"
  19838. " Double-Precision Evaluation of the Wright :math:`\\omega`\n"
  19839. " Function.\" ACM Transactions on Mathematical Software,\n"
  19840. " 2012. :doi:`10.1145/2168773.2168779`.\n"
  19841. "\n"
  19842. "Examples\n"
  19843. "--------\n"
  19844. ">>> import numpy as np\n"
  19845. ">>> from scipy.special import wrightomega, lambertw\n"
  19846. "\n"
  19847. ">>> wrightomega([-2, -1, 0, 1, 2])\n"
  19848. "array([0.12002824, 0.27846454, 0.56714329, 1. , 1.5571456 ])\n"
  19849. "\n"
  19850. "Complex input:\n"
  19851. "\n"
  19852. ">>> wrightomega(3 + 5j)\n"
  19853. "(1.5804428632097158+3.8213626783287937j)\n"
  19854. "\n"
  19855. "Verify that ``wrightomega(z)`` satisfies ``w + log(w) = z``:\n"
  19856. "\n"
  19857. ">>> w = -5 + 4j\n"
  19858. ">>> wrightomega(w + np.log(w))\n"
  19859. "(-5+4j)\n"
  19860. "\n"
  19861. "Verify the connection to ``lambertw``:\n"
  19862. "\n"
  19863. ">>> z = 0.5 + 3j\n"
  19864. ">>> wrightomega(z)\n"
  19865. "(0.0966015889280649+1.4937828458191993j)\n"
  19866. ">>> lambertw(np.exp(z))\n"
  19867. "(0.09660158892806493+1.4937828458191993j)\n"
  19868. "\n"
  19869. ">>> z = 0.5 + 4j\n"
  19870. ">>> wrightomega(z)\n"
  19871. "(-0.3362123489037213+2.282986001579032j)\n"
  19872. ">>> lambertw(np.exp(z), k=1)\n"
  19873. "(-0.33621234890372115+2.282986001579032j)")
  19874. ufunc_wrightomega_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  19875. ufunc_wrightomega_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  19876. ufunc_wrightomega_loops[2] = <np.PyUFuncGenericFunction>loop_D_D__As_F_F
  19877. ufunc_wrightomega_loops[3] = <np.PyUFuncGenericFunction>loop_D_D__As_D_D
  19878. ufunc_wrightomega_types[0] = <char>NPY_FLOAT
  19879. ufunc_wrightomega_types[1] = <char>NPY_FLOAT
  19880. ufunc_wrightomega_types[2] = <char>NPY_DOUBLE
  19881. ufunc_wrightomega_types[3] = <char>NPY_DOUBLE
  19882. ufunc_wrightomega_types[4] = <char>NPY_CFLOAT
  19883. ufunc_wrightomega_types[5] = <char>NPY_CFLOAT
  19884. ufunc_wrightomega_types[6] = <char>NPY_CDOUBLE
  19885. ufunc_wrightomega_types[7] = <char>NPY_CDOUBLE
  19886. ufunc_wrightomega_ptr[2*0] = <void*>scipy.special._ufuncs_cxx._export_wrightomega_real
  19887. ufunc_wrightomega_ptr[2*0+1] = <void*>(<char*>"wrightomega")
  19888. ufunc_wrightomega_ptr[2*1] = <void*>scipy.special._ufuncs_cxx._export_wrightomega_real
  19889. ufunc_wrightomega_ptr[2*1+1] = <void*>(<char*>"wrightomega")
  19890. ufunc_wrightomega_ptr[2*2] = <void*>scipy.special._ufuncs_cxx._export_wrightomega
  19891. ufunc_wrightomega_ptr[2*2+1] = <void*>(<char*>"wrightomega")
  19892. ufunc_wrightomega_ptr[2*3] = <void*>scipy.special._ufuncs_cxx._export_wrightomega
  19893. ufunc_wrightomega_ptr[2*3+1] = <void*>(<char*>"wrightomega")
  19894. ufunc_wrightomega_data[0] = &ufunc_wrightomega_ptr[2*0]
  19895. ufunc_wrightomega_data[1] = &ufunc_wrightomega_ptr[2*1]
  19896. ufunc_wrightomega_data[2] = &ufunc_wrightomega_ptr[2*2]
  19897. ufunc_wrightomega_data[3] = &ufunc_wrightomega_ptr[2*3]
  19898. wrightomega = np.PyUFunc_FromFuncAndData(ufunc_wrightomega_loops, ufunc_wrightomega_data, ufunc_wrightomega_types, 4, 1, 1, 0, "wrightomega", ufunc_wrightomega_doc, 0)
  19899. cdef np.PyUFuncGenericFunction ufunc_xlog1py_loops[4]
  19900. cdef void *ufunc_xlog1py_ptr[8]
  19901. cdef void *ufunc_xlog1py_data[4]
  19902. cdef char ufunc_xlog1py_types[12]
  19903. cdef char *ufunc_xlog1py_doc = (
  19904. "xlog1py(x, y, out=None)\n"
  19905. "\n"
  19906. "Compute ``x*log1p(y)`` so that the result is 0 if ``x = 0``.\n"
  19907. "\n"
  19908. "Parameters\n"
  19909. "----------\n"
  19910. "x : array_like\n"
  19911. " Multiplier\n"
  19912. "y : array_like\n"
  19913. " Argument\n"
  19914. "out : ndarray, optional\n"
  19915. " Optional output array for the function results\n"
  19916. "\n"
  19917. "Returns\n"
  19918. "-------\n"
  19919. "z : scalar or ndarray\n"
  19920. " Computed x*log1p(y)\n"
  19921. "\n"
  19922. "Notes\n"
  19923. "-----\n"
  19924. "\n"
  19925. ".. versionadded:: 0.13.0")
  19926. ufunc_xlog1py_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19927. ufunc_xlog1py_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19928. ufunc_xlog1py_loops[2] = <np.PyUFuncGenericFunction>loop_D_DD__As_FF_F
  19929. ufunc_xlog1py_loops[3] = <np.PyUFuncGenericFunction>loop_D_DD__As_DD_D
  19930. ufunc_xlog1py_types[0] = <char>NPY_FLOAT
  19931. ufunc_xlog1py_types[1] = <char>NPY_FLOAT
  19932. ufunc_xlog1py_types[2] = <char>NPY_FLOAT
  19933. ufunc_xlog1py_types[3] = <char>NPY_DOUBLE
  19934. ufunc_xlog1py_types[4] = <char>NPY_DOUBLE
  19935. ufunc_xlog1py_types[5] = <char>NPY_DOUBLE
  19936. ufunc_xlog1py_types[6] = <char>NPY_CFLOAT
  19937. ufunc_xlog1py_types[7] = <char>NPY_CFLOAT
  19938. ufunc_xlog1py_types[8] = <char>NPY_CFLOAT
  19939. ufunc_xlog1py_types[9] = <char>NPY_CDOUBLE
  19940. ufunc_xlog1py_types[10] = <char>NPY_CDOUBLE
  19941. ufunc_xlog1py_types[11] = <char>NPY_CDOUBLE
  19942. ufunc_xlog1py_ptr[2*0] = <void*>_func_xlog1py[double]
  19943. ufunc_xlog1py_ptr[2*0+1] = <void*>(<char*>"xlog1py")
  19944. ufunc_xlog1py_ptr[2*1] = <void*>_func_xlog1py[double]
  19945. ufunc_xlog1py_ptr[2*1+1] = <void*>(<char*>"xlog1py")
  19946. ufunc_xlog1py_ptr[2*2] = <void*>_func_xlog1py[double_complex]
  19947. ufunc_xlog1py_ptr[2*2+1] = <void*>(<char*>"xlog1py")
  19948. ufunc_xlog1py_ptr[2*3] = <void*>_func_xlog1py[double_complex]
  19949. ufunc_xlog1py_ptr[2*3+1] = <void*>(<char*>"xlog1py")
  19950. ufunc_xlog1py_data[0] = &ufunc_xlog1py_ptr[2*0]
  19951. ufunc_xlog1py_data[1] = &ufunc_xlog1py_ptr[2*1]
  19952. ufunc_xlog1py_data[2] = &ufunc_xlog1py_ptr[2*2]
  19953. ufunc_xlog1py_data[3] = &ufunc_xlog1py_ptr[2*3]
  19954. xlog1py = np.PyUFunc_FromFuncAndData(ufunc_xlog1py_loops, ufunc_xlog1py_data, ufunc_xlog1py_types, 4, 2, 1, 0, "xlog1py", ufunc_xlog1py_doc, 0)
  19955. cdef np.PyUFuncGenericFunction ufunc_xlogy_loops[4]
  19956. cdef void *ufunc_xlogy_ptr[8]
  19957. cdef void *ufunc_xlogy_data[4]
  19958. cdef char ufunc_xlogy_types[12]
  19959. cdef char *ufunc_xlogy_doc = (
  19960. "xlogy(x, y, out=None)\n"
  19961. "\n"
  19962. "Compute ``x*log(y)`` so that the result is 0 if ``x = 0``.\n"
  19963. "\n"
  19964. "Parameters\n"
  19965. "----------\n"
  19966. "x : array_like\n"
  19967. " Multiplier\n"
  19968. "y : array_like\n"
  19969. " Argument\n"
  19970. "out : ndarray, optional\n"
  19971. " Optional output array for the function results\n"
  19972. "\n"
  19973. "Returns\n"
  19974. "-------\n"
  19975. "z : scalar or ndarray\n"
  19976. " Computed x*log(y)\n"
  19977. "\n"
  19978. "Notes\n"
  19979. "-----\n"
  19980. "\n"
  19981. ".. versionadded:: 0.13.0")
  19982. ufunc_xlogy_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  19983. ufunc_xlogy_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  19984. ufunc_xlogy_loops[2] = <np.PyUFuncGenericFunction>loop_D_DD__As_FF_F
  19985. ufunc_xlogy_loops[3] = <np.PyUFuncGenericFunction>loop_D_DD__As_DD_D
  19986. ufunc_xlogy_types[0] = <char>NPY_FLOAT
  19987. ufunc_xlogy_types[1] = <char>NPY_FLOAT
  19988. ufunc_xlogy_types[2] = <char>NPY_FLOAT
  19989. ufunc_xlogy_types[3] = <char>NPY_DOUBLE
  19990. ufunc_xlogy_types[4] = <char>NPY_DOUBLE
  19991. ufunc_xlogy_types[5] = <char>NPY_DOUBLE
  19992. ufunc_xlogy_types[6] = <char>NPY_CFLOAT
  19993. ufunc_xlogy_types[7] = <char>NPY_CFLOAT
  19994. ufunc_xlogy_types[8] = <char>NPY_CFLOAT
  19995. ufunc_xlogy_types[9] = <char>NPY_CDOUBLE
  19996. ufunc_xlogy_types[10] = <char>NPY_CDOUBLE
  19997. ufunc_xlogy_types[11] = <char>NPY_CDOUBLE
  19998. ufunc_xlogy_ptr[2*0] = <void*>_func_xlogy[double]
  19999. ufunc_xlogy_ptr[2*0+1] = <void*>(<char*>"xlogy")
  20000. ufunc_xlogy_ptr[2*1] = <void*>_func_xlogy[double]
  20001. ufunc_xlogy_ptr[2*1+1] = <void*>(<char*>"xlogy")
  20002. ufunc_xlogy_ptr[2*2] = <void*>_func_xlogy[double_complex]
  20003. ufunc_xlogy_ptr[2*2+1] = <void*>(<char*>"xlogy")
  20004. ufunc_xlogy_ptr[2*3] = <void*>_func_xlogy[double_complex]
  20005. ufunc_xlogy_ptr[2*3+1] = <void*>(<char*>"xlogy")
  20006. ufunc_xlogy_data[0] = &ufunc_xlogy_ptr[2*0]
  20007. ufunc_xlogy_data[1] = &ufunc_xlogy_ptr[2*1]
  20008. ufunc_xlogy_data[2] = &ufunc_xlogy_ptr[2*2]
  20009. ufunc_xlogy_data[3] = &ufunc_xlogy_ptr[2*3]
  20010. xlogy = np.PyUFunc_FromFuncAndData(ufunc_xlogy_loops, ufunc_xlogy_data, ufunc_xlogy_types, 4, 2, 1, 0, "xlogy", ufunc_xlogy_doc, 0)
  20011. cdef np.PyUFuncGenericFunction ufunc_y0_loops[2]
  20012. cdef void *ufunc_y0_ptr[4]
  20013. cdef void *ufunc_y0_data[2]
  20014. cdef char ufunc_y0_types[4]
  20015. cdef char *ufunc_y0_doc = (
  20016. "y0(x, out=None)\n"
  20017. "\n"
  20018. "Bessel function of the second kind of order 0.\n"
  20019. "\n"
  20020. "Parameters\n"
  20021. "----------\n"
  20022. "x : array_like\n"
  20023. " Argument (float).\n"
  20024. "out : ndarray, optional\n"
  20025. " Optional output array for the function results\n"
  20026. "\n"
  20027. "Returns\n"
  20028. "-------\n"
  20029. "Y : scalar or ndarray\n"
  20030. " Value of the Bessel function of the second kind of order 0 at `x`.\n"
  20031. "\n"
  20032. "Notes\n"
  20033. "-----\n"
  20034. "\n"
  20035. "The domain is divided into the intervals [0, 5] and (5, infinity). In the\n"
  20036. "first interval a rational approximation :math:`R(x)` is employed to\n"
  20037. "compute,\n"
  20038. "\n"
  20039. ".. math::\n"
  20040. "\n"
  20041. " Y_0(x) = R(x) + \\frac{2 \\log(x) J_0(x)}{\\pi},\n"
  20042. "\n"
  20043. "where :math:`J_0` is the Bessel function of the first kind of order 0.\n"
  20044. "\n"
  20045. "In the second interval, the Hankel asymptotic expansion is employed with\n"
  20046. "two rational functions of degree 6/6 and 7/7.\n"
  20047. "\n"
  20048. "This function is a wrapper for the Cephes [1]_ routine `y0`.\n"
  20049. "\n"
  20050. "See also\n"
  20051. "--------\n"
  20052. "j0: Bessel function of the first kind of order 0\n"
  20053. "yv: Bessel function of the first kind\n"
  20054. "\n"
  20055. "References\n"
  20056. "----------\n"
  20057. ".. [1] Cephes Mathematical Functions Library,\n"
  20058. " http://www.netlib.org/cephes/\n"
  20059. "\n"
  20060. "Examples\n"
  20061. "--------\n"
  20062. "Calculate the function at one point:\n"
  20063. "\n"
  20064. ">>> from scipy.special import y0\n"
  20065. ">>> y0(1.)\n"
  20066. "0.08825696421567697\n"
  20067. "\n"
  20068. "Calculate at several points:\n"
  20069. "\n"
  20070. ">>> import numpy as np\n"
  20071. ">>> y0(np.array([0.5, 2., 3.]))\n"
  20072. "array([-0.44451873, 0.51037567, 0.37685001])\n"
  20073. "\n"
  20074. "Plot the function from 0 to 10.\n"
  20075. "\n"
  20076. ">>> import matplotlib.pyplot as plt\n"
  20077. ">>> fig, ax = plt.subplots()\n"
  20078. ">>> x = np.linspace(0., 10., 1000)\n"
  20079. ">>> y = y0(x)\n"
  20080. ">>> ax.plot(x, y)\n"
  20081. ">>> plt.show()")
  20082. ufunc_y0_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  20083. ufunc_y0_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  20084. ufunc_y0_types[0] = <char>NPY_FLOAT
  20085. ufunc_y0_types[1] = <char>NPY_FLOAT
  20086. ufunc_y0_types[2] = <char>NPY_DOUBLE
  20087. ufunc_y0_types[3] = <char>NPY_DOUBLE
  20088. ufunc_y0_ptr[2*0] = <void*>_func_y0
  20089. ufunc_y0_ptr[2*0+1] = <void*>(<char*>"y0")
  20090. ufunc_y0_ptr[2*1] = <void*>_func_y0
  20091. ufunc_y0_ptr[2*1+1] = <void*>(<char*>"y0")
  20092. ufunc_y0_data[0] = &ufunc_y0_ptr[2*0]
  20093. ufunc_y0_data[1] = &ufunc_y0_ptr[2*1]
  20094. y0 = np.PyUFunc_FromFuncAndData(ufunc_y0_loops, ufunc_y0_data, ufunc_y0_types, 2, 1, 1, 0, "y0", ufunc_y0_doc, 0)
  20095. cdef np.PyUFuncGenericFunction ufunc_y1_loops[2]
  20096. cdef void *ufunc_y1_ptr[4]
  20097. cdef void *ufunc_y1_data[2]
  20098. cdef char ufunc_y1_types[4]
  20099. cdef char *ufunc_y1_doc = (
  20100. "y1(x, out=None)\n"
  20101. "\n"
  20102. "Bessel function of the second kind of order 1.\n"
  20103. "\n"
  20104. "Parameters\n"
  20105. "----------\n"
  20106. "x : array_like\n"
  20107. " Argument (float).\n"
  20108. "out : ndarray, optional\n"
  20109. " Optional output array for the function results\n"
  20110. "\n"
  20111. "Returns\n"
  20112. "-------\n"
  20113. "Y : scalar or ndarray\n"
  20114. " Value of the Bessel function of the second kind of order 1 at `x`.\n"
  20115. "\n"
  20116. "Notes\n"
  20117. "-----\n"
  20118. "\n"
  20119. "The domain is divided into the intervals [0, 8] and (8, infinity). In the\n"
  20120. "first interval a 25 term Chebyshev expansion is used, and computing\n"
  20121. ":math:`J_1` (the Bessel function of the first kind) is required. In the\n"
  20122. "second, the asymptotic trigonometric representation is employed using two\n"
  20123. "rational functions of degree 5/5.\n"
  20124. "\n"
  20125. "This function is a wrapper for the Cephes [1]_ routine `y1`.\n"
  20126. "\n"
  20127. "See also\n"
  20128. "--------\n"
  20129. "j1: Bessel function of the first kind of order 1\n"
  20130. "yn: Bessel function of the second kind\n"
  20131. "yv: Bessel function of the second kind\n"
  20132. "\n"
  20133. "References\n"
  20134. "----------\n"
  20135. ".. [1] Cephes Mathematical Functions Library,\n"
  20136. " http://www.netlib.org/cephes/\n"
  20137. "\n"
  20138. "Examples\n"
  20139. "--------\n"
  20140. "Calculate the function at one point:\n"
  20141. "\n"
  20142. ">>> from scipy.special import y1\n"
  20143. ">>> y1(1.)\n"
  20144. "-0.7812128213002888\n"
  20145. "\n"
  20146. "Calculate at several points:\n"
  20147. "\n"
  20148. ">>> import numpy as np\n"
  20149. ">>> y1(np.array([0.5, 2., 3.]))\n"
  20150. "array([-1.47147239, -0.10703243, 0.32467442])\n"
  20151. "\n"
  20152. "Plot the function from 0 to 10.\n"
  20153. "\n"
  20154. ">>> import matplotlib.pyplot as plt\n"
  20155. ">>> fig, ax = plt.subplots()\n"
  20156. ">>> x = np.linspace(0., 10., 1000)\n"
  20157. ">>> y = y1(x)\n"
  20158. ">>> ax.plot(x, y)\n"
  20159. ">>> plt.show()")
  20160. ufunc_y1_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  20161. ufunc_y1_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  20162. ufunc_y1_types[0] = <char>NPY_FLOAT
  20163. ufunc_y1_types[1] = <char>NPY_FLOAT
  20164. ufunc_y1_types[2] = <char>NPY_DOUBLE
  20165. ufunc_y1_types[3] = <char>NPY_DOUBLE
  20166. ufunc_y1_ptr[2*0] = <void*>_func_y1
  20167. ufunc_y1_ptr[2*0+1] = <void*>(<char*>"y1")
  20168. ufunc_y1_ptr[2*1] = <void*>_func_y1
  20169. ufunc_y1_ptr[2*1+1] = <void*>(<char*>"y1")
  20170. ufunc_y1_data[0] = &ufunc_y1_ptr[2*0]
  20171. ufunc_y1_data[1] = &ufunc_y1_ptr[2*1]
  20172. y1 = np.PyUFunc_FromFuncAndData(ufunc_y1_loops, ufunc_y1_data, ufunc_y1_types, 2, 1, 1, 0, "y1", ufunc_y1_doc, 0)
  20173. cdef np.PyUFuncGenericFunction ufunc_yn_loops[3]
  20174. cdef void *ufunc_yn_ptr[6]
  20175. cdef void *ufunc_yn_data[3]
  20176. cdef char ufunc_yn_types[9]
  20177. cdef char *ufunc_yn_doc = (
  20178. "yn(n, x, out=None)\n"
  20179. "\n"
  20180. "Bessel function of the second kind of integer order and real argument.\n"
  20181. "\n"
  20182. "Parameters\n"
  20183. "----------\n"
  20184. "n : array_like\n"
  20185. " Order (integer).\n"
  20186. "x : array_like\n"
  20187. " Argument (float).\n"
  20188. "out : ndarray, optional\n"
  20189. " Optional output array for the function results\n"
  20190. "\n"
  20191. "Returns\n"
  20192. "-------\n"
  20193. "Y : scalar or ndarray\n"
  20194. " Value of the Bessel function, :math:`Y_n(x)`.\n"
  20195. "\n"
  20196. "Notes\n"
  20197. "-----\n"
  20198. "Wrapper for the Cephes [1]_ routine `yn`.\n"
  20199. "\n"
  20200. "The function is evaluated by forward recurrence on `n`, starting with\n"
  20201. "values computed by the Cephes routines `y0` and `y1`. If `n = 0` or 1,\n"
  20202. "the routine for `y0` or `y1` is called directly.\n"
  20203. "\n"
  20204. "See also\n"
  20205. "--------\n"
  20206. "yv : For real order and real or complex argument.\n"
  20207. "y0: faster implementation of this function for order 0\n"
  20208. "y1: faster implementation of this function for order 1\n"
  20209. "\n"
  20210. "References\n"
  20211. "----------\n"
  20212. ".. [1] Cephes Mathematical Functions Library,\n"
  20213. " http://www.netlib.org/cephes/\n"
  20214. "\n"
  20215. "Examples\n"
  20216. "--------\n"
  20217. "Evaluate the function of order 0 at one point.\n"
  20218. "\n"
  20219. ">>> from scipy.special import yn\n"
  20220. ">>> yn(0, 1.)\n"
  20221. "0.08825696421567697\n"
  20222. "\n"
  20223. "Evaluate the function at one point for different orders.\n"
  20224. "\n"
  20225. ">>> yn(0, 1.), yn(1, 1.), yn(2, 1.)\n"
  20226. "(0.08825696421567697, -0.7812128213002888, -1.6506826068162546)\n"
  20227. "\n"
  20228. "The evaluation for different orders can be carried out in one call by\n"
  20229. "providing a list or NumPy array as argument for the `v` parameter:\n"
  20230. "\n"
  20231. ">>> yn([0, 1, 2], 1.)\n"
  20232. "array([ 0.08825696, -0.78121282, -1.65068261])\n"
  20233. "\n"
  20234. "Evaluate the function at several points for order 0 by providing an\n"
  20235. "array for `z`.\n"
  20236. "\n"
  20237. ">>> import numpy as np\n"
  20238. ">>> points = np.array([0.5, 3., 8.])\n"
  20239. ">>> yn(0, points)\n"
  20240. "array([-0.44451873, 0.37685001, 0.22352149])\n"
  20241. "\n"
  20242. "If `z` is an array, the order parameter `v` must be broadcastable to\n"
  20243. "the correct shape if different orders shall be computed in one call.\n"
  20244. "To calculate the orders 0 and 1 for an 1D array:\n"
  20245. "\n"
  20246. ">>> orders = np.array([[0], [1]])\n"
  20247. ">>> orders.shape\n"
  20248. "(2, 1)\n"
  20249. "\n"
  20250. ">>> yn(orders, points)\n"
  20251. "array([[-0.44451873, 0.37685001, 0.22352149],\n"
  20252. " [-1.47147239, 0.32467442, -0.15806046]])\n"
  20253. "\n"
  20254. "Plot the functions of order 0 to 3 from 0 to 10.\n"
  20255. "\n"
  20256. ">>> import matplotlib.pyplot as plt\n"
  20257. ">>> fig, ax = plt.subplots()\n"
  20258. ">>> x = np.linspace(0., 10., 1000)\n"
  20259. ">>> for i in range(4):\n"
  20260. "... ax.plot(x, yn(i, x), label=f'$Y_{i!r}$')\n"
  20261. ">>> ax.set_ylim(-3, 1)\n"
  20262. ">>> ax.legend()\n"
  20263. ">>> plt.show()")
  20264. ufunc_yn_loops[0] = <np.PyUFuncGenericFunction>loop_d_id__As_ld_d
  20265. ufunc_yn_loops[1] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  20266. ufunc_yn_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  20267. ufunc_yn_types[0] = <char>NPY_LONG
  20268. ufunc_yn_types[1] = <char>NPY_DOUBLE
  20269. ufunc_yn_types[2] = <char>NPY_DOUBLE
  20270. ufunc_yn_types[3] = <char>NPY_FLOAT
  20271. ufunc_yn_types[4] = <char>NPY_FLOAT
  20272. ufunc_yn_types[5] = <char>NPY_FLOAT
  20273. ufunc_yn_types[6] = <char>NPY_DOUBLE
  20274. ufunc_yn_types[7] = <char>NPY_DOUBLE
  20275. ufunc_yn_types[8] = <char>NPY_DOUBLE
  20276. ufunc_yn_ptr[2*0] = <void*>_func_yn
  20277. ufunc_yn_ptr[2*0+1] = <void*>(<char*>"yn")
  20278. ufunc_yn_ptr[2*1] = <void*>_func_yn_unsafe
  20279. ufunc_yn_ptr[2*1+1] = <void*>(<char*>"yn")
  20280. ufunc_yn_ptr[2*2] = <void*>_func_yn_unsafe
  20281. ufunc_yn_ptr[2*2+1] = <void*>(<char*>"yn")
  20282. ufunc_yn_data[0] = &ufunc_yn_ptr[2*0]
  20283. ufunc_yn_data[1] = &ufunc_yn_ptr[2*1]
  20284. ufunc_yn_data[2] = &ufunc_yn_ptr[2*2]
  20285. yn = np.PyUFunc_FromFuncAndData(ufunc_yn_loops, ufunc_yn_data, ufunc_yn_types, 3, 2, 1, 0, "yn", ufunc_yn_doc, 0)
  20286. cdef np.PyUFuncGenericFunction ufunc_yv_loops[4]
  20287. cdef void *ufunc_yv_ptr[8]
  20288. cdef void *ufunc_yv_data[4]
  20289. cdef char ufunc_yv_types[12]
  20290. cdef char *ufunc_yv_doc = (
  20291. "yv(v, z, out=None)\n"
  20292. "\n"
  20293. "Bessel function of the second kind of real order and complex argument.\n"
  20294. "\n"
  20295. "Parameters\n"
  20296. "----------\n"
  20297. "v : array_like\n"
  20298. " Order (float).\n"
  20299. "z : array_like\n"
  20300. " Argument (float or complex).\n"
  20301. "out : ndarray, optional\n"
  20302. " Optional output array for the function results\n"
  20303. "\n"
  20304. "Returns\n"
  20305. "-------\n"
  20306. "Y : scalar or ndarray\n"
  20307. " Value of the Bessel function of the second kind, :math:`Y_v(x)`.\n"
  20308. "\n"
  20309. "Notes\n"
  20310. "-----\n"
  20311. "For positive `v` values, the computation is carried out using the\n"
  20312. "AMOS [1]_ `zbesy` routine, which exploits the connection to the Hankel\n"
  20313. "Bessel functions :math:`H_v^{(1)}` and :math:`H_v^{(2)}`,\n"
  20314. "\n"
  20315. ".. math:: Y_v(z) = \\frac{1}{2\\imath} (H_v^{(1)} - H_v^{(2)}).\n"
  20316. "\n"
  20317. "For negative `v` values the formula,\n"
  20318. "\n"
  20319. ".. math:: Y_{-v}(z) = Y_v(z) \\cos(\\pi v) + J_v(z) \\sin(\\pi v)\n"
  20320. "\n"
  20321. "is used, where :math:`J_v(z)` is the Bessel function of the first kind,\n"
  20322. "computed using the AMOS routine `zbesj`. Note that the second term is\n"
  20323. "exactly zero for integer `v`; to improve accuracy the second term is\n"
  20324. "explicitly omitted for `v` values such that `v = floor(v)`.\n"
  20325. "\n"
  20326. "See also\n"
  20327. "--------\n"
  20328. "yve : :math:`Y_v` with leading exponential behavior stripped off.\n"
  20329. "y0: faster implementation of this function for order 0\n"
  20330. "y1: faster implementation of this function for order 1\n"
  20331. "\n"
  20332. "References\n"
  20333. "----------\n"
  20334. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  20335. " of a Complex Argument and Nonnegative Order\",\n"
  20336. " http://netlib.org/amos/\n"
  20337. "\n"
  20338. "Examples\n"
  20339. "--------\n"
  20340. "Evaluate the function of order 0 at one point.\n"
  20341. "\n"
  20342. ">>> from scipy.special import yv\n"
  20343. ">>> yv(0, 1.)\n"
  20344. "0.088256964215677\n"
  20345. "\n"
  20346. "Evaluate the function at one point for different orders.\n"
  20347. "\n"
  20348. ">>> yv(0, 1.), yv(1, 1.), yv(1.5, 1.)\n"
  20349. "(0.088256964215677, -0.7812128213002889, -1.102495575160179)\n"
  20350. "\n"
  20351. "The evaluation for different orders can be carried out in one call by\n"
  20352. "providing a list or NumPy array as argument for the `v` parameter:\n"
  20353. "\n"
  20354. ">>> yv([0, 1, 1.5], 1.)\n"
  20355. "array([ 0.08825696, -0.78121282, -1.10249558])\n"
  20356. "\n"
  20357. "Evaluate the function at several points for order 0 by providing an\n"
  20358. "array for `z`.\n"
  20359. "\n"
  20360. ">>> import numpy as np\n"
  20361. ">>> points = np.array([0.5, 3., 8.])\n"
  20362. ">>> yv(0, points)\n"
  20363. "array([-0.44451873, 0.37685001, 0.22352149])\n"
  20364. "\n"
  20365. "If `z` is an array, the order parameter `v` must be broadcastable to\n"
  20366. "the correct shape if different orders shall be computed in one call.\n"
  20367. "To calculate the orders 0 and 1 for an 1D array:\n"
  20368. "\n"
  20369. ">>> orders = np.array([[0], [1]])\n"
  20370. ">>> orders.shape\n"
  20371. "(2, 1)\n"
  20372. "\n"
  20373. ">>> yv(orders, points)\n"
  20374. "array([[-0.44451873, 0.37685001, 0.22352149],\n"
  20375. " [-1.47147239, 0.32467442, -0.15806046]])\n"
  20376. "\n"
  20377. "Plot the functions of order 0 to 3 from 0 to 10.\n"
  20378. "\n"
  20379. ">>> import matplotlib.pyplot as plt\n"
  20380. ">>> fig, ax = plt.subplots()\n"
  20381. ">>> x = np.linspace(0., 10., 1000)\n"
  20382. ">>> for i in range(4):\n"
  20383. "... ax.plot(x, yv(i, x), label=f'$Y_{i!r}$')\n"
  20384. ">>> ax.set_ylim(-3, 1)\n"
  20385. ">>> ax.legend()\n"
  20386. ">>> plt.show()")
  20387. ufunc_yv_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  20388. ufunc_yv_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  20389. ufunc_yv_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  20390. ufunc_yv_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  20391. ufunc_yv_types[0] = <char>NPY_FLOAT
  20392. ufunc_yv_types[1] = <char>NPY_FLOAT
  20393. ufunc_yv_types[2] = <char>NPY_FLOAT
  20394. ufunc_yv_types[3] = <char>NPY_FLOAT
  20395. ufunc_yv_types[4] = <char>NPY_CFLOAT
  20396. ufunc_yv_types[5] = <char>NPY_CFLOAT
  20397. ufunc_yv_types[6] = <char>NPY_DOUBLE
  20398. ufunc_yv_types[7] = <char>NPY_DOUBLE
  20399. ufunc_yv_types[8] = <char>NPY_DOUBLE
  20400. ufunc_yv_types[9] = <char>NPY_DOUBLE
  20401. ufunc_yv_types[10] = <char>NPY_CDOUBLE
  20402. ufunc_yv_types[11] = <char>NPY_CDOUBLE
  20403. ufunc_yv_ptr[2*0] = <void*>_func_cbesy_wrap_real
  20404. ufunc_yv_ptr[2*0+1] = <void*>(<char*>"yv")
  20405. ufunc_yv_ptr[2*1] = <void*>_func_cbesy_wrap
  20406. ufunc_yv_ptr[2*1+1] = <void*>(<char*>"yv")
  20407. ufunc_yv_ptr[2*2] = <void*>_func_cbesy_wrap_real
  20408. ufunc_yv_ptr[2*2+1] = <void*>(<char*>"yv")
  20409. ufunc_yv_ptr[2*3] = <void*>_func_cbesy_wrap
  20410. ufunc_yv_ptr[2*3+1] = <void*>(<char*>"yv")
  20411. ufunc_yv_data[0] = &ufunc_yv_ptr[2*0]
  20412. ufunc_yv_data[1] = &ufunc_yv_ptr[2*1]
  20413. ufunc_yv_data[2] = &ufunc_yv_ptr[2*2]
  20414. ufunc_yv_data[3] = &ufunc_yv_ptr[2*3]
  20415. yv = np.PyUFunc_FromFuncAndData(ufunc_yv_loops, ufunc_yv_data, ufunc_yv_types, 4, 2, 1, 0, "yv", ufunc_yv_doc, 0)
  20416. cdef np.PyUFuncGenericFunction ufunc_yve_loops[4]
  20417. cdef void *ufunc_yve_ptr[8]
  20418. cdef void *ufunc_yve_data[4]
  20419. cdef char ufunc_yve_types[12]
  20420. cdef char *ufunc_yve_doc = (
  20421. "yve(v, z, out=None)\n"
  20422. "\n"
  20423. "Exponentially scaled Bessel function of the second kind of real order.\n"
  20424. "\n"
  20425. "Returns the exponentially scaled Bessel function of the second\n"
  20426. "kind of real order `v` at complex `z`::\n"
  20427. "\n"
  20428. " yve(v, z) = yv(v, z) * exp(-abs(z.imag))\n"
  20429. "\n"
  20430. "Parameters\n"
  20431. "----------\n"
  20432. "v : array_like\n"
  20433. " Order (float).\n"
  20434. "z : array_like\n"
  20435. " Argument (float or complex).\n"
  20436. "out : ndarray, optional\n"
  20437. " Optional output array for the function results\n"
  20438. "\n"
  20439. "Returns\n"
  20440. "-------\n"
  20441. "Y : scalar or ndarray\n"
  20442. " Value of the exponentially scaled Bessel function.\n"
  20443. "\n"
  20444. "See Also\n"
  20445. "--------\n"
  20446. "yv: Unscaled Bessel function of the second kind of real order.\n"
  20447. "\n"
  20448. "Notes\n"
  20449. "-----\n"
  20450. "For positive `v` values, the computation is carried out using the\n"
  20451. "AMOS [1]_ `zbesy` routine, which exploits the connection to the Hankel\n"
  20452. "Bessel functions :math:`H_v^{(1)}` and :math:`H_v^{(2)}`,\n"
  20453. "\n"
  20454. ".. math:: Y_v(z) = \\frac{1}{2\\imath} (H_v^{(1)} - H_v^{(2)}).\n"
  20455. "\n"
  20456. "For negative `v` values the formula,\n"
  20457. "\n"
  20458. ".. math:: Y_{-v}(z) = Y_v(z) \\cos(\\pi v) + J_v(z) \\sin(\\pi v)\n"
  20459. "\n"
  20460. "is used, where :math:`J_v(z)` is the Bessel function of the first kind,\n"
  20461. "computed using the AMOS routine `zbesj`. Note that the second term is\n"
  20462. "exactly zero for integer `v`; to improve accuracy the second term is\n"
  20463. "explicitly omitted for `v` values such that `v = floor(v)`.\n"
  20464. "\n"
  20465. "Exponentially scaled Bessel functions are useful for large `z`:\n"
  20466. "for these, the unscaled Bessel functions can easily under-or overflow.\n"
  20467. "\n"
  20468. "References\n"
  20469. "----------\n"
  20470. ".. [1] Donald E. Amos, \"AMOS, A Portable Package for Bessel Functions\n"
  20471. " of a Complex Argument and Nonnegative Order\",\n"
  20472. " http://netlib.org/amos/\n"
  20473. "\n"
  20474. "Examples\n"
  20475. "--------\n"
  20476. "Compare the output of `yv` and `yve` for large complex arguments for `z`\n"
  20477. "by computing their values for order ``v=1`` at ``z=1000j``. We see that\n"
  20478. "`yv` returns nan but `yve` returns a finite number:\n"
  20479. "\n"
  20480. ">>> import numpy as np\n"
  20481. ">>> from scipy.special import yv, yve\n"
  20482. ">>> v = 1\n"
  20483. ">>> z = 1000j\n"
  20484. ">>> yv(v, z), yve(v, z)\n"
  20485. "((nan+nanj), (-0.012610930256928629+7.721967686709076e-19j))\n"
  20486. "\n"
  20487. "For real arguments for `z`, `yve` returns the same as `yv` up to\n"
  20488. "floating point errors.\n"
  20489. "\n"
  20490. ">>> v, z = 1, 1000\n"
  20491. ">>> yv(v, z), yve(v, z)\n"
  20492. "(-0.02478433129235178, -0.02478433129235179)\n"
  20493. "\n"
  20494. "The function can be evaluated for several orders at the same time by\n"
  20495. "providing a list or NumPy array for `v`:\n"
  20496. "\n"
  20497. ">>> yve([1, 2, 3], 1j)\n"
  20498. "array([-0.20791042+0.14096627j, 0.38053618-0.04993878j,\n"
  20499. " 0.00815531-1.66311097j])\n"
  20500. "\n"
  20501. "In the same way, the function can be evaluated at several points in one\n"
  20502. "call by providing a list or NumPy array for `z`:\n"
  20503. "\n"
  20504. ">>> yve(1, np.array([1j, 2j, 3j]))\n"
  20505. "array([-0.20791042+0.14096627j, -0.21526929+0.01205044j,\n"
  20506. " -0.19682671+0.00127278j])\n"
  20507. "\n"
  20508. "It is also possible to evaluate several orders at several points\n"
  20509. "at the same time by providing arrays for `v` and `z` with\n"
  20510. "broadcasting compatible shapes. Compute `yve` for two different orders\n"
  20511. "`v` and three points `z` resulting in a 2x3 array.\n"
  20512. "\n"
  20513. ">>> v = np.array([[1], [2]])\n"
  20514. ">>> z = np.array([3j, 4j, 5j])\n"
  20515. ">>> v.shape, z.shape\n"
  20516. "((2, 1), (3,))\n"
  20517. "\n"
  20518. ">>> yve(v, z)\n"
  20519. "array([[-1.96826713e-01+1.27277544e-03j, -1.78750840e-01+1.45558819e-04j,\n"
  20520. " -1.63972267e-01+1.73494110e-05j],\n"
  20521. " [1.94960056e-03-1.11782545e-01j, 2.02902325e-04-1.17626501e-01j,\n"
  20522. " 2.27727687e-05-1.17951906e-01j]])")
  20523. ufunc_yve_loops[0] = <np.PyUFuncGenericFunction>loop_d_dd__As_ff_f
  20524. ufunc_yve_loops[1] = <np.PyUFuncGenericFunction>loop_D_dD__As_fF_F
  20525. ufunc_yve_loops[2] = <np.PyUFuncGenericFunction>loop_d_dd__As_dd_d
  20526. ufunc_yve_loops[3] = <np.PyUFuncGenericFunction>loop_D_dD__As_dD_D
  20527. ufunc_yve_types[0] = <char>NPY_FLOAT
  20528. ufunc_yve_types[1] = <char>NPY_FLOAT
  20529. ufunc_yve_types[2] = <char>NPY_FLOAT
  20530. ufunc_yve_types[3] = <char>NPY_FLOAT
  20531. ufunc_yve_types[4] = <char>NPY_CFLOAT
  20532. ufunc_yve_types[5] = <char>NPY_CFLOAT
  20533. ufunc_yve_types[6] = <char>NPY_DOUBLE
  20534. ufunc_yve_types[7] = <char>NPY_DOUBLE
  20535. ufunc_yve_types[8] = <char>NPY_DOUBLE
  20536. ufunc_yve_types[9] = <char>NPY_DOUBLE
  20537. ufunc_yve_types[10] = <char>NPY_CDOUBLE
  20538. ufunc_yve_types[11] = <char>NPY_CDOUBLE
  20539. ufunc_yve_ptr[2*0] = <void*>_func_cbesy_wrap_e_real
  20540. ufunc_yve_ptr[2*0+1] = <void*>(<char*>"yve")
  20541. ufunc_yve_ptr[2*1] = <void*>_func_cbesy_wrap_e
  20542. ufunc_yve_ptr[2*1+1] = <void*>(<char*>"yve")
  20543. ufunc_yve_ptr[2*2] = <void*>_func_cbesy_wrap_e_real
  20544. ufunc_yve_ptr[2*2+1] = <void*>(<char*>"yve")
  20545. ufunc_yve_ptr[2*3] = <void*>_func_cbesy_wrap_e
  20546. ufunc_yve_ptr[2*3+1] = <void*>(<char*>"yve")
  20547. ufunc_yve_data[0] = &ufunc_yve_ptr[2*0]
  20548. ufunc_yve_data[1] = &ufunc_yve_ptr[2*1]
  20549. ufunc_yve_data[2] = &ufunc_yve_ptr[2*2]
  20550. ufunc_yve_data[3] = &ufunc_yve_ptr[2*3]
  20551. yve = np.PyUFunc_FromFuncAndData(ufunc_yve_loops, ufunc_yve_data, ufunc_yve_types, 4, 2, 1, 0, "yve", ufunc_yve_doc, 0)
  20552. cdef np.PyUFuncGenericFunction ufunc_zetac_loops[2]
  20553. cdef void *ufunc_zetac_ptr[4]
  20554. cdef void *ufunc_zetac_data[2]
  20555. cdef char ufunc_zetac_types[4]
  20556. cdef char *ufunc_zetac_doc = (
  20557. "zetac(x, out=None)\n"
  20558. "\n"
  20559. "Riemann zeta function minus 1.\n"
  20560. "\n"
  20561. "This function is defined as\n"
  20562. "\n"
  20563. ".. math:: \\zeta(x) = \\sum_{k=2}^{\\infty} 1 / k^x,\n"
  20564. "\n"
  20565. "where ``x > 1``. For ``x < 1`` the analytic continuation is\n"
  20566. "computed. For more information on the Riemann zeta function, see\n"
  20567. "[dlmf]_.\n"
  20568. "\n"
  20569. "Parameters\n"
  20570. "----------\n"
  20571. "x : array_like of float\n"
  20572. " Values at which to compute zeta(x) - 1 (must be real).\n"
  20573. "out : ndarray, optional\n"
  20574. " Optional output array for the function results\n"
  20575. "\n"
  20576. "Returns\n"
  20577. "-------\n"
  20578. "scalar or ndarray\n"
  20579. " Values of zeta(x) - 1.\n"
  20580. "\n"
  20581. "See Also\n"
  20582. "--------\n"
  20583. "zeta\n"
  20584. "\n"
  20585. "Examples\n"
  20586. "--------\n"
  20587. ">>> import numpy as np\n"
  20588. ">>> from scipy.special import zetac, zeta\n"
  20589. "\n"
  20590. "Some special values:\n"
  20591. "\n"
  20592. ">>> zetac(2), np.pi**2/6 - 1\n"
  20593. "(0.64493406684822641, 0.6449340668482264)\n"
  20594. "\n"
  20595. ">>> zetac(-1), -1.0/12 - 1\n"
  20596. "(-1.0833333333333333, -1.0833333333333333)\n"
  20597. "\n"
  20598. "Compare ``zetac(x)`` to ``zeta(x) - 1`` for large `x`:\n"
  20599. "\n"
  20600. ">>> zetac(60), zeta(60) - 1\n"
  20601. "(8.673617380119933e-19, 0.0)\n"
  20602. "\n"
  20603. "References\n"
  20604. "----------\n"
  20605. ".. [dlmf] NIST Digital Library of Mathematical Functions\n"
  20606. " https://dlmf.nist.gov/25")
  20607. ufunc_zetac_loops[0] = <np.PyUFuncGenericFunction>loop_d_d__As_f_f
  20608. ufunc_zetac_loops[1] = <np.PyUFuncGenericFunction>loop_d_d__As_d_d
  20609. ufunc_zetac_types[0] = <char>NPY_FLOAT
  20610. ufunc_zetac_types[1] = <char>NPY_FLOAT
  20611. ufunc_zetac_types[2] = <char>NPY_DOUBLE
  20612. ufunc_zetac_types[3] = <char>NPY_DOUBLE
  20613. ufunc_zetac_ptr[2*0] = <void*>_func_zetac
  20614. ufunc_zetac_ptr[2*0+1] = <void*>(<char*>"zetac")
  20615. ufunc_zetac_ptr[2*1] = <void*>_func_zetac
  20616. ufunc_zetac_ptr[2*1+1] = <void*>(<char*>"zetac")
  20617. ufunc_zetac_data[0] = &ufunc_zetac_ptr[2*0]
  20618. ufunc_zetac_data[1] = &ufunc_zetac_ptr[2*1]
  20619. zetac = np.PyUFunc_FromFuncAndData(ufunc_zetac_loops, ufunc_zetac_data, ufunc_zetac_types, 2, 1, 1, 0, "zetac", ufunc_zetac_doc, 0)
  20620. #
  20621. # Aliases
  20622. #
  20623. jn = jv