import numpy as np

from statsmodels.tools.tools import Bunch

mpg_bs = Bunch()

mpg_bs.smooth0 = Bunch()
mpg_bs.smooth0.term = "weight"
mpg_bs.smooth0.bs_dim = 12
mpg_bs.smooth0.dim = 1
mpg_bs.smooth0.p_order = np.array([
    3, 2
    ])
mpg_bs.smooth0.by = "NA"
mpg_bs.smooth0.label = "s(weight)"
mpg_bs.smooth0.sp = -1
mpg_bs.smooth0.m = np.array([
    3, 2
    ])
mpg_bs.smooth0.knots = np.array([
    1488, 1488, 1488, 1488, 1953.22222222, 2118.77777778, 2275,
    2383.88888889, 2515.55555556, 2757.33333333, 3016.44444444,
    3208.11111111, 4066, 4066, 4066, 4066
    ])
mpg_bs.smooth0.rank = 10
mpg_bs.smooth0.null_space_dim = 1
mpg_bs.smooth0.df = 11
mpg_bs.smooth0.S_scale = 2.44395544177397e-06
mpg_bs.smooth0.vn = "weight"
mpg_bs.smooth0.first_para = 5
mpg_bs.smooth0.last_para = 15
mpg_bs.smooth0.S = np.array([
    0.130569121544375, -0.0191732921244136, 0.0202548028417763,
    0.0393112950002946, 0.032061392663319, 0.0241651485426007,
    0.0238771778381105, 0.0389406835250852, 0.0171569521441248,
    0.00680570834700402, 0.00541920498010491, -0.0191732921244136,
    0.0631473273216884, -0.0592997810399249, 0.0178641542128365,
    0.00461438941034586, 0.00793912465273829, 0.00408821971418319,
    -0.000681869049168392, 0.00213834646721613, 0.000935846814259467,
    0.000163463753965317, 0.0202548028417763, -0.0592997810399249,
    0.201022514824508, -0.186241322892132, 0.00284878067469136,
    0.0287314367063779, 0.00263260805442764, -0.00708846456492193,
    0.00065385484055723, 0.000395067932117418, -0.000586348849229599,
    0.0393112950002947, 0.0178641542128365, -0.186241322892132,
    0.479322071007576, -0.286380917395105, 0.0563704638942206,
    0.0348887744557148, 0.0255203052273876, 0.0138979985789615,
    0.00560832050247454, 0.00383270204450356, 0.032061392663319,
    0.00461438941034587, 0.00284878067469137, -0.286380917395105,
    0.414581586658592, -0.181289913269406, -0.00412646444222532,
    -0.00354719180127285, -0.00206283566879658, -0.000685858743449883,
    -0.00142523589453221, 0.0241651485426007, 0.00793912465273829,
    0.0287314367063779, 0.0563704638942206, -0.181289913269406,
    0.213321319885371, -0.0483506678191679, 0.0110304252072989,
    0.0122299348640366, 0.00357726593043956, 0.00234383478372281,
    0.0238771778381105, 0.00408821971418319, 0.00263260805442764,
    0.0348887744557148, -0.00412646444222533, -0.0483506678191679,
    0.0999220996092033, -0.0356092452156359, 0.00921547832469341,
    0.00389860712399989, 0.00147745030481206, 0.0389406835250852,
    -0.000681869049168392, -0.00708846456492192, 0.0255203052273876,
    -0.00354719180127286, 0.0110304252072989, -0.0356092452156359,
    0.0574427000604467, -0.0102653399490586, -0.000311188772793241,
    0.00285258581655637, 0.0171569521441248, 0.00213834646721613,
    0.000653854840557233, 0.0138979985789615, -0.00206283566879658,
    0.0122299348640366, 0.00921547832469341, -0.0102653399490586,
    0.0189789273643945, -0.0062453384832703, 0.00255839876648785,
    0.00680570834700402, 0.000935846814259467, 0.000395067932117419,
    0.00560832050247454, -0.000685858743449884, 0.00357726593043956,
    0.00389860712399989, -0.000311188772793241, -0.0062453384832703,
    0.0211496391608495, -0.0111654555301857, 0.00541920498010491,
    0.000163463753965317, -0.000586348849229599, 0.00383270204450356,
    -0.00142523589453221, 0.00234383478372281, 0.00147745030481206,
    0.00285258581655637, 0.00255839876648785, -0.0111654555301857,
    0.00794139033444708
    ]).reshape(11, 11, order="F")

