Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scipy code is faster in Pyodide v0.23.4 than in v0.24.0 and v0.25.0 #4486

Closed
sebastianherreramonterrosa opened this issue Feb 6, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@sebastianherreramonterrosa
Copy link

I currently use pyodide to code the kernel of https://phitter.io. The first version that I used of pyodide was v0.23.4 and all worked perfect. When I update my version to v0.24.0 or v0.25.0 the execution's time for simple operations increase and freeze the browser. An example of a simple operation is:

mode: function (arr: number[]): number {
    const pyodideStore = usePyodideStore();
    pyodideStore.pyodide.globals.set("arr", arr);
    pyodideStore.runPython(`
        def calc_shgo_mode(distribution, data):
            objective = lambda x: -distribution.pdf(x)[0]
            bnds = [[min(data), max(data)]]
            solution = scipy.optimize.shgo(objective, bounds=bnds, n=100 * len(data))
            return solution.x[0]
        data = arr.to_py()
        distribution = scipy.stats.gaussian_kde(data)
        mode = calc_shgo_mode(distribution, data)
    `);
    return pyodideStore.pyodide.globals.get("mode");
},

I don´t know if is an explanaition about this behaviour.

@sebastianherreramonterrosa sebastianherreramonterrosa added the bug Something isn't working label Feb 6, 2024
@hoodmane
Copy link
Member

hoodmane commented Feb 6, 2024

It would be nice if you could make benchmarks of how long the specific operations you are doing take on the different versions. You are using scipy which is it's own weird beast. Between 0.23.4 and 0.24.0 there were three PRs which might have an effect on this:
#3331
#3794
#3996

All three of which were generous contributions from @lesteve, maybe he has a guess. To get a better concept, it would be useful to break down how much time is spent in each of the scipy functions. One could also compare the same functions on native Python in scipy 1.9 vs 1.11, probably there there isn't much of a difference.

See this comment which has some benchmarks on the effects of these PRs. But it seems to show that Pyodide 0.24.0 should be a fair bit faster than 0.23.4 for most of the operations tested. Anyways it's hard to know without trying to measure what you are using specifically.

cc @rth

@hoodmane hoodmane changed the title Pyodide v0.23.4 is faster than v0.24.0 and v0.25.0 Scipy code is faster in Pyodide v0.23.4 than in v0.24.0 and v0.25.0 Feb 6, 2024
@lesteve
Copy link
Contributor

lesteve commented Feb 7, 2024

@sebastianherreramonterrosa what is the value of arr in your snippet?

Without a stand-alone snipet, we are pretty much reduced to random guessing ...

@sebastianherreramonterrosa
Copy link
Author

@lesteve The value of arr is here: Dataset

