Skip to content

Commit a0c2995

Browse files
committed
test: use Distributions for fixtures generation for independent verification
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent f884c94 commit a0c2995

File tree

2 files changed

+7
-7
lines changed
  • lib/node_modules/@stdlib/stats/base/dists/wald/skewness/test/fixtures/julia

2 files changed

+7
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"expected":[1.8001127100408947,6.60345916766498,4.744786320622099,5.1409370744500755,2.817715333096361,4.412849265604714,4.052815453286427,3.3831488686246898,4.766013674173579,4.650154666223604,4.506460033438271,1.686301432693246,5.487795730371866,3.7978508712779075,6.808049274301827,3.7500260645836474,4.143062000676884,3.662750257594592,3.081816834558629,3.2322005812434087,3.6353182994115825,2.6117293733120652,5.389826698994897,3.9449772918156647,3.04558935402639,3.7570789429495974,4.609169088581761,1.8595291477046003,3.7161378361375674,1.5304259711620927,2.0086081777163685,4.421091507082496,1.7503765772320694,2.516770715474001,3.4519407259760406,4.777598169877546,3.0475929645983646,4.767983834892113,4.358445449153358,6.899840048926189,3.3184034251550623,3.5333048944184697,3.9111545479758174,2.2539929683992552,10.69730595403215,3.509951407154185,2.29709150825654,2.7813264645354874,8.17513082299846,3.540036332669115,2.792213394395399,8.834097885653488,4.189527332431366,5.045165252444418,3.7486922670410303,3.696087175913859,5.210784096444956,3.5685135306792146,4.367258240385365,8.849867745798335,2.8590412399782004,3.888472654984648,3.0078523129654706,2.463223588797109,4.47977430476627,6.091153301290284,1.4820483936351927,12.554489239773396,6.833443480925151,5.830612475084531,5.699167569908145,3.5984613647818335,2.134250917414274,2.055386386231741,3.1665596464714723,2.3503683948902583,5.344770167300359,6.377020813462458,5.490135660890077,8.73673538828137,4.194196755858767,2.8236200578555923,3.1388423203090907,1.7968619579734677,4.1221659759236156,4.975059430357519,6.243195083226972,2.7378697670392524,1.1164829292976028,3.6034918244231404,4.202828724990132,3.70112066948111,4.493544010674009,4.1874117001858515,6.872480841248698,5.735349941291528,2.970444533653999,4.265559000361125,6.222330651715551,6.161593836811996],"lambda":[3.25284316463199,0.9027625640980764,4.090612758045264,2.9999638457944053,3.002940469398644,4.227551095591315,2.766601913943147,1.240442554561217,3.5109646371196885,3.1246816208985995,2.0920779013662347,1.611250229353447,2.7818083239924327,3.4795741213379863,2.0048000619288002,5.104905087329686,2.4569859782377397,5.171454864014924,3.4840653942561506,2.701186320297121,2.899820075702395,4.163002341211083,1.344688941660735,2.8599222584342665,4.822788108451253,1.4571924259001607,2.4384891485312448,3.490831889003224,1.479508693378302,5.258660907382155,4.895943527854397,2.6304035645633537,3.0436522944830484,3.0187672437770185,4.340026333952016,1.0745301780432492,4.0176009842703175,1.062093584998381,4.405118466626204,1.320007984846839,4.351178554175254,5.253156803438819,2.843381565258129,3.2315775009905954,0.7186125614814982,4.541536801259744,4.256716082229229,5.431642206656574,0.9427970403663412,4.234180019868364,3.398190153917744,0.7927191733916956,2.480612722801476,0.8443197236251933,4.42269602237103,4.305177611923048,0.6352112239031983,1.8072871101599453,2.4685569986159086,0.9658447986436431,4.245926525507043,1.1611042884298164,4.275148717829811,3.4428253065659336,3.119726671553988,1.3328253267473884,4.459537177191674,0.5930491825572588,0.8255885739057718,2.0705839538808863,0.5204938618524203,3.9178641179065745,4.937562511019078,3.572951536571119,3.3786852028860848,4.840772371591905,1.892174365033723,1.913620360478331,2.0385785901773854,1.1174612487213815,5.214999357187094,3.4812818859855232,3.2379689418801947,2.0302583785620216,3.589029373854044,2.056318187982969,1.002546977179854,2.960937025931656,4.721729463529798,5.0862525557112725,2.8822304689797216,5.430119378590753,3.1812056569039284,3.5300197999828193,1.8783018565896858,1.4292781149696805,3.835385989085406,3.3151866944163206,1.9311696391559425,2.201831654233437],"mu":[1.171170195093368,4.373952127529011,10.23243929824197,8.809638498045118,2.6491005566457755,9.147123483472347,5.0491447394601465,1.5775254129458078,8.861240298265876,7.507546994643975,4.720699872012542,0.5090857031232239,9.308518534193428,5.576470353668192,10.324616720070745,7.97652508035936,4.686008085858069,7.708765670057944,3.6766935638137173,3.135513249351642,4.258076189301067,3.1551534988284073,4.340391723879843,4.945392133578853,4.9704803748450095,2.2854674307326146,5.756037293745734,1.3411964820918416,2.2701713588870938,1.368539420916623,2.194746390253777,5.712666654776843,1.0361330198914949,2.124586528372639,5.746144124325655,2.725180966487402,4.1460851484285195,2.682809434548414,9.297759584168293,6.982518500660425,5.323812624993505,7.286854284064105,4.832841905973791,1.8242198625738644,9.13694750097398,6.216737593201908,2.4956792461631956,4.668663591550009,7.001081341486458,5.895793280347573,2.943759865640489,6.8738692549968015,4.83778444261498,2.387894950341259,6.905643620885003,6.534810160075157,1.9163808033322312,2.5571684487759034,5.231405636002325,8.405013145908928,3.8562999326914067,1.9506835340312696,4.2975578772585425,2.3210267562905424,6.956428171667295,5.494520361179457,1.0883586902191562,10.385951729005875,4.283515845370594,7.821295413134402,1.87843406667436,5.636902829387689,2.4989700495157203,1.6771486902880113,3.7642682644246745,2.9712830737079705,6.005880881543179,8.646671157441011,6.827333242384649,9.477380711654641,10.193171934238798,3.083963273739024,3.5446157938899674,0.7283468232333452,6.77618808347783,5.655152925063713,4.341862179073717,2.4661088034389906,0.6539774372875646,7.338418811591539,5.656783783253794,8.264819204853993,7.137189630714612,6.877426477504747,9.85711796418698,5.223890648721434,3.760187164492798,6.702200071093865,8.307762772487772,9.288118236852245]}
1+
{"expected":[12.599083899079275,5.739441692219705,1.9282735339867396,3.6264150581833157,3.433464267957004,2.205466914291399,4.1132941146147,5.040685299375855,6.496601080028685,3.5945357410206262,4.111473477895208,5.253365877259784,2.552800800356776,5.285407221314946,3.0088225107583177,3.2162428755900416,2.3976709265580376,4.576301497866316,9.579102185287962,2.3251331670767854,4.9908072506748145,5.94302406902407,2.4249065651569732,4.195682504196377,4.57182915165523,2.249709928521037,4.213739185196408,4.858559130883821,2.435977839997367,3.0346299111267903,2.610951217492536,2.0091661431048253,11.692465051205845,1.5982800857892316,4.21899714178746,6.131624275749567,6.72035283464564,3.798666737196376,2.5551404908246598,7.4342644854312745,3.8830517352871703,6.538861466404222,1.8715501955098093,3.343417234763251,9.850242039024032,3.785696015267953,9.307492010669991,5.682953186427918,4.392286361795967,4.504996817053119,4.6484649015109,3.8538543069095184,6.081056641462078,4.215129611443201,6.299036577853567,9.433505788255527,2.9847243838436386,5.443033001635557,3.579995313961616,4.243948188585669,4.766699862439638,3.9573551605173236,3.5358246069844124,1.8561395908105438,2.6716103718135855,2.0412124779387497,4.469658909290711,3.124915425130218,2.8194462152991413,4.165771963180374,3.614849420774358,3.549132366793855,2.9012253551756118,7.175207982956385,2.738363618536485,3.895721357686928,4.219354078546378,5.09904346625587,5.90537896492223,5.369619301607546,2.6213516364921534,4.892397333602656,1.7128122100047802,3.434273553373905,6.281034623042766,2.317765475292558,3.4693697907889414,7.229860387097055,7.180562473591426,5.113649141138721,4.694844822035962,3.3516958991253603,9.042507686577867,4.661656070269289,1.9771142424723929,9.521918418151486,7.37437689846918,4.844434916165156,3.906722573861413,1.9928797464688601],"lambda":[0.5739716628300069,2.8461302942934865,1.8586075864321852,3.894368989906014,1.9131381202263504,1.1652899467145605,1.0481579805589498,3.1866241735617313,1.8793719407614247,2.378278830168762,1.1077661019445064,3.256152854971023,5.03911006784973,1.489821484807415,5.0361212255877685,1.3825534131956552,1.5125717861835986,2.4161000039940945,0.8232237775107422,2.0538773468553613,3.5838472008721247,2.37169252076812,2.5976042142176574,5.252883380849487,3.9259933115080754,5.307907531191412,4.836485702347713,1.7593920113362915,2.9508513325851435,3.417354909930063,4.487467602016409,2.913858978329807,0.5951916086471905,4.072399755214093,4.092449851466184,1.1293101303012172,1.3589471993564735,3.8795227840050837,3.8199633582219046,0.6432221142069245,2.2031469209059216,1.6472502802715112,5.233291622660542,3.2256936241858494,0.6981068922290957,4.290458770191611,0.6379992088427351,1.423256222119626,3.21277398390776,4.52482529197544,2.265406156914362,3.94832640379757,1.1835519294108028,4.8840446595366975,1.9909048163822736,0.8182914328531888,1.3847825651921997,1.9285111744679284,2.5803403807095155,4.6566625929905845,3.61496560805606,4.2509474868677195,4.743084643148921,5.036587192457257,5.387244081240578,4.870469459351811,3.239725072909489,4.9068952795463945,2.037478024164875,4.0693662585898815,4.203731218472452,4.7470070016726185,4.715791231289337,1.528694920158732,3.4334473360371938,3.098817078246993,4.162625606893076,1.7422442952494213,2.469499180915235,1.6721202955488237,5.461045092182237,2.4565272351516056,5.365070882737467,4.674514627228464,1.449211707227577,4.104925713818345,4.453207740775688,1.4598321700420687,1.6358957376452539,3.385033211961245,2.9657912313265062,3.843886367379204,0.621251353500349,1.964744821249531,3.557375354976873,0.51626853132282,1.1985608380749386,2.4109488958672767,4.503958557915168,4.072938389887346],"mu":[10.123387901130993,10.417213495539695,0.7678607647223497,5.690489256295672,2.5059296805435145,0.62978539405052,1.9704424914328296,8.996374080288165,8.81338270624564,3.4143329803859466,2.080657269537027,9.984758663158964,3.648759089545692,4.624328003479244,5.06578560305387,1.589048247482327,0.966167979751424,5.622139984674751,8.393150461730073,1.2337513984038158,9.918558754590562,9.307453022011146,1.6971510196902524,10.274494957729397,9.117736372751924,2.984928199625185,9.541632831208075,4.614610942502969,1.945590722933613,3.496705396373489,3.399040442568166,1.3069462359973634,9.041207802656757,1.1558824499620852,8.09392767228104,4.717607274257623,6.819369515211247,6.220111719912538,2.771062084404869,3.94997614872816,3.691027696967812,7.825666815526568,2.036739029954574,4.006468753770745,7.52615607596429,6.832076166140271,6.14105482953515,5.107269070495655,6.8868235932371995,10.203479184087772,5.439045342864858,6.515700650084639,4.8629847266330035,9.641819204457112,8.777205131062384,8.09117762689701,1.370716197388779,6.348360565000386,3.6745097644124187,9.319066451209498,9.126353251390071,7.39696030023044,6.588700907526898,1.928035897848945,4.272385032226204,2.254782959572665,7.191416003057369,5.324033944359522,1.7996085684406244,7.846486932207633,6.103414327437789,6.64387964662717,4.410369638577493,8.744748051659894,2.860685491094092,5.225516266278004,8.234112302244327,5.033197472870523,9.568897940230187,5.356881021508116,4.169498463368216,6.533148285038477,1.7488495725082405,6.12581369708432,6.352602761857959,2.4502013321743528,5.9556837859946095,8.478523772988943,9.371951696709667,9.835179221278173,7.263409867933211,4.797966896094953,5.644202823943833,4.743993669988468,1.54507907823441,5.200942553055921,7.242161986516225,6.286830431450478,7.637953680785057,1.7973287370679087]}