mpg_bs.coefficients = np.array([
    29.6272774569595, -6.21365498504518, 1.43986598470837, 1.01128095138012,
    20.1053719083286, -1.26007449980292, -5.26871981200625,
    -4.544036357677, -7.60063071956733, -5.01036711884368,
    -6.96226144900638, -9.06722069409647, -8.81829781369916,
    -7.9145836553663, -6.28068941724657, 5.09307848346347,
    1.90848821039499, -0.646225516186639, -1.50240395085899,
    -4.19244286007642, -5.72993924243941, -6.83323296859843,
    -5.77088950575513, -4.29112523442438
    ])
mpg_bs.fitted_values = np.array([
    21.9396113442978, 21.9396113442978, 18.7594768791121, 23.978775547494,
    19.6605284085114, 22.5415570425591, 21.4364029092864, 21.5001397125411,
    19.345544773382, 17.3284985371825, 23.0829354555269, 23.0829354555269,
    20.5257074462847, 20.350418275392, 20.0920273672739, 16.3475493433762,
    15.2683918200041, 14.6016645854518, 48.1414677548395, 34.6770647570973,
    33.3220963193152, 34.9078179723597, 34.9078179723597, 25.7413956426768,
    31.8998747894453, 31.4406608644666, 31.4406608644666, 25.4076816004152,
    24.637322541799, 19.5423694752458, 43.7120662014648, 36.1794319009933,
    37.8600814894106, 31.3973345386248, 30.9527603762328, 29.8740452948944,
    29.6825700516209, 26.8853631419929, 26.3600803699054, 26.1773024038522,
    25.3856227340742, 23.3020193188726, 24.7100852851954, 26.4172597325081,
    34.6770647570973, 33.3220963193152, 23.0296498930938, 14.7476201253168,
    14.7476201253168, 14.0557212409125, 34.34782143196, 33.965299405798,
    33.7800699350403, 32.4689563918131, 32.329358068477, 23.1906404151376,
    23.1906404151376, 23.1512875039068, 20.6941238423555, 25.5363151316018,
    25.3886549365523, 25.5363151316018, 25.3886549365523, 34.4607486893619,
    25.3326646650999, 20.7768158749875, 31.8441811103844, 23.0217104934054,
    22.4301358955383, 23.1106217353394, 22.4200843547568, 14.7491664060278,
    14.8191667947128, 14.012803756677, 13.9581303982076, 18.1760880728356,
    33.3190101477328, 32.4975851853098, 31.1829311245072, 25.6555703896226,
    22.6046524037776, 25.6230700315092, 19.5479517982215, 19.6165588348237,
    19.6186479966108, 25.1994604891903, 24.8987688972877, 22.3628638356355,
    22.3628638356355, 34.2300125601631, 39.2885271153262, 33.1621106074804,
    32.5172901213345, 30.742747639841, 32.1452590079292, 30.6934785442198,
    31.6517339944659, 30.5907093672281, 30.9641455088909, 24.6266167464042,
    24.9022880874316, 18.78153275305, 17.1521355867311, 19.0141306741668,
    18.231718904575, 16.8216593127165, 17.7202420891745, 22.0561680452922,
    27.2153336488053, 20.5096211586017, 25.567299743712, 21.9831410020533,
    26.7629956266796, 20.2961667790902, 25.2853678595518, 21.7669720922915,
    26.7629956266796, 18.4910047689371, 33.3190101477328, 25.7413956426768,
    31.8998747894453, 31.4406608644666, 29.7789375739066, 24.637322541799,
    19.1142432042937, 19.2193336362723, 17.6365280620964, 17.6365280620964,
    17.579806089837, 15.8168257322192, 21.8960566915, 21.7074289198647,
    21.6525958338155, 21.4785952775663, 18.9756522798894, 18.9897722666541,
    30.4602645168316, 29.3805961723331, 27.2238321670602, 27.9694092954432,
    27.7274373142384, 24.7585135497211, 24.3629123288499, 21.0288767895242,
    26.8745904429808, 24.038604652806, 24.1756501080763, 20.4312780252146,
    32.4709598995115, 31.6700176166953, 31.9735144592214, 30.0023513412019,
    28.4464554097632, 25.3419682258173, 30.061904278659, 29.8978667285749,
    37.2387365989938, 37.2387365989938, 29.9813024611395, 29.8303048561215,
    29.7392162621016, 29.1611058213974, 28.9573381148783, 23.6489155519235,
    23.2515846177326, 21.6472193877583, 21.6596390100383, 21.6094248571684,
    20.9701064457552, 20.8066296061343, 20.6663348110776, 25.161054576378,
    33.0089371917933, 24.3712852430277, 24.3712852430277, 24.2659916432858,
    18.5704777306123, 18.4763039586984, 17.9248313386425, 17.7576418795043,
    38.0290768582748, 27.2115396047694, 37.9994882599177, 27.1914558802737,
    26.6487573286281, 34.7866136817861, 24.6246815506878, 26.2295193582235,
    26.4988154777346, 21.8800181352396, 33.5183981701922, 24.5373651901876,
    20.8017272859603, 20.6222748754003, 20.8111189208126, 20.5838532565161,
    18.3170655814092, 17.5023519244001, 20.8093138226564, 18.3617172827568,
    19.5919656568361, 26.0100107405061, 20.4732985733418
    ])