// JS Representation
const arr = [782.1587476, 795.387086, 799.7345698, 806.9197855, 807.0463942, 807.3649597, 809.8982279, 812.8464141, 813.5454571, 814.0393853, 814.4982938, 814.7235583, 815.2237586, 815.3689112, 815.549188, 816.5616516, 816.6898013, 816.7170744, 816.9565214, 818.545773, 818.5851785, 818.6100861, 818.6707629, 818.8429549, 819.5863531, 820.7975631, 821.2037954, 821.2545802, 821.3866398, 822.7657442, 823.5462453, 823.6373205, 823.8577613, 824.4523423, 824.6145776, 826.8229941, 826.9143961, 827.4739583, 827.7353163, 828.1253071, 828.18333, 828.4066215, 828.4682931, 828.6164161, 828.7162096, 828.9112205, 829.0875069, 829.239806, 829.35716, 830.0010021, 830.1688936, 830.3358744, 831.4524552, 831.5245596, 831.7075856, 832.0860798, 832.2370759, 832.3447862, 833.2832111, 833.4840663, 833.5412179, 833.8488735, 833.939438, 834.0439737, 834.3184225, 834.4691618, 835.0099595, 835.3312188, 835.4768996, 835.6195047, 835.6228222, 835.6312219, 835.6332902, 835.7457027, 836.2510027, 836.2798312, 836.4761627, 836.5636378, 836.7503009, 836.7804539, 836.9120054, 837.2280176, 837.2544554, 837.5386083, 837.663141, 838.0297279, 838.3433105, 838.35716, 838.4609116, 838.6197982, 838.730219, 839.0732597, 839.1237875, 839.1483822, 839.4337945, 839.4762865, 839.6733894, 839.6817123, 839.7688878, 839.8980412, 840.0159731, 840.2424596, 840.3715146, 840.3871349, 841.0504482, 841.1463021, 841.1763338, 841.2826581, 841.7285967, 841.9570781, 841.9581628, 841.9860092, 842.0103145, 842.0312513, 842.0517846, 842.0928257, 842.1650072, 842.2656446, 842.2829051, 842.2834287, 842.3116781, 842.3786753, 842.4788982, 842.4917058, 842.4981138, 842.5453892, 842.7016393, 842.7861256, 842.8692922, 842.9069063, 842.9207527, 842.9359663, 842.9533521, 842.9605148, 843.099987, 843.2001442, 843.467077, 843.5545311, 843.657943, 843.696733, 843.7495148, 843.8336588, 843.8869706, 843.9069298, 844.1345881, 844.2656454, 844.2886571, 844.3334613, 844.3965966, 844.4545492, 844.6503324, 844.7755959, 845.46535, 845.851068, 846.4413221, 846.5233331, 846.5892224, 846.6594364, 846.8058929, 846.8283309, 846.8546908, 846.8978856, 847.0392173, 847.0792188, 847.4043115, 847.4994034, 847.5290311, 847.7404196, 847.7508672, 847.8878883, 848.0013245, 848.0751792, 848.1196961, 848.404692, 848.5295817, 848.5861349, 848.6511693, 848.6792686, 848.6904689, 848.7935428, 848.9257823, 849.1313569, 849.5648062, 849.5894205, 849.6632241, 849.7188228, 849.7968841, 849.8450987, 849.919392, 849.9852716, 850.0058486, 850.0656169, 850.2730876, 850.3143636, 850.3615158, 850.3854795, 850.4776778, 850.655202, 850.7403472, 851.1023123, 851.1253055, 851.1548517, 851.162766, 851.2446505, 851.334977, 851.5258614, 851.689019, 851.6948659, 851.7774109, 851.8469066, 851.9722277, 852.0785364, 852.0942629, 852.1183263, 852.1509178, 852.1818823, 852.3636828, 852.3719416, 852.4076414, 852.4124014, 852.4285035, 852.5509646, 852.6016967, 852.6295195, 852.778375, 852.9630238, 853.0480618, 853.1853232, 853.2536754, 853.4650902, 853.474556, 853.4803882, 853.4981369, 853.5169506, 853.7498026, 853.7596088, 853.771249, 853.8177267, 853.9648747, 854.0160808, 854.0371607, 854.1469414, 854.1878797, 854.2782155, 854.4959794, 854.5128875, 854.5341941, 854.6029135, 854.635134, 854.6732009, 854.7233832, 854.7251252, 854.8667529, 854.9922837, 855.0582391, 855.1187926, 855.1202825, 855.1394506, 855.2158649, 855.224387, 855.277782, 855.3214245, 855.3606894, 855.4310529, 855.4707688, 855.5728725, 855.7080877, 855.7547884, 855.7788215, 855.7846521, 855.8148306, 855.8377203, 855.8591832, 856.0358198, 856.1468668, 856.2625146, 856.3525789, 856.3710821, 856.4059718, 856.4735757, 856.5394404, 856.5788504, 856.6649837, 856.6866937, 856.7298533, 856.7300913, 856.7835127, 856.8890044, 856.9803916, 857.0230457, 857.0484798, 857.1133314, 857.2304327, 857.2570511, 857.2697741, 857.3049065, 857.3432602, 857.3461793, 857.4165333, 857.5437701, 857.6109487, 857.6277571, 857.639747, 857.727137, 857.9464543, 857.9506384, 858.0427017, 858.1118515, 858.1213896, 858.1335344, 858.2070648, 858.2369164, 858.2565261, 858.2844712, 858.3793605, 858.4157308, 858.4666072, 858.5767237, 858.610572, 858.6609581, 858.8101175, 858.9694253, 858.9717189, 858.9762378, 859.0542378, 859.114204, 859.1832323, 859.1964421, 859.253045, 859.2957552, 859.3754127, 859.3996904, 859.4222159, 859.456602, 859.5289713, 859.5448865, 859.679917, 859.6958147, 859.7800027, 859.7809582, 859.788375, 859.9181919, 859.9629368, 859.9669429, 859.9918573, 860.0009367, 860.0268162, 860.0409976, 860.0689805, 860.0764545, 860.1176702, 860.1634715, 860.1694903, 860.2103333, 860.2460809, 860.3538701, 860.3826605, 860.4005881, 860.4138446, 860.4185801, 860.4638097, 860.4670054, 860.5283644, 860.5931542, 860.6079135, 860.6204238, 860.622259, 860.8544945, 860.8668242, 860.8788494, 860.9821749, 860.9830103, 861.0839108, 861.1113551, 861.3580732, 861.392444, 861.3962901, 861.4033673, 861.5201231, 861.5424699, 861.569766, 861.5737016, 861.6040886, 861.6309877, 861.6310055, 861.6564187, 861.7807512, 861.8008336, 861.8263225, 861.8810661, 861.9628085, 861.9774943, 862.0591369, 862.0911487, 862.1934019, 862.2110969, 862.240667, 862.2508034, 862.2773312, 862.2801743, 862.4273951, 862.4560616, 862.4699879, 862.5850871, 862.5917319, 862.6874776, 862.6886352, 862.7384848, 862.7569398, 862.8529433, 862.8626725, 862.9115471, 863.0274525, 863.1849294, 863.1906987, 863.1970598, 863.2648953, 863.2777406, 863.3290182, 863.3865371, 863.4308369, 863.4595399, 863.5809612, 863.5878549, 863.6074579, 863.6247579, 863.6664467, 863.6738954, 863.717568, 863.7253293, 863.823153, 863.8716101, 863.9300991, 863.9905764, 864.0004003, 864.0209765, 864.0667252, 864.0826488, 864.0893278, 864.1737217, 864.1997249, 864.2046876, 864.229757, 864.2397886, 864.2465886, 864.305131, 864.3389194, 864.3476932, 864.3835192, 864.404353, 864.4997047, 864.5255873, 864.5457004, 864.5592507, 864.7586133, 864.8069879, 864.8118739, 864.8344875, 864.8688667, 864.9462794, 864.9604254, 864.9910742, 865.0163996, 865.022091, 865.0683656, 865.1081238, 865.1583917, 865.2501112, 865.2749089, 865.2851953, 865.325469, 865.328327, 865.430275, 865.4514735, 865.4600855, 865.5040912, 865.5896058, 865.6761783, 865.7396302, 865.7641858, 865.8602111, 865.8624922, 865.9452542, 865.9459657, 865.9462152, 865.9477506, 865.961709, 865.9656759, 865.9978445, 866.0136831, 866.0875596, 866.1238567, 866.1823497, 866.1879169, 866.2497999, 866.267226, 866.2792419, 866.3538624, 866.3790684, 866.4294118, 866.5094482, 866.5472755, 866.5635153, 866.6098511, 866.6173881, 866.6246633, 866.6476948, 866.6561446, 866.6862933, 866.6956207, 866.7156736, 866.7353973, 866.7554796, 866.7675189, 866.8370668, 866.879343, 866.953693, 866.9724811, 867.022321, 867.2248012, 867.2665982, 867.2899444, 867.3301462, 867.331914, 867.3370949, 867.3399766, 867.345396, 867.3542287, 867.429616, 867.4492505, 867.4537017, 867.4930933, 867.5284609, 867.5651521, 867.5880558, 867.6009308, 867.6351897, 867.6890995, 867.7021903, 867.7752852, 867.8026153, 867.8731957, 867.9621609, 867.97682, 867.9836246, 868.0264632, 868.0480631, 868.1787902, 868.2426199, 868.3386618, 868.3503943, 868.3947593, 868.404012, 868.5082333, 868.5350414, 868.5504229, 868.5783449, 868.6340435, 868.7074892, 868.7670459, 868.8085481, 868.8189999, 868.8281739, 868.8307809, 868.8733644, 869.0649608, 869.1204867, 869.1316025, 869.192464, 869.2925762, 869.2956843, 869.324623, 869.3591494, 869.3592932, 869.3726452, 869.3765701, 869.3783265, 869.5025607, 869.5450973, 869.5500504, 869.5610493, 869.590671, 869.7012583, 869.7354967, 869.7394734, 869.7786962, 869.8088289, 869.8542718, 869.8804441, 869.8862735, 869.9443149, 869.9460516, 870.0578012, 870.0666913, 870.1122222, 870.1171013, 870.1348305, 870.1552228, 870.1644474, 870.2066534, 870.21681, 870.2581006, 870.2604022, 870.2708777, 870.2806314, 870.3174869, 870.3355396, 870.39364, 870.4213434, 870.4233218, 870.4338684, 870.4433912, 870.4885629, 870.5082413, 870.5338205, 870.5493134, 870.6151044, 870.6244149, 870.658427, 870.683495, 870.7671641, 870.7685698, 870.7889983, 870.8489869, 870.8704471, 870.9019464, 870.9296165, 870.9640818, 871.0246954, 871.0912496, 871.1085711, 871.254292, 871.2640589, 871.2888834, 871.3106621, 871.4411725, 871.4447261, 871.4843156, 871.6184513, 871.6191847, 871.6912778, 871.6950445, 871.7112015, 871.7130404, 871.729319, 871.7880936, 871.8391008, 871.8635821, 871.8836068, 871.8847767, 871.9395164, 871.9583515, 871.958968, 872.0153485, 872.037776, 872.1005787, 872.2087747, 872.2225163, 872.2274791, 872.2770698, 872.2831565, 872.2851052, 872.331393, 872.4011178, 872.4714698, 872.4971242, 872.5219973, 872.5982144, 872.5993298, 872.6085526, 872.6728447, 872.7756421, 872.8995799, 872.9145417, 872.9207345, 872.9230154, 872.9449416, 872.9755434, 873.0155942, 873.0919728, 873.1167569, 873.1361866, 873.1814808, 873.2183366, 873.2392234, 873.2485468, 873.2702648, 873.2720889, 873.2951493, 873.3865566, 873.4158555, 873.500556, 873.5319464, 873.6855352, 873.6906065, 873.7271928, 873.7583086, 873.816419, 873.8792258, 873.9204321, 873.9208096, 873.940095, 873.9485891, 873.9811986, 873.9952788, 874.087778, 874.0932569, 874.1038451, 874.119552, 874.1295218, 874.161451, 874.1734033, 874.2191899, 874.2746553, 874.3288225, 874.3423884, 874.3488125, 874.3803244, 874.4342655, 874.4367397, 874.4693033, 874.4707547, 874.5863337, 874.6078583, 874.6903967, 874.7481289, 874.8709368, 874.9086792, 874.9746519, 874.9760631, 874.9861585, 875.1012416, 875.1260115, 875.1467516, 875.190557, 875.2584833, 875.2736726, 875.275011, 875.3452632, 875.3537608, 875.4334982, 875.4508048, 875.4969518, 875.4982944, 875.6160241, 875.6258949, 875.634177, 875.6627567, 875.6802332, 875.7099107, 875.7216339, 875.7349581, 875.8132414, 875.8299069, 875.8637355, 875.893718, 875.923427, 876.0554595, 876.0561243, 876.0571265, 876.0922079, 876.101079, 876.1209743, 876.1306606, 876.136072, 876.1668303, 876.2053787, 876.2544616, 876.2579437, 876.3476088, 876.3509242, 876.3513804, 876.4591675, 876.4735279, 876.4864953, 876.5636328, 876.5851535, 876.7597727, 876.7665073, 876.7839597, 876.787057, 876.7937265, 876.7993689, 876.8150221, 876.8169517, 876.8471022, 876.8875677, 876.9282669, 876.9710813, 876.9851825, 876.9949606, 877.0381644, 877.0574657, 877.1169795, 877.1330331, 877.1404848, 877.2007651, 877.285081, 877.2908848, 877.3046894, 877.31101, 877.3547276, 877.3634816, 877.3865706, 877.4222439, 877.4329044, 877.4601132, 877.4854006, 877.4945715, 877.5408161, 877.5417593, 877.5742222, 877.6271825, 877.6307179, 877.6882774, 877.7097935, 877.7566048, 877.7724436, 877.8531696, 877.876906, 877.9067431, 877.9147984, 877.9177926, 878.0040262, 878.0229884, 878.0248847, 878.0477176, 878.0522838, 878.055012, 878.1174972, 878.1676769, 878.2015039, 878.2190838, 878.2422891, 878.3090724, 878.3429301, 878.3741484, 878.3918131, 878.4258675, 878.4875268, 878.646919, 878.6507949, 878.6645655, 878.760361, 878.7609977, 878.8358942, 878.8537124, 878.87946, 878.908014, 879.0540702, 879.0623667, 879.0784496, 879.085164, 879.1661569, 879.167068, 879.1898847, 879.19048, 879.1950193, 879.2267717, 879.2443516, 879.2804033, 879.3542149, 879.3744385, 879.396938, 879.5199186, 879.6014262, 879.622814, 879.6375174, 879.6394698, 879.6768376, 879.7557698, 879.7601091, 879.7712126, 879.7796249, 879.7841481, 879.8043685, 879.8245905, 879.8341876, 879.9594216, 879.9653627, 879.9822428, 880.1282142, 880.1398705, 880.162837, 880.1748014, 880.1807493, 880.1870496, 880.2009292, 880.235968, 880.2450426, 880.2726906, 880.2842302, 880.3214688, 880.3582622, 880.3647906, 880.3709233, 880.3977348, 880.411284, 880.4200699, 880.4381291, 880.4518882, 880.4710647, 880.5177603, 880.527427, 880.5390287, 880.540021, 880.5600933, 880.5735713, 880.5738835, 880.5870468, 880.5906233, 880.6250329, 880.6296337, 880.6343272, 880.6464337, 880.6476791, 880.6634182, 880.6765156, 880.6876663, 880.733272, 880.7426167, 880.759981, 880.7699676, 880.7929376, 880.793621, 880.8300851, 880.8582531, 880.8720513, 880.9600542, 880.9715997, 880.9804228, 881.0049092, 881.0679231, 881.076677, 881.0866773, 881.1153204, 881.1289506, 881.1336735, 881.1565068, 881.1904345, 881.1978718, 881.2141377, 881.2410964, 881.2587872, 881.2749548, 881.332104, 881.3349176, 881.3384084, 881.4093262, 881.438169, 881.4508062, 881.49238, 881.5227655, 881.5893501, 881.6083354, 881.6542917, 881.6582569, 881.6890546, 881.7050085, 881.7147464, 881.7991998, 881.8064411, 881.9246093, 881.942485, 881.9985998, 882.0190624, 882.0249948, 882.0665313, 882.1011165, 882.1327578, 882.1354598, 882.1702949, 882.2013945, 882.2278444, 882.2358369, 882.2495746, 882.2821253, 882.3975979, 882.4409709, 882.4644211, 882.4647359, 882.4777446, 882.4838722, 882.5160373, 882.5435177, 882.5867244, 882.6559987, 882.6954033, 882.7085532, 882.7287336, 882.8271223, 882.8466527, 882.8616746, 882.9118585, 882.9446462, 882.9558845, 883.0317416, 883.0674043, 883.0762778, 883.0859195, 883.1508205, 883.1826474, 883.2859549, 883.300353, 883.3032277, 883.3046086, 883.3183623, 883.3239844, 883.3364634, 883.3553425, 883.3639472, 883.4573078, 883.4881879, 883.5122604, 883.531111, 883.5661984, 883.5784611, 883.5801073, 883.6007569, 883.6271874, 883.6436494, 883.6671969, 883.6922505, 883.7375095, 883.7590087, 883.7663095, 883.7861057, 883.7948863, 883.8002845, 883.8114709, 883.8117659, 883.8194284, 883.8230523, 883.8633183, 883.8743359, 883.9324142, 883.9451261, 883.9466271, 883.9615063, 884.0058444, 884.0154656, 884.0192582, 884.0365996, 884.0513416, 884.0530919, 884.0629919, 884.0787077, 884.087954, 884.1296226, 884.1578377, 884.2954658, 884.3162841, 884.3247916, 884.3425989, 884.3758133, 884.3965611, 884.4236697, 884.5079064, 884.7068506, 884.7166289, 884.7368457, 884.7473131, 884.8213238, 884.8840868, 884.9402885, 884.9660408, 884.977664, 885.1604797, 885.2200021, 885.2779761, 885.3256131, 885.3596937, 885.370054, 885.4052554, 885.4307169, 885.4601886, 885.5100024, 885.5323465, 885.5488229, 885.5665213, 885.5758687, 885.5957289, 885.597766, 885.6205499, 885.6280059, 885.6477598, 885.6851975, 885.6939911, 885.7381134, 885.7569506, 885.8429192, 885.8533163, 885.8674844, 885.9329921, 885.9636556, 885.9877656, 886.0320199, 886.0431425, 886.1067792, 886.1201001, 886.1428073, 886.1459527, 886.1958275, 886.2201081, 886.2568192, 886.2601177, 886.281765, 886.2863002, 886.3409374, 886.3649512, 886.388617, 886.4325098, 886.4347744, 886.4458991, 886.4637025, 886.4946113, 886.5456995, 886.5575286, 886.6079876, 886.6097386, 886.647303, 886.6751305, 886.6855316, 886.7122966, 886.7594417, 886.7672019, 886.7672357, 886.8353837, 886.8467557, 886.8557887, 886.8688785, 886.9293603, 886.9528441, 886.9777796, 886.9790721, 886.9824876, 887.0183222, 887.024093, 887.0656213, 887.0887146, 887.0887445, 887.0893576, 887.1047644, 887.1080161, 887.1393491, 887.1554699, 887.1621051, 887.1816174, 887.2089312, 887.2387944, 887.2515879, 887.2761876, 887.2770555, 887.2807531, 887.281315, 887.2898924, 887.2920651, 887.293797, 887.3033454, 887.3259704, 887.3836914, 887.4399223, 887.450823, 887.5287286, 887.5764584, 887.606971, 887.6097644, 887.6328683, 887.6337398, 887.6450292, 887.6598165, 887.6787459, 887.6787733, 887.6941082, 887.7120302, 887.8366728, 887.8526492, 887.8707368, 887.8972027, 887.9410559, 887.958195, 887.9698014, 887.9711167, 888.0331645, 888.0645098, 888.1346028, 888.1461451, 888.1751073, 888.1797978, 888.2325188, 888.2428044, 888.279416, 888.3003687, 888.316888, 888.3839806, 888.4703156, 888.5058347, 888.5060203, 888.5162328, 888.5364139, 888.5764851, 888.5816954, 888.5821762, 888.5833724, 888.6159206, 888.6189233, 888.6405493, 888.67704, 888.6879409, 888.7022493, 888.7055447, 888.7723846, 888.8059683, 888.8502701, 888.8810273, 888.890289, 888.89071, 889.0200597, 889.0556372, 889.0773218, 889.1145304, 889.1230876, 889.2056815, 889.2205136, 889.2435282, 889.2488072, 889.2957895, 889.3474809, 889.373568, 889.4010399, 889.4254407, 889.4254472, 889.4523269, 889.4538101, 889.4541286, 889.4875207, 889.4975523, 889.5111013, 889.5895742, 889.615238, 889.6368376, 889.6477856, 889.6793873, 889.6809367, 889.7500712, 889.7590507, 889.7600762, 889.8020726, 889.8119168, 889.8409789, 889.8473712, 889.8496589, 889.8598788, 889.8603202, 889.8979006, 889.8986021, 889.9104863, 889.9171215, 889.919348, 889.9249594, 889.9254897, 889.9486683, 890.034532, 890.1141163, 890.115741, 890.1320128, 890.1781133, 890.2308049, 890.2554206, 890.2894303, 890.3769275, 890.4222579, 890.4717265, 890.4754674, 890.5782469, 890.6816568, 890.6898632, 890.6916582, 890.6973432, 890.703591, 890.7427699, 890.743887, 890.7447999, 890.8436663, 890.9997614, 891.0407106, 891.0558675, 891.0582536, 891.0732628, 891.1655512, 891.1953472, 891.1995171, 891.212909, 891.2174065, 891.2705191, 891.2826232, 891.298377, 891.3227383, 891.3967681, 891.4292382, 891.4577809, 891.4606363, 891.5611054, 891.6023162, 891.6164771, 891.6448012, 891.67849, 891.6900524, 891.7348868, 891.7388607, 891.7440362, 891.7656983, 891.7867272, 891.8385851, 891.8437513, 891.8447278, 891.8448697, 891.8616032, 891.8859532, 891.9384412, 891.9416411, 891.9437373, 891.9605029, 891.967867, 891.968273, 891.9725994, 891.9787192, 891.9885078, 891.9953113, 892.0151159, 892.0438879, 892.0879054, 892.1008516, 892.1139413, 892.1990777, 892.2167649, 892.2500578, 892.2505215, 892.2701887, 892.2829834, 892.2953644, 892.3455451, 892.3962515, 892.3983337, 892.4103317, 892.4233026, 892.4238796, 892.4270264, 892.4464271, 892.481909, 892.5361394, 892.54059, 892.5485391, 892.601353, 892.6691471, 892.679399, 892.7326713, 892.7430822, 892.8220908, 892.8486552, 892.8652216, 892.8772855, 892.8949763, 892.8974853, 892.9011978, 892.9042047, 892.9123432, 892.9220852, 892.9400307, 892.963279, 892.9725219, 893.022682, 893.0349285, 893.0870741, 893.1310514, 893.1332703, 893.1386134, 893.1721101, 893.17912, 893.1948263, 893.2437762, 893.2667186, 893.402335, 893.4672432, 893.4966162, 893.5017894, 893.5779986, 893.639394, 893.6517574, 893.7181125, 893.7715267, 893.7895381, 893.8417352, 893.8566465, 893.9103179, 893.9172946, 894.0203375, 894.0385365, 894.0389549, 894.0676295, 894.0729616, 894.0791502, 894.0955757, 894.112641, 894.1204725, 894.1419384, 894.1681853, 894.1769813, 894.2508865, 894.3094656, 894.3098951, 894.322457, 894.3417198, 894.4409344, 894.5213306, 894.5299124, 894.5829505, 894.6071095, 894.6469123, 894.6821165, 894.7108331, 894.7370073, 894.776624, 894.7861041, 894.7913249, 894.8194891, 894.8301659, 894.8304291, 894.8815089, 894.939508, 895.0442227, 895.0589671, 895.0750121, 895.0821013, 895.0823947, 895.1182341, 895.1318765, 895.1378973, 895.1654248, 895.1882584, 895.2226397, 895.2458569, 895.2484016, 895.2518521, 895.3243588, 895.3269164, 895.3591796, 895.364725, 895.3712169, 895.3737035, 895.397426, 895.4123705, 895.43446, 895.4771601, 895.4902263, 895.4978124, 895.4999842, 895.5029089, 895.5603089, 895.5989727, 895.6361632, 895.6476914, 895.6696314, 895.6794662, 895.6886413, 895.7005851, 895.7028268, 895.7097312, 895.7122032, 895.7192673, 895.7257132, 895.8088649, 895.8324811, 895.8536443, 895.8915327, 895.9436994, 895.9640563, 895.9990576, 896.0127408, 896.0523528, 896.0569794, 896.0662836, 896.0757807, 896.0961626, 896.1413303, 896.1699288, 896.1932354, 896.2142678, 896.2524928, 896.3069022, 896.3124275, 896.3834622, 896.4204933, 896.4652681, 896.4761897, 896.4824148, 896.5721113, 896.6276986, 896.6523918, 896.6585213, 896.6856333, 896.7107378, 896.7427303, 896.8228397, 896.8520311, 896.9223492, 896.9231451, 896.9270623, 896.942365, 896.945728, 896.9518687, 896.9915516, 897.0266234, 897.0325964, 897.0731926, 897.3285089, 897.3603801, 897.361806, 897.3839029, 897.3876408, 897.5075973, 897.5233802, 897.5706171, 897.6076083, 897.6297917, 897.6605212, 897.7397179, 897.7584852, 897.8049122, 897.8060626, 897.8148519, 897.9278937, 897.9489603, 898.0003962, 898.0136319, 898.050075, 898.0515119, 898.0932751, 898.1449444, 898.1633453, 898.1639141, 898.1701955, 898.1831816, 898.2159292, 898.2423209, 898.3152917, 898.3236292, 898.3339617, 898.367438, 898.390342, 898.4174269, 898.4345396, 898.4468698, 898.4616088, 898.48712, 898.487621, 898.5334907, 898.5484079, 898.5771893, 898.5869894, 898.6292885, 898.6379138, 898.6634717, 898.6932746, 898.7540218, 898.7958522, 898.8274402, 898.8723178, 898.8794034, 898.8794041, 898.8894314, 898.8982681, 898.9100762, 898.9557457, 899.00263, 899.0093631, 899.0862708, 899.1025951, 899.1445121, 899.1757613, 899.2203011, 899.2244166, 899.229526, 899.2651143, 899.2841141, 899.2873029, 899.4093471, 899.476449, 899.502388, 899.6714585, 899.7395829, 899.8162084, 899.9233127, 899.9901443, 899.9942598, 900.1116102, 900.1125491, 900.1291797, 900.1329038, 900.1344617, 900.2097482, 900.2766165, 900.2773693, 900.3033516, 900.3135958, 900.3494446, 900.3588533, 900.3628824, 900.3835626, 900.4520788, 900.4931674, 900.4971906, 900.506054, 900.5522291, 900.6197565, 900.6483866, 900.7092849, 900.709415, 900.7114779, 900.7237187, 900.7382911, 900.7767414, 900.7858665, 900.8030744, 900.8607497, 900.8705958, 900.9412396, 900.9501378, 900.9671252, 900.9979218, 901.0434152, 901.0627598, 901.0990398, 901.1323016, 901.1328693, 901.1611046, 901.1652202, 901.2467294, 901.2611865, 901.2826935, 901.3029028, 901.3103576, 901.315496, 901.3701373, 901.3844942, 901.3967882, 901.398208, 901.4006631, 901.4085964, 901.5948337, 901.6081592, 901.6421085, 901.667053, 901.6721479, 901.6733114, 901.6809021, 901.6846704, 901.7138236, 901.7358557, 901.7939344, 901.8603814, 901.8699795, 901.9570929, 901.9589088, 901.9745391, 902.0272182, 902.0860045, 902.1088309, 902.1752115, 902.1934363, 902.2328392, 902.3609166, 902.3695855, 902.3717079, 902.3876664, 902.3955054, 902.4044419, 902.4229559, 902.4383004, 902.4455083, 902.5140584, 902.5214115, 902.5235095, 902.5509479, 902.6021237, 902.6099077, 902.6200086, 902.6209301, 902.6343404, 902.6360412, 902.6641587, 902.6989851, 902.7382087, 902.7499785, 902.7769596, 902.7863462, 902.8335253, 902.8393497, 902.8445629, 902.8634073, 902.8786193, 902.894155, 902.9022432, 902.93766, 902.9615891, 903.0149059, 903.089666, 903.1342364, 903.1768114, 903.2041591, 903.2304755, 903.2898804, 903.3444276, 903.3787424, 903.3863479, 903.4465128, 903.4756626, 903.4771877, 903.5385141, 903.7508969, 903.7803873, 903.7974587, 903.8322739, 903.8446915, 903.8639954, 903.8916352, 903.9907742, 904.007145, 904.0082079, 904.1331489, 904.2441541, 904.2536612, 904.2694689, 904.3419049, 904.373089, 904.4126359, 904.4676765, 904.5163191, 904.5265953, 904.5732632, 904.5979707, 904.6037334, 904.6133736, 904.6324168, 904.6559951, 904.754243, 904.7822711, 904.7999681, 904.8646061, 904.8762071, 904.8886065, 904.9062935, 904.9318547, 904.9653376, 904.9799326, 904.9931785, 904.9983149, 905.137418, 905.1560945, 905.19594, 905.201404, 905.225989, 905.2273371, 905.2621844, 905.303947, 905.348164, 905.4334153, 905.4588778, 905.460257, 905.4723355, 905.5302436, 905.6569755, 905.689561, 905.6976947, 905.7562625, 905.7975113, 905.802205, 905.8183842, 905.8405572, 905.8405706, 905.8591788, 905.8975369, 905.9496034, 905.9831573, 906.0830044, 906.1112427, 906.1494164, 906.1510998, 906.2260771, 906.2392914, 906.2449855, 906.2821834, 906.284019, 906.2958529, 906.3243491, 906.3344775, 906.3705772, 906.3730813, 906.3868379, 906.5995429, 906.8230319, 906.9119261, 906.9341949, 906.9592772, 906.9621404, 906.9689581, 906.9998319, 907.0075709, 907.0229988, 907.0653828, 907.12857, 907.1784884, 907.201896, 907.2292191, 907.2906568, 907.3497231, 907.3582152, 907.426522, 907.4599169, 907.4752755, 907.4954864, 907.5258505, 907.633815, 907.7011358, 907.7211735, 907.748167, 907.8460751, 907.9476722, 907.9621109, 908.0350976, 908.0388407, 908.0393228, 908.0493037, 908.0653558, 908.1102469, 908.1722999, 908.2485159, 908.2640138, 908.2656005, 908.2725651, 908.2790678, 908.2857411, 908.400655, 908.4116419, 908.4185085, 908.4195954, 908.4255357, 908.5306883, 908.549186, 908.5914958, 908.6540995, 908.6939522, 908.7045479, 908.7051658, 908.7111827, 908.7341369, 908.7639622, 908.7920531, 908.867048, 908.8973452, 908.9120806, 908.93188, 908.9688863, 909.013755, 909.0881028, 909.2151717, 909.2272985, 909.3135467, 909.3555895, 909.4349605, 909.5561474, 909.5740302, 909.617823, 909.6190973, 909.6689245, 909.6804831, 909.6993531, 909.722541, 909.7627871, 909.7795055, 909.8137075, 909.8286293, 909.8453806, 909.8706203, 909.8977213, 909.8983956, 909.9378658, 909.9817004, 910.0128044, 910.0177102, 910.0195578, 910.0231474, 910.0313568, 910.1493956, 910.1662086, 910.1703876, 910.2270864, 910.2526318, 910.2935325, 910.6453424, 910.738297, 910.7716056, 910.8149708, 910.8590972, 910.8788377, 910.8978674, 910.9422266, 910.9813919, 911.0547164, 911.1920417, 911.2202988, 911.3053698, 911.3172388, 911.400038, 911.4064037, 911.443415, 911.4510954, 911.4789544, 911.5093887, 911.5243282, 911.5382702, 911.612624, 911.6314939, 911.6803939, 911.6890935, 911.7821455, 911.7977209, 911.8275297, 911.8672378, 911.9396266, 911.9846811, 912.0097093, 912.0208783, 912.1929168, 912.2165956, 912.2373545, 912.3213836, 912.3278155, 912.4057646, 912.5418225, 912.5437325, 912.5585737, 912.6612059, 912.6692051, 912.6694686, 912.702797, 912.7106144, 912.9324081, 912.9572995, 912.9990672, 913.1367123, 913.2590401, 913.2597605, 913.311628, 913.3503531, 913.3812907, 913.4053763, 913.6298613, 913.8492496, 913.9419904, 914.0172336, 914.0409501, 914.1779646, 914.3856804, 914.4453795, 914.4736035, 914.4863062, 914.4884061, 914.7182635, 914.7606363, 914.840786, 915.0343354, 915.0364359, 915.1336029, 915.1491603, 915.2075085, 915.2650363, 915.4177328, 915.4244135, 915.4467513, 915.4637361, 915.5666772, 915.6295841, 915.6801651, 915.7282038, 915.8072941, 915.819277, 915.8321706, 915.8760143, 915.9057198, 915.9140011, 916.0392248, 916.0960924, 916.1411279, 916.2451026, 916.2663372, 916.44166, 916.4588722, 916.483015, 916.5206147, 916.5320739, 916.5651427, 916.5966714, 916.6285479, 916.7816444, 916.7871033, 916.803188, 916.8608829, 916.8696123, 916.9354837, 917.0934486, 917.2353639, 917.2980287, 917.333777, 917.3763915, 917.4381859, 917.6803312, 917.6931153, 917.8069148, 917.9101907, 917.920806, 917.9690829, 918.0074915, 918.0291909, 918.0772258, 918.1126609, 918.1235179, 918.1409722, 918.2921142, 918.348081, 918.3777829, 918.4697076, 918.47815, 918.56524, 918.6912766, 918.7168139, 918.7782721, 918.784186, 918.9240528, 919.0796341, 919.1042082, 919.1866983, 919.2244915, 919.2916685, 919.3580434, 919.3784239, 919.6897056, 919.751845, 919.7596854, 919.9463057, 920.0039489, 920.183925, 920.4634921, 920.5017618, 920.5314856, 920.7016564, 920.7059891, 920.8151251, 920.8740009, 920.9590744, 921.0808313, 921.1613823, 921.2072459, 921.3653039, 921.478868, 921.610092, 921.8353794, 921.8887112, 922.0269266, 922.0423677, 922.0504554, 922.0665681, 922.1021354, 922.4199766, 922.4863861, 922.5253403, 922.5696163, 922.7223899, 922.7641562, 923.1479024, 923.3693065, 923.4638082, 923.5025778, 923.6125241, 923.6233058, 923.6276864, 923.9245688, 924.011222, 924.120821, 924.4178273, 924.4265314, 924.4529928, 924.4672934, 924.4802814, 924.7695343, 924.7760339, 924.9897483, 925.0542336, 925.0760239, 925.1103863, 925.1783308, 925.642098, 925.6443887, 925.7136253, 925.9824697, 926.2136724, 926.516041, 926.6365557, 926.9057942, 927.1278621, 927.412003, 927.6539911, 927.8273543, 927.9099347, 928.4870432, 928.5760207, 928.6335355, 928.8010291, 929.2683396, 929.488798, 930.2120345, 930.2409666, 930.869405, 931.2298845, 931.5999795, 931.9604511, 933.0093013, 933.0294647, 933.1323162, 933.2311583, 933.4425496, 933.5988419, 933.7168507, 934.3222121, 934.8730977, 935.010967, 935.0746306, 935.0991934, 935.6479235, 935.6723948, 935.6794025, 935.822326, 936.2687752, 936.5224461, 937.4734664, 937.769119, 938.4283023, 938.9293084, 939.039414, 939.9934511, 941.4844677, 941.5771756, 941.6735601, 943.7874585, 947.5586641, 948.4608989, 949.5634606, 952.7002856]