lib/node_modules/@stdlib/stats/base/dists/wald/skewness/test/fixtures/julia/runner.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
# See the License for the specific language governing permissions and
1717
# limitations under the License.
1818

19+
import Distributions: skewness, InverseGaussian
1920
import JSON
2021

2122
"""
2223
gen( mu, lambda, name )
2324
24-
Generate fixture data for the skewness of a Wald (Inverse Gaussian)
25-
distribution and write to file.
25+
Generate fixture data and write to file.
2626
2727
# Arguments
2828
29-
- `mu`: mean parameter
30-
- `lambda`: shape parameter
31-
- `name::AbstractString`: output filename
29+
* `mu`: mean parameter
30+
* `lambda`: shape parameter
31+
* `name::AbstractString`: output filename
3232
3333
# Examples
3434
@@ -41,7 +41,7 @@ julia> gen( mu, lambda, "data.json" );
4141
function gen( mu, lambda, name )
4242
z = Array{Float64}( undef, length(mu) );
4343
for i in eachindex(mu)
44-
z[i] = 3.0 * sqrt( mu[i] / lambda[i] );
44+
z[ i ] = skewness( InverseGaussian( mu[i], lambda[i] ) );
4545
end
4646

4747
# Store data to be written to file as a collection:

0 commit comments

Comments
 (0)