mpg_bs.linear_predictors = mpg_bs.fitted_values
mpg_bs.deviance = 871.169775911354
mpg_bs.null_deviance = 8721.1724137931
mpg_bs.iter = 1
mpg_bs.weights = np.array([
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    ])
mpg_bs.prior_weights = np.array([
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    ])
mpg_bs.df_null = 202
mpg_bs.y = np.array([
    21, 21, 19, 24, 18, 19, 19, 19, 17, 16, 23, 23, 21, 21, 20, 16, 16, 15,
    47, 38, 38, 37, 31, 24, 31, 31, 31, 24, 24, 19, 49, 31, 38, 30, 30, 30,
    30, 27, 27, 27, 27, 24, 25, 24, 38, 38, 24, 15, 15, 13, 30, 31, 31, 31,
    31, 17, 17, 17, 16, 26, 26, 26, 26, 36, 26, 19, 31, 22, 22, 22, 22, 16,
    16, 14, 14, 19, 37, 31, 31, 24, 23, 25, 19, 19, 19, 25, 25, 23, 23, 31,
    45, 31, 31, 31, 31, 31, 31, 31, 31, 27, 27, 17, 17, 19, 19, 17, 19, 19,
    28, 19, 25, 19, 28, 19, 25, 19, 28, 18, 37, 24, 31, 31, 31, 24, 19, 19,
    17, 17, 17, 17, 21, 21, 21, 21, 19, 19, 31, 26, 26, 32, 28, 26, 24, 24,
    28, 25, 23, 23, 35, 31, 31, 31, 27, 27, 30, 30, 34, 38, 38, 28, 28, 29,
    29, 26, 26, 24, 24, 24, 24, 24, 24, 29, 30, 27, 27, 27, 20, 19, 20, 19,
    37, 27, 37, 27, 27, 37, 26, 24, 24, 19, 33, 25, 23, 23, 24, 24, 17, 17,
    23, 19, 18, 26, 19
    ])
mpg_bs.residuals = mpg_bs.y - mpg_bs.fitted_values
mpg_bs.sig2 = 4.70648213227865
mpg_bs.edf_all = np.array([
    0.999999999999898, 1.00000000000005, 1.00000000000003, 1.00000000000002,
    0.715182726327133, 0.945523457125076, 0.933952133938362,
    0.910787981046657, 0.918439669310707, 0.936922915439925,
    0.967620005020078, 0.978502846618072, 0.979593620228742,
    0.973114724412765, 0.993928896515985, 0.206529848573726,
    0.134722764346217, 0.130032558435079, 0.214058208629181,
    0.428628830751172, 0.480753053928721, 0.728730191076721,
    0.464984912297227, 0.858004843431828
    ])
mpg_bs.edf1 = np.array([
    0.999999999999765, 1.00000000000012, 1.00000000000008, 1.00000000000005,
    0.895328939039617, 0.985281018312391, 0.980485303917254,
    0.985115307594987, 0.979973329752608, 0.991029113855046,
    0.996293301947028, 0.996456521529546, 0.997881056094132,
    0.998369079216076, 0.999638164901435, 0.263857404503542,
    0.167489975859197, 0.241183045516588, 0.33714799512247,
    0.51312433111897, 0.537892914498989, 0.811390270624644,
    0.600430783273412, 0.922162336898961
    ])
mpg_bs.hat = np.array([
    0.078074509536494, 0.078074509536494, 0.065030323239247,
    0.0401345230539626, 0.168187944335173, 0.0664399958506056,
    0.0736573430018038, 0.0780134136835909, 0.070154483540544,
    0.180767093886445, 0.0664593954539867, 0.0664593954539867,
    0.0594553974001933, 0.0675038468082751, 0.0536944450768444,
    0.0970468595627894, 0.125358300385429, 0.125631704260218,
    0.944302622125637, 0.0519142263263012, 0.0379831848669348,
    0.0493844279965059, 0.0493844279965059, 0.0949083347321329,
    0.0309819618026538, 0.029589102491272, 0.029589102491272,
    0.0670447385890157, 0.0842123937662785, 0.0687733897932081,
    0.422927507867707, 0.1328199698695, 0.096736475340286,
    0.0419915413707043, 0.0396238084435642, 0.0346918436236485,
    0.0363065585955308, 0.0491064279890273, 0.0441863897171056,
    0.0388360718854439, 0.0414457600258062, 0.0451305758954266,
    0.0505018876352514, 0.0744589274009074, 0.0519142263263012,
    0.0379831848669348, 0.101629248471346, 0.436525380451652,
    0.436525380451652, 0.410550032148353, 0.0425422548236529,
    0.039274955616929, 0.0380389889031733, 0.0330421266803994,
    0.0325988284653424, 0.066244431441902, 0.066244431441902,
    0.0666221560337819, 0.0952529331187707, 0.046598430925228,
    0.0484713995290722, 0.046598430925228, 0.0484713995290722,
    0.11544865825422, 0.0480259855055657, 0.0566600271329405,
    0.137824712103277, 0.112620492286817, 0.182195648532627,
    0.11200306230358, 0.188335501134619, 0.169514959934583,
    0.158055134563875, 0.160687809078496, 0.168998857825895,
    0.0681007619372312, 0.0357408884807467, 0.0331290501952606,
    0.0300353569162307, 0.0866855568546318, 0.0663539796978426,
    0.0330200310685004, 0.0646249177791591, 0.0586792000782014,
    0.0592011499253728, 0.0382030583658832, 0.0445521201486119,
    0.067008407725231, 0.067008407725231, 0.0432898262619123,
    0.12461566211325, 0.0358742808101827, 0.03362714942096,
    0.0325446423810936, 0.0323846714084075, 0.0335509666038901,
    0.0303353227561161, 0.0362607404205336, 0.0298241376272862,
    0.0362837776795306, 0.0432688893651977, 0.0709252762463711,
    0.147397446518277, 0.0723900341977973, 0.0517894283747262,
    0.106665126964701, 0.0503219409131233, 0.0834357951937577,
    0.100818501015755, 0.105292582127573, 0.104194456647628,
    0.0762380011365815, 0.105895524421508, 0.131464943163143,
    0.105727045973233, 0.0727635750299144, 0.105895524421508,
    0.0437337708748914, 0.0357408884807467, 0.0949083347321329,
    0.0309819618026538, 0.029589102491272, 0.0529778772840967,
    0.0842123937662785, 0.0607153181824941, 0.0672240685836559,
    0.144807911379215, 0.144807911379215, 0.141129878619691,
    0.688420146600013, 0.0609351365077056, 0.0626297831888101,
    0.0648027622574709, 0.0759997034218865, 0.0782103847541935,
    0.0707477713155958, 0.0410921970518355, 0.0589697594313821,
    0.152256577677227, 0.056765876958851, 0.0440206300688631,
    0.0331810206918762, 0.145634415508243, 0.171438771769591,
    0.045261532361592, 0.041840944187868, 0.143150260376584,
    0.156242430028033, 0.0410741399980494, 0.0522187899853102,
    0.0442706334210004, 0.0971923907649902, 0.165585071470526,
    0.238054218005531, 0.0532738449881275, 0.0604428830039113,
    0.111392476904907, 0.111392476904907, 0.057580243342699,
    0.0605291866378679, 0.0573770911039481, 0.0885019494515106,
    0.0862447970676653, 0.0955397769716847, 0.081739783220223,
    0.0812965346829218, 0.0809796720150843, 0.0813844390983633,
    0.0553602073413133, 0.0595903222287986, 0.0580738296478883,
    0.0331472062547294, 0.117186329269605, 0.0421565210307805,
    0.0421565210307805, 0.0431360897292105, 0.0601728243619919,
    0.0608147839961041, 0.0469900387599093, 0.0511099791683115,
    0.133968859142191, 0.0454828817219972, 0.134269192729732,
    0.045677409250904, 0.0484924110945302, 0.0915494575563987,
    0.0473953480872363, 0.0521826902889385, 0.0499074879741539,
    0.0607510996298348, 0.138895050565221, 0.0906618240478993,
    0.0545651794730959, 0.0588322152774606, 0.0555824719807064,
    0.0578268424764083, 0.0579806773332134, 0.0555747554696179,
    0.0570504628526928, 0.0556475846732603, 0.0510369790482531,
    0.105422478219541, 0.0549738873644795
    ])