In my browser, the duration of this operation with v0.23.4 is 0.21209999999403953 seconds. With v0.25.0 is 176.69040000000595 seconds. I hope it is possible to reproduce the scenario.

@lesteve
Copy link
Contributor

lesteve commented Feb 8, 2024

See Python reproducer below. In Python it goes from to less than 1s in scipy 1.10.1 to 40s in scipy 1.11.4. I would suggest to have a look at the scipy doc and github repo to see whether there are reasons for this performance change.

It could well be the case that much of the difference is unrelated to Pyodide and is due to a change in scipy, but that needs to be looked at in more details.

import numpy as np
import scipy.stats
import scipy.optimize


array = [782.1587476, 795.387086, 799.7345698, 806.9197855, 807.0463942, 807.3649597, 809.8982279, 812.8464141, 813.5454571, 814.0393853, 814.4982938, 814.7235583, 815.2237586, 815.3689112, 815.549188, 816.5616516, 816.6898013, 816.7170744, 816.9565214, 818.545773, 818.5851785, 818.6100861, 818.6707629, 818.8429549, 819.5863531, 820.7975631, 821.2037954, 821.2545802, 821.3866398, 822.7657442, 823.5462453, 823.6373205, 823.8577613, 824.4523423, 824.6145776, 826.8229941, 826.9143961, 827.4739583, 827.7353163, 828.1253071, 828.18333, 828.4066215, 828.4682931, 828.6164161, 828.7162096, 828.9112205, 829.0875069, 829.239806, 829.35716, 830.0010021, 830.1688936, 830.3358744, 831.4524552, 831.5245596, 831.7075856, 832.0860798, 832.2370759, 832.3447862, 833.2832111, 833.4840663, 833.5412179, 833.8488735, 833.939438, 834.0439737, 834.3184225, 834.4691618, 835.0099595, 835.3312188, 835.4768996, 835.6195047, 835.6228222, 835.6312219, 835.6332902, 835.7457027, 836.2510027, 836.2798312, 836.4761627, 836.5636378, 836.7503009, 836.7804539, 836.9120054, 837.2280176, 837.2544554, 837.5386083, 837.663141, 838.0297279, 838.3433105, 838.35716, 838.4609116, 838.6197982, 838.730219, 839.0732597, 839.1237875, 839.1483822, 839.4337945, 839.4762865, 839.6733894, 839.6817123, 839.7688878, 839.8980412, 840.0159731, 840.2424596, 840.3715146, 840.3871349, 841.0504482, 841.1463021, 841.1763338, 841.2826581, 841.7285967, 841.9570781, 841.9581628, 841.9860092, 842.0103145, 842.0312513, 842.0517846, 842.0928257, 842.1650072, 842.2656446, 842.2829051, 842.2834287, 842.3116781, 842.3786753, 842.4788982, 842.4917058, 842.4981138, 842.5453892, 842.7016393, 842.7861256, 842.8692922, 842.9069063, 842.9207527, 842.9359663, 842.9533521, 842.9605148, 843.099987, 843.2001442, 843.467077, 843.5545311, 843.657943, 843.696733, 843.7495148, 843.8336588, 843.8869706, 843.9069298, 844.1345881, 844.2656454, 844.2886571, 844.3334613, 844.3965966, 844.4545492, 844.6503324, 844.7755959, 845.46535, 845.851068, 846.4413221, 846.5233331, 846.5892224, 846.6594364, 846.8058929, 846.8283309, 846.8546908, 846.8978856, 847.0392173, 847.0792188, 847.4043115, 847.4994034, 847.5290311, 847.7404196, 847.7508672, 847.8878883, 848.0013245, 848.0751792, 848.1196961, 848.404692, 848.5295817, 848.5861349, 848.6511693, 848.6792686, 848.6904689, 848.7935428, 848.9257823, 849.1313569, 849.5648062, 849.5894205, 849.6632241, 849.7188228, 849.7968841, 849.8450987, 849.919392, 849.9852716, 850.0058486, 850.0656169, 850.2730876, 850.3143636, 850.3615158, 850.3854795, 850.4776778, 850.655202, 850.7403472, 851.1023123, 851.1253055, 851.1548517, 851.162766, 851.2446505, 851.334977, 851.5258614, 851.689019, 851.6948659, 851.7774109, 851.8469066, 851.9722277, 852.0785364, 852.0942629, 852.1183263, 852.1509178, 852.1818823, 852.3636828, 852.3719416, 852.4076414, 852.4124014, 852.4285035, 852.5509646, 852.6016967, 852.6295195, 852.778375, 852.9630238, 853.0480618, 853.1853232, 853.2536754, 853.4650902, 853.474556, 853.4803882, 853.4981369, 853.5169506, 853.7498026, 853.7596088, 853.771249, 853.8177267, 853.9648747, 854.0160808, 854.0371607, 854.1469414, 854.1878797, 854.2782155, 854.4959794, 854.5128875, 854.5341941, 854.6029135, 854.635134, 854.6732009, 854.7233832, 854.7251252, 854.8667529, 854.9922837, 855.0582391, 855.1187926, 855.1202825, 855.1394506, 855.2158649, 855.224387, 855.277782, 855.3214245, 855.3606894, 855.4310529, 855.4707688, 855.5728725, 855.7080877, 855.7547884, 855.7788215, 855.7846521, 855.8148306, 855.8377203, 855.8591832, 856.0358198, 856.1468668, 856.2625146, 856.3525789, 856.3710821, 856.4059718, 856.4735757, 856.5394404, 856.5788504, 856.6649837, 856.6866937, 856.7298533, 856.7300913, 856.7835127, 856.8890044, 856.9803916, 857.0230457, 857.0484798, 857.1133314, 857.2304327, 857.2570511, 857.2697741, 857.3049065, 857.3432602, 857.3461793, 857.4165333, 857.5437701, 857.6109487, 857.6277571, 857.639747, 857.727137, 857.9464543, 857.9506384, 858.0427017, 858.1118515, 858.1213896, 858.1335344, 858.2070648, 858.2369164, 858.2565261, 858.2844712, 858.3793605, 858.4157308, 858.4666072, 858.5767237, 858.610572, 858.6609581, 858.8101175, 858.9694253, 858.9717189, 858.9762378, 859.0542378, 859.114204, 859.1832323, 859.1964421, 859.253045, 859.2957552, 859.3754127, 859.3996904, 859.4222159, 859.456602, 859.5289713, 859.5448865, 859.679917, 859.6958147, 859.7800027, 859.7809582, 859.788375, 859.9181919, 859.9629368, 859.9669429, 859.9918573, 860.0009367, 860.0268162, 860.0409976, 860.0689805, 860.0764545, 860.1176702, 860.1634715, 860.1694903, 860.2103333, 860.2460809, 860.3538701, 860.3826605, 860.4005881, 860.4138446, 860.4185801, 860.4638097, 860.4670054, 860.5283644, 860.5931542, 860.6079135, 860.6204238, 860.622259, 860.8544945, 860.8668242, 860.8788494, 860.9821749, 860.9830103, 861.0839108, 861.1113551, 861.3580732, 861.392444, 861.3962901, 861.4033673, 861.5201231, 861.5424699, 861.569766, 861.5737016, 861.6040886, 861.6309877, 861.6310055, 861.6564187, 861.7807512, 861.8008336, 861.8263225, 861.8810661, 861.9628085, 861.9774943, 862.0591369, 862.0911487, 862.1934019, 862.2110969, 862.240667, 862.2508034, 862.2773312, 862.2801743, 862.4273951, 862.4560616, 862.4699879, 862.5850871, 862.5917319, 862.6874776, 862.6886352, 862.7384848, 862.7569398, 862.8529433, 862.8626725, 862.9115471, 863.0274525, 863.1849294, 863.1906987, 863.1970598, 863.2648953, 863.2777406, 863.3290182, 863.3865371, 863.4308369, 863.4595399, 863.5809612, 863.5878549, 863.6074579, 863.6247579, 863.6664467, 863.6738954, 863.717568, 863.7253293, 863.823153, 863.8716101, 863.9300991, 863.9905764, 864.0004003, 864.0209765, 864.0667252, 864.0826488, 864.0893278, 864.1737217, 864.1997249, 864.2046876, 864.229757, 864.2397886, 864.2465886, 864.305131, 864.3389194, 864.3476932, 864.3835192, 864.404353, 864.4997047, 864.5255873, 864.5457004, 864.5592507, 864.7586133, 864.8069879, 864.8118739, 864.8344875, 864.8688667, 864.9462794, 864.9604254, 864.9910742, 865.0163996, 865.022091, 865.0683656, 865.1081238, 865.1583917, 865.2501112, 865.2749089, 865.2851953, 865.325469, 865.328327, 865.430275, 865.4514735, 865.4600855, 865.5040912, 865.5896058, 865.6761783, 865.7396302, 865.7641858, 865.8602111, 865.8624922, 865.9452542, 865.9459657, 865.9462152, 865.9477506, 865.961709, 865.9656759, 865.9978445, 866.0136831, 866.0875596, 866.1238567, 866.1823497, 866.1879169, 866.2497999, 866.267226, 866.2792419, 866.3538624, 866.3790684, 866.4294118, 866.5094482, 866.5472755, 866.5635153, 866.6098511, 866.6173881, 866.6246633, 866.6476948, 866.6561446, 866.6862933, 866.6956207, 866.7156736, 866.7353973, 866.7554796, 866.7675189, 866.8370668, 866.879343, 866.953693, 866.9724811, 867.022321, 867.2248012, 867.2665982, 867.2899444, 867.3301462, 867.331914, 867.3370949, 867.3399766, 867.345396, 867.3542287, 867.429616, 867.4492505, 867.4537017, 867.4930933, 867.5284609, 867.5651521, 867.5880558, 867.6009308, 867.6351897, 867.6890995, 867.7021903, 867.7752852, 867.8026153, 867.8731957, 867.9621609, 867.97682, 867.9836246, 868.0264632, 868.0480631, 868.1787902, 868.2426199, 868.3386618, 868.3503943, 868.3947593, 868.404012, 868.5082333, 868.5350414, 868.5504229, 868.5783449, 868.6340435, 868.7074892, 868.7670459, 868.8085481, 868.8189999, 868.8281739, 868.8307809, 868.8733644, 869.0649608, 869.1204867, 869.1316025, 869.192464, 869.2925762, 869.2956843, 869.324623, 869.3591494, 869.3592932, 869.3726452, 869.3765701, 869.3783265, 869.5025607, 869.5450973, 869.5500504, 869.5610493, 869.590671, 869.7012583, 869.7354967, 869.7394734, 869.7786962, 869.8088289, 869.8542718, 869.8804441, 869.8862735, 869.9443149, 869.9460516, 870.0578012, 870.0666913, 870.1122222, 870.1171013, 870.1348305, 870.1552228, 870.1644474, 870.2066534, 870.21681, 870.2581006, 870.2604022, 870.2708777, 870.2806314, 870.3174869, 870.3355396, 870.39364, 870.4213434, 870.4233218, 870.4338684, 870.4433912, 870.4885629, 870.5082413, 870.5338205, 870.5493134, 870.6151044, 870.6244149, 870.658427, 870.683495, 870.7671641, 870.7685698, 870.7889983, 870.8489869, 870.8704471, 870.9019464, 870.9296165, 870.9640818, 871.0246954, 871.0912496, 871.1085711, 871.254292, 871.2640589, 871.2888834, 871.3106621, 871.4411725, 871.4447261, 871.4843156, 871.6184513, 871.6191847, 871.6912778, 871.6950445, 871.7112015, 871.7130404, 871.729319, 871.7880936, 871.8391008, 871.8635821, 871.8836068, 871.8847767, 871.9395164, 871.9583515, 871.958968, 872.0153485, 872.037776, 872.1005787, 872.2087747, 872.2225163, 872.2274791, 872.2770698, 872.2831565, 872.2851052, 872.331393, 872.4011178, 872.4714698, 872.4971242, 872.5219973, 872.5982144, 872.5993298, 872.6085526, 872.6728447, 872.7756421, 872.8995799, 872.9145417, 872.9207345, 872.9230154, 872.9449416, 872.9755434, 873.0155942, 873.0919728, 873.1167569, 873.1361866, 873.1814808, 873.2183366, 873.2392234, 873.2485468, 873.2702648, 873.2720889, 873.2951493, 873.3865566, 873.4158555, 873.500556, 873.5319464, 873.6855352, 873.6906065, 873.7271928, 873.7583086, 873.816419, 873.8792258, 873.9204321, 873.9208096, 873.940095, 873.9485891, 873.9811986, 873.9952788, 874.087778, 874.0932569, 874.1038451, 874.119552, 874.1295218, 874.161451, 874.1734033, 874.2191899, 874.2746553, 874.3288225, 874.3423884, 874.3488125, 874.3803244, 874.4342655, 874.4367397, 874.4693033, 874.4707547, 874.5863337, 874.6078583, 874.6903967, 874.7481289, 874.8709368, 874.9086792, 874.9746519, 874.9760631, 874.9861585, 875.1012416, 875.1260115, 875.1467516, 875.190557, 875.2584833, 875.2736726, 875.275011, 875.3452632, 875.3537608, 875.4334982, 875.4508048, 875.4969518, 875.4982944, 875.6160241, 875.6258949, 875.634177, 875.6627567, 875.6802332, 875.7099107, 875.7216339, 875.7349581, 875.8132414, 875.8299069, 875.8637355, 875.893718, 875.923427, 876.0554595, 876.0561243, 876.0571265, 876.0922079, 876.101079, 876.1209743, 876.1306606, 876.136072, 876.1668303, 876.2053787, 876.2544616, 876.2579437, 876.3476088, 876.3509242, 876.3513804, 876.4591675, 876.4735279, 876.4864953, 876.5636328, 876.5851535, 876.7597727, 876.7665073, 876.7839597, 876.787057, 876.7937265, 876.7993689, 876.8150221, 876.8169517, 876.8471022, 876.8875677, 876.9282669, 876.9710813, 876.9851825, 876.9949606, 877.0381644, 877.0574657, 877.1169795, 877.1330331, 877.1404848, 877.2007651, 877.285081, 877.2908848, 877.3046894, 877.31101, 877.3547276, 877.3634816, 877.3865706, 877.4222439, 877.4329044, 877.4601132, 877.4854006, 877.4945715, 877.5408161, 877.5417593, 877.5742222, 877.6271825, 877.6307179, 877.6882774, 877.7097935, 877.7566048, 877.7724436, 877.8531696, 877.876906, 877.9067431, 877.9147984, 877.9177926, 878.0040262, 878.0229884, 878.0248847, 878.0477176, 878.0522838, 878.055012, 878.1174972, 878.1676769, 878.2015039, 878.2190838, 878.2422891, 878.3090724, 878.3429301, 878.3741484, 878.3918131, 878.4258675, 878.4875268, 878.646919, 878.6507949, 878.6645655, 878.760361, 878.7609977, 878.8358942, 878.8537124, 878.87946, 878.908014, 879.0540702, 879.0623667, 879.0784496, 879.085164, 879.1661569, 879.167068, 879.1898847, 879.19048, 879.1950193, 879.2267717, 879.2443516, 879.2804033, 879.3542149, 879.3744385, 879.396938, 879.5199186, 879.6014262, 879.622814, 879.6375174, 879.6394698, 879.6768376, 879.7557698, 879.7601091, 879.7712126, 879.7796249, 879.7841481, 879.8043685, 879.8245905, 879.8341876, 879.9594216, 879.9653627, 879.9822428, 880.1282142, 880.1398705, 880.162837, 880.1748014, 880.1807493, 880.1870496, 880.2009292, 880.235968, 880.2450426, 880.2726906, 880.2842302, 880.3214688, 880.3582622, 880.3647906, 880.3709233, 880.3977348, 880.411284, 880.4200699, 880.4381291, 880.4518882, 880.4710647, 880.5177603, 880.527427, 880.5390287, 880.540021, 880.5600933, 880.5735713, 880.5738835, 880.5870468, 880.5906233, 880.6250329, 880.6296337, 880.6343272, 880.6464337, 880.6476791, 880.6634182, 880.6765156, 880.6876663, 880.733272, 880.7426167, 880.759981, 880.7699676, 880.7929376, 880.793621, 880.8300851, 880.8582531, 880.8720513, 880.9600542, 880.9715997, 880.9804228, 881.0049092, 881.0679231, 881.076677, 881.0866773, 881.1153204, 881.1289506, 881.1336735, 881.1565068, 881.1904345, 881.1978718, 881.2141377, 881.2410964, 881.2587872, 881.2749548, 881.332104, 881.3349176, 881.3384084, 881.4093262, 881.438169, 881.4508062, 881.49238, 881.5227655, 881.5893501, 881.6083354, 881.6542917, 881.6582569, 881.6890546, 881.7050085, 881.7147464, 881.7991998, 881.8064411, 881.9246093, 881.942485, 881.9985998, 882.0190624, 882.0249948, 882.0665313, 882.1011165, 882.1327578, 882.1354598, 882.1702949, 882.2013945, 882.2278444, 882.2358369, 882.2495746, 882.2821253, 882.3975979, 882.4409709, 882.4644211, 882.4647359, 882.4777446, 882.4838722, 882.5160373, 882.5435177, 882.5867244, 882.6559987, 882.6954033, 882.7085532, 882.7287336, 882.8271223, 882.8466527, 882.8616746, 882.9118585, 882.9446462, 882.9558845, 883.0317416, 883.0674043, 883.0762778, 883.0859195, 883.1508205, 883.1826474, 883.2859549, 883.300353, 883.3032277, 883.3046086, 883.3183623, 883.3239844, 883.3364634, 883.3553425, 883.3639472, 883.4573078, 883.4881879, 883.5122604, 883.531111, 883.5661984, 883.5784611, 883.5801073, 883.6007569, 883.6271874, 883.6436494, 883.6671969, 883.6922505, 883.7375095, 883.7590087, 883.7663095, 883.7861057, 883.7948863, 883.8002845, 883.8114709, 883.8117659, 883.8194284, 883.8230523, 883.8633183, 883.8743359, 883.9324142, 883.9451261, 883.9466271, 883.9615063, 884.0058444, 884.0154656, 884.0192582, 884.0365996, 884.0513416, 884.0530919, 884.0629919, 884.0787077, 884.087954, 884.1296226, 884.1578377, 884.2954658, 884.3162841, 884.3247916, 884.3425989, 884.3758133, 884.3965611, 884.4236697, 884.5079064, 884.7068506, 884.7166289, 884.7368457, 884.7473131, 884.8213238, 884.8840868, 884.9402885, 884.9660408, 884.977664, 885.1604797, 885.2200021, 885.2779761, 885.3256131, 885.3596937, 885.370054, 885.4052554, 885.4307169, 885.4601886, 885.5100024, 885.5323465, 885.5488229, 885.5665213, 885.5758687, 885.5957289, 885.597766, 885.6205499, 885.6280059, 885.6477598, 885.6851975, 885.6939911, 885.7381134, 885.7569506, 885.8429192, 885.8533163, 885.8674844, 885.9329921, 885.9636556, 885.9877656, 886.0320199, 886.0431425, 886.1067792, 886.1201001, 886.1428073, 886.1459527, 886.1958275, 886.2201081, 886.2568192, 886.2601177, 886.281765, 886.2863002, 886.3409374, 886.3649512, 886.388617, 886.4325098, 886.4347744, 886.4458991, 886.4637025, 886.4946113, 886.5456995, 886.5575286, 886.6079876, 886.6097386, 886.647303, 886.6751305, 886.6855316, 886.7122966, 886.7594417, 886.7672019, 886.7672357, 886.8353837, 886.8467557, 886.8557887, 886.8688785, 886.9293603, 886.9528441, 886.9777796, 886.9790721, 886.9824876, 887.0183222, 887.024093, 887.0656213, 887.0887146, 887.0887445, 887.0893576, 887.1047644, 887.1080161, 887.1393491, 887.1554699, 887.1621051, 887.1816174, 887.2089312, 887.2387944, 887.2515879, 887.2761876, 887.2770555, 887.2807531, 887.281315, 887.2898924, 887.2920651, 887.293797, 887.3033454, 887.3259704, 887.3836914, 887.4399223, 887.450823, 887.5287286, 887.5764584, 887.606971, 887.6097644, 887.6328683, 887.6337398, 887.6450292, 887.6598165, 887.6787459, 887.6787733, 887.6941082, 887.7120302, 887.8366728, 887.8526492, 887.8707368, 887.8972027, 887.9410559, 887.958195, 887.9698014, 887.9711167, 888.0331645, 888.0645098, 888.1346028, 888.1461451, 888.1751073, 888.1797978, 888.2325188, 888.2428044, 888.279416, 888.3003687, 888.316888, 888.3839806, 888.4703156, 888.5058347, 888.5060203, 888.5162328, 888.5364139, 888.5764851, 888.5816954, 888.5821762, 888.5833724, 888.6159206, 888.6189233, 888.6405493, 888.67704, 888.6879409, 888.7022493, 888.7055447, 888.7723846, 888.8059683, 888.8502701, 888.8810273, 888.890289, 888.89071, 889.0200597, 889.0556372, 889.0773218, 889.1145304, 889.1230876, 889.2056815, 889.2205136, 889.2435282, 889.2488072, 889.2957895, 889.3474809, 889.373568, 889.4010399, 889.4254407, 889.4254472, 889.4523269, 889.4538101, 889.4541286, 889.4875207, 889.4975523, 889.5111013, 889.5895742, 889.615238, 889.6368376, 889.6477856, 889.6793873, 889.6809367, 889.7500712, 889.7590507, 889.7600762, 889.8020726, 889.8119168, 889.8409789, 889.8473712, 889.8496589, 889.8598788, 889.8603202, 889.8979006, 889.8986021, 889.9104863, 889.9171215, 889.919348, 889.9249594, 889.9254897, 889.9486683, 890.034532, 890.1141163, 890.115741, 890.1320128, 890.1781133, 890.2308049, 890.2554206, 890.2894303, 890.3769275, 890.4222579, 890.4717265, 890.4754674, 890.5782469, 890.6816568, 890.6898632, 890.6916582, 890.6973432, 890.703591, 890.7427699, 890.743887, 890.7447999, 890.8436663, 890.9997614, 891.0407106, 891.0558675, 891.0582536, 891.0732628, 891.1655512, 891.1953472, 891.1995171, 891.212909, 891.2174065, 891.2705191, 891.2826232, 891.298377, 891.3227383, 891.3967681, 891.4292382, 891.4577809, 891.4606363, 891.5611054, 891.6023162, 891.6164771, 891.6448012, 891.67849, 891.6900524, 891.7348868, 891.7388607, 891.7440362, 891.7656983, 891.7867272, 891.8385851, 891.8437513, 891.8447278, 891.8448697, 891.8616032, 891.8859532, 891.9384412, 891.9416411, 891.9437373, 891.9605029, 891.967867, 891.968273, 891.9725994, 891.9787192, 891.9885078, 891.9953113, 892.0151159, 892.0438879, 892.0879054, 892.1008516, 892.1139413, 892.1990777, 892.2167649, 892.2500578, 892.2505215, 892.2701887, 892.2829834, 892.2953644, 892.3455451, 892.3962515, 892.3983337, 892.4103317, 892.4233026, 892.4238796, 892.4270264, 892.4464271, 892.481909, 892.5361394, 892.54059, 892.5485391, 892.601353, 892.6691471, 892.679399, 892.7326713, 892.7430822, 892.8220908, 892.8486552, 892.8652216, 892.8772855, 892.8949763, 892.8974853, 892.9011978, 892.9042047, 892.9123432, 892.9220852, 892.9400307, 892.963279, 892.9725219, 893.022682, 893.0349285, 893.0870741, 893.1310514, 893.1332703, 893.1386134, 893.1721101, 893.17912, 893.1948263, 893.2437762, 893.2667186, 893.402335, 893.4672432, 893.4966162, 893.5017894, 893.5779986, 893.639394, 893.6517574, 893.7181125, 893.7715267, 893.7895381, 893.8417352, 893.8566465, 893.9103179, 893.9172946, 894.0203375, 894.0385365, 894.0389549, 894.0676295, 894.0729616, 894.0791502, 894.0955757, 894.112641, 894.1204725, 894.1419384, 894.1681853, 894.1769813, 894.2508865, 894.3094656, 894.3098951, 894.322457, 894.3417198, 894.4409344, 894.5213306, 894.5299124, 894.5829505, 894.6071095, 894.6469123, 894.6821165, 894.7108331, 894.7370073, 894.776624, 894.7861041, 894.7913249, 894.8194891, 894.8301659, 894.8304291, 894.8815089, 894.939508, 895.0442227, 895.0589671, 895.0750121, 895.0821013, 895.0823947, 895.1182341, 895.1318765, 895.1378973, 895.1654248, 895.1882584, 895.2226397, 895.2458569, 895.2484016, 895.2518521, 895.3243588, 895.3269164, 895.3591796, 895.364725, 895.3712169, 895.3737035, 895.397426, 895.4123705, 895.43446, 895.4771601, 895.4902263, 895.4978124, 895.4999842, 895.5029089, 895.5603089, 895.5989727, 895.6361632, 895.6476914, 895.6696314, 895.6794662, 895.6886413, 895.7005851, 895.7028268, 895.7097312, 895.7122032, 895.7192673, 895.7257132, 895.8088649, 895.8324811, 895.8536443, 895.8915327, 895.9436994, 895.9640563, 895.9990576, 896.0127408, 896.0523528, 896.0569794, 896.0662836, 896.0757807, 896.0961626, 896.1413303, 896.1699288, 896.1932354, 896.2142678, 896.2524928, 896.3069022, 896.3124275, 896.3834622, 896.4204933, 896.4652681, 896.4761897, 896.4824148, 896.5721113, 896.6276986, 896.6523918, 896.6585213, 896.6856333, 896.7107378, 896.7427303, 896.8228397, 896.8520311, 896.9223492, 896.9231451, 896.9270623, 896.942365, 896.945728, 896.9518687, 896.9915516, 897.0266234, 897.0325964, 897.0731926, 897.3285089, 897.3603801, 897.361806, 897.3839029, 897.3876408, 897.5075973, 897.5233802, 897.5706171, 897.6076083, 897.6297917, 897.6605212, 897.7397179, 897.7584852, 897.8049122, 897.8060626, 897.8148519, 897.9278937, 897.9489603, 898.0003962, 898.0136319, 898.050075, 898.0515119, 898.0932751, 898.1449444, 898.1633453, 898.1639141, 898.1701955, 898.1831816, 898.2159292, 898.2423209, 898.3152917, 898.3236292, 898.3339617, 898.367438, 898.390342, 898.4174269, 898.4345396, 898.4468698, 898.4616088, 898.48712, 898.487621, 898.5334907, 898.5484079, 898.5771893, 898.5869894, 898.6292885, 898.6379138, 898.6634717, 898.6932746, 898.7540218, 898.7958522, 898.8274402, 898.8723178, 898.8794034, 898.8794041, 898.8894314, 898.8982681, 898.9100762, 898.9557457, 899.00263, 899.0093631, 899.0862708, 899.1025951, 899.1445121, 899.1757613, 899.2203011, 899.2244166, 899.229526, 899.2651143, 899.2841141, 899.2873029, 899.4093471, 899.476449, 899.502388, 899.6714585, 899.7395829, 899.8162084, 899.9233127, 899.9901443, 899.9942598, 900.1116102, 900.1125491, 900.1291797, 900.1329038, 900.1344617, 900.2097482, 900.2766165, 900.2773693, 900.3033516, 900.3135958, 900.3494446, 900.3588533, 900.3628824, 900.3835626, 900.4520788, 900.4931674, 900.4971906, 900.506054, 900.5522291, 900.6197565, 900.6483866, 900.7092849, 900.709415, 900.7114779, 900.7237187, 900.7382911, 900.7767414, 900.7858665, 900.8030744, 900.8607497, 900.8705958, 900.9412396, 900.9501378, 900.9671252, 900.9979218, 901.0434152, 901.0627598, 901.0990398, 901.1323016, 901.1328693, 901.1611046, 901.1652202, 901.2467294, 901.2611865, 901.2826935, 901.3029028, 901.3103576, 901.315496, 901.3701373, 901.3844942, 901.3967882, 901.398208, 901.4006631, 901.4085964, 901.5948337, 901.6081592, 901.6421085, 901.667053, 901.6721479, 901.6733114, 901.6809021, 901.6846704, 901.7138236, 901.7358557, 901.7939344, 901.8603814, 901.8699795, 901.9570929, 901.9589088, 901.9745391, 902.0272182, 902.0860045, 902.1088309, 902.1752115, 902.1934363, 902.2328392, 902.3609166, 902.3695855, 902.3717079, 902.3876664, 902.3955054, 902.4044419, 902.4229559, 902.4383004, 902.4455083, 902.5140584, 902.5214115, 902.5235095, 902.5509479, 902.6021237, 902.6099077, 902.6200086, 902.6209301, 902.6343404, 902.6360412, 902.6641587, 902.6989851, 902.7382087, 902.7499785, 902.7769596, 902.7863462, 902.8335253, 902.8393497, 902.8445629, 902.8634073, 902.8786193, 902.894155, 902.9022432, 902.93766, 902.9615891, 903.0149059, 903.089666, 903.1342364, 903.1768114, 903.2041591, 903.2304755, 903.2898804, 903.3444276, 903.3787424, 903.3863479, 903.4465128, 903.4756626, 903.4771877, 903.5385141, 903.7508969, 903.7803873, 903.7974587, 903.8322739, 903.8446915, 903.8639954, 903.8916352, 903.9907742, 904.007145, 904.0082079, 904.1331489, 904.2441541, 904.2536612, 904.2694689, 904.3419049, 904.373089, 904.4126359, 904.4676765, 904.5163191, 904.5265953, 904.5732632, 904.5979707, 904.6037334, 904.6133736, 904.6324168, 904.6559951, 904.754243, 904.7822711, 904.7999681, 904.8646061, 904.8762071, 904.8886065, 904.9062935, 904.9318547, 904.9653376, 904.9799326, 904.9931785, 904.9983149, 905.137418, 905.1560945, 905.19594, 905.201404, 905.225989, 905.2273371, 905.2621844, 905.303947, 905.348164, 905.4334153, 905.4588778, 905.460257, 905.4723355, 905.5302436, 905.6569755, 905.689561, 905.6976947, 905.7562625, 905.7975113, 905.802205, 905.8183842, 905.8405572, 905.8405706, 905.8591788, 905.8975369, 905.9496034, 905.9831573, 906.0830044, 906.1112427, 906.1494164, 906.1510998, 906.2260771, 906.2392914, 906.2449855, 906.2821834, 906.284019, 906.2958529, 906.3243491, 906.3344775, 906.3705772, 906.3730813, 906.3868379, 906.5995429, 906.8230319, 906.9119261, 906.9341949, 906.9592772, 906.9621404, 906.9689581, 906.9998319, 907.0075709, 907.0229988, 907.0653828, 907.12857, 907.1784884, 907.201896, 907.2292191, 907.2906568, 907.3497231, 907.3582152, 907.426522, 907.4599169, 907.4752755, 907.4954864, 907.5258505, 907.633815, 907.7011358, 907.7211735, 907.748167, 907.8460751, 907.9476722, 907.9621109, 908.0350976, 908.0388407, 908.0393228, 908.0493037, 908.0653558, 908.1102469, 908.1722999, 908.2485159, 908.2640138, 908.2656005, 908.2725651, 908.2790678, 908.2857411, 908.400655, 908.4116419, 908.4185085, 908.4195954, 908.4255357, 908.5306883, 908.549186, 908.5914958, 908.6540995, 908.6939522, 908.7045479, 908.7051658, 908.7111827, 908.7341369, 908.7639622, 908.7920531, 908.867048, 908.8973452, 908.9120806, 908.93188, 908.9688863, 909.013755, 909.0881028, 909.2151717, 909.2272985, 909.3135467, 909.3555895, 909.4349605, 909.5561474, 909.5740302, 909.617823, 909.6190973, 909.6689245, 909.6804831, 909.6993531, 909.722541, 909.7627871, 909.7795055, 909.8137075, 909.8286293, 909.8453806, 909.8706203, 909.8977213, 909.8983956, 909.9378658, 909.9817004, 910.0128044, 910.0177102, 910.0195578, 910.0231474, 910.0313568, 910.1493956, 910.1662086, 910.1703876, 910.2270864, 910.2526318, 910.2935325, 910.6453424, 910.738297, 910.7716056, 910.8149708, 910.8590972, 910.8788377, 910.8978674, 910.9422266, 910.9813919, 911.0547164, 911.1920417, 911.2202988, 911.3053698, 911.3172388, 911.400038, 911.4064037, 911.443415, 911.4510954, 911.4789544, 911.5093887, 911.5243282, 911.5382702, 911.612624, 911.6314939, 911.6803939, 911.6890935, 911.7821455, 911.7977209, 911.8275297, 911.8672378, 911.9396266, 911.9846811, 912.0097093, 912.0208783, 912.1929168, 912.2165956, 912.2373545, 912.3213836, 912.3278155, 912.4057646, 912.5418225, 912.5437325, 912.5585737, 912.6612059, 912.6692051, 912.6694686, 912.702797, 912.7106144, 912.9324081, 912.9572995, 912.9990672, 913.1367123, 913.2590401, 913.2597605, 913.311628, 913.3503531, 913.3812907, 913.4053763, 913.6298613, 913.8492496, 913.9419904, 914.0172336, 914.0409501, 914.1779646, 914.3856804, 914.4453795, 914.4736035, 914.4863062, 914.4884061, 914.7182635, 914.7606363, 914.840786, 915.0343354, 915.0364359, 915.1336029, 915.1491603, 915.2075085, 915.2650363, 915.4177328, 915.4244135, 915.4467513, 915.4637361, 915.5666772, 915.6295841, 915.6801651, 915.7282038, 915.8072941, 915.819277, 915.8321706, 915.8760143, 915.9057198, 915.9140011, 916.0392248, 916.0960924, 916.1411279, 916.2451026, 916.2663372, 916.44166, 916.4588722, 916.483015, 916.5206147, 916.5320739, 916.5651427, 916.5966714, 916.6285479, 916.7816444, 916.7871033, 916.803188, 916.8608829, 916.8696123, 916.9354837, 917.0934486, 917.2353639, 917.2980287, 917.333777, 917.3763915, 917.4381859, 917.6803312, 917.6931153, 917.8069148, 917.9101907, 917.920806, 917.9690829, 918.0074915, 918.0291909, 918.0772258, 918.1126609, 918.1235179, 918.1409722, 918.2921142, 918.348081, 918.3777829, 918.4697076, 918.47815, 918.56524, 918.6912766, 918.7168139, 918.7782721, 918.784186, 918.9240528, 919.0796341, 919.1042082, 919.1866983, 919.2244915, 919.2916685, 919.3580434, 919.3784239, 919.6897056, 919.751845, 919.7596854, 919.9463057, 920.0039489, 920.183925, 920.4634921, 920.5017618, 920.5314856, 920.7016564, 920.7059891, 920.8151251, 920.8740009, 920.9590744, 921.0808313, 921.1613823, 921.2072459, 921.3653039, 921.478868, 921.610092, 921.8353794, 921.8887112, 922.0269266, 922.0423677, 922.0504554, 922.0665681, 922.1021354, 922.4199766, 922.4863861, 922.5253403, 922.5696163, 922.7223899, 922.7641562, 923.1479024, 923.3693065, 923.4638082, 923.5025778, 923.6125241, 923.6233058, 923.6276864, 923.9245688, 924.011222, 924.120821, 924.4178273, 924.4265314, 924.4529928, 924.4672934, 924.4802814, 924.7695343, 924.7760339, 924.9897483, 925.0542336, 925.0760239, 925.1103863, 925.1783308, 925.642098, 925.6443887, 925.7136253, 925.9824697, 926.2136724, 926.516041, 926.6365557, 926.9057942, 927.1278621, 927.412003, 927.6539911, 927.8273543, 927.9099347, 928.4870432, 928.5760207, 928.6335355, 928.8010291, 929.2683396, 929.488798, 930.2120345, 930.2409666, 930.869405, 931.2298845, 931.5999795, 931.9604511, 933.0093013, 933.0294647, 933.1323162, 933.2311583, 933.4425496, 933.5988419, 933.7168507, 934.3222121, 934.8730977, 935.010967, 935.0746306, 935.0991934, 935.6479235, 935.6723948, 935.6794025, 935.822326, 936.2687752, 936.5224461, 937.4734664, 937.769119, 938.4283023, 938.9293084, 939.039414, 939.9934511, 941.4844677, 941.5771756, 941.6735601, 943.7874585, 947.5586641, 948.4608989, 949.5634606, 952.7002856]
data = np.array(array)
def calc_shgo_mode(distribution, data):
    objective = lambda x: -distribution.pdf(x)[0]
    bnds = [[min(data), max(data)]]
    solution = scipy.optimize.shgo(objective, bounds=bnds, n=100 * len(data))
    return solution.x[0]

distribution = scipy.stats.gaussian_kde(data)
mode = calc_shgo_mode(distribution, data)

@hoodmane
Copy link
Member

hoodmane commented Feb 8, 2024

Thanks @lesteve!

@hoodmane
Copy link
Member

Okay let's close this since it's very likely a scipy regression not directly related to Pyodide.

@lesteve
Copy link
Contributor

lesteve commented Feb 14, 2024

I was about to open an issue in scipy and realised @sebastianherreramonterrosa had already done it: scipy/scipy#20057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants