| {"task_id": "npsp-000", "category": "array_ops", "prompt": "Return `a` reshaped to shape (8, 5) in C order.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [[-2.338592, 4.152282, 4.776106, 0.439501, 0.841571], [1.84993, 1.187283, 0.522289, -7.251883, 2.488212], [2.764342, -4.700811, -3.035897, 0.172288, 2.032965], [5.514732, -1.287731, 2.004718, 1.5833, 1.118473], [-0.955547, 0.913293, -1.082677, 4.96314, -3.769013], [-0.760205, -7.141644, 0.545738, 3.539238, 1.790779], [-0.597325, 1.77417, 2.053285, 3.682132, -0.560894], [1.242958, -2.088676, -0.217803, -0.70312, -4.965906]], \"dtype\": \"float64\", \"shape\": [8, 5]}"} | |
| {"task_id": "npsp-001", "category": "array_ops", "prompt": "Return the element-wise absolute value of `a`.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, 7.251883, 2.488212, 2.764342, 4.700811, 3.035897, 0.172288, 2.032965, 5.514732, 1.287731, 2.004718, 1.5833, 1.118473, 0.955547, 0.913293, 1.082677, 4.96314, 3.769013, 0.760205, 7.141644, 0.545738, 3.539238, 1.790779, 0.597325, 1.77417, 2.053285, 3.682132, 0.560894, 1.242958, 2.088676, 0.217803, 0.70312, 4.965906], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-002", "category": "array_ops", "prompt": "Return `a` sorted in ascending order.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-7.251883, -7.141644, -4.965906, -4.700811, -3.769013, -3.035897, -2.338592, -2.088676, -1.287731, -1.082677, -0.955547, -0.760205, -0.70312, -0.597325, -0.560894, -0.217803, 0.172288, 0.439501, 0.522289, 0.545738, 0.841571, 0.913293, 1.118473, 1.187283, 1.242958, 1.5833, 1.77417, 1.790779, 1.84993, 2.004718, 2.032965, 2.053285, 2.488212, 2.764342, 3.539238, 3.682132, 4.152282, 4.776106, 4.96314, 5.514732], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-003", "category": "array_ops", "prompt": "Return the cumulative sum of `a`.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-2.338592, 1.8136899999999998, 6.589796, 7.029297, 7.870868, 9.720798, 10.908081000000001, 11.430370000000002, 4.178487000000001, 6.666699000000001, 9.431041, 4.730230000000001, 1.6943330000000008, 1.8666210000000008, 3.8995860000000007, 9.414318000000002, 8.126587, 10.131305000000001, 11.714605, 12.833078, 11.877531000000001, 12.790824, 11.708147, 16.671287, 12.902273999999998, 12.142069, 5.000424999999999, 5.546162999999999, 9.085401, 10.87618, 10.278855, 12.053025, 14.10631, 17.788442, 17.227548, 18.470506, 16.38183, 16.164027, 15.460907, 10.495001], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-004", "category": "array_ops", "prompt": "Clip `a` to the range [-2, 2] and return the result.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-2.0, 2.0, 2.0, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -2.0, 2.0, 2.0, -2.0, -2.0, 0.172288, 2.0, 2.0, -1.287731, 2.0, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 2.0, -2.0, -0.760205, -2.0, 0.545738, 2.0, 1.790779, -0.597325, 1.77417, 2.0, 2.0, -0.560894, 1.242958, -2.0, -0.217803, -0.70312, -2.0], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-005", "category": "array_ops", "prompt": "Return only the strictly positive elements of `a`, in their original order.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, 2.488212, 2.764342, 0.172288, 2.032965, 5.514732, 2.004718, 1.5833, 1.118473, 0.913293, 4.96314, 0.545738, 3.539238, 1.790779, 1.77417, 2.053285, 3.682132, 1.242958], \"dtype\": \"float64\", \"shape\": [24]}"} | |
| {"task_id": "npsp-006", "category": "array_ops", "prompt": "Return the indices that would sort `a` ascending, as an int64 array.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [8, 26, 39, 11, 24, 12, 0, 36, 16, 22, 20, 25, 38, 30, 34, 37, 13, 3, 7, 27, 4, 21, 19, 6, 35, 18, 31, 29, 5, 17, 14, 32, 9, 10, 28, 33, 1, 2, 23, 15], \"dtype\": \"int64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-007", "category": "array_ops", "prompt": "Return `m` transposed.", "input_data": "{\"m\": \"{\\\"data\\\": [[1.78454, 2.056107, 0.09955, 0.002686, 0.572878, 0.637833], [-1.300929, 0.239739, -1.237216, -2.083909, 4.352373, -1.00321], [-5.19234, -2.996016, 2.224916, -0.723849, 0.180393, 1.828207], [-5.261445, 4.704098, -1.701475, 1.437119, 2.570229, -1.987346], [2.972197, 0.903369, -2.275477, 0.906412, -0.662423, 1.302182], [0.261181, -1.040545, 0.122565, 1.966241, -0.08211, 0.793546]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [6, 6]}\"}", "expected_output": "{\"data\": [[1.78454, -1.300929, -5.19234, -5.261445, 2.972197, 0.261181], [2.056107, 0.239739, -2.996016, 4.704098, 0.903369, -1.040545], [0.09955, -1.237216, 2.224916, -1.701475, -2.275477, 0.122565], [0.002686, -2.083909, -0.723849, 1.437119, 0.906412, 1.966241], [0.572878, 4.352373, 0.180393, 2.570229, -0.662423, -0.08211], [0.637833, -1.00321, 1.828207, -1.987346, 1.302182, 0.793546]], \"dtype\": \"float64\", \"shape\": [6, 6]}"} | |
| {"task_id": "npsp-008", "category": "array_ops", "prompt": "Return the row-wise sums of `g` as a 1-D array.", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [23.653576, 33.479868999999994, 31.903597, 22.247421, 13.748684, 31.081812, 24.56029, 24.326532], \"dtype\": \"float64\", \"shape\": [8]}"} | |
| {"task_id": "npsp-009", "category": "array_ops", "prompt": "Normalise each column of `g` to zero mean and unit standard deviation (population std, ddof=0).", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [[-1.2660775658668926, 0.6617000625629937, 0.02979758170916544, 1.1312832643940025, -0.8853699390260489], [0.9510995806064245, -0.41405339203916985, -0.3665703740808006, 0.9010901249329193, 1.4785331948954898], [0.42410555537056055, 0.20263749615991752, -0.7799249697276543, 1.3451403749373207, 0.9996621778101789], [-0.2426991887016702, -0.08337824315633478, 0.7571432820949319, -1.5455885414522283, -0.22225122350672716], [-1.9116581749428108, 0.566457499074657, -1.9043428777264595, -0.39554616638637424, -0.9285255981781683], [0.5732412323353231, 1.2860454543963784, 1.4056140665620596, 0.26578051163826466, -0.6607920607601346], [1.0419935585895164, 0.09549762729347142, 1.0260468109708165, -0.9818822056648854, -1.043583024153002], [0.4299950026095475, -2.3149065042919132, -0.16776351980205695, -0.7202773623990179, 1.262326472918414]], \"dtype\": \"float64\", \"shape\": [8, 5]}"} | |
| {"task_id": "npsp-010", "category": "array_ops", "prompt": "Return the pairwise differences between consecutive elements of `a`.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [6.490874, 0.6238240000000008, -4.3366050000000005, 0.40207, 1.008359, -0.662647, -0.6649940000000001, -7.774172, 9.740095, 0.2761300000000002, -7.465153, 1.664914, 3.208185, 1.860677, 3.4817670000000005, -6.802463, 3.292449, -0.42141800000000007, -0.4648269999999999, -2.07402, 1.86884, -1.9959699999999998, 6.0458169999999996, -8.732153, 3.008808, -6.381439, 7.687382, 2.9935, -1.7484590000000002, -2.388104, 2.371495, 0.2791149999999998, 1.6288470000000004, -4.243026, 1.803852, -3.331634, 1.870873, -0.485317, -4.262786], \"dtype\": \"float64\", \"shape\": [39]}"} | |
| {"task_id": "npsp-011", "category": "array_ops", "prompt": "Return `a` with every element rounded to 2 decimal places.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-2.34, 4.15, 4.78, 0.44, 0.84, 1.85, 1.19, 0.52, -7.25, 2.49, 2.76, -4.7, -3.04, 0.17, 2.03, 5.51, -1.29, 2.0, 1.58, 1.12, -0.96, 0.91, -1.08, 4.96, -3.77, -0.76, -7.14, 0.55, 3.54, 1.79, -0.6, 1.77, 2.05, 3.68, -0.56, 1.24, -2.09, -0.22, -0.7, -4.97], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-012", "category": "linalg", "prompt": "Return the matrix product of `m` with itself.", "input_data": "{\"m\": \"{\\\"data\\\": [[1.78454, 2.056107, 0.09955, 0.002686, 0.572878, 0.637833], [-1.300929, 0.239739, -1.237216, -2.083909, 4.352373, -1.00321], [-5.19234, -2.996016, 2.224916, -0.723849, 0.180393, 1.828207], [-5.261445, 4.704098, -1.701475, 1.437119, 2.570229, -1.987346], [2.972197, 0.903369, -2.275477, 0.906412, -0.662423, 1.302182], [0.261181, -1.040545, 0.122565, 1.966241, -0.08211, 0.793546]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [6, 6]}\"}", "expected_output": "{\"data\": [[1.8480002336660002, 3.7303423232780006, -3.374672006323, -2.5747487846499992, 9.564270025251, 0.5043326394580003], [27.429066041225, -3.737883668820998, -9.659782107226, -0.6298657267659994, -8.081886910743, 5.680765749980999], [-12.098706500482999, -23.20457927686, 9.185277737281, 7.336923648391999, -17.74306546893, 6.8856037020539995], [-7.115472535310002, 6.5574449381400015, -18.666699199266, -8.098037180954, 19.307215961613004, -12.271967134002], [9.546052409029999, 15.455552841501, -5.759832674385001, 3.035143671308, 7.885593470398999, -4.801154717294001], [-9.198692880144, 8.26984456803, -1.4753332027049997, 6.391983560830999, 0.6858178833369988, -1.9502588951120001]], \"dtype\": \"float64\", \"shape\": [6, 6]}"} | |
| {"task_id": "npsp-013", "category": "linalg", "prompt": "Return the inverse of `s`.", "input_data": "{\"s\": \"{\\\"data\\\": [[7.482598, 2.108322, 0.11393, 2.668225, 0.521946], [2.108322, 8.632871, 3.298573, 3.224495, 1.566888], [0.11393, 3.298573, 11.173995, 1.36509, 1.007685], [2.668225, 3.224495, 1.36509, 11.597274, 1.147504], [0.521946, 1.566888, 1.007685, 1.147504, 7.777386]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [5, 5]}\"}", "expected_output": "{\"data\": [[0.15208937092635716, -0.030808448030359405, 0.011037185499583112, -0.02759045420805671, -0.0013591843049477223], [-0.030808448030359398, 0.1527266992649788, -0.039507616597080436, -0.028812611376798056, -0.019331876636481695], [0.011037185499583114, -0.039507616597080436, 0.10191021253933326, -0.0030019344205279262, -0.0055424104237084], [-0.027590454208056715, -0.02881261137679805, -0.003001934420527928, 0.10162695459265401, -0.006949053369511616], [-0.0013591843049477214, -0.0193318766364817, -0.0055424104237084, -0.006949053369511613, 0.134307256540431]], \"dtype\": \"float64\", \"shape\": [5, 5]}"} | |
| {"task_id": "npsp-014", "category": "linalg", "prompt": "Return the eigenvalues of `s` as a 1-D array sorted ascending. `s` is symmetric, so use a symmetric eigensolver.", "input_data": "{\"s\": \"{\\\"data\\\": [[7.482598, 2.108322, 0.11393, 2.668225, 0.521946], [2.108322, 8.632871, 3.298573, 3.224495, 1.566888], [0.11393, 3.298573, 11.173995, 1.36509, 1.007685], [2.668225, 3.224495, 1.36509, 11.597274, 1.147504], [0.521946, 1.566888, 1.007685, 1.147504, 7.777386]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [5, 5]}\"}", "expected_output": "{\"data\": [5.009439718167531, 6.436258656101522, 7.370789253994382, 10.658719235771812, 17.188917135964758], \"dtype\": \"float64\", \"shape\": [5]}"} | |
| {"task_id": "npsp-015", "category": "linalg", "prompt": "Return the lower-triangular Cholesky factor of `s`.", "input_data": "{\"s\": \"{\\\"data\\\": [[7.482598, 2.108322, 0.11393, 2.668225, 0.521946], [2.108322, 8.632871, 3.298573, 3.224495, 1.566888], [0.11393, 3.298573, 11.173995, 1.36509, 1.007685], [2.668225, 3.224495, 1.36509, 11.597274, 1.147504], [0.521946, 1.566888, 1.007685, 1.147504, 7.777386]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [5, 5]}\"}", "expected_output": "{\"data\": [[2.7354337864404616, 0.0, 0.0, 0.0, 0.0], [0.7707450315379399, 2.8352818372005943, 0.0, 0.0, 0.0], [0.04164970125204665, 1.1520800707841041, 3.137669806223674, 0.0, 0.0], [0.9754303003883278, 0.8721132798584621, 0.10189704779367277, 3.1424266336431446, 0.0], [0.19080922469675013, 0.5007695247309983, 0.13475326895710138, 0.16258905847270655, 2.728665255659193]], \"dtype\": \"float64\", \"shape\": [5, 5]}"} | |
| {"task_id": "npsp-016", "category": "linalg", "prompt": "Solve s @ x = b where b is a vector of ones of the right length, and return x.", "input_data": "{\"s\": \"{\\\"data\\\": [[7.482598, 2.108322, 0.11393, 2.668225, 0.521946], [2.108322, 8.632871, 3.298573, 3.224495, 1.566888], [0.11393, 3.298573, 11.173995, 1.36509, 1.007685], [2.668225, 3.224495, 1.36509, 11.597274, 1.147504], [0.521946, 1.566888, 1.007685, 1.147504, 7.777386]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [5, 5]}\"}", "expected_output": "{\"data\": [0.10336846988257643, 0.03426614662425921, 0.0648954365975996, 0.0352729012177597, 0.10112473180578156], \"dtype\": \"float64\", \"shape\": [5]}"} | |
| {"task_id": "npsp-017", "category": "linalg", "prompt": "Return the singular values of `m` as a 1-D array, in descending order.", "input_data": "{\"m\": \"{\\\"data\\\": [[1.78454, 2.056107, 0.09955, 0.002686, 0.572878, 0.637833], [-1.300929, 0.239739, -1.237216, -2.083909, 4.352373, -1.00321], [-5.19234, -2.996016, 2.224916, -0.723849, 0.180393, 1.828207], [-5.261445, 4.704098, -1.701475, 1.437119, 2.570229, -1.987346], [2.972197, 0.903369, -2.275477, 0.906412, -0.662423, 1.302182], [0.261181, -1.040545, 0.122565, 1.966241, -0.08211, 0.793546]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [6, 6]}\"}", "expected_output": "{\"data\": [9.041093142883927, 7.479526784078189, 4.433244106265389, 2.4954668025544176, 1.8696931841386275, 1.4945950345109649], \"dtype\": \"float64\", \"shape\": [6]}"} | |
| {"task_id": "npsp-018", "category": "linalg", "prompt": "Return the QR decomposition's R factor for `m`.", "input_data": "{\"m\": \"{\\\"data\\\": [[1.78454, 2.056107, 0.09955, 0.002686, 0.572878, 0.637833], [-1.300929, 0.239739, -1.237216, -2.083909, 4.352373, -1.00321], [-5.19234, -2.996016, 2.224916, -0.723849, 0.180393, 1.828207], [-5.261445, 4.704098, -1.701475, 1.437119, 2.570229, -1.987346], [2.972197, 0.903369, -2.275477, 0.906412, -0.662423, 1.302182], [0.261181, -1.040545, 0.122565, 1.966241, -0.08211, 0.793546]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [6, 6]}\"}", "expected_output": "{\"data\": [[-8.271781426019185, 0.4138742541122191, 0.9120497697598979, -0.2563581137094326, 2.5496179115449085, -0.904833313491212], [0.0, -6.092390187635642, 2.8432709853754634, -1.2004980477974794, -2.003037553465382, 2.138724751808887], [0.0, 0.0, -2.37963759715507, -0.1464142995470269, 1.8627004431044138, -0.2656560131769521], [0.0, 0.0, 0.0, -3.1766785360375915, 2.4382198099515433, -0.9287080166524544], [0.0, 0.0, 0.0, 0.0, 2.53539449515993, -0.1406796834994175], [0.0, 0.0, 0.0, 0.0, 0.0, 2.1644422038274493]], \"dtype\": \"float64\", \"shape\": [6, 6]}"} | |
| {"task_id": "npsp-019", "category": "linalg", "prompt": "Return the matrix exponential of `m` using scipy.linalg.", "input_data": "{\"m\": \"{\\\"data\\\": [[1.78454, 2.056107, 0.09955, 0.002686, 0.572878, 0.637833], [-1.300929, 0.239739, -1.237216, -2.083909, 4.352373, -1.00321], [-5.19234, -2.996016, 2.224916, -0.723849, 0.180393, 1.828207], [-5.261445, 4.704098, -1.701475, 1.437119, 2.570229, -1.987346], [2.972197, 0.903369, -2.275477, 0.906412, -0.662423, 1.302182], [0.261181, -1.040545, 0.122565, 1.966241, -0.08211, 0.793546]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [6, 6]}\"}", "expected_output": "{\"data\": [[61.87579349341, 40.058884091645595, -30.012743321305482, -7.047777163620306, 30.62436104382362, 0.8077703260435826], [76.40599472757842, 45.94008310271451, -33.68525373504877, -9.730570115529705, 34.35484989971315, 1.9560694670136451], [-182.92625737780722, -109.18836502431684, 81.2475821058694, 26.8018931774882, -80.65786485703147, -0.2655128631970232], [144.26655061266266, 90.30021172562536, -72.1774433409393, -23.937728447791596, 65.63771247594373, -8.594908584846534], [130.9056962041984, 85.43757110463433, -66.53476883508037, -17.739362102484257, 63.68556240166008, -4.027422648392834], [27.85622376333019, 25.32665096254941, -23.094750522582345, -3.4920101607995497, 18.81193741035785, -6.53985947399258]], \"dtype\": \"float64\", \"shape\": [6, 6]}"} | |
| {"task_id": "npsp-020", "category": "linalg", "prompt": "Return the Moore-Penrose pseudo-inverse of `g`.", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [[-0.1429377816094195, 0.05448011061825246, 0.06866100778897095, -0.13419558172308646, -0.013981531950309963, 0.010526309268390682, 0.19418810840799997, -0.06381058193497365], [-0.08860145645427095, 0.006764157452084771, 0.022712524298697977, 0.08830243637736566, 0.17284553919549925, -0.014392729205936308, -0.012377591093680394, -0.059395391420002816], [0.13887980467776495, -0.05314023062170127, -0.08379926907959409, 0.08795608517281608, -0.09861098056858539, 0.034946157009517205, -0.07011005798117999, 0.09053204471159448], [0.1418894290029577, 0.011241710067976581, 0.034947106321188734, -0.1385008080867502, -0.09675938440968165, 0.024577795005627835, -0.005315727728947916, -0.0028474412975652715], [-0.02214685336239382, 0.0233247066778792, -0.00030650650141681254, 0.10402001076583, 0.047695463548411955, -0.03855175802868635, -0.10570581961240878, 0.06483538492956903]], \"dtype\": \"float64\", \"shape\": [5, 8]}"} | |
| {"task_id": "npsp-021", "category": "linalg", "prompt": "Return a 1-element array containing the determinant of `s`.", "input_data": "{\"s\": \"{\\\"data\\\": [[7.482598, 2.108322, 0.11393, 2.668225, 0.521946], [2.108322, 8.632871, 3.298573, 3.224495, 1.566888], [0.11393, 3.298573, 11.173995, 1.36509, 1.007685], [2.668225, 3.224495, 1.36509, 11.597274, 1.147504], [0.521946, 1.566888, 1.007685, 1.147504, 7.777386]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [5, 5]}\"}", "expected_output": "{\"data\": [43540.17579515116], \"dtype\": \"float64\", \"shape\": [1]}"} | |
| {"task_id": "npsp-022", "category": "statistics", "prompt": "Return a 1-D array [mean, median, population standard deviation (ddof=0)] of `a`.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [0.26237502499999993, 0.6936545, 2.9689772850166816], \"dtype\": \"float64\", \"shape\": [3]}"} | |
| {"task_id": "npsp-023", "category": "statistics", "prompt": "Return the 25th, 50th and 75th percentiles of `a` as a 1-D array, using linear interpolation.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-0.9873295, 0.6936545, 2.01177975], \"dtype\": \"float64\", \"shape\": [3]}"} | |
| {"task_id": "npsp-024", "category": "statistics", "prompt": "Return the z-scores of `a` (population std, ddof=0) using scipy.stats.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-0.8760481389083399, 1.3101841481344119, 1.520298251448104, 0.05965891887886399, 0.19508265621397156, 0.5347144227110785, 0.31152409944921605, 0.0875432682869245, -2.530924727151552, 0.7496982163632464, 0.842703306497659, -1.6716820468945128, -1.1109118421502062, -0.03034278014002851, 0.5963635976386569, 1.769079541802722, -0.5221010052258754, 0.5868495470790409, 0.44490908760609743, 0.2883477685465654, -0.4102160131525415, 0.21923979623722273, -0.4530354717727126, 1.5832943548349137, -1.357837274587754, -0.34442163978841434, -2.49379443297371, 0.09544127414851808, 1.1037009247383274, 0.5147914006325625, -0.28956099776801414, 0.5091972183921596, 0.6032077052384514, 1.1518299558094416, -0.27729044245462264, 0.33027634800327904, -0.791872351757245, -0.16173179479118244, -0.3251944802247199, -1.7609703689500018], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-025", "category": "statistics", "prompt": "Return the Pearson correlation matrix of `g`'s columns.", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [[1.0, -0.29586790448042755, 0.5677882138765642, -0.006749565036902352, 0.4820874218471303], [-0.29586790448042755, 1.0, 0.14570270311326347, 0.30853352196537975, -0.6718184313703766], [0.5677882138765642, 0.14570270311326347, 1.0, -0.28446555946137775, -0.24492884202224122], [-0.006749565036902353, 0.30853352196537975, -0.28446555946137775, 1.0, 0.2907477344299281], [0.48208742184713027, -0.6718184313703766, -0.24492884202224124, 0.2907477344299281, 1.0]], \"dtype\": \"float64\", \"shape\": [5, 5]}"} | |
| {"task_id": "npsp-026", "category": "statistics", "prompt": "Return the column-wise covariance matrix of `g` with ddof=1.", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [[5.930468114167553, -1.5616547137608392, 3.4422523291005707, -0.04124030443269642, 4.470383244098749], [-1.5616547137608392, 4.6977007272129825, 0.7861802393955721, 1.6778248341812676, -5.544585133234036], [3.4422523291005707, 0.7861802393955721, 6.197602002279143, -1.7768187298992866, -2.3218076587607155], [-0.04124030443269642, 1.6778248341812676, -1.7768187298992866, 6.295107879277269, 2.7777451396643933], [4.470383244098749, -5.544585133234036, -2.3218076587607155, 2.7777451396643933, 14.49936347784507]], \"dtype\": \"float64\", \"shape\": [5, 5]}"} | |
| {"task_id": "npsp-027", "category": "statistics", "prompt": "Return a 1-element array with the chi-square statistic from a chi-square test of independence on the contingency table `c`.", "input_data": "{\"c\": \"{\\\"data\\\": [[32, 34, 9, 21, 8], [10, 9, 25, 17, 46], [15, 25, 25, 45, 13], [43, 34, 3, 4, 45]], \\\"dtype\\\": \\\"int64\\\", \\\"shape\\\": [4, 5]}\"}", "expected_output": "{\"data\": [147.36878573116684], \"dtype\": \"float64\", \"shape\": [1]}"} | |
| {"task_id": "npsp-028", "category": "statistics", "prompt": "Return a 1-D array [slope, intercept] of the least-squares line fitting `a` against the index 0..len(a)-1.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-0.033694264446529086, 0.919413181707317], \"dtype\": \"float64\", \"shape\": [2]}"} | |
| {"task_id": "npsp-029", "category": "statistics", "prompt": "Return the ranks of `a` using scipy.stats.rankdata with the default average method.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [7.0, 37.0, 38.0, 18.0, 21.0, 29.0, 24.0, 19.0, 1.0, 33.0, 34.0, 4.0, 6.0, 17.0, 31.0, 40.0, 9.0, 30.0, 26.0, 23.0, 11.0, 22.0, 10.0, 39.0, 5.0, 12.0, 2.0, 20.0, 35.0, 28.0, 14.0, 27.0, 32.0, 36.0, 15.0, 25.0, 8.0, 16.0, 13.0, 3.0], \"dtype\": \"float64\", \"shape\": [40]}"} | |
| {"task_id": "npsp-030", "category": "signal", "prompt": "Return the magnitude spectrum of the real FFT of `sig`.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [0.0, 1.7244866097368884e-09, 2.966880286638235e-09, 4.024770390295366e-09, 3.169368566610847e-09, 64.00000000067347, 2.4711699997784958e-09, 3.34979198175915e-09, 2.82842747427887e-09, 4.927753918770411e-09, 1.0376383079187364e-08, 4.435839297617373e-09, 32.00000000945037, 2.291128886433326e-09, 1.0334358299128798e-09, 1.9132926337984407e-09, 2.8284265602558067e-09, 5.951622623649087e-09, 6.104279416683983e-09, 1.4343168957469133e-10, 9.909576783526562e-10, 7.195834333545371e-10, 4.031694715159782e-09, 3.681350143619216e-09, 2.82842756956059e-09, 6.36998216912612e-09, 1.9771559295952027e-09, 4.590625463323191e-09, 2.096480629884055e-09, 8.556956092767413e-09, 1.33482978997774e-09, 2.9512719953704683e-09, 3.999999109716157e-09, 8.846097944075411e-10, 9.540968915521168e-10, 4.6172438478997773e-10, 5.677975115961918e-09, 4.907654562804783e-10, 1.8071761973451644e-09, 2.4487359219429157e-09, 2.8284268339635183e-09, 1.8074733402453812e-09, 6.0544619092825174e-09, 1.9652597721972865e-10, 1.3481845349065094e-09, 6.814096801899009e-10, 2.238634254346798e-09, 4.899676831012127e-09, 2.828426116166597e-09, 1.1428969635094713e-09, 1.4973601668665652e-09, 2.809386046121434e-09, 1.860200884340307e-11, 6.3945351697793255e-09, 2.098887878220558e-09, 3.203407825720753e-09, 2.8284269292452383e-09, 1.5216841047259946e-09, 4.197001636566324e-09, 2.0257111543743304e-09, 2.487536198267555e-09, 3.566230369714887e-09, 1.7434221110782596e-09, 3.817311159118828e-09, 0.0], \"dtype\": \"float64\", \"shape\": [65]}"} | |
| {"task_id": "npsp-031", "category": "signal", "prompt": "Return the real FFT frequencies for `sig` assuming a sample spacing of 1/128.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0], \"dtype\": \"float64\", \"shape\": [65]}"} | |
| {"task_id": "npsp-032", "category": "signal", "prompt": "Return `sig` convolved with a length-5 moving-average kernel using scipy.signal.convolve in 'same' mode.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [0.29082035980000004, 0.5232106788, 0.7602152794000001, 0.9680331246000001, 1.0246486674, 0.9526697076, 0.8050552952000001, 0.6455452396, 0.526337708, 0.4705891568, 0.4656295586, 0.4691186452, 0.4259551180000001, 0.2900812788, 0.04363987180000001, -0.2931916162, -0.6652326298, -0.9974012668000001, -1.2170054754000001, -1.2758910100000003, -1.165122012, -0.9173388912, -0.5960379584000001, -0.27536935780000005, -0.017190695599999986, 0.14701199020000003, 0.22340825820000002, 0.2500566416, 0.28025207480000003, 0.3608295308, 0.5129605924, 0.722120498, 0.9407810072, 1.1030534608000002, 1.1464289582, 1.033315961, 0.7650877718, 0.3838225094, -0.038982930200000016, -0.42309447720000004, -0.7028519140000001, -0.8454758252000001, -0.8584291470000001, -0.7835730238, -0.6802863154000001, -0.6034045800000001, -0.5835371098000001, -0.6164683040000001, -0.6652326296, -0.6741245788000001, -0.589828494, -0.3824051514, -0.05888057920000003, 0.3353527772, 0.7280207468, 1.0406956238, 1.2119989260000001, 1.2156517068000001, 1.0674464836000002, 0.81890384, 0.5398129709999999, 0.295546695, 0.1267469142, 0.0381246572, 2.168404344971009e-19, -0.0381246572, -0.1267469142, -0.295546695, -0.539812971, -0.8189038400000002, -1.0674464836, -1.2156517068, -1.211998926, -1.0406956238, -0.7280207468000001, -0.3353527772, 0.05888057919999998, 0.38240515140000003, 0.589828494, 0.6741245788000001, 0.6652326296, 0.6164683040000001, 0.5835371098000001, 0.60340458, 0.6802863154000001, 0.7835730238, 0.8584291470000001, 0.8454758252000001, 0.7028519140000001, 0.4230944772, 0.03898293020000004, -0.38382250939999996, -0.7650877718, -1.033315961, -1.1464289582, -1.1030534608, -0.9407810071999999, -0.722120498, -0.5129605924, -0.3608295308000001, -0.28025207480000003, -0.2500566416000001, -0.22340825820000004, -0.14701199020000005, 0.0171906956, 0.2753693578, 0.5960379584, 0.9173388912, 1.165122012, 1.27589101, 1.2170054754000001, 0.9974012668000001, 0.6652326298, 0.2931916162, -0.04363987180000001, -0.2900812788, -0.425955118, -0.4691186452, -0.46562955860000005, -0.4705891568000001, -0.526337708, -0.6455452396000001, -0.8050552952000001, -0.9526697076, -1.0246486674, -0.9680331246, -0.7602152794000001, -0.5232106787999999], \"dtype\": \"float64\", \"shape\": [128]}"} | |
| {"task_id": "npsp-033", "category": "signal", "prompt": "Return the discrete cosine transform (type 2, norm='ortho') of `sig`.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [-1.4719616800160393e-17, 1.2300729989381387, -5.290094477731653e-12, 1.3227162999810274, -1.8197409967671446e-11, 1.5657062445721788, 3.7010113568210284e-11, 2.2096907074670753, 3.8831627266872375e-11, 5.562521437993276, -0.9792854016040347, -4.551343392546784, 4.5324525865470234e-11, -1.1721701723677374, -7.158592594176523e-11, -0.4699293001478496, 6.897483892958566e-11, -0.12173775489480076, -1.3495977083603938e-10, 0.16232101597136445, 3.1515686775887354e-10, 0.5756060556256659, 1.4788681611087262e-10, 2.2586931312561638, -1.1611387093607615, -2.5739610988744186, 8.98356337372573e-11, -0.9194893038864621, 4.3519240336200745e-11, -0.5720550997151539, 8.607291175537172e-11, -0.4154282739111877, 1.3529901919893978e-10, -0.32438734154941073, -3.0148034217700086e-10, -0.26420813661397746, 3.2623944334816236e-10, -0.2212384087269892, 8.061155130968272e-12, -0.18894376316975126, -5.839193861502309e-11, -0.16377047486276813, -4.433512497069251e-11, -0.14360446442913663, -2.590882102310068e-10, -0.12710185914208422, -2.4618909178793015e-10, -0.11336379764131818, 1.9642372935649458e-10, -0.10176441707972135, 4.5848615895073203e-10, -0.09185354890838476, -1.4722381991164583e-10, -0.08329860630660536, 3.5303752321839647e-10, -0.07584828446988107, 1.6624906108173906e-10, -0.06930903950262236, 6.986463536182716e-10, -0.06352933122827281, -1.1205211979772148e-10, -0.05838880015339125, 2.54377730997544e-10, -0.05379062916177489, 3.5355342475295144e-10, -0.04965606714944053, -8.008463630427116e-11, -0.04592040983945063, -8.836736302569433e-11, -0.04253000909583479, -4.370285079246523e-11, -0.03944001803314463, -5.486418012203427e-10, -0.03661266444116071, 4.836156218989142e-11, -0.034015910349255205, 1.8144221982525583e-10, -0.031622410519143836, 2.5025623766204847e-10, -0.029408682228966934, -2.939688551264236e-10, -0.027354447631180973, 1.908811926690884e-10, -0.025442100312322913, -6.49135702852232e-10, -0.023656280445213194, 2.1374310688008686e-11, -0.02198351744993496, 1.4862438109113192e-10, -0.02041194702732417, 7.60817223593868e-11, -0.018931069431024128, 2.5296265423374373e-10, -0.017531551005020907, 5.599165720341227e-10, -0.016205058129425354, 3.266407912328787e-10, -0.014944117414730895, 1.33289383354406e-10, -0.013741996065070705, 1.762287561448095e-10, -0.01259260115244365, -3.334489017416632e-10, -0.011490393711415026, -2.2251089859537387e-12, -0.010430312824444954, 7.703622062549307e-10, -0.009407712087147524, -2.5449841917543854e-10, -0.008418304166262922, -3.9069653820596566e-10, -0.0074581091725612544, -3.467599464463063e-10, -0.006523412933914952, 1.874101759904918e-10, -0.005610727509555491, -5.189469356939705e-10, -0.004716757162596341, 2.5130958425378935e-10, -0.00383836553343464, 3.09444626424294e-10, -0.002972548256023666, 4.4457109243698177e-10, -0.002116405435245383, 2.1766521161726517e-10, -0.0012671170427108747, 4.770202763232977e-10, -0.0004219190754837232], \"dtype\": \"float64\", \"shape\": [128]}"} | |
| {"task_id": "npsp-034", "category": "signal", "prompt": "Return `sig` detrended linearly using scipy.signal.detrend.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [-0.22688523042005815, 0.2974530613345884, 0.7135972640892351, 0.9457853518438815, 0.9724297555985282, 0.8300689743531747, 0.5983957541078213, 0.371567443862468, 0.2255782686171145, 0.1927444563717611, 0.25189629512640765, 0.33751797688105434, 0.36463443163570086, 0.2608886803903474, -0.005208200855005979, -0.4096079221003594, -0.8768240793457128, -1.3016580295910662, -1.5814514088364195, -1.6481864070817729, -1.4897639863271266, -1.1533867735724799, -0.7299480608178333, -0.32467082606318676, -0.02381676430854017, 0.13144399544610644, 0.15537151620075304, 0.1089303469553996, 0.07517549271004617, 0.12729013146469276, 0.30028614021933936, 0.5761237749739859, 0.8874506337286325, 1.1388399994832792, 1.2384576562379257, 1.1295133869925722, 0.8108662407472189, 0.33975062650186544, -0.184435967743488, -0.6500036769888414, -0.9666488322341948, -1.0918265154795483, -1.0411715787249016, -0.879690544970255, -0.6969053072156085, -0.574503237460962, -0.5575279947063153, -0.6388979229516688, -0.7624882151970221, -0.8436962994423756, -0.8004598866877289, -0.5841227619330824, -0.19955252017843583, 0.2924934765762108, 0.7917915403308573, 1.1885718740855038, 1.3970820648401505, 1.381686843594797, 1.1668749663494438, 0.8279204231040902, 0.46541073685873685, 0.1722338256133834, 0.00409747736803001, -0.03659143487732341, 0.001786497877323177, 0.04016443063196976, -0.0005244816133836566, -0.16866082985873707, -0.4618377411040905, -0.8243474273494439, -1.1633019705947973, -1.3781138478401507, -1.393509069085504, -1.1849988783308576, -0.788218544576211, -0.2889204808215644, 0.2031255159330822, 0.5876957576877287, 0.8040328824423754, 0.8472692951970219, 0.7660612109516686, 0.6424709187063151, 0.5611009904609616, 0.5780762332156083, 0.7004783029702548, 0.8832635407249014, 1.044744574479548, 1.0953995112341945, 0.9702218279888412, 0.6535766727434877, 0.18800896349813434, -0.33617763074721907, -0.8072932449925725, -1.1259403912379258, -1.2348846604832795, -1.1352670037286328, -0.8838776379739861, -0.5725507792193396, -0.296713144464693, -0.12371713571004642, -0.07160249695539983, -0.10535735120075324, -0.15179852044610667, -0.1278709996914601, 0.02738976006318651, 0.32824382181783307, 0.7335210565724797, 1.1569597693271263, 1.4933369820817728, 1.6517594028364193, 1.585024404591066, 1.3052310253457127, 0.8803970751003591, 0.41318091785500577, 0.00878119660965232, -0.2573156846357011, -0.36106143588105455, -0.3339449811264079, -0.24832329937176134, -0.18917146061711476, -0.22200527286246813, -0.3679944481078216, -0.594822758353175, -0.8264959785985284, -0.9688567598438818, -0.9422123560892351, -0.7100242683345888, -0.29388006557994206], \"dtype\": \"float64\", \"shape\": [128]}"} | |
| {"task_id": "npsp-035", "category": "signal", "prompt": "Return the indices of local maxima in `sig` found by scipy.signal.find_peaks with default arguments, as an int64 array.", "input_data": "{\"sig\": \"{\\\"data\\\": [0.0, 0.520765296, 0.933336503, 1.161951595, 1.185023003, 1.039089226, 0.80384301, 0.573441704, 0.423879533, 0.387472725, 0.443051568, 0.525100254, 0.548643713, 0.441324966, 0.171655089, -0.236317628, -0.707106781, -1.135513727, -1.418880102, -1.489188096, -1.334338671, -1.001534454, -0.581668737, -0.179964498, 0.117316568, 0.269004332, 0.289358857, 0.239344692, 0.202016842, 0.250558485, 0.419981498, 0.692246137, 1.0, 1.24781637, 1.343861031, 1.231343766, 0.909123624, 0.434435014, -0.093324576, -0.562465281, -0.882683432, -1.011434111, -0.96435217, -0.806444132, -0.62723189, -0.508402816, -0.495000569, -0.579943493, -0.707106781, -0.791887861, -0.752224444, -0.539460315, -0.158463069, 0.330009932, 0.825735, 1.218942338, 1.423879533, 1.404911316, 1.186526443, 0.843998904, 0.477916222, 0.181166315, 0.009456971, -0.034804937, -0.0, 0.034804937, -0.009456971, -0.181166315, -0.477916222, -0.843998904, -1.186526443, -1.404911316, -1.423879533, -1.218942338, -0.825735, -0.330009932, 0.158463069, 0.539460315, 0.752224444, 0.791887861, 0.707106781, 0.579943493, 0.495000569, 0.508402816, 0.62723189, 0.806444132, 0.96435217, 1.011434111, 0.882683432, 0.562465281, 0.093324576, -0.434435014, -0.909123624, -1.231343766, -1.343861031, -1.24781637, -1.0, -0.692246137, -0.419981498, -0.250558485, -0.202016842, -0.239344692, -0.289358857, -0.269004332, -0.117316568, 0.179964498, 0.581668737, 1.001534454, 1.334338671, 1.489188096, 1.418880102, 1.135513727, 0.707106781, 0.236317628, -0.171655089, -0.441324966, -0.548643713, -0.525100254, -0.443051568, -0.387472725, -0.423879533, -0.573441704, -0.80384301, -1.039089226, -1.185023003, -1.161951595, -0.933336503, -0.520765296], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [128]}\"}", "expected_output": "{\"data\": [4, 12, 26, 34, 46, 56, 65, 79, 87, 100, 109, 119], \"dtype\": \"int64\", \"shape\": [12]}"} | |
| {"task_id": "npsp-036", "category": "optimization", "prompt": "Fit a degree-2 polynomial to `a` against the index 0..len(a)-1 with numpy.polyfit and return the coefficients (highest power first).", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [-0.0008460859671458246, -0.0006969117278418533, 0.7104299478222972], \"dtype\": \"float64\", \"shape\": [3]}"} | |
| {"task_id": "npsp-037", "category": "optimization", "prompt": "Return the least-squares solution x to g @ x = b, where b is a vector of ones of the right length. Use numpy.linalg.lstsq with rcond=None.", "input_data": "{\"g\": \"{\\\"data\\\": [[2.430467, 7.321266, 6.262129, 7.057496, 0.582218], [7.481136, 5.140247, 5.339102, 6.517242, 9.002142], [6.280658, 6.390547, 4.376518, 7.55941, 7.296464], [4.761695, 5.810669, 7.955908, 0.774986, 2.944163], [0.959852, 7.128168, 1.758072, 3.474089, 0.428503], [6.620385, 8.587085, 9.46601, 5.026196, 1.382136], [7.68819, 6.173328, 8.582107, 2.097982, 0.018683], [6.294074, 1.286393, 5.802066, 2.711958, 8.232041]], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [8, 5]}\"}", "expected_output": "{\"data\": [-0.02706994113417538, 0.11585748914975713, 0.046653553320631924, -0.030767321125194237, 0.07316462841678441], \"dtype\": \"float64\", \"shape\": [5]}"} | |
| {"task_id": "npsp-038", "category": "optimization", "prompt": "Minimise the function f(x) = (x[0]-3)**2 + (x[1]+1)**2 with scipy.optimize.minimize starting from [0, 0] using method 'BFGS', and return the located minimiser x rounded to 6 decimals.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [3.0, -1.0], \"dtype\": \"float64\", \"shape\": [2]}"} | |
| {"task_id": "npsp-039", "category": "optimization", "prompt": "Find the root of f(x) = x**3 - 2x - 5 on the bracket [1, 3] with scipy.optimize.brentq and return it as a 1-element array rounded to 9 decimals.", "input_data": "{\"a\": \"{\\\"data\\\": [-2.338592, 4.152282, 4.776106, 0.439501, 0.841571, 1.84993, 1.187283, 0.522289, -7.251883, 2.488212, 2.764342, -4.700811, -3.035897, 0.172288, 2.032965, 5.514732, -1.287731, 2.004718, 1.5833, 1.118473, -0.955547, 0.913293, -1.082677, 4.96314, -3.769013, -0.760205, -7.141644, 0.545738, 3.539238, 1.790779, -0.597325, 1.77417, 2.053285, 3.682132, -0.560894, 1.242958, -2.088676, -0.217803, -0.70312, -4.965906], \\\"dtype\\\": \\\"float64\\\", \\\"shape\\\": [40]}\"}", "expected_output": "{\"data\": [2.094551482], \"dtype\": \"float64\", \"shape\": [1]}"} | |