mpg_bs.R = np.array([
    -14.247806848775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, -12.8440820360878, 0.373532783001862, -4.2296607322892,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -8.28197639485442, 7.02914411540082, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5.33415428821132, -6.28488179729956,
    0.275366266013156, 0.350799946868301, -0.320832128978794,
    -0.400140439924557, -2.75411074826349, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 6.93889390390723e-18, 0.232054372832382,
    -0.059045600449299, 0.180812355115842, 0.128163547439293,
    0.144886567744466, -0.0269730574249025, -0.184599966726543,
    0.118427787192217, 0.122053978888216, -0.0642672707517637,
    0.0681043144407656, -0.060071867550458, -0.150958262500398,
    0.0229223735842404, 0.0444276150539449, -0.348767846881924,
    0.400671529738335, -0.0077479495898858, -0.0233519344455665,
    -0.0016530657606304, 0.252520737261296, -0.0010134977318948,
    -0.440010476997986, -2.77555756156289e-17, 1.09497230004704,
    -0.214931983948417, 0.930799141411998, 0.550394857028419,
    0.709391063166251, -0.109782318058198, -0.842294484569631,
    0.695883635886005, 0.497451233152266, -0.43887148186347,
    0.581743977285481, -0.402315830184767, -0.709015800353095,
    0.0516077442049284, 0.028185898732357, -0.352543779422061,
    1.27839021341958, 0, 0, 0, 0, 0, 0, -1.38777878078145e-16,
    1.46496369379118, -0.201247454925983, 1.35850779046971,
    0.280404550518566, 1.0970677381965, -0.0446546144567612,
    0.111447137155272, 1.10339850569991, 0.314461688316244,
    -0.822981973569381, 0.910711177150427, -0.465095093337983,
    -0.492817626024387, -0.0302680940522306, -0.250587565379533,
    1.36321225401071, 0, 0, 0, 0, 0, 0, 0, -5.55111512312578e-17,
    0.636539976078798, 0.334849603625203, -0.801543168266999,
    -0.153261416776597, 0.590531348112483, 0.179469236924221,
    2.6920602822558, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1.52655665885959e-16, 0.386544461276061, 0.0617187417679946,
    -3.3375034414008, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 2.22044604925031e-16, -0.268086271294675, 0.0357997911433628,
    -0.811541848512822, -0.417713567994733, -0.549046879404324,
    0.191376270418331, -0.760481136635749, 1.0789013415145,
    -0.49182262459782, 0.630320008138126, 0.0469111147236198,
    1.777708468755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.52655665885959e-16,
    -0.638506225101581, -0.252213861766942, 0.590961092489265,
    -0.376498675165681, -1.05466211118764, 0.161726074180775,
    -0.307990147500367, 0.53052971421346, -0.419174109920259,
    2.18021214925427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    2.4980018054066e-16, -1.88284158749395, -0.158199593825249,
    1.30601514580108, -0.263143162777336, -1.19466765891104,
    -0.0392202790218998, -0.553059650646982, -2.5833579317638, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -7.63278329429795e-17,
    -1.03018120754794, 0.633410571283583, 0.425787563324548,
    -0.117069541181738, -0.15949862209609, -0.203120611440518,
    -0.24794544312747, -0.577954387092811, -0.392668668150195,
    -0.742414613515821, -0.0517296981247248, -0.180774236277864,
    -0.0985346957439217, -0.0346679818369825, -0.522507884861262,
    -0.444065964414515, -0.178453142391426, 0.368705729297475,
    0.951128380630708, 0, 0, 0, 0, -1.35308431126191e-16,
    -0.465120271023632, 0.406195493272399, 0.070203506724658,
    0.112046096976311, -0.200096302157889, -0.152715842062604,
    0.0104383470658289, 0.342550835873512, -0.273815544285267,
    -0.401207001497804, -0.040780018432021, -0.303740748176209,
    -0.0609839545858858, 0.319068530448539, -0.260734203657871,
    -0.260132352451617, -0.0932586655435074, 0.203432578212413,
    0.317497529276374, -0.83938821954848, 0, 0, 0, -4.85722573273506e-17,
    -0.390650961425867, 0.0330907911134603, 0.00733620315637045,
    0.228118285854502, -0.0868790621492882, -0.191943985560395,
    0.0744153770730219, 0.343145769098306, -0.095185581001596,
    -0.223303572468095, -0.150287745525581, -0.158778635381907,
    0.0110735369943658, 1.59565825328421, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -1.11022302462516e-16, 0.274167363775303, 0.474667692897905,
    0.106124488726352, 0.284328629467105, 0.186661254435535,
    0.187571744571793, 0.20413327819365, -0.0397206127231053,
    0.383068904117848, 0.0739013097506463, -0.570930211792512,
    0.0925572774037632, -0.322045428454689, -0.0206704824306383,
    0.138827717514351, 0.305979392429139, 0.329598188006108,
    0.056917317683023, 0.166351113868783, -0.0429579563012386,
    0.698123470574497, 0, 0, 2.77555756156289e-17, 1.28869031811426,
    0.159462695223405, 0.94874511527323, 1.22041060990194,
    1.23041883682224, 0.214295232212795, -0.421272049466657,
    0.484873150940021, 1.22340399746876, -0.126213059047102,
    0.586508858858053, 0.0387247897517475, -1.73048932450117, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 3.33066907387547e-16, 1.38101651269374,
    -0.161333143580265, 0.26879941823133, 1.5843908766769,
    1.56675922898707, 0.130712348793346, -0.15459448409081,
    0.322441342868708, 0.032841704236906, -0.040628028706388,
    1.95780421180254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -4.71844785465692e-16, 0.547361386973655, -0.0560623687491847,
    -1.42773410582977, -0.319295075080351, 1.10930671785576,
    -0.249435864270354, 0.376460682854174, -0.859698359693027,
    -2.22778539317977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -1.16573417585641e-15, -0.680782403896811, -0.0829421876833989,
    -1.06575902669119, -3.08847910097662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, -3.05311331771918e-16, -1.73716924091107,
    -0.427903820099444, 0.508003939493925, 0.0674537346537795,
    -3.01780655906657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, -8.32667268468867e-17, -0.907178653618356, -0.442910523756854,
    0.50555822069335, 0.912713271576068, -0.893880669315821,
    -0.303415799851323, 0.00713986966174707, -0.565052960394418,
    -0.0893598475014228, 0.1719971566722, -0.455461128044599,
    -0.0927359754631413, 0.109881340577719, 0.546762409477948,
    -1.42658278966991, 0, 0, 0, 0, 0, 0, 0, 0, -5.89805981832114e-17,
    -0.358468733615153, -0.156326542139889, 0.124611476610136,
    0.261720342968014, 0.0035504239879391, -0.178906878260252,
    -0.00818092652923195, -0.0665839339476971, 0.00890831066007731,
    0.21700219401572, -0.192545410574642, -0.0251881401918565,
    0.0596236111422667, 0.356927030887266, -0.559501871586496,
    0.00939356269184223, 0.00808635023879492, 0.174506073397661,
    -0.00768811220727605, -0.0824771518664715, 0.00281995201714263,
    0.552896914606241, 0, -8.15320033709099e-17, -0.153937258650552,
    -0.0600660535926754, 0.0307742140033325, 0.0538665072365687,
    0.107288075694366, -0.0951443583796005, -0.0122161530644771,
    0.00205111921342145, 0.00850795594637679, 0.0131768142662108,
    -0.0351898170323615, -0.00506295245698965, 0.000521970211206223,
    0.172268163286512, 0.0600225535087082, -0.0453855401632395,
    -0.0806877659326075, 1.10081916052039, 0, 0, 0, 0, 0
    ]).reshape(24, 24, order="F")

mpg_bs.sp = np.array([
    0.830689464223685, 425.361212061649
    ])
mpg_bs.nsdf = 4
mpg_bs.Ve = np.array([
    1.18849578741713, -0.569737725624008, -0.680858316482058,
    -0.683616810254248, 0.377412685416274, 0.162104128449963,
    0.0284282197471564, -0.170886673387626, -0.194448131082813,
    -0.235607054710811, -0.334637151301396, -0.298355349820224,
    -0.598813240305989, -0.484066776146491, -0.222539433922648,
    -0.343523840336231, -0.124699240656557, 0.0511301117304156,
    0.112522894520982, 0.282177537241417, 0.387281538045199,
    0.418871839073582, 0.402617068797253, 0.425257369102146,
    -0.569737725624005, 0.510619669380942, 0.112546264990929,
    0.117538151789885, -0.278500464239846, -0.106503131214755,
    -0.0142727895051468, 0.119693314820498, 0.122566162544252,
    0.141792166493477, 0.258713037741001, 0.167091968978498,
    0.548140901913199, 0.402802042938447, 0.176247371186236,
    0.253097604219116, 0.0912014747571045, -0.0380177304877867,
    -0.0817277273105231, -0.204215321526615, -0.280746382175004,
    -0.319748198891912, -0.318839637675066, -0.346791704585694,
    -0.680858316482058, 0.112546264990932, 0.638516918399206,
    0.556227307650149, -0.149549094619738, -0.0901476474252184,
    -0.0314272288120588, 0.0594285832238709, 0.0785867343964528,
    0.126531869912634, 0.115344796918859, 0.183217693464862,
    0.163894193990623, 0.162198493812758, 0.106799415384204,
    0.109314043840205, 0.039603794069169, -0.0171925190894075,
    -0.0379071720667663, -0.0926771979192517, -0.125253415978965,
    -0.130401583734828, -0.0977251095986251, -0.0934734674925854,
    -0.683616810254247, 0.117538151789886, 0.55622730765015,
    0.679340900017709, -0.105294697611617, -0.0365742456166672,
    0.0072290114551591, 0.0759677008568446, 0.102238529018836,
    0.0914408551091774, 0.0917917075151983, 0.110113392915614,
    0.0251287873829862, 0.0712284135539027, 0.00420927820895315,
    0.138413432144903, 0.0519845825338026, -0.0183348782823596,
    -0.0449069366586222, -0.118088511396914, -0.163969226310945,
    -0.146443105973786, -0.155948004456154, -0.155717037163534,
    0.377412685416275, -0.278500464239846, -0.149549094619738,
    -0.105294697611618, 8.01906586668495, -2.27352940533633,
    0.45239432853495, -0.433803454982267, -0.321923610858328,
    -0.318990687433886, -0.433465009208203, -0.525137481608645,
    -0.506872937415426, -0.438726607538563, -0.289330429361372,
    -0.318378214065367, -0.101315898912012, 0.0702660843270244,
    0.125057219633613, 0.2769143210106, 0.359103233667746,
    0.354041831289896, 0.282213763036391, 0.281665967664165,
    0.162104128449962, -0.106503131214755, -0.0901476474252181,
    -0.0365742456166671, -2.27352940533632, 2.37285683619595,
    -0.213131606980922, 0.767615270864913, 0.45140474706449,
    0.349810131981814, 0.213475199524978, 0.508125482025884,
    0.103391649249744, -0.128745904515542, -0.0765211944825074,
    -0.14210598704292, -0.0700821910069956, -0.00835991045569704,
    0.0238183516288048, 0.114417262260653, 0.189728622537479,
    0.1859026399357, 0.137259047130605, 0.138169217600521,
    0.0284282197471565, -0.0142727895051469, -0.0314272288120594,
    0.00722901145515861, 0.45239432853495, -0.213131606980925,
    1.48167014860297, 0.358254593363372, 0.821714985190383,
    0.435917484658345, 0.483749368795539, 0.794954101917704,
    0.324483058344503, 0.0820494696682664, 0.0547331327769316,
    0.0486413023665632, -0.000893288118834948, -0.0422342223315039,
    -0.0525140148744463, -0.0607809292570511, -0.0402549081797533,
    0.0356219564069622, 0.00604280956565075, 0.0117467988521824,
    -0.170886673387627, 0.119693314820499, 0.0594285832238702,
    0.0759677008568449, -0.433803454982266, 0.767615270864913,
    0.358254593363373, 1.13763489477576, 0.451943034662882,
    0.597170540589345, 0.419838151190159, 0.780586637924992,
    0.403663838323704, 0.203586408121847, 0.0871329612292375,
    0.109134911376121, 0.0232034159348934, -0.0477316317501318,
    -0.0695234156209474, -0.112765387491885, -0.112306705383561,
    -0.0376954736643469, -0.0615606161698961, -0.0647075752932795,
    -0.194448131082812, 0.122566162544252, 0.0785867343964518,
    0.102238529018836, -0.321923610858328, 0.451404747064489,
    0.821714985190384, 0.451943034662882, 1.30968147581624,
    0.280173059312136, 0.785275069851208, 0.944589724869548,
    0.582120239085169, 0.251692801313291, 0.177417447612862,
    0.236534565581584, 0.063697071092112, -0.0798064294015515,
    -0.128298735246426, -0.232002717105217, -0.259819418835401,
    -0.132041678675547, -0.144238622217655, -0.135794945401223,
    -0.235607054710811, 0.141792166493477, 0.126531869912634,
    0.0914408551091777, -0.318990687433885, 0.349810131981813,
    0.435917484658346, 0.597170540589345, 0.280173059312136,
    1.40453967538731, -0.0549248400788445, 0.887407266694885,
    0.182255134228699, 0.44876824071208, 0.0819989625257823,
    0.195295673825192, 0.0572040232059282, -0.0577601415985759,
    -0.09986577100187, -0.199632793168151, -0.245270473624566,
    -0.071594291206518, -0.0275251080861387, -0.0486598136301801,
    -0.334637151301396, 0.258713037741001, 0.115344796918858,
    0.0917917075151987, -0.433465009208205, 0.213475199524978,
    0.483749368795539, 0.419838151190159, 0.785275069851208,
    -0.0549248400788439, 1.62111742405635, 0.489616865304753,
    1.19779245625055, 0.0892464546337603, 0.446642767986137,
    0.34570878083834, 0.130478144837288, -0.0410385359578811,
    -0.100929223732173, -0.277310119566828, -0.401938968295842,
    -0.433555535429798, -0.425894949004986, -0.422397788871241,
    -0.298355349820222, 0.167091968978497, 0.18321769346486,
    0.110113392915613, -0.525137481608645, 0.508125482025883,
    0.794954101917703, 0.780586637924992, 0.944589724869547,
    0.887407266694884, 0.489616865304751, 2.00741767223713,
    -0.341867060574754, 1.35779003650178, 0.290856050655419,
    0.357337142424838, 0.13148384296731, -0.0486525097265586,
    -0.111064872524035, -0.295277046615757, -0.433706834878977,
    -0.484441193814012, -0.171094901190814, -0.0593737345467254,
    -0.598813240305986, 0.548140901913199, 0.16389419399062,
    0.0251287873829865, -0.506872937415427, 0.103391649249744,
    0.324483058344504, 0.403663838323703, 0.582120239085168,
    0.182255134228698, 1.19779245625054, -0.341867060574751,
    3.99861269607432, -2.00886429180448, 0.881002722046794,
    0.356715486780007, 0.114035128649945, -0.081859095815927,
    -0.144619951057461, -0.29572669309598, -0.350426493349162,
    -0.371609126526997, -0.613212031156679, -0.829918754600024,
    -0.484066776146489, 0.402802042938446, 0.162198493812755,
    0.0712284135539022, -0.438726607538561, -0.128745904515543,
    0.0820494696682656, 0.203586408121846, 0.251692801313291,
    0.448768240712079, 0.0892464546337585, 1.35779003650177,
    -2.00886429180448, 5.69767997552633, -0.950166465577867,
    0.386516976943115, 0.162579206564945, -0.0135283061654258,
    -0.0788824543667668, -0.297040770247142, -0.492669425332621,
    -0.562105275521641, -0.341961974289066, -0.336529822591599,
    -0.222539433922648, 0.176247371186237, 0.106799415384203,
    0.0042092782089533, -0.289330429361373, -0.0765211944825078,
    0.0547331327769319, 0.0871329612292375, 0.177417447612863,
    0.0819989625257824, 0.446642767986138, 0.29085605065542,
    0.881002722046795, -0.950166465577866, 2.43458440656306,
    0.225417044852558, 0.100628997996125, 0.00778427056629371,
    -0.0196130120822873, -0.124385518181094, -0.214499024431833,
    -0.511121699992081, -0.620166616003633, -0.60645532848849,
    -0.343523840336231, 0.253097604219116, 0.109314043840204,
    0.138413432144904, -0.318378214065368, -0.14210598704292,
    0.0486413023665631, 0.109134911376121, 0.236534565581584,
    0.195295673825192, 0.34570878083834, 0.357337142424838,
    0.356715486780007, 0.386516976943115, 0.225417044852558,
    0.39392854398882, 0.127125584382261, -0.0886497989809537,
    -0.161435653471641, -0.34944548551855, -0.449697110002955,
    -0.376881691271306, -0.321387399770619, -0.313722205092763,
    -0.124699240656557, 0.0912014747571047, 0.0396037940691688,
    0.0519845825338027, -0.101315898912011, -0.0700821910069957,
    -0.000893288118835158, 0.0232034159348933, 0.063697071092112,
    0.0572040232059281, 0.130478144837288, 0.13148384296731,
    0.114035128649945, 0.162579206564945, 0.100628997996125,
    0.127125584382261, 0.0574406818774124, -0.00173302682023446,
    -0.0287499587058463, -0.104275328896744, -0.161636207057517,
    -0.160756204797398, -0.130142697810604, -0.13018206203756,
    0.0511301117304161, -0.038017730487787, -0.0171925190894076,
    -0.01833487828236, 0.0702660843270248, -0.0083599104556969,
    -0.0422342223315041, -0.0477316317501321, -0.0798064294015518,
    -0.057760141598576, -0.0410385359578815, -0.0486525097265592,
    -0.0818590958159274, -0.0135283061654262, 0.00778427056629371,
    -0.0886497989809539, -0.00173302682023456, 0.0682701229991469,
    0.0825822726440073, 0.0985048806897502, 0.0706692739185619,
    -0.000645718260510867, 0.0195562281836991, 0.0117075505963419,
    0.112522894520982, -0.0817277273105231, -0.0379071720667655,
    -0.044906936658622, 0.125057219633614, 0.0238183516288047,
    -0.0525140148744461, -0.0695234156209473, -0.128298735246425,
    -0.0998657710018698, -0.100929223732172, -0.111064872524035,
    -0.144619951057461, -0.0788824543667667, -0.0196130120822869,
    -0.161435653471641, -0.0287499587058462, 0.0825822726440071,
    0.117052981020959, 0.17162156214383, 0.155502600429989,
    0.0424939853288228, 0.0710929826375929, 0.0587657751998833,
    0.282177537241414, -0.204215321526614, -0.0926771979192491,
