diff --git "a/dask__dask-6626/docstore.json" "b/dask__dask-6626/docstore.json"
new file mode 100644--- /dev/null
+++ "b/dask__dask-6626/docstore.json"
@@ -0,0 +1 @@
+{"docstore/metadata": {"/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/conftest.py_pytest_": {"doc_hash": "d6ee0502ada0f7929069cd62f1a9f6a03750a14455d587624ce8c18451d7bc7b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/__init__.py__": {"doc_hash": "d19ac4f3b8c8b37e9701d2f022cf04a37c29f62e1f34c584daa8e8bccd78d572"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py__This_file_helps_to_comp_register_vcs_handler.return.decorate": {"doc_hash": "808472df5eec5e1f461cb1a302e2b7c184767449b9beb014e3a96f6f99546a4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_run_command_run_command.return.stdout": {"doc_hash": "9bb6406f4fb972751e5c6364db03cde017bbfe9756c5a54f3f9fc07652056c9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_versions_from_parentdir_versions_from_parentdir.return._": {"doc_hash": "7b907cfcb72231e1177b03b38d56920da01861d319db6838294b786846021aed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_get_keywords_git_get_keywords.return.keywords": {"doc_hash": "21829cd66b2953bba4fd1c01617450ce13b49454cdd63be9a77154cd0da5c308"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_versions_from_keywords_git_versions_from_keywords.return._": {"doc_hash": "6a3a6dd7180b831e2e34ed360173218eb258928dec069e879ea4e6303af34a52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces": {"doc_hash": "2cf80e73e4efcd2ec0a3674445e82ecdc474d1e0188bee4561f214b559e5d14d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_plus_or_dot_render_pep440.return.rendered": {"doc_hash": "e1361e9e7f31292c8fad2b4c78dd5d7ddab63fe3edf6b2d21efd350057f9605b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_pre_render_pep440_post.return.rendered": {"doc_hash": "f736ff4dfea0243dfac2ff609c0191dbec7db316734bbc4bdf6b9efb3a5a7b2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_old_render_pep440_old.return.rendered": {"doc_hash": "c54bff3eb254c5e9f89a412af240ed900b729ba7a7d1c2256ff2eacad05baf69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_render_git_describe.return.rendered": {"doc_hash": "4f8656d406540ec09d958a32cc7ecc81f7f5de84721313016b0e228499a1f49c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_long_render_git_describe_long.return.rendered": {"doc_hash": "9d44c78548b4e9d91f54839e47594fa0bdc73dc7197d4bf6e7085ba0ddf78294"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_render.return._": {"doc_hash": "804fc381aff372ee4cc53a4951345e67223e3259693c49bd34fef69e048787ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_get_versions_": {"doc_hash": "81d079ebbe56db63a6cc14fca7ecf6573363f7b663d1906af58a0aa7cfa01a3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/__init__.py_try__": {"doc_hash": "87d1ff52236bbd113599aede77bd7d5896e3ae0168e1019b1652d6333d53b862"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_tensordot_lookup_register_cupy._cupy_einsum.return.cupy_einsum_args_kwar": {"doc_hash": "4e0e84effbeff9d8a803e0d66e1c1019720b346b724adfa1719ea584a36f9d10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_cupyx_register_cupyx.concatenate_lookup_regist": {"doc_hash": "848c8c243b12829bc9eb718bbcc0af8548fb2b6a49d3c85998d8f72dcfb26e14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_sparse_": {"doc_hash": "6d0d1021359a64faea6becef5e91bc42771ddc3b005a88eac27c18f848bdd02e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_numbers_blockwise._Tensor_operation_Gene": {"doc_hash": "72dbe95669d696820c2e67b7a5aa7038c2037bde76380d5f4510e4cd62acb593"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.out_blockwise.chunks._chunkss_i_for_i_in_out_": {"doc_hash": "7ae773900c494e35b4b0aab4bc8f34b96c066e5e3df88db902d97a47d2885abd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.if_adjust_chunks__": {"doc_hash": "32d125b1b635ad2933bf00ef1513d93498af868a0a4affcc4d2106a9332250bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__A_set_of_NumPy_functi_keepdims_wrapper.return.keepdims_wrapped_callable": {"doc_hash": "267aa7db9d15e673d9e2c81ca025ebfc778c2e678fb24d3eba9134fd39cf25bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__Wrap_NumPy_functions_to_None_2.nanstd.np_nanstd": {"doc_hash": "6dfd7a13783be8c5c1ecdf5e49ca4980a3836f11e9df714c8d234f002240458e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_coarsen_coarsen.return.reduction_x_reshape_newsh": {"doc_hash": "23916e8106631d93edcaf26f1460e0af90847ab9397cfe5cfa39cd72b5444b59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_trim_trim.return.x_tuple_slice_ax_ax_if_": {"doc_hash": "84535f708ca9434cbf0cd87b3b498e25a7e4936fc2946d0ffd5d81dc937f217b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_topk.return.a_tuple_k_slice_if_i_a": {"doc_hash": "71afaa6839afc79a5051bd7f081c355d321a0ac0c5ead5c400435787117752a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_aggregate_argtopk_preprocess.return.a_idx": {"doc_hash": "aa30a20d30cc3a044a3dc089547b61afd7c21887439e31b18138b2496da488b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_argtopk.return.take_along_axis_a_idx2_": {"doc_hash": "2e85665ea9e958cbe742a6e19972dfbc8e9d5da1f52e9a47f5120160d2fe7175"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_aggregate_argtopk_aggregate.return.idx_": {"doc_hash": "93e6a6c59a7387d8ff5d5d7bc26d141bb399ac966055e5f73699d8e9e8e3ec64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_arange_view.if_order_C_.else_.return.x_T_view_dtype_T": {"doc_hash": "bb5a26e78b0a71951c5d95e963ba607652aba660cad0a2a0788376ef7165bdf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_idx_if_i_axis_": {"doc_hash": "4c218837556b0de0b99a55b119babfe7f3329f8c9ac33af60950512e020e9659"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_aggregate_": {"doc_hash": "2d9eaea891f0e914f638686c930ef9d119b008bb2388dba7a17d0335fdb3a32d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_from_numbers_import_Numbe_register_chunk_type._HANDLED_CHUNK_TYPES_appe": {"doc_hash": "8b0c5da3b75d9b067298f62afb322007d8ac6c32473ed1536cc069828270e27f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_try__": {"doc_hash": "5d4ad9b0cd725fe5a751b76ff1e77b5f9f6bca61bb37a737c3d1588bfead4ef6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_math_PerformanceWarning._A_warning_given_when_": {"doc_hash": "53b7933d5f0bbc80405cb2ae660af04b57baa9dc23bf197cddfdd06377217880"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_getter_nofancy.return.getter_a_b_asarray_asar": {"doc_hash": "a79162ebc4c737ea85c7332b316c96120a03c88c63031c040fb4c35bc607db9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_inline_getter_inline.return.getter_a_b_asarray_asar": {"doc_hash": "8ceeea910a037542256084112c909b8eac9f9c87503d18f63ab7657a5f75efda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_optimize_implements.return.decorator": {"doc_hash": "a7d579c93a125650c65288cec34b8bd5c8bc2e8c44c82908fb67844a78032591"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_check_if_handled_given_other_check_if_handled_given_other.return.wrapper": {"doc_hash": "554d818d74f90e8fdc7ac91140c9875bb4cc27bd129185d392275aefa902b6a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_slices_from_chunks_slices_from_chunks.return.list_product_slices_": {"doc_hash": "18afbf357bc75cd9f280170142b2655557936c8f27692ec888b638434ac21fc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getem_getem.return.dict_zip_keys_values_": {"doc_hash": "1a69153fef4d2bda2cd8a633dd2c4260c2302724fd0cdcef98f396d1725f1b15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_dotmany_dotmany.return.sum_map_partial_np_dot_": {"doc_hash": "1b11393f1fc976c7fabff4fa5fb3e956cbb496694fd4b6e09a15cc4655c84b4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__concatenate2__concatenate2.return.concatenate_arrays_axis_": {"doc_hash": "fdabd448b1c5f4d68dc95702aa47eacba53d01fca36874a5f3dd81592c38b33c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_apply_infer_dtype_apply_infer_dtype.return.o_dtype_if_nout_is_None_e": {"doc_hash": "38abaabdd2b9afb74263e66750fc1b9fe05c0439d980257f1eef09ace9efea7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_arg__pass_extra_kwargs.return.func_args_len_keys_": {"doc_hash": "3a637d0af5b15657424e4aeceb0e74994bcdb0fbf1370ce48d6b34b6a88226e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks_map_blocks._Map_a_function_across_": {"doc_hash": "e50e0cb419ecad6c599e4cec50096f02378d9fb9162a85b38144ef1c2d13232d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_not_callable_func__map_blocks.if_has_keyword_func_blo.extra_names_append_block": {"doc_hash": "ea7f3577542d60fde82c5f185e02da110ecb41578db83a3e408509b43cf9a478"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks._If_func_has_block_info__map_blocks.None_11.extra_names_append_block": {"doc_hash": "8bc3fdf8ba2133c46a28388ec96926347bc8e7d24f7a25484761d5b21d39a8bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_extra_argpairs__map_blocks.return.out": {"doc_hash": "4fa4969bc26460a93b279b7b708a9824ab5a60be97ca25b79769fd81f1406e74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_chunks_broadcast_chunks.return.tuple_result_": {"doc_hash": "9b48897b89882baf297c720626a5398d74caa4f6fa35a00ef6efbe9bc9e38c4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store_store.sources_dsk_1.Array___dask_optimize___": {"doc_hash": "8840dc2c8962d4a1a17a870da02dc46892afa41cf75fe11d5b1a531ce0e25225"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store.sources2_store.if_return_stored_.else_.if_compute_.else_.return.result": {"doc_hash": "68c60ce0a76a5249c09493131b88af720b5bda459dea28cabb37d69fcfa7b7ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_blockdims_from_blockshape_blockdims_from_blockshape.return.tuple_": {"doc_hash": "46adcc3b2b73f7050e0e2836fb3ea893c13aac0d4b13bac0ba9d254951ff32ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_finalize_CHUNKS_NONE_ERROR_MESSAGE._": {"doc_hash": "8a0d5a38efce4ebd53929fe422709e05dde56c8b0fcb4ad8556f5c2da4209f3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array_Array.__slots__._dask__name__cached": {"doc_hash": "ed4dde42bc0ec66ea6f8df18576baae85377e2f941f8fc6581a1e9345fd59bb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__new___Array.__new__.return.self": {"doc_hash": "d1ce788626ad90efd97de74f1afeaf38bca63c6c86bde061732ef70740b088e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__reduce___Array.__dask_keys__.return.result": {"doc_hash": "69e932fd86068971612192f0bf0871d8dd6158cacdb41ba9b46a1f3092e24335"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__dask_tokenize___Array.npartitions.return.reduce_mul_self_numblock": {"doc_hash": "587e2b78649cb33d86568b24a6cd0e0bec7630aae1d5b73d2ec900b243a3878f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.compute_chunk_sizes_Array.compute_chunk_sizes.return.x": {"doc_hash": "fdb4e30ee33a86f623ea004a78ebc3d1adc99d3f8491befd406bcb724b3d6506"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.shape_Array.__len__.return.sum_self_chunks_0_": {"doc_hash": "82982dc1c565367a42f9d59baed832a7399c68b479b65e0275ac3950d9a99dfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_ufunc___Array.__array_ufunc__.if_method___call___.else_.return.NotImplemented": {"doc_hash": "745805491e1c9f8dde562504c8644730e8ed9f8d630befd33f80a6d8c7bc3670"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__repr___Array._repr_html_.return._n_join_both_": {"doc_hash": "e350456709a92ec5a082fa7fa71afa1185d4895d251ce53b558c787dff0d89f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._repr_html_table_Array._repr_html_table.return._n_join_table_": {"doc_hash": "e3a2d21ac38a90bd70e3f4ac92588736a1b0e5a437a42c371ad300f3e8b332e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.ndim_Array.__array__.return.x": {"doc_hash": "c21cf7509e7c8ae5c5504bf2dd9e0f1110ca7eb0480cec53c69adae96e99993b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function___Array.__array_function__.handle_nonmatching_names.return._HANDLED_FUNCTIONS_func_": {"doc_hash": "cbfdf4355d89bc71bccf8979bb7530fcbd73c8f977f28383dcbf464813b4fab7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function__._First_verify_that_all__Array.__array_function__.return.da_func_args_kwargs_": {"doc_hash": "2c8c36f0219d2b2ff0698a3a539ee8f296e43506ba3d6ab12f02dfc9a9c0e3e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._elemwise_Array.to_svg.return.svg_self_chunks_size_siz": {"doc_hash": "5f9047fc96a4fd7a4173d4030a04e0cae87158752eac73bc29663f770130287f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_hdf5_Array.to_hdf5.return.to_hdf5_filename_datapat": {"doc_hash": "7a4b1f6f1dca4965f42c0943e1e41d58cabcc3327ae6856eedee7f9d2a7ad178"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_dask_dataframe_Array.to_dask_dataframe.return.from_dask_array_self_col": {"doc_hash": "eb41ea798375e7649dd5b4b1a703744197109a6d88af956785e4857ee8e0690f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__bool___Array.__complex__.return.self__scalarfunc_complex_": {"doc_hash": "a62286c8dd9a68a3979fdbc9f44ed075c384ef8e741ad72af27da2e3b89600ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__setitem___Array.__setitem__.if_isinstance_key_Array_.else_.raise_NotImplementedError": {"doc_hash": "d46d84ff26a0f1c3cf1889a643a7769cfba841d82ac258b3c0ae8a8c4bc13a4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__getitem___Array.__getitem__.return.Array_graph_out_chunks_": {"doc_hash": "2cc08915fb397b2fffc554e9d79b92f20e2d43ea44422db023d931ca04c01caa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._vindex_Array._vindex.return._vindex_self_key_": {"doc_hash": "becb90a50266ea6383e3132a507bf19b51f41deaee54aa92e525cb6eb35cecb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.vindex_Array.vindex.return.IndexCallable_self__vinde": {"doc_hash": "72f734f2c0dcb3ba5d0c3779218f965d7bb90d4295d6add49674ff20eb8b11d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._blocks_Array._blocks.return.Array_graph_name_chunks": {"doc_hash": "83d485803d89d4362095f05c11fceb0b4515e5cd512968d96382f35ec3778ed2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.blocks_Array.blocks.return.IndexCallable_self__block": {"doc_hash": "5c530a7a60c764f792e32cac107bb30cd969f894106e843614516acf65800901"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.partitions_Array.partitions.return.self_blocks": {"doc_hash": "2a90708e8db75df32013465f41e28a3e17c720aa66a243c25bc644eef20c43b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.dot_Array.argtopk.return.argtopk_self_k_axis_axi": {"doc_hash": "cab7be299997cb924bc28eb60726ae74c90311aeef295e3103185bd2e88e11d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.astype_Array.astype.return.self_map_blocks_chunk_ast": {"doc_hash": "3d45fad9171a4c45d9f1bb4ba11a3717de6e36755dd239e1ee5ba176bde27133"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__abs___Array.__sub__.return.elemwise_operator_sub_se": {"doc_hash": "b7ae628ef4abf6d37c1838c74476974d7e757fa95ae6c90c895bc18ebd1975e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__rsub___Array.sum.return.sum_": {"doc_hash": "e65e83a5bd120314dbe554f05fdb3e7566bbc66901eeef1e42816ca593b8c1bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.trace_Array.var.return.var_": {"doc_hash": "25bada816b1ee2c4c88f7b07df4e857926240efd2412081fc50119438736a90f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.moment_Array.map_blocks.return.map_blocks_func_self_a": {"doc_hash": "2c7595af891dbccf4cb83ae113a854aaa76f3a79ea6b899dc11528624d1a0c2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.map_overlap_Array.map_overlap.return.map_overlap_": {"doc_hash": "3d9b652989c9c9a478422eade6685b92eecf53a37dfe6ea037c6dce2bd236542"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.cumsum_Array.clip.return.clip_self_min_max_": {"doc_hash": "9ca1e701b2d17be673cac7beb9622bdcd1c9812bd1e1e191c8d7dc9e686e9f37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.view_Array.view.return.self_map_blocks_": {"doc_hash": "5aa2687e75b00cd93c3a52afe86ce0402492335dd844369c5d270f12b76f1349"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.swapaxes_Array.__deepcopy__.return.c": {"doc_hash": "a56294942f1efd0fbf1b0cf0e424d76db487ab2c009f3e8ee84b2e383bd691a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_delayed_Array.to_delayed.return.np_array_L_dtype_object_": {"doc_hash": "a8085bf664f1ef0987ba329df745a129f9e3f3e8a8b8e6a4dfaf0afbd5411f81"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.repeat_ensure_int.return.i": {"doc_hash": "6ccbd0af0cf4cbf403aec0bc73a702515bf61797f77c055f8f23dc03f91bd656"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks_normalize_chunks.if_isinstance_chunks_lis.chunks.tuple_chunks_": {"doc_hash": "559c60061cd46debf2fe90171b9156c4e57c62fb27b0bd1f46b4c762508e527d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks.if_isinstance_chunks_Nu_normalize_chunks.return.tuple_tuple_int_x_if_not": {"doc_hash": "e5ffc23fc30076b0660e3cb447523a8f3ba9d6a63642b48387931c5b27e5d246"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__compute_multiplier_auto_chunks.largest_block.np_prod_": {"doc_hash": "a5543b17831c56a31815aba44f78c0d83c443633ef83ae0f59c72dea0e1226d5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_auto_chunks.if_previous_chunks__auto_chunks.if_previous_chunks_.else_.return.tuple_chunks_": {"doc_hash": "1005b2bfd9620564268d787afe125008250fc52bc792544b88282ea3c7fd5504"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_round_to__get_chunk_shape.return.s_len_s_None_sli": {"doc_hash": "8df2e5387efc50be37cef71d706bdfac11e00ae1e171606e1f1a6b41ff7e1d41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array_from_array._Create_dask_array_from": {"doc_hash": "8f507a59c9613415b7e2b993b9775daf5b30ca179a84fbae9c001905f2b0fe85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array.if_isinstance_x_Array__from_array.return.Array_dsk_name_chunks_": {"doc_hash": "04160fb7d38cc48bc7d3ec87fd246d07f3c0de5f91bf1026f82c5390505d8712"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_zarr_from_zarr.return.from_array_z_chunks_nam": {"doc_hash": "80b4799bab173f2ce28ea2758086cd3e6b586eb1df6f027fe60e64cd6276b7c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_zarr_to_zarr.return.arr_store_z_lock_False_": {"doc_hash": "d45ee52fb49562e0c5269680e685113f027cb19f585b95044b5ac8a50c256343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__check_regular_chunks__check_regular_chunks.return.True": {"doc_hash": "62e09a0117a1209e5c4f2feb69b55cd4f82c0d9bfcfd36bc0a8bd1afe3b9902e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_delayed_from_delayed.return.Array_graph_name_chunks": {"doc_hash": "b8d68f430bf5042754742c61d221d47480f0679e9158e10b3101ee005dba4143"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_func_from_func.return.Array_dsk_name_chunks_": {"doc_hash": "51ec22c7c6a1859e7b202dbc6717c0e0c8ecf6985df46bc6a8980e8de3143c20"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_common_blockdim_common_blockdim.return.tuple_out_": {"doc_hash": "2668de515adcb9f3fd946355f6ebd67041ab550be1878ab9f2e123252a3e33e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks_unify_chunks.arrays._": {"doc_hash": "4a204f5ec9a6f128aadb57a42a1e7ec08441637904eabcc9689db0c1a43c9ebb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks.for_a_i_in_arginds__unpack_singleton.return.x": {"doc_hash": "4cf0cc1d7841b4e7575fc9f1489aef646dc26b297f8957a891c391779757a475"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block_block._": {"doc_hash": "91289085cb4d44868b2a0c0999760f5455c617c5712b01dfa534b3cb02e57272"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block._This_was_copied_almost__block.return.rec_map_reduce_": {"doc_hash": "5f14a3f601929aacf4404c5534cc99ac7b6afca7f36dd0cb41457e456806339f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_concatenate.inds._list_range_ndim_for_i_": {"doc_hash": "cbefa708604d9f5e6debea29f5c254438bda35029af7009fdc7b2448ac614c64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate.for_i_ind_in_enumerate_i_concatenate.return.Array_graph_name_chunks": {"doc_hash": "8993d22159af728dfaa5b2ab43333a0ec6677e9ad5acb26065373469e7ffa254"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_load_store_chunk_load_chunk.return.load_store_chunk_None_ou": {"doc_hash": "d9505c65021b7b60237f1db6d077d1a8b82b83b06f960888af758d4e9a26fd57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_insert_to_ooc_insert_to_ooc.return.dsk": {"doc_hash": "4e47d33c928c4da8d123fb38a4789d76920c2f2866e21c4fc6f998937e45d428"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_retrieve_from_ooc_retrieve_from_ooc.return.load_dsk": {"doc_hash": "ba1ee239b8b3f29f52077f12734016c706a06ae5a47dce8a68f0d6dfe329d890"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asarray_asarray.return.from_array_a_getitem_get": {"doc_hash": "491e6a84e40505d3ce05265bb2d070ddb49bd38b572340e32738d1dad312c3cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asanyarray_asanyarray.return.from_array_a_chunks_a_sh": {"doc_hash": "c1c8dc3eecf1caf5bdd6908b5f8bfd558b9698b2ccc757ac3b360e6d0d4e53e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_is_scalar_for_elemwise_is_scalar_for_elemwise.return._": {"doc_hash": "ec02f31babf9b764705384928aff761c9f8f4646a26190a8b7c96ec3ece211b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_shapes_broadcast_shapes.return.tuple_reversed_out_": {"doc_hash": "63427393841c883e93de15cd7f988cae12eaf924309f6a21f72df939807a46a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_elemwise_elemwise.return.handle_out_out_result_": {"doc_hash": "f4342bf2e749b6e9b2bf29f74b2e4784921481509c0c8e23b4b1e2b12382b776"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_handle_out_handle_out.if_isinstance_out_Array_.else_.return.result": {"doc_hash": "3c9fc8d9d8351e46ab66993611541160eab573f78b0b52d99c703f3485c7c207"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__enforce_dtype__enforce_dtype.return.result": {"doc_hash": "69be4a9567201ba6151024d8de494d0eeb5195f64459455450e0591a12d4a8cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_to_broadcast_to.return.Array_graph_name_chunks": {"doc_hash": "3c28139d7e1ece51169d9820ed100ac7f7115e92a72496bd5f91710a791a7ab8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_arrays_broadcast_arrays.return.result": {"doc_hash": "d3ccaaa996454c61a8b836285a4fc9340a7d038f8efa885a120ba6933f0f6d82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_offset_func_offset_func.return._offset": {"doc_hash": "f89799f38f3329ba6a3dd966e1c811ec4a8902e1bdf07f257cf51f255000689b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_chunks_from_arrays_chunks_from_arrays.return.tuple_result_": {"doc_hash": "fbc922cecf55dd87e0689f02509351a911984db673dcf0c06621934098cb7ae8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_deepfirst_reshapelist.if_len_shape_1_.else_.return._reshapelist_shape_1_p": {"doc_hash": "c39912614f970f83f76354b333bdc46cd4e197a5f5c5155b12b2f247e8b34935"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_transposelist_transposelist.return.reshapelist_newshape_res": {"doc_hash": "88350e3382500f29b8081db2f1dfc9660f5b297fd0d63230250d114e88c5c11b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack_stack.keys.list_product_name_ra": {"doc_hash": "b8a6345856eea1927c6cf671b60da8b86bf606e0c8051de24b7776bcaf744e9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack.inputs_stack.return.Array_graph_name_chunks": {"doc_hash": "a2fc20ccade92de61012a9e79e72bafc37ebbc3dc7c3e59671ef7c512db2d242"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate3_concatenate3.return.result": {"doc_hash": "e105497ac68f2de75f5c801115f140cd18b6b9988d11b196f1c3a99e09a6f53f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_axes_to_hdf5.with_h5py_File_filename_.store_list_data_values_": {"doc_hash": "42995d6e258404c6817d9ee94c6e6003fc7bd5136eaf12e4ed8d3d16a6edd1ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_interleave_none_keyname.return._name_i_tuple_k_for_k": {"doc_hash": "e222a54e46cb41333517d313287b1b95c148946fb732102cfc19cc0664f5b2df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex__vindex.return.x": {"doc_hash": "71cddccbc557f4f4468f2b0c39e7de41073ed31d90f579194d37ca401b092089"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_array__vindex_array.return.result_1d_reshape_broadca": {"doc_hash": "56d3e7abc9198b8776216b7c9c8ec573d97ab9d0ef74497e29167f38f3823f9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__get_axis__vindex_transpose.return.block_transpose_axes_": {"doc_hash": "256cb095bc5f9b491cf2d5c2553e0091811726aecc32d32b0ee1adae9ee3f466"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_merge__vindex_merge.return.x": {"doc_hash": "a7b883138cc1c7d5b624073a84622b4aab543bbdf06f19dcb5d9abc391ce45b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_npy_stack_to_npy_stack.compute_as_if_collection_": {"doc_hash": "696287e7b306b4829b73a31acca9f78d92d445b49bb747d5a851c3f5ec294dc5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_npy_stack_": {"doc_hash": "62b1013ff4895b34eb2846c2f343273189e6734683d404d30abe8b4ea0946de5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_from_collections_abc_impo_AxisError": {"doc_hash": "3441624dcd6bc7e268a0c677eb05b87568db399d18a69ffc8c2b3f8f017cfa47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_empty_like_empty_like.return.empty_shape_dtype_dtype": {"doc_hash": "72d1da865fc10937a19668d8030ccc7676fbc0ade3e8f1a55cecbcb1676f3c1e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_ones_like_ones_like.return.ones_shape_dtype_dtype_": {"doc_hash": "b8633f170df7a356d75a25f038eff886b562196e6e63dad442385c6dc6fa2e95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_zeros_like_zeros_like.return.zeros_shape_dtype_dtype": {"doc_hash": "6e5b9b4bd7600933bcb5765642ab7afa0ebd95c08b8cd4887ba2c4c2403eb9d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_full_like__get_like_function_shapes_chunks.return.shape_chunks": {"doc_hash": "85e671a6c1badcc9719893fd21cb70b096baa7af211a003b2bcf7bfd3e24b827"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linspace_linspace.if_retstep_.else_.return.Array_dsk_name_chunks_": {"doc_hash": "286301d5730d9bc8507063a3c148d50ffcb6e053fe9651ace88d2cfb74548e16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_arange_arange.return.Array_dsk_name_chunks_": {"doc_hash": "6fe9fd65b75c694984fd348b8b07258387aee93c3712097874a9bd9bfce4ef1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_meshgrid_meshgrid.return.grid": {"doc_hash": "78679de020ae216c9dd861c515c5cb5f3d8dc8991d88df4662d3e2568e4b8782"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_indices_indices.return.grid": {"doc_hash": "d6d45a6e39744ad5b138d3dcd8c0987e34b8b8afe86e7aeb7dcbb7d6cd8ed922"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_eye_eye.return.Array_eye_name_eye_shap": {"doc_hash": "c64385f726f1ee986bd8739b425b4b54b83164ec762b3daa271830e594a2aca5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diag_diag.return.Array_graph_name_chunk": {"doc_hash": "3b51ccc7e9ec660d7a65914af51f6dd9603a4f0a1faa9e7fa3bffb5cb52e07f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diagonal_diagonal.return.Array_graph_name_shape_": {"doc_hash": "cc5dc64b38b073bf8cefce60fdcfb7a1f99baa6f1dd7f1c2db855859fc830850"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_triu_triu.return.Array_graph_name_shape_": {"doc_hash": "62cd9998680e447fe727f7cc982c677dcd7e48ba588fe8bd7ac2b83582089e89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tril_tril.return.Array_graph_name_shape_": {"doc_hash": "04ab416ad2b32f2c0635daa6caa6da1286cbde43a930cadab6d96dba5c8d0573"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py__np_fromfunction_fromfunction.return.Array_dsk_name_chunks_": {"doc_hash": "766455ffac82b15944d5284ec79bc4b75f32e16927d34ec32b37f0322050fb33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_repeat_repeat.return.concatenate_out_axis_axi": {"doc_hash": "a3f80e3a43e12a5df28cee0122038f2bedb01eb9f505a4de10b3c07db74ddeda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tile_tile.return.empty_shape_shape_out_dt": {"doc_hash": "1cba7ecaa196c602993fae546e1764a12057516228862414925a1bc5e3167879"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_expand_pad_value_expand_pad_value.return.pad_value": {"doc_hash": "44bb4ed537076573a268d1c8bf850ccde603fcc5b01cf10a5ba5a41696d0fd4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_get_pad_shapes_chunks_get_pad_shapes_chunks.return.pad_shapes_pad_chunks": {"doc_hash": "688c2f17169cf1421eb12ca6a6ae92845e43da52e1e1d05e2f96753ea309c5e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linear_ramp_chunk_linear_ramp_chunk.return.result": {"doc_hash": "50dd995486fab008f44b356bcc6aa2ed3d3820d8d68403ed11c486c7d18477fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_edge_pad_edge.return.result": {"doc_hash": "22f7af7656eb92946ba899086ebca7a18d96796591740cf127ba50e6d8e2c193"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_reuse_pad_reuse.return.result": {"doc_hash": "65aee02fd8fc1cd3cb44a71386947f373fe6f11861852045bd70690ff76197bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_stats_pad_stats.return.result": {"doc_hash": "9d0a2b55695c34ff20feb8b288076b6baffaffbacbac2c1114825719770a8f8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_wrapped_pad_func_pad_udf.return.result": {"doc_hash": "82d26e729e23eed211c63a008f3f22a1b89592d81ccd1c5256be63c80d4e44da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_": {"doc_hash": "601e2a269bfc02187e3a160ff4d6f5501ca0a8bf9282aebd4267285db86940c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_np_chunk_einsum.return.chunk_reshape_chunk_shape": {"doc_hash": "8b6f29dea925648cd02a89db1846ea0b7f5d12adefbaca43f825696ca96cecd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py__This_function_duplicate_parse_einsum_input._Parse_ellipses": {"doc_hash": "b095f157a7a5b966b7d37116832675b7443f11018cc29997c230bc0c0bb06a67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_parse_einsum_input.if_in_subscripts__parse_einsum_input.return._input_subscripts_output": {"doc_hash": "42068a064a2dac2460eb50d5adf2f0b4ed792cbe5f2ea88a2c40dcb362ed9edb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_einsum_": {"doc_hash": "9a42d324c84a2dcf0c6b40fd24b4e6775da81d4ff833584aeb2937391a4d20a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_inspect__hfft_out_chunks.return.chunks": {"doc_hash": "3e0bc0f09e362be62634abd64d6741f3291d736777d9a7891ae36c4b3e159a54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__ihfft_out_chunks__out_chunk_fns._": {"doc_hash": "3cabb6a98edf8851f793a3ab292e0b49280562e8a3e8d53bea286ef5c225496a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap_fft_wrap.try_.except_KeyError_.raise_ValueError_Given_u": {"doc_hash": "1afa4cdb7ab884a38eb6130a76c119fd9510cb19a2fd11e689e6d66ca2a9c0f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.func_fft_wrap.func.return.a_map_blocks_fft_func_a": {"doc_hash": "b5058979c84ce548343c9cd322b80c7c334f3a78fcfc8bd4b95487aaeb91b94a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.if_kind_endswith_fft__fft_wrap.return.func": {"doc_hash": "da14e5a0aafeca36b6db816bb059476bdde67e3d89c8c3d52cb7719d1a16f236"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_rfftfreq.return.r": {"doc_hash": "05c5e884839e760cbfb490e2f19a5bb43b7ee63078298f840fbeefc8047c6fc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__fftshift_helper_": {"doc_hash": "7275be591d823941f88c8bea39390b12b92eb61d8acd77dc6c5afb46b563df19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_np__SIGNATURE._0_1_format__IN": {"doc_hash": "617a0b769e9b7d48c8d467e794673ec528cd8f0cf994e52f89c0fb545269ed38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__parse_gufunc_signature__parse_gufunc_signature.return.ins_outs": {"doc_hash": "b11fabc79fd245f9225ef9ff3225da7d52ee7a9f8ae5a43a32a92e0b0e25137d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes__validate_normalize_axes._Assert_we_have_as_many_": {"doc_hash": "e959df10eb023926a92b75a8cf7a5abb2a8af76bda5e64b4cd695dc3ab60b3e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes.for_idx_iax_icd_in_en__validate_normalize_axes.return.input_axes_output_axes": {"doc_hash": "261db20631488665c7fadd7e551c249d33912b503e2f473180af76e1be4a7b63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc_apply_gufunc._": {"doc_hash": "92eabd576c86363e1360c52491559dd287b052a8d2f871b0401781bc1693f6d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.axes_apply_gufunc.max_loopdims.max_num_loopdims_if_num_": {"doc_hash": "7b1a9336f9a820ca6fd0db24b957e1537c8631a9e2f847cd989ea3024057918a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.core_input_shapes_apply_gufunc._Modifying_blockwise_": {"doc_hash": "58ff76e27a4d2ae53db41f10493299686c00ac59918b1cb1695279ab83170456"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.if_meta_is_not_None__apply_gufunc._Undo_from_above": {"doc_hash": "672f602e6869482bb95b4e4c8c675c00696f0d62bd254f3ceeb203ff1ff71144"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc_gufunc._": {"doc_hash": "6c45a80b043e86ddf3d793dc870c79523de7a7d0a63aef1249185a74ed87e74e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc.__init___gufunc.__call__.return.apply_gufunc_": {"doc_hash": "4b29bbd5fd1606196471f04f4270e3dc70ab06fac301526846502f3154a7ab27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc_as_gufunc._": {"doc_hash": "98536c3b13d52fbb1f0758477a625782917bab25c5d6335d9daf8384d2d29914"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc._allowedkeys_": {"doc_hash": "489003ee768a30128386c13bdd4e2d28f19b3ad39af6b06fbcb115c045f19e9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/image.py_from_glob_import_glob_": {"doc_hash": "d7e91752e274da8f4badce843f579d70c8714169326d4d3d7e5f2d3abc667bf9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_operator__nanmin.return.k_1_if_np_isnan_k_0_else": {"doc_hash": "e409a9d7c34ab8c361a92e95a83874099323b52dbd3c1e509794174526b90b06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__wrapped_qr__wrapped_qr.if_a_shape_0_0_.else_.return.np_linalg_qr_a_": {"doc_hash": "4659cfebba558a04a373e8cdbc14891d0191a677bd42950120dfab5107bd3199"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr_tsqr.layers.data___dask_graph___lay": {"doc_hash": "0f71b61dcf0c16c461769c1448d2e3af13e88cc582a2906f6883a19b80c974c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.dependencies_tsqr.can_distribute.chunks_well_defined_and_i": {"doc_hash": "db049b7353af8e34f1b44b36982cafa180c861f08d85a72d279f73bca0506579"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an_tsqr.if_chunks_well_defined_an.dependencies_name_q_st3_": {"doc_hash": "46f27886d35129726db5a90abf05f5f6eb79fa5c43862c8afffe85ab756f3622"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an.else__tsqr.if_chunks_well_defined_an.else_.dependencies_name_r_st2_": {"doc_hash": "a05bac3b17033ea9f4172d860c54976e21c129836026104a56bcd7bdca452cfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_not_compute_svd__tsqr.if_not_compute_svd_.else_.return.u_s_vh": {"doc_hash": "e06859b7c3af91cb855226fd7b6d604ed7a8fa4a831f577d28e0e15956097273"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr_sfqr.name_R_1.prefix_R_1_": {"doc_hash": "1bb319eb1a19287783eb276a2721124eda02f4559feded56e0b5bec493155047"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr.layers_name_Q_R1_nam_sfqr.return.Q_R": {"doc_hash": "788b23b9aec0cd083f945fe3e7bab72833be465645222dd8734e944be30cccbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_level_compression_level.return.min_max_min_subspace_size": {"doc_hash": "22e16e8e9973dfcb7e59b53fc539081bda9d3ad2f919aa49cf3ba07da6dfa5ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_matrix_compression_matrix.return.q_T": {"doc_hash": "c68ae3ad91b63c36308d884b29ae2594e9f4b76d852f019b6a19acafa221bf12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_compressed_svd_compressed.return.u_s_v": {"doc_hash": "56f0921ce901eafec85afef4c7e8d6e240b625f305b837356ba1e9e03aaa5974"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_qr_qr.if_len_a_chunks_1_1_.else_.raise_NotImplementedError": {"doc_hash": "ca6d7768a8bde88e3a1d41e545a258ee7de224cc99dc820360c281938634b378"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_svd._Single_chunk_case": {"doc_hash": "1d9cb1992f16e84a5d714e2b34903f2b59aa71a5ff489ca934e3128cf8e8fb8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd.if_nb_0_nb_1_1___solve_triangular_lower.return.scipy_linalg_solve_triang": {"doc_hash": "56d8dce4903484cb6ffcbca272dace386f2eb2fa1f450b475e5c59f7fa15508f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu_lu.dsk._": {"doc_hash": "02e1103735ce6803e442ce88fb256bba0ab0e9a23d6e5203de93af1b471f40b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.for_i_in_range_min_vdim__lu.for_i_in_range_min_vdim_.for_k_in_range_i_1_vdi.dsk_name_lu_k_i_": {"doc_hash": "381d34c91b0a7c5344df478730c2a757590cefe907905b867086afcc9f256789"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.None_4_lu.return.p_l_u": {"doc_hash": "e0667e5516ab6a537b4b1aacc123f966ee3e3180285a4710b4cc9f6628f95e3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_triangular_solve_triangular.return.Array_graph_name_shape_": {"doc_hash": "d8d7d6f30b144122750c387e65a7a06e51a719d8a31d5e7feb3751f1a40a6896"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_solve.return.solve_triangular_u_uy_": {"doc_hash": "fdf0c4c1eaa1a711b6462508f1b4892ba35fd5df7c901a067f5898e53af139cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_inv__cholesky_lower.return.scipy_linalg_cholesky_a_": {"doc_hash": "2228d64cbe27f9f05c59692db042577c5f10fc5081d61c788fecd30dbdf2c6d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_cholesky_cholesky.if_lower_.else_.return.u": {"doc_hash": "4af45195d7095afeb0100abedb50270932cc55376cf97c41b79ddffa7a945472"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__cholesky__cholesky.return.lower_upper": {"doc_hash": "c5213564f9c8d065985823c4dc616ffade5737aeb8dc26653aa0b301623d526b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__sort_decreasing_lstsq.return.x_residuals_rank_s": {"doc_hash": "4c91c2d7a1089919dd6e13a74c18256a3ce3ed4f0a604dc0299b78a2f70bcf67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_norm_": {"doc_hash": "0b3ea2f48799a1dbe6ea799175dcf1e43b2dfddb8c9b82a86460734083ccd004"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_from_functools_import_wra_normalize_masked_array.return._data_mask_fill_value_": {"doc_hash": "396a99a42782285a786f1c1908819de2c42355d6d02bbb79f13cb10152dd2593"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__concatenate__concatenate.return.out": {"doc_hash": "cf91bf3fa61e25b5516855f50f0eccf708b9d93658f3e47c64e53b9f4a529616"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__tensordot__tensordot.return.res_reshape_olda_oldb_": {"doc_hash": "7fdee7331d7e50822d7ca958366598cc6d9c0378ac64d2cd515a5e11612f0340"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_filled_masked_outside.return.x_map_blocks_np_ma_masked": {"doc_hash": "4071914691df0012670bfa135a7c36219fe8129421f700cb78b608e603491057"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_where_masked_where.return.blockwise_": {"doc_hash": "78cf43f154acc5082dbe99f792dc6ac02fe57f8b9a6c4842f3011537e1dabf56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_values__masked_array.return.np_ma_masked_array_data_": {"doc_hash": "555d6066093bfd811d80e0d5cb57e91893dc92723646cb0ef3ce2f817686338a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_array_masked_array.return.blockwise__masked_array_": {"doc_hash": "6eaa9e2b0385cfbdabe6eaaa9bd9d58087968d2f0b7668d1617f71b657a2fca9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__set_fill_value_": {"doc_hash": "4c5bf244f24c924b42e4ebb4b0ef56381b3462ed439f91f2cc6146b4085167d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_from_distutils_version_im_try_.except_TypeError_.ma_divide.np_ma_core__DomainedBinar": {"doc_hash": "334386f28124078632b04cdf0648551e05b49dfc204d3f61303e87a625bc597e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_if_LooseVersion_np___vers_if_LooseVersion_np___vers.take_along_axis.return.arr__make_along_axis_idx_": {"doc_hash": "f6692d69b4c7b80817968c4044eb8923d288c9d59ef00c4579fc8f8720d5cdf3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_ge_16__make_sliced_dtype_np_ge_16.return.np_dtype_new_": {"doc_hash": "c7a6b9f1497722f4a59911468d7efcdc58d74f129ec6f2e572b26c7301c2a4bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_lt_14_None_1.else_._make_sliced_dtype._make_sliced_dtype_np_lt_": {"doc_hash": "4646cb6e53b1a5b699f7b83c2e76706b897f3d7c39e11f07ad807997d4c1e5b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser__Recurser.map_reduce.return.f_x_kwargs_": {"doc_hash": "da9cdefc4c144d84e7c74173e430c81e3777b0113daef426b812bc492b2e8f1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser.walk_if__numpy_116_.else_._unravel_index_keyword._dims_": {"doc_hash": "b672887e258dfacd8f83addad7005afcf137a9db4082279d744ef7ba645b3b01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_taken_di_moveaxis.return.result": {"doc_hash": "7349956e1f8e48ca973aa12b608250326d1a0057f7d40c8dc05166a927a09b23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_adapted__": {"doc_hash": "0eceeb42979a77ce74e058c15dfd8fae71395c23d3109be2221a8b7e6e03990c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_from_itertools_import_zip_GETNOREMOVE._getter_getter_nofancy_": {"doc_hash": "46fa1708756cfa6b4d764bd207afff42df0b3f063fb70f17241ae5b67adb3d5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_optimize.return.dsk5": {"doc_hash": "5b9ac084e0fa0d33840a7a57b24dc18dfb0b23e3b287a7667cc02ff0bcd1c394"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_hold_keys_hold_keys.return.hold_keys": {"doc_hash": "cfa2971852f7b932684b2f00f811a16f1669e7812d136ade3aba1d4ebc5a0ab0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_slices_optimize_slices.return.dsk": {"doc_hash": "99df1a6d6242c0eb66dc536907331d396221dacb6cba11e7f27f4dea09c0d643"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_normalize_slice_check_for_nonfusible_fancy_indexing.for_f_n_in_zip_longest_f.if_type_f_is_not_list_an.raise_NotImplementedError": {"doc_hash": "6650f3f814bd3e5702b028566bc574b21e556ea1ed194fb9a301f60354582d00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice_fuse_slice._and_newaxes": {"doc_hash": "0ebe26b90504be091a55a5bc528455cbc55e8ce757f9071f8c602b309c33d4a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice.None_8_": {"doc_hash": "4a7c8739a0263cfa7cfb8168ce6d2f18dec7f00c28d10bbe1e7c2d96f42fc7b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_warnings_fractional_slice.if_all_ind_slice_None_.else_.return._getitem_rounded_index_": {"doc_hash": "775a70dc80eb546fb3235cfc9107074d5ddf7a0d7ebba8aa3b071d41d6741679"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_expand_key_expand_key.return.result": {"doc_hash": "ec0270b05d7844a1405cffb6f9c5223e775270b77039b57569589bf3369b99f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_internal_overlap_internal.return.Array_graph_name_chunks": {"doc_hash": "d0f223c9752b8252e54c8db0805c7394ef2a5bc7a13e9ac812c144648482cfaa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_trim_overlap_trim_internal.return.map_blocks_": {"doc_hash": "9f1b124d807b2692522eb26869384e43baba83f860057d8b31b3d9eef647fdd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py__trim__trim.return.x_ind_": {"doc_hash": "5f67b416d011267cebbcb439ccc1a48c7a125e452702dba107e6d9a6dfb643a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_periodic_periodic.return.concatenate_r_x_l_ax": {"doc_hash": "4c7894cdaf701b7de8f47f2ae92df4f43b1cdc274f9ba99b00d406ace22e35a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_reflect_reflect.return.concatenate_l_x_r_ax": {"doc_hash": "eb59e04f9e63091d05b162216497bcf91340ca59958fb8a8835b852f8391a1e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_nearest_nearest.return.concatenate_l_x_r_ax": {"doc_hash": "4c43ba64cf299316e3786d2414c9d092d03a55b3277fcd6abf5a3eae2f0fbef6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_constant__remove_overlap_boundaries.return.l_r": {"doc_hash": "10b22ae7ade514585d647a1250e70640de44cfdbe853fc95478fdb1579bf59f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_boundaries_boundaries.return.x": {"doc_hash": "db105f851669b27191eeee60cdd9529b4f10210454fca872ba08f53d33a4083b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_overlap._Share_boundaries_betwe": {"doc_hash": "c9482a647f40e38e776d0e8e021e4d20e98ff57ec62280986098d505ebc35f50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap.depth2_overlap.return.x4": {"doc_hash": "8d539541463b236e09b726d16a692bb8ba59dc6f476c56befe4b2a95cb1eb53f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_add_dummy_padding_add_dummy_padding.return.x": {"doc_hash": "33d37ccfb4f3ae9908ebe1df289d831d4990a7a0e0d3934282ddd626c6b472b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap_map_overlap._Map_a_function_over_bl": {"doc_hash": "bfb5dd93f030acbf61f3d794be577a06f018c77b0cd182818e2f540fb18b7691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap._Look_for_invocation_usi_map_overlap.if_trim_.else_.return.x": {"doc_hash": "c75836850799ac16e3615a3ae444fdaaf4ce0432016950609f02b8e76eb7a37c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_coerce_depth_": {"doc_hash": "7dac5aeb74762d1c0ef4483398f0c9f2ee9b901c39050de716b783572f7d9fa1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_from_collections_abc_impo__percentiles_from_tdigest.return.np_array_t_quantile_qs_": {"doc_hash": "d97e9fdc96295b10654e130069130849aef1e863143152526ed145298a061b4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile_percentile._Allow_using_t_digest_if": {"doc_hash": "7b9e563f833c6c247c663f3edf76a4935adc1b4980a822c51430a56612c26b64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile.if__percentile.return.Array_graph_name2_chunk": {"doc_hash": "0c033dd771a7cf551073bdaa4231585391b830d50d0098a8056333064a5e06c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles_merge_percentiles.combined_vals_counts.merge_sorted_map_zip_va": {"doc_hash": "6e71192a560a81e1f02f20261d6859506ff4a62a2959be2327e8d6f22bb342a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles.combined_vals_combined_c_": {"doc_hash": "cbd39f1b6aff28531000f54da10f9c1107e1a207a9ac5ae823aaed7e0ef8c9ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_numbers_doc_wraps.return._": {"doc_hash": "804fe1e96a8e86416e5a007a5217e5df06df5daafe1962f317012c2842e6d311"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState_RandomState.seed.self__numpy_state_seed_se": {"doc_hash": "6c5f47ad34c9555420bbeaf517cd5b5cd4f788391ac5398b1a681fd98297ce62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap_RandomState._wrap.vals._": {"doc_hash": "3c138485552c4a7efd65c350dc4f6f5866f2165bd6465f85b02639fc083efbe3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap.for_seed_size_slc_bloc_RandomState._wrap.return.Array_graph_name_chunks": {"doc_hash": "3704ffd9829084c267991501505b5b587c1daa5bcfece40551ca279d20fc4590"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.beta_RandomState.with_ignoring_AttributeEr.choice.return.Array_graph_name_chunks": {"doc_hash": "0eb3dfd443d4bf148466aba95ea6793d88b04fed3f35fa079a3ed6d303e54ea5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._derived_from_np_random_RandomState.multinomial.return.self__wrap_": {"doc_hash": "87b802fcd3b9e55eef1b0c76eb547d7e5910a306a85c0bb538986faa78bd7730"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.negative_binomial_RandomState.rayleigh.return.self__wrap_rayleigh_sc": {"doc_hash": "d85e7488b5d89f107127e109a404a4888d39fda2df0e4f7a12fb65e95d6f0117"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.standard_cauchy_RandomState.zipf.return.self__wrap_zipf_a_siz": {"doc_hash": "17d4546ee94d6315679079e4354e38dce5e66c8f1c0052ceea3c71c3d5ab85cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py__choice_": {"doc_hash": "d8f5ad828565596aec9b513ad94dc11c6af7f3b7d16761bb62ab484549c2d39a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py___config": {"doc_hash": "1375076d81890b33a7b952e1d7f8a893cadfb86994b8deb22b896e8c4bda0fe0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_cumdims_label_cumdims_label.return._": {"doc_hash": "f889d58b1de136d1a222328934d259b62cf622d9749c8e9b6d16c16b8996a2fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__breakpoints__breakpoints.return.tuple_sorted_cumold_cum": {"doc_hash": "e6a9503d31d480dd619c069b5e65ac502192d9a5e3069c04694d4eb285c65ab5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__intersect_1d__intersect_1d.return.ret": {"doc_hash": "d19d3df97617f6af3ad23af0a6909353a0c67c8ce670d3c76d023bdbe1aa2ed2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__old_to_new__old_to_new.return.old_to_new": {"doc_hash": "d3fecc82fdd13090a3c361c2963c83ab417810615f32a7b95471c7205980cf60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_intersect_chunks_intersect_chunks.return.cross": {"doc_hash": "825ef9e652323d0fe498d70de354808569953a9804f554dc69e7c17486aeadbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_rechunk_rechunk.return.x": {"doc_hash": "877e4f758e8d6066904a02c062da6f9122359f5835213fbaf903c69e4792ea83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__number_of_blocks_divide_to_width.return.tuple_chunks_": {"doc_hash": "178b18f76dfae2dbb770cf0ec23437484a3eb40f7611cbe909f20785d8561133"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_merge_to_number_merge_to_number.return.tuple_filter_None_chunks": {"doc_hash": "fc82712635db2a3998679336f7909c98e07ab00d6db39dcafe9bafd5432a8f76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_merge_rechunk_find_merge_rechunk.return.tuple_chunks_memory_lim": {"doc_hash": "d23e3e8950d874ac648b213214cbaf5c7334eb548351eb9a30f560c45a3258eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_split_rechunk_find_split_rechunk.return.tuple_chunks_": {"doc_hash": "eec737ad37d33000372fd1e9baa1a2b2b937ff8bbdfc4a607181f672cf6f1844"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_plan_rechunk_plan_rechunk.return.steps_new_chunks_": {"doc_hash": "7250fdc29fc483ff6988ab9cfb39731ee823b2e338442afec33fb0feb900f407"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__compute_rechunk__compute_rechunk.return.Array_graph_merge_name_": {"doc_hash": "a7703de2efd69af820afdd2d33f109a1cff3c1004bf383fd75d95494d104c1a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__PrettyBlocks__PrettyBlocks.__repr__.__str__": {"doc_hash": "2f95da48686b7a63ccfb36fcf3de3d8ff282f64585f652c4a18a9601323a4443"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_blocks_format_blocks.return._PrettyBlocks_blocks_": {"doc_hash": "619c36af4b482a1cb62a26975b01972d2ac401bcfe8c047f663251b30a90b966"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_chunks_": {"doc_hash": "d97e00ae95c54ee24535578831afc763213e278686ab3f834660c80ce93d2a50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_builtins_divide.return.f_a_b_dtype_dtype_": {"doc_hash": "7dc489b784029377b2ceeafcffe3ec4783ee865956b35f2676c5184b75190d6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction_reduction._General_version_of_red": {"doc_hash": "f8f69996dff788eb92f598eeec534823220980578f9e016c912d4b57baec598f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction.if_axis_is_None__reduction.return.handle_out_out_result_": {"doc_hash": "b3f9c01750a0057c3b9e917463633577cf23f1421f9a6ec1159aac1f2c391417"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__tree_reduce__tree_reduce.return.partial_reduce_": {"doc_hash": "eba553bd8594752ad5de4c1022b6b71710fc11e8d3857f2e911712d209557fe4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_partial_reduce_partial_reduce.if_np_isscalar_meta_.else_.return.Array_graph_name_out_ch": {"doc_hash": "fd807dc15f08a25c2410391dc16d440d1d1c43b37d43ba20ed0949c48438cd60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_sum_prod.return.reduction_": {"doc_hash": "c6b56ec8d61581dd41ac36f1b6c27092822114b0a009f3f49ed509f3e14950a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_min_all.return.reduction_": {"doc_hash": "b5568de5b8af54179040b7cf9ac24a5918976772eacb1edbd28488a5739d142d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nansum_nansum.return.reduction_": {"doc_hash": "3f10e7bfc5c67b589aa854f94da031c25a6db535b193123ec087610c5957cc4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_with_ignoring_AttributeEr_nanmax.return.reduction_": {"doc_hash": "ef7e4ab5980cb546d76a10a201daa6fb8fb48963dd8a3b5e545fe128c4a04bf2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_numel_numel.return.full_like_safe_x_prod_s": {"doc_hash": "ff2e93e85b172cc9fac2f48b48f6341cadec69bbe151237a57983760272dd6fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nannumel_mean_chunk.return._n_n_total_total_": {"doc_hash": "42838f7198467df332e2756df44282e7c4489da978a80b40d02c707c69693230"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_combine_mean_combine.return._n_n_total_total_": {"doc_hash": "cd29ed394c60445fe8b3b000d6e38adeea395c1bad0a7a93e9293f8a7df2b949"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_agg_mean_agg.return.divide_total_n_dtype_dt": {"doc_hash": "2af5edf4ed30411482749a64a2c711fc07bbffca2bf52ad710b5ef660de99350"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_mean.return.reduction_": {"doc_hash": "a8ed714ea0a5c2683cf97564803701157742f80c36e23f6ea61e540c3ad9d553"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmean_None_1.nanmean.derived_from_np_nanmean_": {"doc_hash": "9812886f61993083fb9351d9c66cece8bc59e30bbc502259655796b364db1663"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_chunk_moment_chunk.return._total_total_n_n_": {"doc_hash": "841eae85021dafca7f4b1306c9063b5fa7f806367a2cb145b94298f4d26d84b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__moment_helper__moment_helper.return.M": {"doc_hash": "e73a5d375cc60c93c9d7332d45ae1d16bc482dca3a06749f7d6b08788a656b92"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_combine_moment_combine.return._total_total_n_n_": {"doc_hash": "701a01fecd0ad05f45445ec75ec49b4302373f4a810d36b79a404b059178afd7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_agg_moment_agg.return.divide_M_denominator_dt": {"doc_hash": "358cc89b0efbb35f9427cc49f3926e0fd39c4a4ff8ca7fcc4d9d0b8b21e702fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_moment.return.reduction_": {"doc_hash": "e6d015506c1d2d6a81dac54b404235a01407c19b5a1c80f9f02c78db539687cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_var_var.return.reduction_": {"doc_hash": "e6b7ae8504bdf9031679f1217eee9401ef4ec0ca4c66d42cbaa11c3cc9ed5948"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanvar_nanvar.return.reduction_": {"doc_hash": "10c6122aab6f7378b30bdd0ed38717044d1d35eb972f29b14704c84bca6673e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_2_safe_sqrt.return._sqrt_a_": {"doc_hash": "f969a24c9fa23a3864eaf87f20f30e2460e225a463d116ccf2a49fc9ebdf9ecf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_std_nanstd.return.result": {"doc_hash": "f55d80afe28b3ce506374139e97f9e318673914d9f1d89b60768278b767ed926"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_3__arg_combine.return.arg_vals": {"doc_hash": "534b12874344838451199c9ad043d3e92028a09b996f132f6f012ae4046139aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_chunk_arg_chunk.return.result": {"doc_hash": "bf55ab36a35cf6c4749375448a689d103bd1e6718e52840debf629429ecd8370"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_combine_nanarg_agg.return.arg": {"doc_hash": "95f16941f7100178581b9dea78ff8cea70a165c657523dba9a2cf3d3b6b3083a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_reduction_arg_reduction.return.handle_out_out_result_": {"doc_hash": "b747ebf91497607ba1acb4d4e714bf271c67cb88e5c637c818625dfa452a206c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_make_arg_reduction_make_arg_reduction.return.derived_from_np_wrapped_": {"doc_hash": "4921f7d9a8692d08e9700e22b013b7d026762f666a1370efc832a48fda45b0af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__nanargmin_nanargmax.make_arg_reduction_chunk_": {"doc_hash": "3bef79fda0b9b8f0d69357946570a64ed6915b5095f0f385ce6642aea980c226"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_cumreduction_cumreduction.return.handle_out_out_result_": {"doc_hash": "5f4c83d176b473631f4a2968e3d82e3184023e729c1ab242d295fdcfbe43668d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__cumsum_merge_cumprod.return.cumreduction_np_cumprod_": {"doc_hash": "9711eaecebedfda34bf943ffd53c6a6c9dd8fd99e02b50c996d2026c3dee46d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_topk_topk.return.reduction_": {"doc_hash": "90e6028e4cc6d9c0385734376315ef7036b534be48fce086cc6415938200948e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_argtopk_argtopk.return.reduction_": {"doc_hash": "ede2858ef5a6ee92afe3a322a78956eb01697d4431367535d4c985a144740b20"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_trace_median.return.result": {"doc_hash": "e6c857e4fe88c5cebceb0f3880134cd75a55d0ac76abde87484c4880ddd48740"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmedian_": {"doc_hash": "79d70f70d9b7f9edb3e1b5c99b2319d11d856235342e381f79255f58846fc5b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_from_functools_import_red_reshape_rechunk.return.tuple_result_inchunks_t": {"doc_hash": "e0b1f80f7aa85fd5b4e9e7b5d598a85fcb24e167922989a5bcc57e797c0c8e58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_expand_tuple_expand_tuple.return.tuple_out_": {"doc_hash": "0db96f19e443afe6d780724bac7043c6277d872226defe9ea4a5666823c66500"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_contract_tuple_contract_tuple.return.tuple_out_": {"doc_hash": "9f62f7737f5638b153f7c64ba7c902043e105bd688ea0612423ea6c07b946129"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_reshape_": {"doc_hash": "32d07db40f28edbc67d9955b4fcd5e6adf6b78942266ddb6ae17cae606fdd1f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_inspect_result_type.return.np_result_type_args_": {"doc_hash": "c57591f647ef6fe34b5b2ab178a817f536d8392ed2ebf56c32252b7eb4b1c404"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_3d_atleast_3d.if_len_new_arys_1_.else_.return.new_arys": {"doc_hash": "d8bfaa731ee75d83a55148d8427a4064a462b70c6e69152a97389939b4a9a9eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_2d_dstack.return.concatenate_tup_axis_2_": {"doc_hash": "c462237612ceefa706dde456fe5b99670a1f436186ec965650345c3825a882cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_swapaxes_transpose.return.blockwise_": {"doc_hash": "cc0a51b5c620219f3e136e4638683e1a6f9775eca26b6dbe88c0507b97ee68ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_flip_ALPHABET.alphabet_upper_": {"doc_hash": "8e247c2d2bee67bca12bc194c55a30e40f76e4e216e04e8ab7a22938a1578935"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__tensordot__tensordot.return.x": {"doc_hash": "3c6c616004fc4581db6dbccd2127dc8ee519b6b10805e3ec725465f833a1234a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_tensordot_vdot.return.dot_a_conj_ravel_b_r": {"doc_hash": "400b9ba89f0fcd3c6e38c716ee8cfb68b9cd41eb3ba0defd70d9e74d559da445"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_matmul_matmul.return.out": {"doc_hash": "371f35ee562b44642f9a033003d20c7cd19aff4c7933076a3b35c8a83aed1110"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_outer__inner_apply_along_axis.return.np_apply_along_axis_func1": {"doc_hash": "7e68f7251d68f46521d16cccc2eb152a0e532ea11df6aff0fc0ee765a1af101d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_along_axis_apply_along_axis.return.result": {"doc_hash": "f513296935e16e80a6bfdb56665fb7d0d4b7ffc4ea020aedfe65014bed31422a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_over_axes_apply_over_axes.return.result": {"doc_hash": "aea405db3085e5797b29014d473eb7afb50ea810a45e798f9e40a75b52f7047c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ptp_diff.return.r": {"doc_hash": "e8e01fdce31c51e182780484cddb411ea24a4ed1aff3ab5115066cb0a79510e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ediff1d__gradient_kernel.return.grad": {"doc_hash": "0d83f395b02b2b7dc28bbb7a3dbff0491b38c1e4a32d16a8ef847b7614394747"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_gradient_gradient.return.results": {"doc_hash": "ec73cd11c8e937d95d74d4c4cd4357dcd2cc4bee2853076c7a953bc671f0bef5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__bincount_sum_bincount.return.Array_graph_final_name_": {"doc_hash": "6fdd527ef6ec34ed6c0e73acae13ce59729b6de32a57bd81d447a718166c919b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_digitize__block_hist.return.np_histogram_x_bins_ran": {"doc_hash": "619325924270c823fe3cf27b7593612b909a4591862d69c343d792341585fbc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram_histogram._": {"doc_hash": "08af9c05ed9ec33011cf691d8744f16a1329f593ca9313da77bf014f1fdb601c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_isinstance_bins_Array_histogram._Map_the_histogram_to_al": {"doc_hash": "893f1a4d74f798c0800c8a297f2520e69a3aa40d114eb07badcaa1a7aecfeb9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_weights_is_None__histogram.if_density_is_not_None_.else_.return.n_bins": {"doc_hash": "1d4742fe9740f6d42a610e5b742264bd787e4d0781e669cc984d0b00c7109fed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_cov_cov.if_not_rowvar_.else_.return._dot_X_X_T_conj_fac": {"doc_hash": "de33c4713834c38f05bfb93b902f89c623d2f254a55ac43893fbaf8449cc3f5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_corrcoef_iscomplexobj.return.issubclass_x_dtype_type_": {"doc_hash": "b583748ef2c83e3424ba5945c7455e8c25c71f166fc96e72348ddb4ca89074db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__unique_internal__unique_internal.return.r": {"doc_hash": "9d756ba60b55fb34b209b86ec2bf510ffb69bb9c7a197fc521968064d9485da1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unique_unique.return.result": {"doc_hash": "ad5259f6b22bfcd47e993a3eea5f76e6f9decae7974a5884c339fdc8875ac24b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__isin_kernel_isin.return.result": {"doc_hash": "568f31af0e36d5794686aceb9e8d65b266ba34154cc12bb4cd885dafd371fa53"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_roll_roll.return.result": {"doc_hash": "dfe19ad18fc6a8297e1370adfe575ff7887926e8db4b119f5ba1e5dbac407a32"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_shape_squeeze.return.a": {"doc_hash": "d35077b65e0a4b2f22f34f70c02ae9a2cf04a06dcc19efea54fa55c215fcf21e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_compress_compress.return.a": {"doc_hash": "567cd16e028859ee602099e7698ad0b5d98c32106caefcede9d6c3d66d5471d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_extract__isnonzero_vec.np_vectorize__isnonzero_v": {"doc_hash": "bcec4cda5523975b5fc718513d8084415752653de9ff2c613e91e0999083bf5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_isnonzero_isnonzero.try_.else_.return.a_astype_bool_": {"doc_hash": "4809b5b5cb7fcd7fa8cb7374f749f9841d5fe340eaa97b48404d0d8a4767e972"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_argwhere_where.if_np_isscalar_condition_.else_.return.elemwise_np_where_condit": {"doc_hash": "dc60cae82fa51b236505781333d6c8a1aebb18702cbe71abeca9b29ef2400570"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_count_nonzero__unravel_index_kernel.return.np_stack_np_unravel_index": {"doc_hash": "ab5a3dd7b6d79fcd5c4a991e04199f6eb978a390b71bba3f39654893b2235e71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unravel_index_piecewise.return.map_blocks_": {"doc_hash": "3879491e48294ad5665701762b8712ff2888b0dba8a196b95835cc57861bae05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_aligned_coarsen_chunks_aligned_coarsen_chunks.return.tuple_newchunks_": {"doc_hash": "920d81e3c18f19c9a880e30013a7c634b1454069879b8eb24245e351ab8b9784"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_coarsen_coarsen.return.Array_graph_name_chunks": {"doc_hash": "de5035a2e3952dcfd272c054cc076bbb38968aad6deb7171b3815ea38ae17ca2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_split_at_breaks_split_at_breaks.return.split_array": {"doc_hash": "16fe33a7012f00edd2e100ec776d30c241923783bceb41c7c82c482f9f34a1e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_insert_insert.return.concatenate_interleaved_": {"doc_hash": "3d331e06bec048400b6af505af4a05e743bbd3cd42408d3b8e8f9c935376d217"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__average_": {"doc_hash": "4fb732f241720fb650a5b208494c5d440873d18c767d4d8b3816c50b6c82ebf7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_from_itertools_import_pro__sanitize_index_element.if_isinstance_ind_Number.else_.raise_TypeError_Invalid_": {"doc_hash": "e29f62c3cb9d9d108fe90ae51e603b1083807ebe6bb2b98441907a028c3c2d5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_sanitize_index_sanitize_index.if_index_array_dtype_b.else_.raise_TypeError_Invalid_": {"doc_hash": "ad104f8338fe7b686dc6f57f12ce31ee3c4ee0a05f121ffddf6b26b2d34bd028"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_array_slice_array.return.dsk_out_bd_out": {"doc_hash": "a3233b9f43970793586c80a2d46020be933dba7d17525093f74e5738c1306187"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_newaxes_slice_with_newaxes.if_where_none_.else_.return.dsk_blockdims2": {"doc_hash": "ec8c6db1facb05e1639677aeeab883d186d4fad5cff95fcd7f49dbe9059d2ef0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_wrap_lists_slice_wrap_lists.return.dsk3_blockdims2": {"doc_hash": "0895dd09e776595b18867d03b1391d99818c50790a2a5c3423451033d736ebf2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_slices_and_integers_slice_slices_and_integers.return.dsk_out_new_blockdims": {"doc_hash": "7999bbf9b7dd730d2ca199eb84730b8fe772aef2440fdac3630cb3089c61f020"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d__slice_1d._Returns_a_dict_of_blo": {"doc_hash": "7bbcd0fdb34830ae0d3c936259ca585c4a3c39953dbf00eb68dccf4e5bea31e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d.chunk_boundaries__slice_1d.return.d": {"doc_hash": "95a181199ed9a7d2e06919b03f3979ec02f1176d0257c896caf9e75cfed42a92"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_partition_by_size_issorted.return.np_all_seq_1_seq_1_": {"doc_hash": "28e7ab4b793a44804a370057772226dcb85da72122695bf15b234ebab44115bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slicing_plan_slicing_plan.return.out": {"doc_hash": "140f5fe6ab72b1eb790e1fe93bda10ea5bb9385b2b660eac9e2ef861e5de830c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take_take.outdims.list_dims_": {"doc_hash": "e72ad26774ccfa1a41e8232bb3abda7aaeaa182b5443876390569d99f8fb45b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take.outdims_axis_where_ind_take.return.tuple_chunks2_dsk": {"doc_hash": "19687e1a9b8b5a0a28aa2e9964a1da4922281f120095b93e45f4bfaf7d1a9a36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_posify_index_posify_index.return.ind": {"doc_hash": "1a8ecc737310020569a457adbf089696953ec3167b5f2cd22391df10d0c44f2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__expander_expander.return._expander_tuple_where_": {"doc_hash": "0e79f9db3ef819894b1d515f616d822bbbdab4fa80ca7cdd09b697d208eb2035"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_new_blockdim_new_blockdim.return._int_math_ceil_1_0_slc": {"doc_hash": "23d9adaf194856e87bd2a16d30631747032092542ed63076a1a12b92dfe703c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_replace_ellipsis_replace_ellipsis.return._": {"doc_hash": "a7d917d689d0d98174eb823505c95bd929104c34a6e20b7369d9bb3a6a80c01d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_slice_normalize_slice.return.idx": {"doc_hash": "9a0678db8b41bc54c0950da775ac4b69a28cc4f4d5111782b0ae35a43d41938f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_index_normalize_index.return.idx": {"doc_hash": "e2e189633f7c3015b5d59049e9ff7a7c78464a3121d9c237f5fccfe2bce3d782"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_check_index_check_index.if_np_isnan_dimension_.None_5.raise_IndexError_msg_i": {"doc_hash": "8e21cfa2cfe6bce776ffde020abb3dfa6830e77e2304a0294753b647d864d92e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_out_index_": {"doc_hash": "6b59ac04ce82c08eadce8d5e63b9bdc0e58fdd519fd5ee07c408033fb62464b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_on_axis_slice_with_int_dask_array_on_axis.return.y": {"doc_hash": "62e1facab8cbe789d0a451d3a72e21139ddd6a2d6c252db2581ee27fbcd3b068"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_bool_dask_array_slice_with_bool_dask_array.return.out_tuple_out_index_": {"doc_hash": "d1d7db64c8cfd30be9b5f3618395a487308152229d853e6bcb9a2e87eb6a45ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_getitem_variadic_make_block_sorted_slices.return.index2_index3": {"doc_hash": "70591c77dc36e8c49cb829c55d917babf58765ef4c226c0d0583734e87204cf2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_shuffle_slice_shuffle_slice.with_warnings_catch_warni.return.x_index2_rechunk_chunks2": {"doc_hash": "929db5cfd80ddb6aa6a9b38c45d060851fc85a88ed4a11fd6285daf297fcd539"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__HashIdWrapper__cumsum.if_initial_zero_.else_.return.tuple_accumulate_add_seq": {"doc_hash": "273260da3228d358d0277fa6e8df99c626f2790bd8e066fadfb534d6a736fb4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_cached_cumsum_": {"doc_hash": "77ee85e6c4584fb7dbcde70ff7f743fb4e203110c9552e8b521163c7d9f328e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_____all__._": {"doc_hash": "1367473a88fcde18fcff133f6d0c96cbc85440e7ffb709475d224126ce3f7244"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_None_21_ttest_ind.return.delayed_Ttest_indResult_": {"doc_hash": "51e1a377d6b905215ad8ab5d13aac975ac71a843235dc5081ceced3408d76da3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_1samp_ttest_1samp.return.delayed_Ttest_1sampResult": {"doc_hash": "d4e8361beef68569557b3aa1be59f80a9de9e4bcc0e122d51aa1a62de9d1c18e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_rel_chisquare.return.power_divergence_f_obs_f": {"doc_hash": "b77d275fa500050aa6cdb6684f323bffff180758cfc94caa0ba65cf2523ae195"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_power_divergence_power_divergence.return.delayed_Power_divergenceR": {"doc_hash": "3928d73e9b6377412e93a23d33ac71b303c5dc06b23685b18b604835d267a9c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skew_skew.return.vals": {"doc_hash": "8eb0859f8238b0fcbbe123384a0e2b45e7226d23dcbaa093018b77653927b0f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skewtest_skewtest.return.delayed_SkewtestResult_n": {"doc_hash": "9c8f4a69c3562f111ae5280d0ed64830204e9f589cc8fb03797bdba90047a021"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosis_kurtosis.if_fisher_.else_._TODO_scalar_vals_va": {"doc_hash": "2689e80894c8805bffcf7b8b65ac15070be411c422c80e406781a4d2bf802e2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosistest_kurtosistest.return.delayed_KurtosistestResul": {"doc_hash": "0b59eca99b261f2a6dc4ec2c68c1384ef33319a43b3489b3eeae835ae033ca91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_normaltest_normaltest.return.delayed_NormaltestResult_": {"doc_hash": "af267ce6482e3919de99b4314f86e6202e0db8ec4f292cdcbf67c81df19d2d80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_f_oneway_f_oneway.return.delayed_F_onewayResult_n": {"doc_hash": "df625c0515093a0476e747d82a1b7e0d9798d3a66b392bfe66c8b7fdf4607dfe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_moment__equal_var_ttest_denom.return.df_denom": {"doc_hash": "f6f0bdbb127c6fe177801091b6efc823a3dc679e0de9c42586a4771c79013fd6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__unequal_var_ttest_denom__unequal_var_ttest_denom.return.df_denom": {"doc_hash": "96ac0555c2944ec8a4184c5b437190ad34cee52c2bd8165af1d472b014df0c60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__ttest_ind_from_stats__count.if_axis_is_None_.else_.return.x_shape_axis_": {"doc_hash": "fbcffe68fad2e72f090cdbf505c3a2109180958dea1eb3555a70628fad3344f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__sum_of_squares__sum_of_squares.return.da_sum_a_a_axis_": {"doc_hash": "c3897ac60c2619436f60a2545427f0c0c01b2a4b361d49c017290775fa390d6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__square_of_sums_": {"doc_hash": "969dd22840e2a94c8e305de702549d69687e669af6a110b8cab9623be9ded6e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_math_text_style._font_size_1_0rem_font_": {"doc_hash": "568abfa65255b948ff400d51c1d3d08533b5ecd27d938e74a490df4a7a0ac453"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_2d_svg_2d.return.header_n_join_lines_": {"doc_hash": "f0b0cb58ec2d90d4246252647399023273f83e79311c90883a17b7813ce70bfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_3d_svg_3d.return.header_n_join_xy_z": {"doc_hash": "eaa8141c05d8521df50f0fc53e35a187068e4e356c93ed511c341d8aa5d4dea1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_nd_svg_nd.return.header_n_n_join_out_": {"doc_hash": "dd5a4d00c7b6c834f800d2956bcd7e968f08cfa0f52a4322e4060b6a3f648c59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_lines_svg_lines.return.lines": {"doc_hash": "de369a2960228bd3b5c35814ed27c6e57b4a90dca2b1a28fc624e880127cfd50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_grid_svg_grid.return.h_lines_v_lines_rect_": {"doc_hash": "b42e6975e3b0aa5ef2560a3751c8c2d053f8536b7c3913b1b8b8582b70e1f969"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_1d_draw_sizes.return.tuple_size_r_for_r_in_r": {"doc_hash": "797dbc8db169120c11c2a992ba7ac8471b481076c9b7a15e98bfb3b8dc361eb9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_ratio_response_": {"doc_hash": "42310fc68f08be8b95e3387bc67318d65b1f80a4c22e9d06ebe93be6af59f566"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_copy_from_numpy_import_nancums": {"doc_hash": "9bb06d974370ae24bb3e9eff647ca0914b69eab8f24951bd2b7e21cea8d3b1ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getem_test_getem.assert_getem_X_2_3_": {"doc_hash": "4eb8ee6bcc2493bdf5d71385d3d5493459fc2f40b061502b2e4e37c11416cf80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_test_top.assert_top_identity_z_": {"doc_hash": "6c27fa0bc4fbb025ba9120e123615658d9fda81c799cc953c4f971b70f2e9723"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_with_kwargs_test_top_supports_broadcasting_rules.assert_top_": {"doc_hash": "25c7e5fd86dde49a643ee0cc9ea5570dffeb906ca4793ec1eeaf445d4277a710"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_literals_test_top_literals.assert_top_add_z_ij_": {"doc_hash": "4c49fae161451ffe90f0fbcbb5137f8968807e21c2d2c0c9f1c84fcbd6280074"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_literals_test_blockwise_literals.assert_eq_z_x_": {"doc_hash": "68b24f134c9cb0924c05564412c1746c80cc048f53b6cc85b000fe6abb0e28e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_I_test_blockwise_1_in_shape_I.da_blockwise_": {"doc_hash": "5535934c291d75dc1fd53e6e30983f6be81508a331ca7b7a7fb62505a6d4328e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_II_test_blockwise_1_in_shape_II.da_blockwise_": {"doc_hash": "ac30dbf12443d06d2ce6d2c00b908444511130cf2c39d67fe411cc3d1c8c0389"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_III_test_concatenate3_on_scalars.assert_eq_concatenate3_1": {"doc_hash": "e5d9c3594a253766930ccbcebf1362b2fd7db74abc315192c5c0fd6f7601cca0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_dot_product_test_chunked_dot_product.assert_eq_np_dot_x_o_c": {"doc_hash": "3bd4bea172bc822772e6bec7f77346b6364e719ee4c38e5b27ad19f4aec95583"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_transpose_plus_one_test_chunked_transpose_plus_one.assert_eq_concatenate3_ou": {"doc_hash": "7e116225ac26168be0f64841f2b4eb4a73797bae33a3abc64acd2b4f78b47a05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_dimensions_works_with_singleton_dimensions_test_broadcast_dimensions.assert_broadcast_dimensio": {"doc_hash": "33cc48d6c640a191c9b0e167587bcf0e733bbf4eef38bb61c9c634895e37f4bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_test_Array.with_pytest_raises_TypeEr.Array_dsk_name_chunks_": {"doc_hash": "a81544596fa96ae9d6914f7ca857b0cb9c1a7d0371ff4cda4fcd1093a0835806"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_test_numblocks_suppoorts_singleton_block_dims.assert_set_concat_a___das": {"doc_hash": "fc07a47cf6c8b8cc9f748a3ae29f04a04cf6eb254e0607e1acee37596a6ea621"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_keys_test_keys.assert_d___dask_keys___": {"doc_hash": "34cad0e9564d4e0e39cfb09961fc070db729ff2c1071841de445a645d8edcd5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_computation_test_Array_numpy_gufunc_call__array_ufunc__01.assert_eq_ny_vy_": {"doc_hash": "3a0b038343c42d2fccec46893eb826b7e839944993c164da2ef649ecff89031a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_numpy_gufunc_call__array_ufunc__02_test_Array_numpy_gufunc_call__array_ufunc__02.assert_eq_nv_vv_": {"doc_hash": "867b11eb2d83c0993a7419396a7859159cd42ffb38e4f6e070de7ffe47f272fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_test_stack.assert_stack_a_b_c_a": {"doc_hash": "d688eb649cd27cf5b605e902451bf1cd22896db635bdec58cab14b4bc3c29ac3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_zero_size_test_stack_rechunk.assert_eq_z_np_stack_x_": {"doc_hash": "e6d227571f136cecf1a6f8252ccd546cc1d78526d5fb091c0536b570bcb43ab9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_unknown_chunksizes_test_stack_unknown_chunksizes.None_1": {"doc_hash": "7cafdeb38f022d3af361221c8544c8a0f9806901e2f1c73a107b81d4f93112d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_test_concatenate.None_1": {"doc_hash": "1898ae135ae2ea103ee7bb216ff922ccb2181ef2602643cd232e24680ea3f561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_types_test_concatenate_types.assert_x_dtype_dt_out": {"doc_hash": "fdfdae7ac8f135b4992fd9ef479ab2de5269569cd39a6aa326bac70e10b80a34"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_unknown_axes_test_concatenate_unknown_axes.assert_eq_c_x_np_concate": {"doc_hash": "a9f8d430777ccfa04ebb6f8f1a1ac6a1a32d15ce2844c9b37a5f27c3fc9abf1e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_rechunk_test_concatenate_rechunk.None_1": {"doc_hash": "a93175738a89d11a26e2b2c321c8e8429ccdfdeeab404ee78319485dbf12dab1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_fixlen_strings_test_concatenate_zero_size.None_2": {"doc_hash": "b262f7d17f3ebd44bf07f579ae7dc15f1540b09771e61a4ffe19c0fa41b2f7f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_simple_row_wise_test_block_simple_column_wise.assert_eq_expected_resul": {"doc_hash": "ce84eec631d8d5f37fb80e4106896de15d3f718c9ee4085bc0a463282d3927dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_with_1d_arrays_row_wise_test_block_with_1d_arrays_row_wise.None_1": {"doc_hash": "9aa3ace6f643f5e0d8362989ca882b35cfcf3feb8f9d221eb2243a321a455e43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_with_1d_arrays_multiple_rows_test_block_mixed_1d_and_2d.assert_eq_expected_resul": {"doc_hash": "b44b02f206390a00895de5058a7a7b95fda3094394e5a750c69c9c0547a51235"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_complicated_test_block_complicated.assert_eq_expected_resul": {"doc_hash": "72fc40fab684c3183ebe0e30ab311290d5e8a7a917e4ee39c22ace19cf5c06cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_nested_test_block_nested.assert_eq_expected_resul": {"doc_hash": "425b273eb40b8bdbb089d3e762bbd0185fad80dc923e81141f749e6b6e7f57a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_3d_test_block_3d.None_1": {"doc_hash": "ed198690448c60913024f931f92059d1836b625acdfab22acd18eed4af1916de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_block_with_mismatched_shape_test_block_tuple.for_arrays_in_1_2_.e_match_r_tuple_": {"doc_hash": "79d42c66e8139a5fb9917f568656bb42b9a6645c1b276858ba8fcce61457097e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_shapes_test_broadcast_shapes.None_2": {"doc_hash": "a28ca2388afaae56ce8f3fd56a65fb210c29e139b1cdb9e754030b5942f519a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_on_scalars_test_elemwise_on_scalars.assert_eq_x_sum_y_a": {"doc_hash": "adfdfa8ae3f5849db20e47f6c33644f9301eb7ea578908e9125a8243d6be2553"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_with_ndarrays_test_elemwise_differently_chunked.assert_eq_b_a_x_y_": {"doc_hash": "ff1f8de07278b0451ff52188cd6b0ee7004e9dcc3e97881768fbd3ecbc81de49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_dtype_test_elemwise_dtype.for_x_in_values_.for_y_in_values_.assert_da_maximum_x_y_d": {"doc_hash": "68bbf335477098eb76b9d06670d2eeb43a062b7ff6845650879fb583393e491d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_operators_test_operators.assert_eq_a_x_": {"doc_hash": "f06389631295f0fe1a9c6a7ce17d2efba664ecd21d6c8073edafc11b60356519"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_operator_dtype_promotion_test_field_access.assert_same_keys_y_b_": {"doc_hash": "1ceb51eb8f145c63105654430c14cf3c846203cd6fe4c61427fb2703759c389f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_field_access_with_shape_test_field_access_with_shape.assert_eq_x_col1_col": {"doc_hash": "5fa8b9c63c7ade586cdc38ae684f05a2269b82dcf53ac5e7a17fc80640f953fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_test_matmul.None_6": {"doc_hash": "79fcf8ec979ab71cec61dcfe68e10ba721ce246e1e0883dd711251a8a3cfdaf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_array_ufunc_test_T.assert_eq_x_T_a_T_": {"doc_hash": "0a10e8e45b3512ecc797604e1c3c2bb622be47acd42c6aee7aa7cc8200c0e966"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_test_broadcast_to.None_1": {"doc_hash": "59376d8a183574c490afd4a3a81e044b2534baced3666bf92600644fc323583d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_array_test_broadcast_to_scalar.for_shape_in_tuple_0.assert_eq_a_d_": {"doc_hash": "72312879edf10eef373a4449e50d74e4d6bc9bef2f23baabb2ed6ad5bb904458"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_chunks_test_broadcast_to_chunks.None_3.broadcast_to_a_5_2_6_": {"doc_hash": "cc6c6a0afd4a02806ff427becc781158592182886f264d27a313607b6a3b8a10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_arrays_test_broadcast_arrays_uneven_chunks.None_1": {"doc_hash": "9550c24b47a8c3d8aa8287b65191cc61cbf64ec17fbb67c48b3f2324f0c4dcd2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_operator_test_broadcast_operator.assert_eq_w_d_w_": {"doc_hash": "366932026ef56ec1024074d438d5618d48de6a3fbdec92e3f46484906ea20e46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_test_reshape.assert_eq_xr_ar_": {"doc_hash": "5e30910485ac725c126986327e6ead62e44c3ac3b2136e3eeabcd80d2a89c09d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_exceptions_test_reshape_fails_for_dask_only.for_original_shape_new_s.with_pytest_raises_ValueE.da_reshape_a_new_shape_": {"doc_hash": "e791e623064bfa497fb9bc1f866181ce664dd1078b61832c5de19ba1c3700202"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_unknown_dimensions_test_full.assert_eq_d_np_full_3_": {"doc_hash": "bc15a9a084b48cd0b9a148001cce37e3a121d77c3170474299eccc65339c0537"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_test_map_blocks.None_2": {"doc_hash": "f8b90a7959e1a4616fec0b3f2d1723cba4493e11fa769ad908db65ff1dcc78f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks2_test_map_blocks2.None_1": {"doc_hash": "31df0d34ae2a2be09cec913b0cefd15acc3e06df9dc0ff58cdb859258d4fafe0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_test_map_blocks_block_info.assert_eq_z_x_x_1_": {"doc_hash": "daf70acdc58cef9e7a033a4a81afc149fc822582a32bf0861f5fb57f276e5468"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_new_axis_test_map_blocks_block_info_with_new_axis.assert_eq_z_np_ones_4_": {"doc_hash": "ce6e9a9934f3f4cb81d85d3c8b2732767f8601ea1c37787d671d1019f3771e88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_drop_axis_test_map_blocks_block_info_with_drop_axis.assert_eq_z_np_array_7_": {"doc_hash": "ce07a1379426de86df890bb0f2ae33b3329314f3ec836b24fe7c7b1b004e825f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast_test_map_blocks_block_info_with_broadcast.expected2._": {"doc_hash": "ae0f0679f207b9b7a882e5b12ba290f2c3b84b07f2e5d3896c89852c3c460200"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast.expected_test_map_blocks_block_info_with_broadcast.assert_eq_d_3_np_ones_": {"doc_hash": "3783c146147b1aac1bc671c7f20de3057f94afb0fa64808d163d64f036db4d4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_constants_test_map_blocks_with_kwargs.assert_eq_result_np_arra": {"doc_hash": "4ee4835d0efbc9c13a921b700911b485aee40e623d93fafcf3ce65cf185fcb88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_chunks_broadcast_test_map_blocks_with_chunks.assert_eq_dz_np_ones_5_": {"doc_hash": "2add0acd83a37b348fec6044cc6225ab6a1e6e1e3152b35a4ab1d5001479e470"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_dtype_inference_test_map_blocks_dtype_inference.assert_RuntimeError_in_": {"doc_hash": "2ba02171ec1695129689531625560a5c24daf38ba61b90c3e57173a63484b7c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_newaxis_test_map_blocks_no_array_args.assert_eq_x_np_arange_8_": {"doc_hash": "79b1e4c9cc00ea162b8502aa7c78e5b4c32e0a0ef2b10be484b65c89c3f81691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_optimize_blockwise_test_map_blocks_optimize_blockwise.assert_len_optimized_laye": {"doc_hash": "12b17d7041be74897cd9280d72076c444318ee7383092a374a5a335161f00a7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_repr_test_dtype._no_shape": {"doc_hash": "fbe037a3c3860b57e464c66ac8e61ecb460df6d9836ca09d639c64b95183b10d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockdims_from_blockshape_test_blockdims_from_blockshape.None_2": {"doc_hash": "90d6fac0bcb12dc8a42d0e7d0fce3a3f47021487919239707d19c6ebc214b1c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_coerce_test_bool.with_pytest_raises_ValueE.bool_darr_darr_": {"doc_hash": "451c19cb249849a1c72309879fa238440d0c081191c3393b400a4354e00ea195"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_kwargs_test_store_kwargs.None_5": {"doc_hash": "6d84d627b88d292ae98e508b5e1088c33fb8783e07cb028a581d7dda8eddcffd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_delayed_target_test_store_delayed_target.for_st_compute_in_False_.None_7": {"doc_hash": "af1f2222523acb7dcf4c09994c77891b93fc1afd08a0a214e828e51ad4372db4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_test_store.None_2": {"doc_hash": "8b58d8625006f2f0aed72fc576517511a0dc708c29dfefd7cd28c55acc62e937"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions_test_store_regions._Multiple_regions_keep_": {"doc_hash": "f09870380f5cf717c9b8285d20912b17f74e0726ecd4a1805869426c1971291f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions.None_1_test_store_regions.None_1.assert_ar_2_all_": {"doc_hash": "749f9fc8d9f5593bb97db240bead472c873decbad139c4d237f592ca7426fba2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_compute_false_test_store_compute_false.None_9": {"doc_hash": "b7777e93deb1f5cc10e7eec3d285f144f0c9ba08c3bdfd1eedbcfd962bb95ba0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_nocompute_regions_CounterLock.release.return.self_lock_release_args_": {"doc_hash": "1b293e9a2a900c8dfae0abe515dadab445dc31be93c8c2430632c97b99d9ff8f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_locks_test_store_locks.for_c_in_False_True_.if_c_.else_.assert_lock_acquire_count": {"doc_hash": "673c2687ac643e78a274b0cbfcb56aeac07a578a93ef311829544e619f5fe3f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_method_return_test_store_multiprocessing_lock.assert_st_is_None": {"doc_hash": "5cd87234b9f4668c0aec91cf2559cd3c7660a2d70e35a3fb99eb4f7c2e945e94"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_hdf5_test_to_hdf5.None_3.with_h5py_File_fn_mode_.assert_f_y_chunks_": {"doc_hash": "4919bb9844d8add0ed895468cca2e95a1045987ae04d854650acda46938e6b3b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_dask_dataframe_test_np_array_with_zero_dimensions.assert_eq_np_array_d_sum_": {"doc_hash": "1553d36ee72ffe89f4962ff1bf50dc09eceb589c8d70e41ec1d3f68b47657946"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dtype_complex_test_dtype_complex.assert_eq_d_numbers_": {"doc_hash": "a50183a03392c1c53bb76397068d9ba508051bac4bcdbaec2c0543457af97ef8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_astype_test_astype.assert_d_astype_f8_is_": {"doc_hash": "143aa74287191a55db29fcd540956f724c8427cfda638e25b7c6f1bf9f06bdcf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic_test_arithmetic.assert_eq_da_log10_a_np": {"doc_hash": "592a6fd470e44c29d3790c8c89ced914c1ea3c5a95fb2f3b9420281099410bb3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_log1p_a_np_test_arithmetic.assert_eq_da_ceil_a_np_": {"doc_hash": "0360f401fcd4b8e0241fd7f239264848394bfd52a955c16d015d63442d884e8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_trunc_a_2__test_arithmetic.assert_eq_da_around_a_1": {"doc_hash": "c08e7459ed029fe1cf2df3ff31f1ce8e456089e8dd4b15835763d4cdcbfc45e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_consistent_names_test_optimize.assert_all_key_in_result_": {"doc_hash": "e49f9a0baca82d8e5fe8c63efbcc4cb8231b09b3f72d3aa89f7270f941f64074"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slicing_with_non_ndarrays_test_slicing_with_non_ndarrays.assert_eq_x_1_sum_": {"doc_hash": "b1d9e6459d95708accc4ba3dac9da56c9510bd382a583e5c1bb33e2456944146"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getter_test_getter.assert_eq_getter_np_arang": {"doc_hash": "076c8cf14728f28dceb4b9e8d0e0aee48c66e4d6a9b24fbb12e5486408dd844c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_size_test_Array_normalizes_dtype.assert_isinstance_x_dtype": {"doc_hash": "e67beda188450a0dc30777eca1d22508885c61cd3ea46d24210e092a78b355c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_with_lock_test_from_array_with_lock.assert_eq_e_f_x_x_": {"doc_hash": "3f731fa5e2793dba433d50016abb3625079a4b480c2d49d7af2b09781a667b38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_MyArray_test_from_array_tasks_always_call_getter.assert_eq_x_dx_": {"doc_hash": "46edde344f5e43dcabae2076d4945ced74dcb5d4e42a1ecaad236548050097d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_ndarray_onechunk_test_from_array_ndarray_getitem.assert_dx_dask_dx_name_": {"doc_hash": "00256910170d3f195227e24779cf786f0ec1b6442538ae3e073c54e43e0ab709"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_list_test_from_array_list.assert_dx_dask_dx_name_0": {"doc_hash": "1493ad3dc8a79fb60034a6d24b7ff6e0cbea07ed0db757eb4090f2b352f58d66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_scalar_test_from_array_scalar.assert_isinstance_": {"doc_hash": "4f1dfbb8e502f4b74c2495cecc4965846e545169f0a99e643d18c8541ace3305"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_no_asarray_test_from_array_no_asarray.None_2": {"doc_hash": "fa88b0fd55f978a03ff3aac00108450c639f8ed5c6016fe3c157291a4832bd98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_getitem_test_asarray.assert_eq_asarray_y_x_": {"doc_hash": "e3e940e17a0c43d8191d62deae5aa1d11cfa536c0af5785d5270f25a34e8c084"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_dask_dataframe_test_asarray_dask_dataframe.None_1": {"doc_hash": "702c0cde08e97ed1cf70df7748f22b5f0c703383220588dba8771c7528f74f21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_h5py_test_asarray_h5py.with_tmpfile_hdf5_as_.with_h5py_File_fn_mode_.assert_not_any_isinstance": {"doc_hash": "8b8403024e8bf286dadf1c5535336b8bdc259b6c04ec7784004b5136119b1778"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_chunks_test_asanyarray.assert_da_asanyarray_dx_": {"doc_hash": "de19d9e4fb1c9afc3d53cf9db82d3726d22b26109442c32f11d21463d30b0452"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_dataframe_test_asanyarray_dataframe.None_1": {"doc_hash": "2c5cb1e57d77d6d6a009b82ff37b3c9966e37974b98ad923ba28267229809fc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_datetime64_test_from_func.assert_same_keys_d_from_": {"doc_hash": "714f621048c69f9d23d74fdb0a02ef31bfbd2442c02820f3fed35b3d4d6dfbf5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate3_2_test_concatenate3_2.assert_eq_": {"doc_hash": "6ccef6720f67ab13b13ddd168a6431b25025b588876edec344ed43a96b2211a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks3_test_from_array_with_missing_chunks.assert_d_chunks_da_fro": {"doc_hash": "f3577e8ba1afa43e01fdab535c8d7ef35ca7ae4c7f5c4a30e9be9563e93d9dff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_test_normalize_chunks.None_1.normalize_chunks_5_": {"doc_hash": "55bc54426b1d00cdd9c6bdfdd759abe8ce215e144efe3559feb79792f149e917"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_align_chunks_to_previous_chunks_test_align_chunks_to_previous_chunks.None_5": {"doc_hash": "6d6caa5425cc99d3075a2b5bd98f82245c04fb90febd2135da994dcc6b0ec1e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_on_no_chunks_test_long_slice.assert_eq_d_8000_8200_x": {"doc_hash": "65ef49a093f3f02ef90e858d803c7ebdd572977923e3eb1a1be4d4f33d6bdad1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_h5py_newaxis_test_ellipsis_slicing.assert_eq_da_ones_4_chun": {"doc_hash": "f45f69028d83f2879024c848f11b2fc16d57365e426f0102f0f943b2bc56793d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_test_point_slicing.assert_same_keys_result_": {"doc_hash": "0e537a8bb0842de638eec7f7fb0e009adfa32ad702344988a57826051a3ebd63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_with_full_slice_test_point_slicing_with_full_slice.for_ind_in_inds_.assert_result_shape_0_": {"doc_hash": "961a4c425c612cef6dcc3cd121e8d7d6953a76058b42e440e614ef6d4ff12eb4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_with_floats_test_slice_with_integer_types.None_3": {"doc_hash": "452fbdbf445878105d423d77ebd0622964275e88435e95fdaa4e5b00c9f8a41a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_with_integer_types_test_vindex_basic.assert_eq_result_x_2_": {"doc_hash": "d6d3a7dff9bba7d8417c180c3ad3503383fc87a7ea02824509cf3ee6d4996740"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_nd_test_vindex_nd.assert_eq_result_x_T_": {"doc_hash": "c62ccf2a1dd080a181de9853cc9779d2a6b81942168917ad5f5a986c06b0c9f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_negative_test_vindex_errors.None_4": {"doc_hash": "cbf598d64ee96a10b41aa632b2bf6fe9c2605461a724f7bb3b4bf9e9d7867f79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_merge_test_vindex_merge.assert_": {"doc_hash": "cdf37c2914800c6d27c5a0beede4c88891bd901bb1cc4629138091c339b3a759"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_identity_test_vindex_identity.None_5": {"doc_hash": "a077ac7d1e0e8d9293d352296b0b893f68ab059ef6d60cfdd6747303cb4815bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_empty_array_test_memmap.with_tmpfile_npy_as_fn.with_tmpfile_npy_as_fn.try_.finally_.target__mmap_close_": {"doc_hash": "403413ef8c4231be3fe090c4f48185c553ee06c6f41b6bdc9421159094e885cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_npy_stack_test_to_npy_stack.with_tmpdir_as_dirname_.assert_eq_d_e_": {"doc_hash": "d32dc2248ab6953e71bd7bb8a8b6b14529e84e13c375af1565b6df0f42a2f01b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_test_view.None_1.d_view_i4_order_asdf_": {"doc_hash": "cfb2488d7274b05a1e477cfcf6af2bcb206dac55f9f9170296788f241a6867fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_fortran_test_h5py_tokenize.with_tmpfile_hdf5_as_f.with_tmpfile_hdf5_as_f.assert_tokenize_x1_to": {"doc_hash": "ecf4643c06c00279b5b1a97e9f8f4d30b3f48c008c22cf32d335d507584e69c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_test_map_blocks_with_changed_dimension.None_5": {"doc_hash": "f3ab7db40ada16aeb4ff63fb6f9c841327a3464898e4b6d1a30435de96138a48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_and_broadcast_chunks_test_map_blocks_with_changed_dimension_and_broadcast_chunks.assert_eq_result_expecte": {"doc_hash": "c1c2abb7ed0e3bb1302fd1412fac6c1d872668cbcc814318e3b22b8ef86cffdf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_chunks_test_broadcast_chunks.None_1.broadcast_chunks_a_b_": {"doc_hash": "bcf7561e54a1a5e8075fca9c49e6764a1983ef19e8733841b8111082937d60be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunks_error_test_dont_fuse_outputs.assert_eq_a_np_array_1_": {"doc_hash": "9655b911531cc034221a7c741f60bdb63328c60909f27e7c9c7b18168b8f4007"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dont_dealias_outputs_test_dont_dealias_outputs.assert_eq_a_np_ones_4_": {"doc_hash": "bd8944e8273663dd283b217cca8bad793ce2eb96d8c7bc6afad18c4e3633578e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_timedelta_op_test_to_delayed.assert_a_compute_s": {"doc_hash": "27d8183d6e51efda856953bbd30192b8e3d3e9bb328cc6f9c1e5ab49c2654e89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_delayed_optimize_graph_test_to_delayed_optimize_graph.assert_d_compute_d2": {"doc_hash": "e71259d450fcd69bd99c0fb4eb3a0a4bdb2182273f4eb515947aa6147bb474d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_cumulative_test_cumulative.None_3.x_cumsum_axis_4_": {"doc_hash": "ed40c9816da2733eb309883fc112a4166c7c5052c8581d6fc80705808dc0b88c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_delayed_test_A_property.assert_x_A_is_x": {"doc_hash": "bfd76df0ef13182674719ce2518e3109b40c40fb4fecd0682d3c08d11ac43022"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_copy_mutate_test_copy_mutate.assert_memo_id_x_is_y2": {"doc_hash": "8dba4f582fed14cb30339417c75bfd3f89169aca77c75abe9a5f052c37559162"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_npartitions_test_from_array_raises_on_bad_chunks.None_1.da_from_array_x_chunks_": {"doc_hash": "7754142dd5e15de1f126817301120fc0c2dea876755e568875c1c84ad7de4f44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_axes_test_concatenate_axes.None_1._too_many_axes": {"doc_hash": "a88f203f2e629c9e676df39a94bfb91a5199f29c2049d015d2359032e80f96de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_concatenate_test_blockwise_concatenate.assert_eq_z_np_ones_10_": {"doc_hash": "728f62ef1f3bb31df72515d605892b2a7be932cc4871bc406927dfc2fd065c89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_common_blockdim_test_common_blockdim.None_6": {"doc_hash": "c838984d6a9426a6ad31a7fab676729c09e03b9eebfd0b2eec70158d7a7090d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_that_fit_neatly_test_elemwise_uneven_chunks.assert_z_chunks_2_2": {"doc_hash": "d98f9d1b3c7c9560539f165b47e32a93eb5040daf058678dbc8ade8826800b7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_blockwise_test_uneven_chunks_blockwise.assert_eq_z_x_compute_": {"doc_hash": "7945a96514fedf8e17d3cde32e586eb510a38a91498a8f20a77a7d45af0f8202"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_warn_bad_rechunking_test_map_blocks_delayed.assert_yy_key_in_zz_dask": {"doc_hash": "0426978cbdaee3b48adf2e5e975a93074097ee3fdbe39c6cfa93cb3c7c8f0ed2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_test_no_chunks.assert_eq_x_x_std_kee": {"doc_hash": "40f5ab49514b1900604dca9f4b7a002da577ad33fbd9051f0387ce1873e35bef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_2d_test_no_chunks_2d.assert_eq_x_dot_x_T_1_": {"doc_hash": "ed8ca01ab07aabef5eb44365c103b96e8016cc8e15efd7922e7c3aa785601422"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_yes_chunks_test_no_chunks_yes_chunks.assert_x_dot_x_T_chunk": {"doc_hash": "f3ff9f9f66dba3e039a6208dccfec67b8feeee25ef6106660e2fd7d3ff3231ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_informative_errors_no_chunks_test_raise_informative_errors_no_chunks.for_op_in_.if_chunk_not_in_str_e_v.op_": {"doc_hash": "75b198c542e4db64af3e0ab5d7878dce4e698d8b011eaa5af94be61c2a9ce59c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_slicing_2d_test_no_chunks_slicing_2d.for_op_in_lambda_x_4.with_pytest_raises_ValueE.op_": {"doc_hash": "4682ff178a047891a787bfad3edc66c43663e96ec806e7046f0ccbd54f5487f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_1d_test_index_array_with_array_1d.with_pytest_raises_ValueE.dx_dy_5_": {"doc_hash": "195baecaac2d4fc550d1c9aa2ba54e7fb58710dfacb72e0d141549aafa365376"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_2d_test_index_array_with_array_2d.assert_len_record_2": {"doc_hash": "881cb5f6d8035a59f456f7a202144eabbfde559dee1752e715ca3719c4a6380b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_3d_2d_test_index_array_with_array_3d_2d.assert_eq_x_ind_dx_": {"doc_hash": "4434d42ac2c6903a770aed667ea6dd831df0b27101390d93507a8fe024cd326c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_setitem_1d_test_blockwise_zero_shape_new_axes.da_blockwise_": {"doc_hash": "6f84c5c17e2efa3e5c09ac0371b249904eab372edf45a494f91084cebd0e762e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_against_zero_shape_test_broadcast_against_zero_shape.None_5": {"doc_hash": "cc04392c8a9d6dddb8d5cdb16680debb77a37afba0143668786873c9c77eb74f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_name_test_from_array_name.assert_dx2_name_dx3_na": {"doc_hash": "0f7893ed1180fa611e65bbbd2c33bdfef4edf8bf6edb176b131ceccd62e94ea0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_errs_test_concatenate_errs.None_1.da_concatenate_": {"doc_hash": "9970fcec6c0e338f6d360a0c46bec08d30107b17d6ca5df625b0e37b9fb874a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_errs_test_blockwise_with_numpy_arrays.assert_any_x_is_v_for_v_i": {"doc_hash": "c2780eaf8d8c508a4fc4f8a41a684a2b556092c90e1ad7e41fa58c272e2d23c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_with_lists_test_elemwise_with_lists.assert_eq_x3_d3_": {"doc_hash": "13c56071fa2e143b71550faf0111b91ba0f83e41cacb46ea549bfda5a40ac0e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructor_plugin_test_constructor_plugin.assert_len_L_2": {"doc_hash": "098703174d1d1aa178439256ed1eb748ba762b58213eea0c1295c056adfcb049"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_on_metadata_test_meta.assert_a_nbytes_1000": {"doc_hash": "1fdf4573461c8a0e411e1bb473f79c18290b381139e7574ef7dbc4fd58611a11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_1d_test_normalize_chunks_auto_1d.assert_result_expecte": {"doc_hash": "35ce565cc7680b3b01873b596396af6e85c76edd2af764874ea4b1fa03ff1630"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_2d_test_normalize_chunks_auto_2d.assert_result_expected": {"doc_hash": "757325413fa9718a21940e30ba27c1ca6aeaaa4804b8e2889b1bb844409048c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_3d_test_normalize_chunks_auto_3d.None_1": {"doc_hash": "16d9c8c738a46cb25f10e4d96859e403093ff322bd9c3c0383ed7e70ba3bb415"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructors_chunks_dict_test_zarr_return_stored.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"doc_hash": "6fbb7b9ffb288c078da08596f4d5cbdf3e4f0c2ce7e31c4977098a896d032a15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_zarr_delayed_creates_no_metadata_test_zarr_pass_mapper.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"doc_hash": "1ad11b485c0d9dd870b29be8e46048ba77d9edaf6b0df7f698bccab9d3293111"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_zarr_group_test_zarr_group.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"doc_hash": "cfb024268e1bf380ee91c0388a56d699cc15d69fa7b31807dc897a5333211890"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_regular_chunks_test_zarr_nocompute.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"doc_hash": "f52a15be64f40a05f846628d313b2b94f36aa2300725defb9d04db1ae2968df8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_roundtrip_test_tiledb_roundtrip.None_2.assert_a_chunks_tdb_ch": {"doc_hash": "7c27d951e29eab84c1d9ea4d785290e26873b4d08ea7ce7a8542034da00d485c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_multiattr_test_tiledb_multiattr.with_tmpdir_as_uri_.assert_eq_np_mean_ar2_d": {"doc_hash": "e3912ac98bf6a7ef0bff4856ce639b9de3dbee09f22cce1ba454d937362d560a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blocks_indexer_test_blocks_indexer.with_pytest_raises_IndexE.x_blocks_100_100_": {"doc_hash": "08c1b9833168c92f2214819678e46813212dd65d12ea7951184ec668624d7564"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_partitions_indexer_test_partitions_indexer.with_pytest_raises_IndexE.x_partitions_100_100_": {"doc_hash": "3004e3c878f859f051b6adfec96e39909ffba56ea2ced32ed67abd35299438f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dask_array_holds_scipy_sparse_containers_test_dask_array_holds_scipy_sparse_containers.assert_zz_xx_T_all_": {"doc_hash": "09fb68edba1a35fc1aa9c2fac352e081690242b9da2dd4cd092651451bfea726"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_scipy_sparse_concatenate_test_scipy_sparse_concatenate.assert_z_z_expected_": {"doc_hash": "9e2d91a2395819a84e6943c4215f9d0baf562e014b7537842104ea7f51e7ab75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_3851_test_map_blocks_large_inputs_delayed.None_1": {"doc_hash": "0682c238b8146a046882c46691accc7a97766b5e0cba0268bc5a8e63db90d282"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_large_inputs_delayed_test_blockwise_large_inputs_delayed.None_1": {"doc_hash": "93630030aa61bbb4cf7b58433ce217f3ef20fada0ad538506768859f4b7ebfdd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_reversed_test_map_blocks_chunks.assert_eq_": {"doc_hash": "8d015b99e7f0bbd7e6da18897c6d1ab5fd1f07e6fcd1b4ba148154886580a463"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_nbytes_auto_test_nbytes_auto.None_3.normalize_chunks_10B_": {"doc_hash": "b4c6f83ff11842ae78265ad5970bc1c99d7ec6be527469072f43f85bd15d8390"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_auto_chunks_h5py_test_auto_chunks_h5py.with_tmpfile_hdf5_as_.None_1.with_dask_config_set_ar.assert_x_chunks_256_": {"doc_hash": "79ea819976daf427d51f47865292bd843273a7afa3b2f1aabdfd88b66a795e23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_from_blockwise_test_no_warnings_from_blockwise.None_2": {"doc_hash": "c18f28305181f9de8d4b4141154a0467d75fe3bd0b2740d9b6a20e85906ee694"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_meta_test_compute_chunk_sizes.assert_isinstance_z_chunk": {"doc_hash": "9322a55d4eaf1d82c4e33dc7ce8a1bfce74ed18d4ff49702de368122d1953152"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_2d_array_test_compute_chunk_sizes_2d_array.assert_Z_shape_4_4_": {"doc_hash": "0cdf1c3e15d323208f117e7cf9652841ad1c863ff68fcbdef101f86fd188fe64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_3d_array_test_compute_chunk_sizes_3d_array.assert_Z_chunks_4_4": {"doc_hash": "0fa8def731cf4982b96999fbfb37b2aec5e1440da384704418d6b02ff8ba80fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py__known_": {"doc_hash": "42c911e46003afa2fb602a373ff02535b468535db7b4e3d0ce9e9d7bc874c0fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_pytest_test_array_function_dask.assert_eq_res_y_res_x_": {"doc_hash": "994df497beb6230df086b58c11462e6894425aac36da1e4459a1977fb8f8fe75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_fft_test_array_function_fft.assert_eq_res_y_res_x_": {"doc_hash": "988ce35cd4d8ea057e184a7eb7c2ddf5caf1a5d8891f1a020206e044f05d4b2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_notimpl_function_dask_test_array_notimpl_function_dask.with_pytest_warns_.func_y_": {"doc_hash": "286d4963d725b550b97639ddd4a63d9431e5e9693c9b0472f4c4c00664f2c712"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_test_array_function_sparse.assert_eq_func_x_func_y": {"doc_hash": "bd0c5aec468ef9d47df9a6a1390d9face3487db579254f43d1d45910e7a25ec1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_tensordot_test_array_function_sparse_tensordot.assert_eq_": {"doc_hash": "84ebedcb8a0539c02337b039cba43a4853c7cbba7fca64744ee80e6ea8f07075"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_cupy_svd_test_array_function_cupy_svd.assert_eq_v_v_base_": {"doc_hash": "30a3d8a16e363c7cb13be4325045ca27c6a319a84a03861e9fd8c6325fffc0f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_unregistered_func_test_unregistered_func.assert_eq_xx_yy_check_m": {"doc_hash": "15a1a8121bd9ceb7b698d1c8b9ad3000afdeca830dd0cf8381675c28dcb50bfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_non_existent_func_test_non_existent_func.if_IS_NEP18_ACTIVE_.else_.assert_list_np_sort_x_": {"doc_hash": "5956372846fc5c5aea89a4579aa3f71caa99f87a8205f007ca04f8a6c7f4e989"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_binary_function_type_precedence_": {"doc_hash": "fc775b7eaf624fe6796e94e78bc60b36a192af90f708792949b4151e22f5f2e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_np_test_meta_from_array.assert_meta_from_array_np": {"doc_hash": "3093c82c80e0b47074176445cc01ee568654755f17dde4d2f03653ff8cab8f17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_test_meta_from_array_type_inputs_": {"doc_hash": "2872812a96a46f737c827a057eeabf05ca7592e7a0909db6f499c469d08daf2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_collections_test_optimize_blockwise.assert_": {"doc_hash": "461592654c9abbbed19090f66638bdd1e14e58a2387619151ba13b46f50c9aba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_diamond_fusion_test_blockwise_diamond_fusion.assert_": {"doc_hash": "a2bee1a2e97db51da9fdd5fac83c6f3e543d3e2ce8994b5a74d566427b1777af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_non_blockwise_output_test_blockwise_non_blockwise_output.None_5": {"doc_hash": "e1197fa3d6cc643e099e32ca7584528139ed2f9784dba1564f54e73544735343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_top_len_test_blockwise_names.assert_y_name_startswith_": {"doc_hash": "b32f588d717ed45a14b5a217056c940b4c6ddfcdc0fcd44fa98c0b19047c3bcd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_test_blockwise_new_axes.assert_eq_y_np_ones_4_": {"doc_hash": "02017fddf6506c9791b999bac6e5bf96f97ba47ae969c71e210b6294215141f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_2_test_blockwise_stacked_new_axes.assert_eq_z_np_ones_5_": {"doc_hash": "e7f01aeb88158b134842f6106783619c6267e46d88961b334d3d06497b7d0cdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_front_test_blockwise_stacked_new_axes_front.assert_eq_w_np_ones_7_": {"doc_hash": "c7016de02aae1d0c3b6f17f3aca436572755fe459827a996a92782b385b9736d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_same_dim_test_blockwise_stacked_new_axes_same_dim.assert_eq_c_np_ones_5_": {"doc_hash": "0eb88272f42da59269c45042d1cf9a24308515103a3ea51264760a119f800953"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_chunked_test_blockwise_new_axes_chunked.assert_eq_y_np_array_0": {"doc_hash": "3af5c59603976c3ce4ab037c6eba5da975311c6d52792310052fdbb195a94ff4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_no_args_test_blockwise_kwargs.assert_eq_y_np_ones_5_": {"doc_hash": "b1f7790b8348d68363cd9cd0f3921bdf3a33243fbabd16fcecb8ea42b61196cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_chunks_test_blockwise_chunks.None_3": {"doc_hash": "2568626fcd46846d7f2eab7252af935a2785280d8c9cb96d7358d1ae411f1f43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_numpy_arg_test_blockwise_numpy_arg.with_warnings_catch_warni.assert_eq_x_np_arange_10": {"doc_hash": "ef7fa2b7955fc0d9180b27e39b87aa91c20911be9fa4508c0c8c6ff1f34198ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_bag_array_conversion_test_svd.assert_eq_z_z_": {"doc_hash": "d414324c840dfb371b40168444dab60427baf73239108de5b4a7872f048c630a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_args_delayed_test_args_delayed.None_1": {"doc_hash": "49426b737fc61084621bbebd8f87932b9559dde8298346ed09b4d44b56f52ddc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_namedtuple_test_namedtuple.assert_eq_A_B_": {"doc_hash": "5a4acc4217391827de46645450d8aa80a60b7ec0d4b516ea076ad8ee28da2900"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_validate_top_inputs_test_validate_top_inputs.assert_i_in_str_info_va": {"doc_hash": "db1bb33b856a544dc2966ffa248ba4847fb1c056a26a1efdc1dee4d862519ee2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_dont_merge_before_reductions_test_dont_merge_before_reductions.z_compute_": {"doc_hash": "45e07b09bed94317f8e05eb1563a9ddbd703d080de3557614d317c00b430d59d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_atop_legacy_": {"doc_hash": "26852160fe6f28e05db25fbd5353fc97eeac00fc0e5972fd4b3fb0d55725b988"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_pytest_test_keepdims_wrapper_no_axis.assert_rwf_276": {"doc_hash": "17e70556a822cd339d9b45e247aace1eba4c29352ac57be3889f403ad1ba0e1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_one_axis_test_keepdims_wrapper_one_axis.assert_rwf_np_array_": {"doc_hash": "8a50e425262987521552746010093f47f77ff46391ad9a96417701fb4f3e4072"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_two_axes_test_keepdims_wrapper_two_axes.assert_rwf_np_array_": {"doc_hash": "98fa4391977191c2093130de14fbe586a666e9dc397834832693e19ca62088b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_coarsen_": {"doc_hash": "3ced4d43618118daf5c9ae5f49f60ef1a460266bcddee6bb0db749ccdcdee721"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_pytest_test_arr_like.if_order_F_.else_.assert_not_np_isfortran_d": {"doc_hash": "f1b145e51757e22f822fc70f11c01e54b109619661c1f04c5f32b7fb2b1b6c40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arr_like_shape_test_arr_like_shape.if_empty_not_in_funcnam.assert_eq_np_r_da_r_": {"doc_hash": "82dda06ed481ffb008fbe89e01015413982088257c1f2b17d2c31772015dd602"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_linspace_test_linspace.None_4": {"doc_hash": "b2b3cfc2df29a4cfc99c5a874c09796a4405434246412b0d78add276ce33d5a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_test_arange.assert_da_arange_10_chun": {"doc_hash": "23405af146e4b6cfc67277b6eb23e3c6f367643f0a7e35ae5b0d0afd79d611f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_dtypes_test_arange_dtypes.assert_eq_a_np_a_da_": {"doc_hash": "afdecf7f8721dc4d25e071fb2d104fd4861bb2d649b3c1700f68ccbdf4b58e46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_cast_float_int_step_test_arange_cast_float_int_step.assert_eq_darr_nparr_": {"doc_hash": "55948725bfb8d101ea96f22736544ce4a079efd189053ed287cf40185676a1b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_float_step_test_arange_float_step.None_3": {"doc_hash": "86bb49850afa8b3e4020a7efab24529cafc858149648da1be61e6df935009a0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indices_wrong_chunks_test_indices_dimensions_chunks.with_dask_config_set_ar.assert_expected_actual": {"doc_hash": "d95a4265c303aab48021f3bce2e3b40a7bdcb738e98d91eba11e69c4f2d70533"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_empty_indicies_test_empty_indicies.None_3": {"doc_hash": "dd97c18e5375ab634c753694e3788d74309ea17a14ddc65b37bd4cbda1a9d4e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indicies_test_indicies.None_3": {"doc_hash": "5b656fe233100332c53f67fe3affe45bee0cbbc47f4e526b830630ce6a6650aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_test_meshgrid.for_e_r_a_e_r_d_i_in_zi.if_sparse_.else_.assert_e_r_d_chunks_xi": {"doc_hash": "296e8dfa1097cc7a5ddf5700bbfa681185c427e5531847ea677da53cf347551d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_inputcoercion_test_meshgrid_inputcoercion.assert_eq_z_z_d_": {"doc_hash": "be2ccf119c275f2a4164abe57dad2e1f859fca9990829fbffad9610f6a8ffc6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_.None_1": {"doc_hash": "e34be54bc22201b57f338c54123f9affabc652043c42b952309cc64cf438f22c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_errors_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np": {"doc_hash": "5daaba40d4230a65ea84de449a0d900c139e1161c9677ba9cb6bd9bd0d3408a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_eye_test_eye.with_dask_config_set_ar.assert_4_x_npartitions_": {"doc_hash": "822c0533fddd4edb04ee0ef0fd95bcb7b56a0db31887fcb1e8e5cdfb20bab935"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diag_test_diag.assert_eq_da_diag_d_np_": {"doc_hash": "ae4989a4a37994f92f1c53cd5d3d83d8b811a3888ca34f36a8b8cf6837fcf9f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal_test_diagonal.None_14": {"doc_hash": "cca234cb244f8892674c92e21a3cfd66b6848ea8fb403b9976479127cc971dea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal.None_15_test_diagonal.None_22": {"doc_hash": "55fbb135f085eaff37465c9be1ba525cf2e6c99e99744d1c3e34cf482f6564bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_fromfunction_test_fromfunction.assert_same_keys_d_d2_": {"doc_hash": "4828de766802643eee6c33cbf993ab0ccb1979dd8cd89e11502d2c675128b6a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_repeat_test_repeat.for_r_in_1_2_3_4_.assert_all_concat_d_repea": {"doc_hash": "6cc76abf371b7476047e0b0df3ab995a2b31115459e19621a919095754c42118"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_basic_test_tile_basic.assert_eq_np_tile_b_reps": {"doc_hash": "2c75fed05dcfbecd6534f2688557594bb4937f2a583c69b5d67d85b640a93650"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_chunks_test_tile_neg_reps.with_pytest_raises_ValueE.da_tile_d_reps_": {"doc_hash": "4032670416c797a5d781b1457eaaf82d892f257da3dc21da73a103fe94689b60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_zero_reps_test_tile_zero_reps.assert_eq_np_tile_x_reps": {"doc_hash": "2c155efc2594f4bd1482082ba8d0724120fa34fdb042bb14eca1d3ba6a2fd816"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_empty_array_test_tile_empty_array.assert_eq_np_tile_x_reps": {"doc_hash": "b0bf2a0babbcdab08e10c3598afb56a523e1c8d5c78849ca45aad1e794ec11ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_np_kroncompare_examples_skip_stat_length.pytest_mark_xfail__numpy_": {"doc_hash": "f71a1f4e0e7c4209d0fec242464ae86a54cd531c04970d80fe6d91a3aeb229d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_0_width_test_pad_0_width.assert_eq_np_r_da_r_": {"doc_hash": "c5e4dd93670b4fcff37ec50dff115534120bcb7e7941d0016bc32c1b4ab1abca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_test_pad.if_mode_empty_.else_.assert_eq_np_r_da_r_": {"doc_hash": "fbd2c83b5077ba11e1fa8dd4d167165d7efe655113c0a352a0fb5230098e17fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_3d_data_test_pad_3d_data.assert_eq_np_r_da_r_": {"doc_hash": "2acbf899723dd42caaebcbf4fc9a936c5f31474be632b19811070b82ade0a276"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_udf_": {"doc_hash": "330b1459d2fcd8826aa903681e7d6f41113dbc1b07e8cbd6b3142707443222cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_np_functions._": {"doc_hash": "e222787a6d071f0827f10dd4c10b067e69f5df4969213b0e51839daafd43e8fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_basic_test_sizeof.assert_sizeof_c_c_nby": {"doc_hash": "31d53e8da53db58790f040f56eec3d8a02dd800b815f2cc0c2aa87091d2a725d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diag_test_diag.assert_eq_da_diag_dx_cu": {"doc_hash": "7cf2b2e94b63a0a6ef41e20afedf3b288a20ab09328f757027838a6a031a07a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diagonal_test_diagonal.None_11": {"doc_hash": "c4fbba380810d35412cb33c114381b03fa41ab1dad0415f1f260bc65fc8d190e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_25_20_9_.assert_eq_da_tril_dA_k_": {"doc_hash": "69a12adc5bd8f4dc81a7fdc3ccbf7663a6018489bc3f841cede24027d314b9ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_non_square_arrays_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np": {"doc_hash": "7928707a038d54f5e0843e2cb57426c0725ed727d72e1700dd05fb1f259665da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_apply_gufunc_axis_test_apply_gufunc_axis.assert_eq_m_dm_": {"doc_hash": "889a444af252d6c10750bccacca16ef29510357a4e860fb317f486cf38ada91c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_overlap_internal_test_overlap_internal.assert_same_keys_da_overl": {"doc_hash": "015af3457951ebf4ee29e805d0c31cb8a1f818b88c8df635035c028642c063df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_": {"doc_hash": "7067acd317996e505e4df44256548288efc7e44041bd9e0383568e6ebac7e64c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_reflect_test_reflect.None_1": {"doc_hash": "d5780653ebf168e3f33055894e871c414f12367307c8781becb0ac325963634c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_nearest_test_nearest.None_1": {"doc_hash": "60d558a93f5f2d22c6edbd7868ce9509d297db13a12c54dd9e8e1495161037bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_constant_test_constant.assert_eq_e_1_np_on": {"doc_hash": "074255da3dca169628f64ab0321b6da2198fdf54fd6160df736abf3be53ca8ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_boundaries_test_boundaries.assert_eq_e_expected_": {"doc_hash": "1922d1167ee833cf8c16ed42019c5e7558bb6379b89638d762e27d871fdbdcdd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_all_test_random_all.rnd_test_rs_standard_t_2": {"doc_hash": "54545aec4ee0dd99ee1ef5bf43ec17da2770db388f3a18eb7270c118cfdf016f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_shapes_test_random_shapes.assert_x_shape_shape": {"doc_hash": "79b6297d5b8a1a70f7477dfda1bbe271c1d7e478f051a4a02d8fa73ae1e9e8f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_test_tsqr._full_matrix_returned": {"doc_hash": "fbbef2d152adf235732a9d68925fdbbe6b67c7241bcb1541196778b4e2700a3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr.if_error_type_is_None__test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr": {"doc_hash": "478a5d1774f350dfca6ee65783b0ad87a6ce1e13cb7a841281ab6454ce60c8c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain_test_tsqr_uncertain.data.da_from_array_mat_chunks": {"doc_hash": "6d04b323649a67de752fca65150dd32e0159c1d5e3312f6184b5a97e63ce8aa7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_vary_rows__test_tsqr_uncertain._full_matrix_returned": {"doc_hash": "7b9b198d8fe4bb48d28cf7b3bb3e305d014c613c6735cc8b8bdcae4f488bfad0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr": {"doc_hash": "a7cf8792a72365d027ba8b8ae96e5df23f44534ea1d097bc308797362d39eb24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_da_linalg_sfqr_dat": {"doc_hash": "de89ccb8cc6a51a0098d8a482facf3d6639e74ef23c0e7c401813dd514d0d42d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sparse_hstack_vstack_csr_test_sparse_hstack_vstack_csr.assert_eq_x_y_todense_": {"doc_hash": "fe99d54b2e9539e1a3504dc05839a22d1faa0575eea8dee3ef713da4ece3a7f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_cupy_sparse_concatenate_test_cupy_sparse_concatenate.assert_z_toarray_z_": {"doc_hash": "d3ae1096c148bf0920829a51bb05c784bff3e9cf79b377aa85ea739e3fd1210d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_bincount_": {"doc_hash": "e57616ee90ff72471dcb49ed0b7dc209da93e297f0874b04f55f38cd159bfda4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_operator_dispatch_property.return.wrapped": {"doc_hash": "ea6a5e7886e2824f37dde3ea0c527e909efbe23031935632fc6326bfdd0d0fdf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray_EncapsulateNDArray.__array__.return.np_asarray_self_arr_arg": {"doc_hash": "9da32cc53c09562d5834621380ed7ac08f4990389d7fd13fc80035e58e357e3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_function___EncapsulateNDArray.__setitem__.wrap___setitem___": {"doc_hash": "3f49a12391631e18bc4bf27ab23871022cfdfb4f678c6d5cb2c6537375aa1461"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_ufunc___da_register_chunk_type_En": {"doc_hash": "2199df318c2abf5ec4d47926d468fa6686ac178c668ba8da67664b79f012924b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_WrappedArray_WrappedArray.__setitem__.self_arr_key_value": {"doc_hash": "c20e9ef3c7f5ecfc2231023d873cc76c462eff33a9b08eb3d58d71ebd7aff134"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_binary_operation_type_precedence_test_binary_operation_type_precedence.assert_": {"doc_hash": "cc6a949980ae3bebd267d2019336f966c309b3b99abff91173a68e6e1739e67d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_array_chunk_test_is_valid_array_chunk.assert_is_valid_array_chu": {"doc_hash": "c0a0ce5cc1cecb8ce20435060bd0b3c7d7f9a87f26bdba2f0378049f8273c1f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_chunk_type_": {"doc_hash": "d631d3e91da2f6127954870eacdfafb54c1a95707277c531404b17a76704c87c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_from_itertools_import_com_test_fft.assert_eq_da_fft_darr_n": {"doc_hash": "927bc63798c193504d0180c6eae6ac0db6611551dd0d9d30f3c13e80dbff88c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft2n_shapes_test_fft2n_shapes.assert_eq_": {"doc_hash": "632f12d366ddc2d5a41f576f98646e88bafdd9624a849d67107b55099f026222"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_n_kwarg_test_fft_n_kwarg.None_5": {"doc_hash": "1117f5baea2fac14e141885a1d0765ff6700549f23c9b9f454e7829316e8cd05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_consistent_names_test_wrap_bad_kind.with_pytest_raises_ValueE.fft_wrap_np_ones_": {"doc_hash": "c3f6e727cddaa01e2853d30978f216338f44a87f6a3d7e33907cc85af2f6743b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_nd_ffts_axes_test_nd_ffts_axes.for_num_axes_in_range_1_.for_axes_in_combinations_.if_len_set_axes_len_a.else_.assert_eq_r_er_": {"doc_hash": "f5bd41db059f7a5545bc576b1c70c677a1e9647196cdc784f9f4e30e2fbb7be7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_ffts_test_wrap_ffts.if_modname_scipy_fftp.else_.None_5": {"doc_hash": "762204454f6f2b89e6735a254897deeef5bceb7f90dc225af285d64acce32439"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_fftns_test_wrap_fftns.assert_eq_": {"doc_hash": "15da8a7d670123c1c4a287f245cc01a055bb6de147db206ea49fc887ced3c690"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftfreq_test_fftfreq.assert_eq_r1_r2_": {"doc_hash": "0101e8d82e97518ca26df3d4773a8fdb42253e71b291cb8dfac480f88d12c0e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_rfftfreq_test_rfftfreq.assert_eq_r1_r2_": {"doc_hash": "94005c36f4ebad7528317e3b15069970d914a24311c3a4267351c73b37be61a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_test_fftshift.assert_eq_d_r_a_r_": {"doc_hash": "281386e558d82975081ed86791390423694f3eba21201dd4550cd4db7d9836d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_identity_": {"doc_hash": "e97bd10d31521f993760023fc0ecdd7242f475de66e0726259da3837b69369ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_pytest_test__parse_gufunc_signature.None_3._parse_gufunc_signature_": {"doc_hash": "d8582bd564455f1c72095e3bfb324fa3c77c92cac7ec778a4d27758f25f9d24a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_input_validation_01_test_apply_gufunc_axes_input_validation_01.None_2.apply_gufunc_foo_i_": {"doc_hash": "fbeda353c636daca6d437d432f8c4651aa6eacfbecc3b9a0f22b5b5e3d934f32"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_01_test__validate_normalize_axes_01.assert_o_0_": {"doc_hash": "5ffcb1513a502d9d609af1a8781ffb7b2386afd7fc4884dd9d0c6ac64ed6bfaf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_02_test__validate_normalize_axes_02.None_2._validate_normalize_axes_": {"doc_hash": "e6cde94ee6bb668f5338930e70a260885f56b55f8d1efa1ddcea6e426b519d23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_03_test__validate_normalize_axes_03.None_2._validate_normalize_axes_": {"doc_hash": "2fb04460ca164c2f0de8b8f705643b0833e000e928a7099ca7b0ea969ac06396"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01_test_apply_gufunc_01.assert_std_compute_shap": {"doc_hash": "2600c72bec68c1dd91729297d43c7c1204033347f9e4e901bf7ce859a581ddef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01b_test_apply_gufunc_01b.assert_std_compute_shap": {"doc_hash": "35415ee65556e42787f37995d7c1773e29bffd8d3258742971d50fd035327b1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_test_apply_gufunc_output_dtypes_string.assert_mean_compute_sha": {"doc_hash": "091ea3d1a834cd1285e86ab1cb3fdd41646a34d837718bea4f5f505d0da95654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_many_outputs_test_apply_gufunc_output_dtypes_string_many_outputs.assert_std_compute_shap": {"doc_hash": "f36ed57ed6d5015b777d1133617738297f357f5a3a6193460430a6608a396228"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_pass_additional_kwargs_test_apply_gufunc_02.assert_c_compute_shape_": {"doc_hash": "ea873a5c3f46ce269ace5205538b58a48918c066d4eb7fc1404cfae2b51aa61a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_scalar_output_test_apply_gufunc_elemwise_01b.with_pytest_raises_ValueE.apply_gufunc_add_": {"doc_hash": "c6ad27f35d74c7ce962634f10b65382ec9aa83c60ef65f9056cc10dc5a8646d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_elemwise_02_test_apply_gufunc_elemwise_02.assert_eq_z2_np_array_1": {"doc_hash": "bc1277464ca1c2f5eab165c38e1d0927efc7ddfae8a93e335c901cc9608d6ec3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_vector_output_test_apply_gufunc_two_scalar_output.assert_y_compute_2": {"doc_hash": "d8e497532feef657dfd76f514429300b382ee672831144d34832506a938428aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_two_mixed_outputs_test_apply_gufunc_output_dtypes.assert_eq_y_dy_": {"doc_hash": "0cdedd70119571165ccb76e698e468f34f5d80ceca14822056fff0249fb31674"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_two_inputs_test_gufunc_two_inputs.assert_eq_x_3_np_ones_": {"doc_hash": "4665e4ec2c67b16b80892aaf06db4a1dd359579f9c20d84917f4f755e2b339ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_mixed_inputs_test_gufunc.assert_valy_shape_10_": {"doc_hash": "f8059e6a94e0d45eacfa6c1de614ed278b8d025523d6c97a6713c14bf46f09cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_as_gufunc_test_apply_gufunc_broadcasting_loopdims.assert_z_compute_shape_": {"doc_hash": "791c28a47649fc7f8de34951f00be9c084b3e4d9a1d1a9ce9d4334ee8d53081d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_same_dimsizes_test_apply_gufunc_check_coredim_chunksize.assert_consists_of_multi": {"doc_hash": "cf65b1c5b7099841169827156281c95c6f454eab2b8f6d2b0f1ebdab9884768f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_inhomogeneous_chunksize_test_apply_gufunc_check_inhomogeneous_chunksize.assert_with_different_ch": {"doc_hash": "2f70d2267db4a76bb927bfd32aedc882bea9a97d01e2ea7de488d83b0be70d00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_infer_dtype_test_apply_gufunc_infer_dtype.assert_eq_z1_dx_dy_": {"doc_hash": "6b90ebfdb1e24c98273a8a09b131bf385bf62e61891896d501c653eb1b19c2fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_01_test_apply_gufunc_axis_02.assert_eq_m_dm_": {"doc_hash": "c9fa2b12a816bcd46ba395f8baed4d24c9a7ae9447161c2c3db2895f8d4c458c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_02b_test_apply_gufunc_axis_02b.assert_eq_m_dm_": {"doc_hash": "97910ed9f1ad2b2c8fa1e11012066544ad6e18e919ae53c169eb20443b7cc0df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_03_test_apply_gufunc_axis_03.assert_eq_m_dm_": {"doc_hash": "f1337b281b074fc6552d841716892cdacb1b3d8f6641efdf4c02e85839ad473d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_keepdims_test_apply_gufunc_axis_keepdims.assert_eq_m_dm_": {"doc_hash": "8aa5433c365f831ebd5a2636fe0fc517db4f6c52ca5904fa8e98d3f8bfd46153"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_01_test_apply_gufunc_axes_01.assert_eq_m_dm_": {"doc_hash": "4fee468b197621a0c813b6e6284d57e6765be9c1fc2b901fb7c666d8f6f530e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_02_test_apply_gufunc_axes_02.assert_eq_m_dm_": {"doc_hash": "bfec28111607f2a98c0e75aea6272f77f1be79686dd1e81144cb7962fd7594d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_two_kept_coredims_test_apply_gufunc_axes_two_kept_coredims.assert_c_compute_shape_": {"doc_hash": "a0e9d6e34515be9dc0a37c198f585b8cb1f735b47c6a4c830e6bcd9c6406f95d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_01_test_apply_gufunc_via_numba_01.assert_eq_x_y_": {"doc_hash": "c043dfe3c4a72c73af0bf402c0e282cf7e4fc95f5d8cff54454577d68c89ff40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_02_test_apply_gufunc_via_numba_02.assert_eq_x_y_": {"doc_hash": "af202d6d53fdfe7ba8a33b54d87b1d70fdc9851a65ef9d5a758412c6052db1f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_preserve_meta_type_test_preserve_meta_type.assert_eq_mean_mean_": {"doc_hash": "b319a24bee3d3b6561a21f028b49528e8fd2b5e5a019f12873d820316ebc259f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_with_meta_": {"doc_hash": "dfc012d199fc8469103e57129c9a632990e7f48a6ad61f1af9669752ef16d6cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_from_contextlib_import_co_random_images.with_tmpdir_as_dirname_.yield_os_path_join_dirnam": {"doc_hash": "8512f688e5db94b912756c45fbdc529714ac0e7e0ece65bca5f1a76a3309487a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_test_imread.with_random_images_4_5_.assert_im_compute_dtype": {"doc_hash": "1de2325b19fb0d81ab2d3ead4f81afc557a6c7a7c4229c4eaf487bcd1d1b8ece"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_with_custom_function_": {"doc_hash": "2599cd47d29cfaa9e97c754a44278a1e780d3fb3da9e4288f206fd3e7d29228e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_pytest_test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com": {"doc_hash": "863ed557cb1ec54e775dea5a418927d2bcb6f487fc39c3437f5a6f9adb9be026"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain_test_tsqr_uncertain.if_vary_rows_.m.mat_shape_0_": {"doc_hash": "9e977e5b4aeb57716923fe627fe008c5fd287fc79f10103000a9f397451e8f99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_vary_cols__test_tsqr_uncertain._full_matrix_returned": {"doc_hash": "65a04bedb67fe6472daec8b94121b8e0aebdd852b263b81a5ba987ff7b53238b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com": {"doc_hash": "56e27bcdda8341df9e0abc0bf3deef570f1c5962f4169f002027714197f8c11d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_zero_height_chunks_test_tsqr_zero_height_chunks.None_13": {"doc_hash": "0ee246afab18e541055ac35cf8974d5212ac760fa11895d794f44f363eb535dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_sfqr_data_": {"doc_hash": "20817ea12c96f43ff18fb94977e93a2a3257ceba16654a1a2e7f663829199475"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_qr_test_qr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_qr_data_": {"doc_hash": "b6a81803841024b544a781ec1f9aed609b18e42e4379f41778bdf3f10c4b88ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_linalg_consistent_names_test_linalg_consistent_names.assert_same_keys_v1_v2_": {"doc_hash": "d46fd9f8dc94ae1e36c0cca700b144fc34d2bea627659343aeb0f257d7d7566e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_dask_svd_self_consistent_test_dask_svd_self_consistent.for_d_e_e_in_zip_d_u_d.assert_d_e_dtype_e_dty": {"doc_hash": "8aedec5a7933f1a11ac7218c675c3e504492fa30280fd2a949b1e350fb74cc84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_test_svd_compressed._s_must_contain_the_sing": {"doc_hash": "67d98fe576bafa0235a0c6e5be5e2057e91d0383b549079fc1f89e392dc84ed5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_deterministic_test_svd_compressed_deterministic.assert_all_da_compute_u_": {"doc_hash": "a14511e15daeeefdc44779c4320e7df1d67817c694a14899d29ecedd9ab4ee9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_shapes_test_svd_compressed_shapes.assert_v_shape_r_n_": {"doc_hash": "02149eddd66a222d8db082563339de1cadc3416a051a106998c9124a04201db7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_compute__check_lu_result.assert_eq_u_da_triu_u_": {"doc_hash": "3478bc9cc7d8f9899ee59159f96c06c338bb5c6cd0d620dc6df88bb5a9f7a8b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_1_test_lu_1.for_A_chunk_in_zip_A3_._check_lu_result_dp_dl_": {"doc_hash": "a30312252a7af98748f02e752e943dbd7fd015e9362c67c5588ed88d57d113ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_2_test_lu_3._check_lu_result_dp_dl_": {"doc_hash": "6b5788244d3725ad78202607ea9c7aae069126bb509eb3d644308268b61cfe03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_errors_test_lu_errors.None_2": {"doc_hash": "4d9218cc77a3dd7e77b76694311d4c377d1f9ed5e81dcd92aef5e633196de3fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_vector_test_solve_triangular_vector.assert_eq_dAl_dot_res_b": {"doc_hash": "8bd870cecfd823b1d57679e1a6cf7a7a66ef425d7931a7c45859633d932d27ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix_test_solve_triangular_matrix.assert_eq_dAl_dot_res_b": {"doc_hash": "daf957161ba4d6f624483d7825f265e31f40a04f9b2bf4e18d4cfaeeffcafcfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix2_test_solve_triangular_matrix2.assert_eq_dAl_dot_res_b": {"doc_hash": "f31e6d66533a4f6ceff1629d021f0b1120203bf47d1a0ca89b8bbba2a9382d35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_errors_test_solve_triangular_errors.None_1": {"doc_hash": "6b1a630125be491cc9243808dd3e61a9b626d2985c07e414b328c32a63317f89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_test_solve.None_6": {"doc_hash": "2969c1c5632150f0dedfe3dc953c98e99145e33e664f5f75699b77d1ab4b24ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_inv__get_symmat.return.lA_dot_lA_T_": {"doc_hash": "5dc075a1feee1df456f31475092ccc2d25639f37d656984d1b999c7369e6688d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_sym_pos_test_solve_sym_pos.None_6": {"doc_hash": "535caab04d7f269295f0483df0e60743b34ee7af18802f3737f4244e1a56da6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_cholesky_test_cholesky.assert_eq_": {"doc_hash": "2ac2795d2bf6d851a1023bf80bf64b4ad42350aa8a1b194ca9a88d4db9f6f7e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lstsq_test_lstsq.None_7": {"doc_hash": "8ea8f2459223d34276bb4178899992b66e1d5fad0d214e1449f60f20a2be1f9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_no_chunks_svd_test_no_chunks_svd.for_chunks_in_np_nan_.assert_eq_abs_u_abs_du_": {"doc_hash": "284e1c7fef49408375d830168938560b7f751ea739bfb233902f61235776ee91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_flip_test_svd_flip.None_1": {"doc_hash": "60ecb5cda34174b7c3e6f0c3c6f1ee5c3ab754ceb9951e65720fd8e4f53d9159"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_supported_array_shapes_test_svd_supported_array_shapes.assert_eq_dv_nv_": {"doc_hash": "945c7744291fc1ed57815f3df54dfee5100d8c41e23283bcc37d33f41ee5e7a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_incompatible_chunking_test_svd_incompatible_dimensions.with_pytest_raises_ValueE.da_linalg_svd_x_": {"doc_hash": "bad1218e900cf50e5f082dde6e7ad14851db59e81047c913d265238dfa97e7ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_ndim_test_norm_any_ndim.assert_eq_a_r_d_r_": {"doc_hash": "2568a1efd10cfa111bdfa34a60622cf2cc1c3e5da7fc9aa0435b930f64ca85f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_slice_test_norm_any_slice.for_firstaxis_in_range_le.for_secondaxis_in_range_l.assert_eq_a_r_d_r_": {"doc_hash": "06fad678b9fbf9ea46cb414f0f9f102f8625b065569b29b824dfa090c8bc3f95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_1dim_test_norm_1dim.assert_eq_a_r_d_r_": {"doc_hash": "74544d4bc5b429c35973ddeec64500eb4fbda8e13fb4bea1e42c1caee3501626"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_2dim_test_norm_2dim.assert_eq_a_r_d_r_": {"doc_hash": "d3d57d0c333e31c410f4313c2a9d526b6f7e02ca1712fae1aa73e431e9bb3f9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_implemented_errors_": {"doc_hash": "f857fffa6c1789929c7b8ca5bef1ea3eae088fb273f46755e2ade295bf1eecea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linearoperator.py_pytest_": {"doc_hash": "6b7106b310e1cd9144312edd753e91afbd2bc28d5c6f427d6993d1d3824a1c93"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_random_test_tokenize_masked_array.None_4": {"doc_hash": "01c2d253b473c28d6c346c63f8f63d75c650b84af9158a79d4714345974c6a6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_from_array_masked_array_test_copy_deepcopy.assert_isinstance_y2_comp": {"doc_hash": "635258393bc186c5f22cb0791ec18ca23ec8758ad1234a2094704303f621894c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_functions_functions._": {"doc_hash": "0092b3f075163c87fb65d30f8beec8b0a7791c7f8630dbc852b8561f3217559b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_basic_test_basic.if_yy_shape_.assert_isinstance_zz_np_": {"doc_hash": "4cd9c9bc8072a0ba3dadb274698bcef8d64e3964c6bcaa100df3fe3044f1f0d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_tensordot_test_tensordot.None_2": {"doc_hash": "873559e2f682789b392baad6418bf3bcc01a5c3a0ab7e4416a549cf6e6fdef27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_check_m": {"doc_hash": "e45df437d3e81feadaca0841231fbc090edaff43a9d8812cb6b5ffd69924dbd5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_check_m": {"doc_hash": "42c4198d4abf8957e1527baa93b2989c0a1f0b64d503d08a2720aed4d7eb38b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_output_type_test_mixed_output_type.assert_isinstance_zz_np_": {"doc_hash": "324064cb8967bce12aabb1ef19888dd7d633adfc49f281583909437f7a764c4b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_creation_functions_test_creation_functions.assert_eq_da_ma_fix_inval": {"doc_hash": "899b75a42ea21e8b945b160057aadaac59b901957f3bf007fa7c4c0b4f7076d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_filled_assert_eq_ma.if_res_is_np_ma_masked_.else_.assert_eq_a_b_equal_nan": {"doc_hash": "f94702fdfef877dbb3519aeb6083f662a050fcc949cd2e927e9954c8e0efe35c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_test_reductions.None_6": {"doc_hash": "c2d168d12d21612bc44e91946239578d858812721de9e861e10b1a8f1e4fc350"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_allmasked_test_reductions_allmasked.assert_eq_ma_dfunc_dx_f": {"doc_hash": "7aa74c6e3663e26fdfb6d5910e2f46c4f0fa4ace2c9cb66d531ee3c363f4031b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_arg_reductions_test_arg_reductions.assert_eq_ma_dfunc_dmx_2": {"doc_hash": "c7db251706be26e9869717ecdbde239c65100b8f16be9a317a4aea3405e4b9e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_cumulative_test_cumulative.for_axis_in_0_1_2_.assert_eq_ma_dmx_cumprod_": {"doc_hash": "a798b75c0557404e4ce4942f6c40743e2dc59d1a6eb0870e05e694f0d2ca160e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_accessors_test_accessors.None_3": {"doc_hash": "7f0e34eab362cfea5c4d56b953708d12f2484b4dfe73f401193c244e53e143b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_masked_array_test_masked_array.with_pytest_raises_np_ma_.da_ma_masked_array_dx_ma": {"doc_hash": "60641999cf87448bb0113bab0cb4a5c823c02df778db4925f8dc347dc95dd8cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_set_fill_value_test_set_fill_value.with_pytest_raises_ValueE.da_ma_set_fill_value_dmx_": {"doc_hash": "378aa1646ab6817390b7ff4e897803ca745c28f45f5ea972dd0b86d207719343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_average_weights_with_masked_array_": {"doc_hash": "229df04d64aac4198e1ff48398b6fee2ad00d730a9146502a800e8d435d9f9e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_pytest_test_slice_dtype.assert_result_expected": {"doc_hash": "b1bf5577a4eaec77aac008c132c0a356bf5776d5b9856ad43dbfc09220a4bf31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_test_min_max_round_funcs_": {"doc_hash": "7439a4f00fc089c9d33c9d8153fd75ed6fa556b7b62604a6442eb03077553c23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_pytest_test_fuse_getitem.for_inp_expected_in_pair.assert_result_y_ex": {"doc_hash": "9e6896e1824e3b7a53b21cc617ce349013ae8304891c2e7d3d8fad8e8c471840"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getitem_lock_test_fuse_getitem_lock.for_inp_expected_in_pair.assert_result_y_ex": {"doc_hash": "6c06fa2e39e710244ac85582d307ac1c50d7ae262b886dc35b688a703bec25fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_with_getitem_fusion_test_optimize_with_getitem_fusion.assert_len_result_len_": {"doc_hash": "8ad1c49fde51b8beb84f53db922dcf8f8c7dce1904d826e647445071a479d843"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_slicing_test_optimize_slicing.None_1": {"doc_hash": "b61c1d631ee355ed4cce0fac0d17d31488d31a2e755b4bc8293b11e63be334a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_test_fuse_slice.None_1.fuse_slice_None_np_array": {"doc_hash": "64914ccc058e57a25dc5e1c310a455a9c514f55f009f3aa65b2ee1d171e1e7e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_with_lists_test_fuse_slice_with_lists.None_6": {"doc_hash": "59ac7f7a5331a8ddee8ffa72ddabdef178d01008d44aacc2d868429c49cc2ae1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_nonfusible_fancy_indexing_test_nonfusible_fancy_indexing.for_a_b_in_cases_.with_pytest_raises_NotImp.fuse_slice_a_b_": {"doc_hash": "79d3e6a5ecfaacad1545e3e00a0da7dfaafb77cb3f93bf2cccf0e8044ac21e0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_hard_fuse_slice_cases_test_dont_fuse_numpy_arrays.for_chunks_in_5_10_.assert_sum_isinstance_v_": {"doc_hash": "a60dbd7839aeb0d0c1c763c4335375f939d06c60f4c9e860f874e57ac71fcdee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_minimize_data_transfer_test_minimize_data_transfer.for_dep_in_deps_.assert_dsk_dep_1_big": {"doc_hash": "16da15053ea426b1eff693d3f6199b283c94ae7b485eaf685411f76b4b73d0ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slices_with_alias_test_fuse_slices_with_alias.assert_dsk2_fused_key_": {"doc_hash": "b87c1f5702d6cf1fe00a2e7c082cee6539b6b1e4464126ed21c6baf4508db8eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_dont_fuse_fancy_indexing_in_getter_nofancy_test_dont_fuse_fancy_indexing_in_getter_nofancy.None_1": {"doc_hash": "3cf9971f95fb73ca6a221f5cfbfd0d1faccb90194ec6213a69f8605f91d88600"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getter_with_asarray_test_fuse_getter_with_asarray.assert_eq_z_x_1_": {"doc_hash": "0b17308e743e932b547ade9ab37fa3ca524db62254c02bbffe3a59e77f3c926b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy.for_orig_final_in_opts_.assert_optimize_slices_": {"doc_hash": "c1fdccbf49405dfeda38fb0f22bce4d008d55bf8a480672e76577d03f6695a0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_turn_off_fusion_test_turn_off_fusion.assert_len_a_len_b_": {"doc_hash": "3219a92b4bcc946e363f8d712a7669b5f1a8d7876abda4517ea7a81acfb7d736"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_gh3937_test_gh3937.y_compute_": {"doc_hash": "29de2d34d19a8bc75e83f0d37aa989c63463e6d267ce3eb78b3acfca7a4def8f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_double_dependencies_": {"doc_hash": "28709ddb069720df992abb3c9f49764861da71f017d0632d691e48ecd02c9e4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_pytest_test_fractional_slice.assert_isinstance_fs_1_1": {"doc_hash": "f597456a73f591e815fe99835dfa25951aae624eb7c671150c0adf067decded5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_test_overlap_internal.assert_same_keys_overlap_": {"doc_hash": "da65f34facc8130e9acefbb0c6a97ae42aeb9365e78f22957e15b25cae80eeb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_test_overlap_internal_asymmetric.assert_same_keys_overlap_": {"doc_hash": "4e9ab70969b790b6ec2c60d7f48e04a8c84a3ecafb44f0359a1def915e8e0452"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_small_test_overlap_internal_asymmetric_small.assert_same_keys_overlap_": {"doc_hash": "ce5d051590780cb1fd8b300ad962d1ae56b8267967d5109d7b611cde52558a96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_": {"doc_hash": "095cf645e32e66b4e407f7774d5a886a69887e81fda9e03af2cc6d759c5fead8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_reflect_test_reflect.None_1": {"doc_hash": "1deab0dcf8adc7ea964319bf210ec0cd68152eab82524ae8c5cf61cde9986bc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_test_nearest.None_1": {"doc_hash": "5989f0b4b73d30b4ac1d05408ebbe3b18eca23684fd113109ace627ea8e037bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_constant_test_constant.assert_eq_e_1_np_on": {"doc_hash": "d92839efee8e7bac502440e73b820e952ff668a570886f4b40ee5699d7c4f220"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_boundaries_test_boundaries.assert_eq_e_expected_": {"doc_hash": "15bb7bd9513cd01da3f71c4abfe5ab6256787fbc9e052ee97f3f5c172a04897c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_test_overlap.assert_same_keys_g_overl": {"doc_hash": "0a32f6223231644378f09cc5a975233f1a8b24d124d3d680d2b3721219381639"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap.g_4_test_overlap.None_2": {"doc_hash": "c1a8899f0c5e1543b5ce7e93c7a418895eb5393d3b90a92c2097c353ce5fb6fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_asymmetric_overlap_boundary_exception_test_map_overlap.assert_eq_": {"doc_hash": "ba4a7393e55b57aef3db33e84b4f3505b39dc92900fd1db72e2671563fcf1176"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_no_depth_test_map_overlap_multiarray._are_not_somehow_shifted": {"doc_hash": "636d67c63057608f5a1a890c18208f0f06d96ebbd5b05e92893d76e8326c0cff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_defaults_test_map_overlap_multiarray_defaults.assert_eq_z_sum_20_": {"doc_hash": "4b79a578e69c20d853e6cf36292c9f349c8ed767c723c0931f36ab0bc08958bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_different_depths_test_map_overlap_multiarray_uneven_numblocks_exception.with_pytest_raises_ValueE.da_map_overlap_lambda_x_": {"doc_hash": "9a3fa3ce57a35f735856f3e86ffc1e1daae73bfda8a8713c6eb637ba5c19ad42"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_block_broadcast_test_map_overlap_multiarray_block_broadcast.assert_eq_z_sum_4_1": {"doc_hash": "7f8da61df26a9c5a08d4b2700f3dcfc77a358c8c77cc1dcbf859f52dd550aa39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_variadic_test_map_overlap_multiarray_variadic.assert_all_x_compute_": {"doc_hash": "692b1e039c32726cc23beb664886fd52e3fca2f896a8c9e5febaa5a4f5948277"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_deprecated_signature_test_map_overlap_deprecated_signature.None_2.assert_y_shape_5_": {"doc_hash": "65159f1862bced86ef6d4bb28baadcd52ef7a15d1f2e43286f83e8bc24d372f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_overlap_test_nearest_overlap.assert_array_almost_equal": {"doc_hash": "9cde8fab4a776eeea57f7c452cb870a1da5e2cdd578a7bddfc1cc38eda017e8a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_0_depth_test_0_depth.None_3": {"doc_hash": "2fcc5bd640ecebdce180e1f43ad5dde186a5e21198f6c62f054dca1593c865ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_some_0_depth_test_some_0_depth.None_3": {"doc_hash": "3a27faa173c097939bbb31feb00c6496028b06ad55d3a7f007a3d06ba1f6cdb2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_one_chunk_along_axis_test_constant_boundaries.assert_b_chunks_darr_c": {"doc_hash": "759045858be2c64cbb65d8060f5cf8da0303bbcc57e06582ec485ad3e878adda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_equals_boundary_length_test_depth_equals_boundary_length.None_3": {"doc_hash": "3ff8209f0c59fc372104052e15ddf5eff159f5fd2cfd888e9595895f910f849c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_greater_than_boundary_length_test_depth_greater_than_boundary_length.None_3": {"doc_hash": "fb6ca1a091fab27a93ed77b80bed5cab4a134ba4ca5495633f677990d5e43778"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_bad_depth_raises_test_none_boundaries.assert_eq_exp_res_": {"doc_hash": "a18755c5c472869980064a6bb17343a4e964da3388fdca886a4283d3c63c7370"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_small_test_no_shared_keys_with_different_depths.da_compute_r_scheduler_": {"doc_hash": "5e9e6cf30c6b16ce2f749130d36d29bcd17eb78d316f2e45ebecd3557b6865a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_small_test_overlap_few_dimensions_small.None_5": {"doc_hash": "6ff6b21940e991bfce337848dc90d96cead39d9c49c2f44cd68d2873fb93d4f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_test_overlap_few_dimensions.assert_len_c_dask_10_": {"doc_hash": "ed4828c3574536268604767cc5feaba57267055e498f4d6d0f2bedf19475d243"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_boundry_": {"doc_hash": "8b280a6d7e5543ed6a0799432e25bb91c18019713175fcec6746a4e336849355"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_pytest_test_percentile.if_method_tdigest_.assert_eq_": {"doc_hash": "b7ff74f651bb236fe1b37dcdb04f4caef64e2f5821f02c41d015e4095e58bb02"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentile_with_categoricals_test_percentile_with_categoricals.assert_same_keys_da_perce": {"doc_hash": "eb2d7918f7601d4de1a34e0ade60ac1d3fe3e46d35e05c5a459bc9fe50b7a805"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentiles_with_empty_arrays_test_percentiles_with_scaler_percentile.assert_eq_da_percentile_d": {"doc_hash": "3f0ab974a0fdb9c90d8533f6ca393cedc773bac1f7a6ebc027db503260d01dbc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_unknown_chunk_sizes_": {"doc_hash": "5e6d390a02dd7cb81b57ba2e69a0cc2cf2c480ffe8d411ce6b26a4b178e572df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_pytest_test_determinisim_through_dask_values.assert_eq_samples_1_samp": {"doc_hash": "aa40f18b7bf15e93422c84c036f03272d07a70747dda736126975a16b7d06e5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_randomstate_consistent_names_test_randomstate_consistent_names.assert_sorted_": {"doc_hash": "eba20ed8c3814a4a49de6a3c0ddd80157fcb1993e908fa74cada5f5dcab32370"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_test_parametrized_random_function.assert_len_y_90": {"doc_hash": "629d14c379335ae79e3b1689484af1bded7dcf088546cff43d967c70b892bb5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_kwargs_test_consistent_across_sizes.assert_eq_x1_x3_": {"doc_hash": "f7a42cd19efb71de758dcf83f2239121394acadd1dc6e4ee81714fc26b9b466b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_all_test_random_all.da_random_standard_t_2_s": {"doc_hash": "0fbb40073ad4864c514dc0f6f3b85814c57955ed8985a0218b90d6a0f0043d8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_array_broadcasting_test_multinomial.for_size_chunks_in_5_.assert_x_shape_y_shape": {"doc_hash": "3fee01c1efd823ce5e4c62782c401c6c851f03ebb80ce13b67e05939ac9d703a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_choice_test_choice.assert_len_res_len_np": {"doc_hash": "e1c9324f5f23655640fc7e00f9060a60888e229804aaf9b36c72bfedb40a813e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_create_with_auto_dimensions_test_permutation.assert_x_shape_100_": {"doc_hash": "8c9d7d3285260b0880cf9eea901268c96fdd2807b1d04ca74a0df10533d9ce27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_external_randomstate_class_test_external_randomstate_class.assert_eq_a_b_": {"doc_hash": "3cd6cb2613138028f21916f404a9a9d5e0210fcea4e6843a8834629d2a72e157"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_auto_chunks_": {"doc_hash": "6ac97d45458a7a46007793182f6e86511fb9528d4d1fa37ea4b670c74aa362da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_from_itertools_import_pro_test_rechunk_internals_1.assert_i1d_1_answer4": {"doc_hash": "8085715d071fb6fea87dfa95fe24d3a30bc98c04b7a35a104d60b7f48075bc3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_1_test_intersect_1.assert_answer_cross": {"doc_hash": "b74959dbe9760b2bd188df55a67834fac24019518df929cd32565f62c8e70894"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_2_test_intersect_2.assert_answer_cross": {"doc_hash": "7aea0facdfa4ff073c947269a2eab21818404767514a526a3699b27cc229c0de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_1d_test_rechunk_2d.assert_np_all_x2_compute_": {"doc_hash": "d9f6dce63b1b531dea2d9d7f17d443c0c6e0483b68ba6c2ead5c31d3aee8039b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_4d_test_rechunk_expand.assert_np_all_y_compute_": {"doc_hash": "5ffcf9448d382f060fcd43087c0207281576dfa57e07ca303ed0f334d1ff55a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_expand2_test_rechunk_expand2.for_off_off2_in_product_.if_a_off_off2_0_.assert_np_all_y_orig_": {"doc_hash": "9794cb4d37d79eed78c0575840f291fce233f74592497426d18e25effa88cc88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_method_test_rechunk_method.assert_np_all_x2_compute_": {"doc_hash": "7073f2da1eb82f55adf6413ddb49f3eb354af2f4f53418967a31531de2497fae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_blockshape_test_dtype.assert_x_rechunk_chunks_": {"doc_hash": "ec57f20a4398da9631c1504e4b1038838b9985490a71ab1c45ad006cffd754b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_dict_test_rechunk_with_dict.assert_y_chunks_24_": {"doc_hash": "aa8f7d876f815fc5ebef489b8cc2fd70bf917a25f1fb26de0b1839b2f97f3b5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_empty_input_test_rechunk_intermediates.assert_len_y_dask_30": {"doc_hash": "f8a5cd6e97f95f10e2d075caebefba8bef8864ff8beb3ca60cf1e5e38644cee7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_divide_to_width_test_divide_to_width.assert_chunks_4_4_2": {"doc_hash": "ca080b1e3e26a0ff34f7eafe8b2c03e83fa12ff2437cf471fb315c74c26a5b43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_merge_to_number__assert_steps.assert_steps_expected": {"doc_hash": "af3f0d61c64499a953c462fe8937ae6fc47566581746a688a65b415bbfbba9a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_test_plan_rechunk.for_i_in_range_len_steps_.assert_len_succ_1_le": {"doc_hash": "6f81e7032cb5875b68538e542c423d4e91eef818a133ba4178f2aabe1d0e89ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_5d_test_plan_rechunk_5d.None_2": {"doc_hash": "19a5b2acd6aef52246eb3bd0919cd71df75ac73abd1a2159308f026f66ceab1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_heterogenous_test_plan_rechunk_heterogenous.None_4": {"doc_hash": "6b1cfdc5d10d9bc35cac2f73bfad92e8015ef277d21c3c20cf9cd1c40ddd9a5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_asymmetric_test_rechunk_warning.assert_not_w": {"doc_hash": "5818cef12ea6c6e99ad2ced8baef2f25afa4ab2adb2e1f9e595c4b54ae793f88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_dont_concatenate_single_chunks_test_dont_concatenate_single_chunks.assert_not_any_": {"doc_hash": "17ed6ad7c51ed4953bc04a61a364392b2066b64978cdb502d183de6cee88fc1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_test_intersect_nan.assert_result_expected": {"doc_hash": "bfdd901e97978864ede2e28092ba81455829776d3c593745a3c3ed45e2ddf8cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_single_test_intersect_nan_single.assert_result_expected": {"doc_hash": "fd62873d939574e887b7da8dbe39ea86fea22506a1519450a8809707e46c0a84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_long_test_intersect_nan_long.assert_result_expected": {"doc_hash": "e9336afdf0993b691bc0b153329f7bddb09c0561abfeefe04d61ac033198d817"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_pandas_test_rechunk_unknown_from_pandas.assert_eq_result_expecte": {"doc_hash": "b2e23227e462271e80f380d077a8bdc4119099115589a536070ceb4f8295fefe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_array_test_rechunk_unknown_from_array.assert_eq_x_result_": {"doc_hash": "b6164b93e8037eeba5a4b136c4c000b026b01bc40ba6b9bbdc3baf35d9c31f3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_test_rechunk_unknown.assert_eq_result_expecte": {"doc_hash": "aac008192767784eb86b4bc0d271a2861779bd250819dd3b5d72052f719b5124"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_explicit_test_rechunk_unknown_raises.with_pytest_raises_ValueE.x_rechunk_None_5_5_5": {"doc_hash": "90f72328a3ed5b7bf44264dd3a85f17705b4541f6b17d5b92298ae5ffecec1f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_single_test_old_to_new.assert_result_expected": {"doc_hash": "11b6dd1c80d345d1f268950077ae915419780f459b71c869be7207a80f34f212"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_large_test_old_to_new_large.assert_result_expected": {"doc_hash": "ea92b62374b6ee8011fc9148798024e246e28acb38cd43e83126a9c8a985621f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_changing_raises_test_old_to_new_known.assert_result_expected": {"doc_hash": "014e5c5b3b966fbad5bd418cf47df1eb4e60583802bf830f6ec540d0bf79c947"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_dim_test_rechunk_avoid_needless_chunking.assert_len_dsk_8_2": {"doc_hash": "b25f43428233af22b397dfbc9ec93f94137ec52dc37f3fe99e16182956dc40e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_1d_test_rechunk_auto_1d.assert_y_chunks_expec": {"doc_hash": "9e97ad4d9ec821262f88f5af6287100c111ccbdded77ad24f6caa07f2dbd2e03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_2d_test_rechunk_auto_2d._limited_by_largest": {"doc_hash": "2d1617605f6476fc707773ec58afb91c69d1eac445cd86279e2144dcc22b8d1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_3d_test_rechunk_auto_3d._even_split": {"doc_hash": "137ae4e03a26298458dea33cd344269afe3ae6314cab631e853dd3bcee0c349c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_image_stack_test_rechunk_auto_image_stack.None_2.assert_z_chunks_1_": {"doc_hash": "0fd0e4290affdd89150eb9c884f8ed5346c366686f7e0cd3303677a6989c4b74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_down_test_rechunk_down.None_2.assert_z_chunks_10_": {"doc_hash": "6e15253e9b98e8b7540d17ea6675a640d9eddff7dd708de14073c4101e249e48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_": {"doc_hash": "6324a4711e1907a87fdaeff11fcb46b241133df043077753555a3a3b9fd6b9e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_from_itertools_import_zip_test_numel.None_1.for_sub_in_itertools_comb.assert_eq_": {"doc_hash": "3d80c195db33d92c991b8f194edaa4ea4385572707d27ef08724cff91c233999"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_1d_test_reduction_1d_test.if_split_every_.assert_eq_": {"doc_hash": "6a42e8e597ed78f33ffc283ef7842861e0eace14187ccdfdc067b22951254a2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_1D_test_reductions_1D.None_15": {"doc_hash": "48aea01596966fb4d3a58536599c07b74184e33921b731e6fbcec94a198a6f24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_2d_test_reduction_2d_test.with_warnings_catch_warni.if_split_every_.None_8": {"doc_hash": "157da34345257a0c92c1093cd0df542cabc99655338ec464e4d1268edbd9a3e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reduction_errors_test_reductions_2D.None_15": {"doc_hash": "831836b73904f5e1a91772392559b4358ab298391a6de62bef43e953b6f957fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_test_arg_reductions.assert_eq_dfunc_a2_0_sp": {"doc_hash": "10e47ce7447e2d8b1c535950e08249c97dbda9979404f99202876a79adee760c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nanarg_reductions_test_nanarg_reductions.None_2.with_pytest_warns_None_.dfunc_a_compute_": {"doc_hash": "fd05faad1341a35d5c41ff4742d08e34d72bdbc3ea2f9ae758e2136456244e8a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_unknown_chunksize_test_arg_reductions_unknown_single_chunksize.None_1": {"doc_hash": "8f2a166bb301ad0e0cbb84e3102545aa5b55f18974d3397eddbae6bc48d92a68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans_test_reductions_2D_nans.None_9.assert_eq_da_nanargmin_a_": {"doc_hash": "5b309a6fb45b5764fd1cb492acb7389d182190ae864addeebf4307501bb6084f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans.None_10_test_reductions_2D_nans.None_12.assert_eq_da_nanargmin_a_": {"doc_hash": "835051b05c9ded4c872d82f262907b37c793a451b5c171173d777d680c16863d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_moment_test_moment.None_7": {"doc_hash": "8fe3d6e73906859b89d9580ab4eb29da978c6c271a7bc39047d8774199103b9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_negative_axes_test_reductions_with_negative_axes.assert_eq_a_sum_axis_0_": {"doc_hash": "30ced6dfd7c65bc02a31e0439d65b7b6af0e57414f42419e21fac324f36a3d25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_test_nan.assert_eq_np_nanprod_x_": {"doc_hash": "1f3939d55824268ab985366c8e8cfd82429623a0532e2d933038c4e526e607ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_object_test_nan_object.with_warnings_catch_warni.None_3": {"doc_hash": "07173c95d165aefbc385969ca308ea10d8f54ef34becf18f1524c80dae408d17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_0d_array_test_reduction_on_scalar.assert_x_x_all_": {"doc_hash": "ff3b34887ec3aad2c1ad361a5de9ea9491c0bf4a0e9c6d536f9e87cbb1839f4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_empty_array_assert_max_deps.if_eq_.else_.assert_max_map_len_depen": {"doc_hash": "99e19b1cc8645162481fe8f1205b6a2a48aafe01723f789f16c3f4c9342b8bca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_depth_test_tree_reduce_depth.None_26": {"doc_hash": "8ef0527b00790c4c58b8f99fd56619220f2774d11b695a7ef522782ef5390121"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_set_options_test_array_reduction_out.assert_eq_x_func_np_ones": {"doc_hash": "68f44ef6e6f282e638f882a483b87a46029e63c67cf908af1d8cd393fa2bcd9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_array_cumreduction_axis_test_array_cumreduction_out.assert_eq_x_func_np_ones": {"doc_hash": "0be8dfa392450afaadab89a339a6b31ec31e54df1d302437340a6ec1b369d3e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk1_test_topk_argtopk1.None_1.daskfunc_b_k_axis_3_s": {"doc_hash": "1fbf579c889ce86e0bc4e8a39967b00b770e744cc5f3a40d767d96b852b9c85b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk2_test_topk_argtopk2.None_1": {"doc_hash": "9c87f5102d38d5aa13881ccb6b069ed7d14d5b8f896502e3aea59092948bce83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk3_test_topk_argtopk3.assert_eq_": {"doc_hash": "f2f88084139648e21b78a5c9592b1c7a7bc08ef757dab22ef6d9a9a3a291e1a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_regres_3940_test_regres_3940.if_func_not_in_da_cumsum.None_1": {"doc_hash": "3328e6fdcfa2f6a4599e290822f67d51e24b5b9eb833d7d7d50aea864a7705c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_trace_test_trace.None_13": {"doc_hash": "99e2c39bc9c0dccb09e79af22390621fc071d8a3dd1e0d342c566af9e0aa0d7e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_median_": {"doc_hash": "cc105ed6f5db2cca5b2d80c8dfc77c661f3c7bc6e6a2ae21115249502798ad91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_pytest_test_reshape_rechunk.assert_np_prod_list_map_l": {"doc_hash": "0b61d6d8e5c5f7099079989f3025217a00a4b70d74f3575242d9a4540ae4ccee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_expand_tuple_test_expand_tuple.assert_expand_tuple_7_4": {"doc_hash": "ba0c55faf016f38ba39d407876842a8e398d48581d1cdc6725b0fc9c323d483e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_contract_tuple_test_contract_tuple.None_3": {"doc_hash": "e8e6eec6fa53b866b400d0fc13951161da8076b90593e14f28af7d784537fd5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_reshape_unknown_sizes_": {"doc_hash": "2cc45ef107777dd432f297009f61f4d1db2025443c3b4ae7af12c222398d3298"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_itertools_test_array.assert_isinstance_y_da_A": {"doc_hash": "616fb1cf9aed4ee4df493d745c2a0afc6841b5d3e7352e79eac4c70c93db33b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_array_return_type_test_atleast_nd_no_args.assert_np_r_n_da_r_n": {"doc_hash": "f5302e12e56eac249da0b750a7ced31ee03361268135afc3c4adf081f70e418d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_one_arg_test_atleast_nd_one_arg.assert_eq_np_r_da_r_": {"doc_hash": "f95a7b42534189df7313d292c303cacb8d6789a89f071090cc29225ede4d7d16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_two_args_test_atleast_nd_two_args.for_np_r_da_r_in_zip_np_.assert_eq_np_r_da_r_": {"doc_hash": "94b1b17e2d80d5880f7472ba65e443d77010163bbba680f1f091d1039313396f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_test_transpose.None_1.d_transpose_1_2_": {"doc_hash": "2cdec967647dd6c8df9d68c1502a0fbb04ae6f6f15a6426b0c570c9aa8be9dcb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_negative_axes_test_transpose_skip_when_possible.assert_x_transpose_3_": {"doc_hash": "b6489591e974a6d6626b7e312504161483c3db07ba491905601b12a0d70aae01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_swapaxes_test_swapaxes.None_1": {"doc_hash": "4f4f900a3d54a7a59de1b4a408b7bc9c6456b294f8dfd5b59d4596eba53db7ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_test_moveaxis_rollaxis.for_axis1_in_range_x_ndi.for_axis2_in_range_x_ndi.assert_eq_np_func_x_axis": {"doc_hash": "14ec6df936e4e0b57c264c8f2d46fc131af111473d416441e84a2b9248da808e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_keyword_test_moveaxis_rollaxis_numpy_api.assert_eq_result_np_roll": {"doc_hash": "44586488d36359f7d7c071c198a49ed83a1947303555111608b6dd35efd35972"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_flip_test_flip.try_.else_.assert_eq_np_r_da_r_": {"doc_hash": "d89ad089505209d6487a5f44465e7bb347de8070f5733e0af2074a8fc5762a42"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_matmul_test_matmul.for_d1_d2_in_itertools_p.if_x_ndim_0_or_y_ndim_.else_.assert_eq_expected_da_ma": {"doc_hash": "a1d43a97bddcc5eb6c213555e460d4589a18336098ca44c1688a6e038db4bf04"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_test_tensordot.with_pytest_warns_da_Perf.assert_not_same_keys_da_t": {"doc_hash": "b84cc15f622d7b6e45b7d967f3fafb1c53466ff667e47c56ebef4dd020f0f33f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_2_test_tensordot_2.assert_eq_da_tensordot_y_": {"doc_hash": "6660beabe967e580a1e09452348173eee95ba389b3272b9ec20d2d45fac9c8f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_neq2_test_tensordot_double_contraction_neq2.assert_eq_da_tensordot_y_": {"doc_hash": "0fa656ccef42f00e30e296a36c58fff56f0688bdcecd51d696e7deb236e03f17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_ngt2_test_tensordot_double_contraction_ngt2.None_1": {"doc_hash": "21bddf8f96cc1feb7fe2496edbd22f27bfc4c92d17f490621b3206aae0775505"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_more_than_26_dims_test_dot_method.assert_eq_a_dot_b_x_dot": {"doc_hash": "bdeba4cf07a62a4c7fa52e9ce9ceced0653bcfad40e147485a73d9002a2d88c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vdot_test_vdot.assert_eq_da_vdot_a_b_": {"doc_hash": "fda3815d5e4300597812014708c76ee5499ae60d4201feaee3df3552c759f0c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_outer_test_outer.assert_eq_np_outer_y_x_": {"doc_hash": "c00a44bd5ec3adb61e3af521bed02c37dc4f4791e0f1b96420bf001ba35eb212"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_along_axis_test_apply_along_axis.assert_eq_": {"doc_hash": "6e623970cf5af48b458379f2781464879af45a7c7875a1ab1f12631100f8d466"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_over_axes_test_apply_over_axes.assert_eq_da_apply_over_a": {"doc_hash": "2c778889886b66f0bcbb8eb55c79ab05ec356c2cf93177808a5b71643876b5f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ptp_test_ptp.assert_eq_da_ptp_d_axis_": {"doc_hash": "338c8c04f811b4a8cff7a31eb2457f6093cf5da91be4bc21ee172228735aec14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_diff_test_diff.assert_eq_da_diff_a_n_a": {"doc_hash": "cc63cb213b2e5192966e77c364db82265230830373d3cc28f195125d1fc24b5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ediff1d_test_ediff1d.assert_eq_da_ediff1d_a_t": {"doc_hash": "ac44ba9ba88e99460eb8dbc581dc6bbde2fff25a441f84dccae75f9e6b51bb80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_gradient_test_gradient.if_isinstance_axis_Numbe.else_.assert_eq_": {"doc_hash": "8ad980f388adfa1a6c3fa1a955e8d96529b53998283e14dcf371d8c98af7ebda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_test_bincount.None_2": {"doc_hash": "394cf217d5b7b9cbc635b51c5cce01467a61eda02bb1a05653692eeec744fcb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_with_weights_test_bincount_unspecified_minlength._shape_is_nan_so_must": {"doc_hash": "706be33ff612774e9ed5e2ac62aa58f8a06a23ee67525a15c5e7376ed78b32e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_digitize_test_digitize.for_chunks_in_10_10_.for_right_in_False_True.assert_eq_": {"doc_hash": "b5abaa280b7230d3c1291edeecaaa881237021e9e11f34e17133646914954a9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_test_histogram.assert_same_keys_da_histo": {"doc_hash": "5b0328ced166d9cba88ba95c8d7622c001f75fa76e1f880065064088f54e78ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_alternative_bins_range_test_histogram_return_type.assert_eq_da_histogram_v_": {"doc_hash": "f5efa11d90de239f24b3eabe8a229626315765c9be908b606e6558ea7c7df851"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_extra_args_and_shapes_test_histogram_extra_args_and_shapes.for_v_bins_w_in_data_.None_2": {"doc_hash": "e1832d0b0da34e81a9f2dfad780e2a6ed3357225f439c84323e9a88c34c00494"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_normed_deprecation_test_histogram_bin_range_raises.assert_bins_in_err_msg_": {"doc_hash": "0810e66728741354b844f282d672123160b6f1b382693ee3986dbc48ea721110"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_range_test_histogram_delayed_range.assert_eq_bins_d_bins_": {"doc_hash": "f92ca49ef74b800bc7640f73d58e87ffb45e3bf5cae6c76b8196b9d930642698"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_bins_test_histogram_delayed_bins.assert_eq_bins_d2_bins_": {"doc_hash": "88c825da014b81040710509a864f2d3a50a99050146bc1cc7980fc12186a05b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_n_bins_raises_with_density_test_cov.with_pytest_raises_ValueE.da_cov_d_ddof_1_5_": {"doc_hash": "bba6e8c785c385cd78d02a3b239ea1b191ba94bd33d33dabc42174a050671f4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_corrcoef_test_round.assert_eq_d_round_2_da_": {"doc_hash": "c245c313fcd1f6d0135c194cf3eb4d3e25741ae19642d6edc028c038638998c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_kwargs_test_unique_kwargs.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_": {"doc_hash": "2e99360f19aa61e17638fdae111e799e2dd5fa4c589292551b8e3a3d7ac30715"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_rand_test_unique_rand.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_": {"doc_hash": "b8375a0258c7e5cc2f30d568b3bb7af060f33f38dea1ced6b063602b65331032"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_rand_test_isin_rand.assert_eq_r_a_r_d_": {"doc_hash": "044a03e83b4774c4adcd4d86a15075d96116635b515fb5273e5941c01577454f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_assume_unique__maybe_len.try_.except_TypeError_.return.0": {"doc_hash": "8d8180dea55f0b804536c55434e52c47ebf37e18f3543930684f5f4ff88ebc64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_roll_test_shape.assert_np_shape_x_sha": {"doc_hash": "b153aa7e01fb2e770fea1bf75dacb27c24891057d35d530986f483deb822b784"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_union1d_test_union1d.assert_eq_result_expecte": {"doc_hash": "0d20b2e4de9e94385bb8876e3b6cf77c78c1107d69139d914718f880e1bdd308"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ravel_test_ravel_1D_no_op.assert_eq_dx_dx_2_rave": {"doc_hash": "a961c75b470f7652f087142deba63fd5589af5200645342822215cd0097bebfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_squeeze_test_squeeze.assert_d_s_chunks_exp_": {"doc_hash": "3e0643927c7ef95f915ce03bb3a7decc0b21863e4666ae58a9bdda8ea501acfb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vstack_test_hstack.assert_eq_np_hstack_x_y": {"doc_hash": "df334cad7986502494c75501f7247ef7677d8bc70e10a09113ef04b0ac8d939e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_dstack_test_dstack.assert_eq_np_dstack_x_y": {"doc_hash": "39d35a5d277efba219f80299a3e62c3fc195597ede553e5112d93ee205308534"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_stack_unknown_chunk_sizes_test_stack_unknown_chunk_sizes.assert_eq_np_stacked_dsk": {"doc_hash": "28be35f76de26c6ccae181fd62e44b4007a8511b6b69cb35c1636e98c61f93b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_test_take.assert_same_keys_da_take_": {"doc_hash": "2da290f9036e73c20a023451be41d8a5fcd7908fe11dd0b7b54225b960c0b8a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_dask_from_numpy_test_take_dask_from_numpy.assert_eq_z_np_array_2_": {"doc_hash": "89e522d72d4dc63d5f6641e803e46c8bb81ec2e18ea196212d946405cbe2bbcd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_compress_test_compress.None_2.da_compress_True_Fal": {"doc_hash": "99c2aa5fbe2c25e75c9a3ff87efca6a84aa5750e37f0578bd94fd1c7632a7115"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_extract_test_extract.for_c_dc_in_c1_c1_.if_isinstance_dc_da_Arra.assert_np_isnan_res_chunk": {"doc_hash": "4acaa4dacbff074ad0485879eff1b7b69cab4dfdfdc64c53ce801bd436913f8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isnull_test_isclose.assert_eq_da_isclose_a_b": {"doc_hash": "f01b63841214e8cd2d3f6359f46ee8188579931df57f5d96291809087f548092"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_allclose_test_allclose.assert_eq_np_array_n_r_": {"doc_hash": "78b94c0d16a58ba90dda863c4fbb1511a05b70175e5a33e2ced2c0f8078260a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_choose_test_choose.None_3": {"doc_hash": "137f4f9aea513c0369c5702947b5636747464a071d1f5c65a344021869115d7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_test_piecewise.assert_eq_": {"doc_hash": "a528dd24f0281743d6178294708e100f05e4c39fbe61b720308fdd89436802f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_otherwise_test_piecewise_otherwise.assert_eq_": {"doc_hash": "9b4f78b81259d861bd4a8faa16b7a53db9102f2347a3ad37fccf3a0604a31275"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_argwhere_test_argwhere_str.assert_eq_d_nz_x_nz_": {"doc_hash": "b2d0ffd7040dd9047c73d3afd94a227d088117bbf42377ebaf2be470ff5b0c37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_test_where.for_c1_c2_in_.for_b1_b2_in_0_0_.assert_eq_w1_w2_": {"doc_hash": "5a2303828733af5c3dde03344987a1af3b7971abbad2c5811bd8f702d8e1a420"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_scalar_dtype_test_where_scalar_dtype.assert_eq_w3_w4_": {"doc_hash": "6e0132e1b2e3d686dd207a4cb10a439c0e7210ae2941f97f8787b24dbeaf9b00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_bool_optimization_test_where_bool_optimization.for_c_in_True_False_np.assert_w1_is_ex_w1": {"doc_hash": "0a356516c0047e9e322f4d4969e659bd013524c5e0868de92dd3747a1315fc64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_nonzero_test_where_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_w_.assert_eq_d_w_i_x_w_i_": {"doc_hash": "ea3083acc2ed229dd8d635c5f2d682bd62c2e9b39702e16086b639d3d2ccc882"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_incorrect_args_test_count_nonzero.for_shape_chunks_in_0_.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_": {"doc_hash": "19331d3752b316f71d3e26f18167417b16f1e72eda15bb89e604418425042c6a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_axis_test_count_nonzero_obj.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_": {"doc_hash": "5d956f167ebf2335d01fe1ae718fcfb175c643bf7854a494ed3c35b9d1726ca1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_obj_axis_test_count_nonzero_obj_axis.if_d_c_shape_tuple_.else_.assert_eq_x_c_astype_np_i": {"doc_hash": "98649f8c480c4f4fa585d1ad391a99c6cf17dadb18dc86cab795c7dd963cc283"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_str_test_flatnonzero.for_shape_chunks_in_0_.assert_eq_d_fnz_x_fnz_": {"doc_hash": "9d25753dd800f8c85963f44a167ad88eed0f33bc99b963d3484fb524260d3f5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_test_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i": {"doc_hash": "e08068857f7bbb40aa7bc5343f6adf681155a61da5b62aeb4223d39043046fca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_method_test_nonzero_method.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i": {"doc_hash": "bbf2954f2d20a0249e757ea43d56d512e0c5ef1a305e49ddbb2f5a18c3b3fe9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_empty_test_unravel_index_empty.assert_len_d_indices_": {"doc_hash": "fb9a99bfe6a7759df28b478f9ddc92ce36f1c07074a160ca953e9215f1fe4081"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_test_unravel_index.for_nindices_shape_orde.assert_eq_darr_vindex_d_i": {"doc_hash": "8233fd5c265acbd762db5b13d5f3a6366f9cb52333502a14e2eb42969e0f62de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_test_coarsen.None_2": {"doc_hash": "d3ed8a61d8121c07616d9a001a6b76c6e11459fe4e7b53494abbd1aec17f5c8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_with_excess_test_coarsen_bad_chunks.assert_eq_da_coarsen_np_s": {"doc_hash": "74d8e3fcdc445cec849efda42d8285409e64542489994df5aa16e811a7d6a4c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_aligned_coarsen_chunks_test_aligned_coarsen_chunks.assert_acc_10_20_30_4": {"doc_hash": "cfb4de70f4418f955d018d9d12326c8cf83765f2f6a174cbbcc11785b25df8eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_insert_test_insert.None_2.da_insert_a_3_1_axi": {"doc_hash": "1a698126794d2387af83f793e3a0a0ee145068dca039bcf24b5a4413fbadec4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_multi_insert_test_result_type.None_10": {"doc_hash": "a211e59edc332a2df6d2c2d0e1bedb538af9a76a8bbe9113b1257cc9f262f579"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py__numpy_and_dask_inputs__numpy_and_dask_inputs.return.np_inputs_da_inputs": {"doc_hash": "9e33dc7ee545e061e0684c6c62759e6b460f975c34edc58b79b1071e8a85a2cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_test_einsum.with_pytest_warns_None_.assert_eq_": {"doc_hash": "5719a6ac53536af95d4130a3457d66d01b1693a4f0e0bb1959a75e9549b49dfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_optimize_test_einsum_optimize.None_1": {"doc_hash": "3a85d5a307f734e56c7a9b17252a19382ba5266fec79cf8287cc1524803145c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_order_test_einsum_order.assert_eq_": {"doc_hash": "69444844d10697a61e69d73378169b9a79538a5885eb3257b5bdebd9266ead50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_casting_test_einsum_casting.assert_eq_": {"doc_hash": "546464071d8fd1bcc99bde4af639f70c78d37018c5914854d876e5045e2dd1a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_split_every_test_einsum_invalid_args.with_pytest_raises_TypeEr.da_einsum_a_da_inputs": {"doc_hash": "317e53317b1e0792b5df2338fe086f832f53549c25244ee0e3d9a663cfa1c0e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction_test_einsum_broadcasting_contraction.assert_eq_np_res_mul_res": {"doc_hash": "dd5064baa72948dd4d899873b330a8c7ba1ef65a1eaad53cd187e8209a7d8764"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction2_test_einsum_broadcasting_contraction2.assert_eq_np_res_mul_res": {"doc_hash": "c73352a71c6a5be85b9a2c3386adc26c75f4a9c441a7bdfe41a094710cf50774"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction3_test_einsum_broadcasting_contraction3.assert_eq_np_res_da_res_": {"doc_hash": "dc919cb7146c625adfe31a412293242949d28a184bcb2ad98416a4f02cb173ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_average_": {"doc_hash": "cb89393276db49888874921c3a5516ee3fce1d7d4342ff51fe4f0fee2f1c23aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_itertools_from_dask_array_utils_imp": {"doc_hash": "1fb97b21159630c6c6f645bbb30d3ab61fb51163cf1aded3fda25d1500a8ab98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d_test_slice_1d._x_1_8_1_": {"doc_hash": "45a736b2c46ae225cf43794670689eeba83f0eac3685b0fff91bd20e16dba31c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d.expected_14_test_slice_1d.None_14": {"doc_hash": "67ed2e3a4defa877b60c73ba423b3d33a42fef8b2b737806dcfab57803cd2c9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_singleton_value_on_boundary_test_slice_array_1d.None_7": {"doc_hash": "b36723ac891eba7cd18d1dae465d7b71a5c3db7f9c582cbaae3095b1a33fd2ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_array_2d_test_slice_array_2d.None_3": {"doc_hash": "1f42c329b15f4763f7d44756fd9949ae3c2b3190cd39876e68bf26b9498845c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_optimizations_test_slicing_with_singleton_indices.assert_expected_result": {"doc_hash": "8497d4bda28609ba854263cdab1c558dfe27016904b9f93d7915139baf8fe3a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_newaxis_test_slicing_with_newaxis.assert_chunks_3_": {"doc_hash": "87f02a3f365f68f5bfb98304a23a7403b6865b042ace131bb5c89661a3091f7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_test_take.None_3": {"doc_hash": "92464a2a2d770dfe0fa1db1e7ba2ebe9a5660e8a60a7881e6e27734aeddf6c34"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_sorted_test_take_sorted.assert_chunks_20_20": {"doc_hash": "4e9b656cc2f0a5a541bf9e9dc4aba81fbeff236a20b27a4db8c5d61495e2e9cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_chunks_test_slicing_chunks.None_5": {"doc_hash": "d0bb37589cb916c765fc5c0550149476c52e1a9ee772c98f874fd6e600300776"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_numpy_arrays_test_slicing_with_numpy_arrays.None_1": {"doc_hash": "7d2bd780b5a0918472a724bb92a954f995152cd3346d44e8a63af22038562edf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_and_chunks_test_slicing_identities.None_9": {"doc_hash": "b23f2b5926a33b154cac8789b23242099e2dcb1d92622482aa04f6a8f03f7ded"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_stop_0_ReturnItem.__getitem__.return.key": {"doc_hash": "df22706e09e578ecd7fdc0621cc214e65654e3748f6ac0ee2df8b35e43e10015"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_exhaustively_test_slicing_exhaustively.for_i_in_first_indexers_.for_j_in_second_indexers_.assert_eq_x_i_j_a_i_j": {"doc_hash": "f700ce9e07447c16ad6c8a3e228f18e6c346a932f785cb7bdfa483196596092d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_negative_step_flops_keys_test_slicing_with_negative_step_flops_keys.assert_y_dask_y_name_1_": {"doc_hash": "d08c1521e0696f82a477d8a50175a1d4d5f82f8c3244d1f4b9a532821a338ea3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_slice_test_multiple_list_slicing.assert_eq_x_0_1_2_": {"doc_hash": "4c13dfb3be0d85a2c6a85d388bc0f4ca21158f1a3d23dea4c21c86fd0e521889"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_list_slicing_test_boolean_list_slicing.assert_eq_da_asarray_0_": {"doc_hash": "22ff62d496f627bf064192d671a5661be595dddbc96f11a3bf6b66e850ae51ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_numpy_array_slicing_test_boolean_numpy_array_slicing.assert_eq_da_asarray_0_": {"doc_hash": "5e9fbdc6e9d41a9b2e5a961c84bf12b2f5ecea53c905f27bf5275e1a0e501fbd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_list_test_new_blockdim.assert_new_blockdim_20_": {"doc_hash": "c1b86da6d3464590a055fccb45f231a127503194572caaa0a1a7095a089e1f87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_test_slicing_consistent_names.assert_same_keys_a_0_1_": {"doc_hash": "e2829a9fb32be077dff88bf5b94cc5bb6b57143327ae3adca5fa5ede5d933932"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_after_normalization_test_sanitize_index.None_1": {"doc_hash": "d0a3da9596337f496160a32bf5751584201cdf7d9769ac2f13c75737241fa4ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_uneven_blockdims_test_uneven_blockdims.None_5": {"doc_hash": "6924c971f3bf2cdfa5bbcaa50bb4f51417c804e437dc1b512f51051a3ca34411"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_oob_check_test_index_with_int_dask_array.assert_eq_x_T_idx_ex": {"doc_hash": "6d1dd22c78b51c5880aa0312561fd7912e60eae4dc7c37afe9b041966faead14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_0d_test_index_with_int_dask_array_0d.assert_eq_x_idx0_x_": {"doc_hash": "aef3d7ac7ebc06135b9e51f7f973e7284112cb512b775dc0c608d2c9257c3fe0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_nanchunks_test_index_with_int_dask_array_nanchunks.None_1": {"doc_hash": "5ef2206c2cdb7e71a96276bedcbd5e43adcda127c4feb2cf1deb34c4e65c8941"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_negindex_test_index_with_int_dask_array_indexerror.None_1.a_idx_compute_": {"doc_hash": "eda17cbdca5f0abb9d7d5b8e834265fe85d2acecdd907dece0a5bfb47c7e92b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_dtypes_test_index_with_int_dask_array_nocompute.with_pytest_raises_NotImp.result_compute_": {"doc_hash": "4ec82051f66a340d048935620178ba07fa56ba91a4433a672f57f01d5ec09dcf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_test_index_with_bool_dask_array.for_index_in_ind_slice.assert_eq_x_x_index_d_i": {"doc_hash": "1d07550f8f08710fa7eebc544831e178e713a74c7b78cdbe01c27d2cfa689ec3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_2_test_index_with_bool_dask_array_2.for_i_in_range_x_ndim_.assert_eq_x_tuple_index3_": {"doc_hash": "fb234bca913a67deebe84b10a15147312ac454d73c0cf8979c12038df2c2d7b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cull_test_negative_list_slicing.assert_eq_dx_4_1_x_": {"doc_hash": "ac1083a6624a4a083048483ac89117878c4a05709a9574e3a1644a6e0f5133a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_permit_oob_slices_test_take_semi_sorted.assert_y_chunks_5_5": {"doc_hash": "a97f7963782db12ca2f458f287f56b07ba14c747e0abd8e6e2e2f5a8b79eec45"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_plan_test_slicing_plan.for_i_x_j_y_in_zip.assert_x_y_all_": {"doc_hash": "6a348f56062ccdfe6e14397cd23c1cd1a8e86c425328703ff3bad1857c657902"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_test_getitem_avoids_large_chunks.assert_eq_result_expecte": {"doc_hash": "d8db8226f8f2cf3fc818ca609a51daf917090d6038e6d30bf401dedbf74b1fcc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_missing_test_getitem_avoids_large_chunks_missing.assert_eq_result_expecte": {"doc_hash": "9ced50e95d17cdfe0847cdd20c24746544d639ce2b3167c762b616964e0d8d7a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_avoids_large_chunks_test_take_avoids_large_chunks.None_11": {"doc_hash": "7e5eb3d047c7f3ee39086d3e074bdb3a6baecc566a6e43562e7f6a4b79ec8181"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_uses_config_test_take_uses_config.assert_len_dsk_4": {"doc_hash": "b7565547f15bc5373dbc523173f469784c29f4c466652bbb21698fc9b85300ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_pathological_unsorted_slicing_test_pathological_unsorted_slicing.assert_out_of_order_in_": {"doc_hash": "a25d67987892dd4fd8ad863ba14ad92aee85e6250b5683167baab63e4fbacfbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cached_cumsum_test_cached_cumsum_non_tuple.None_2": {"doc_hash": "29bf8318bec9be22e53e428cc9f34a970e62a0c23dcff6a02a7907728be21182"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_setitem_with_different_chunks_preserves_shape_test_setitem_with_different_chunks_preserves_shape.assert_x_shape_result_": {"doc_hash": "4de263d043a46efc2cfba63a31a9909311a98741ece8a59a2e0d91e1a18a60d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh3579_test_make_blockwise_sorted_slice.None_1": {"doc_hash": "6f0048cf89634cb33210a910663d735762b651496cc9cf3784bf2aa35da52fe6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_shuffle_slice_test_shuffle_slice.assert_eq_a_b_": {"doc_hash": "783e704f13d6f3a7f9c2a9dcf4fa1aecfcb073fe93035f9bf4df7f114bbd617d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh4043_": {"doc_hash": "8584c5b2b279eb8d8f9c437780681ef24fc2a4ba669304e504009e363137995f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_random_numpy_120_xfail.pytest_mark_xfail_": {"doc_hash": "262305eb8d4439fb9584757977a722d4b3309ec98d910395e620f1b646c642fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_functions_functions._": {"doc_hash": "032ee98bf6b62285eb470188b41ce2b2ed1bd7eefb5e16427563961f9800e922"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_basic_test_basic.if_yy_shape_.if_not_isinstance_zz_spa._mostly_dense": {"doc_hash": "5a1de8edeee909930af8ac3909746b84b49f3ccfd7b8af527be28820f21525d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_tensordot_test_tensordot.assert_eq_": {"doc_hash": "116a7f181abebf92b965fe38346cb97d7e8d86b3322bf927f9f9dacf1e1acc52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_": {"doc_hash": "95a74bbda6223e3d0da2d7403a22dc12c576a796376b0b4cde9ca480e9c75330"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_": {"doc_hash": "609129fca2e07f0f70da65dec3b1224c232553e4d08b9097ac6213a3eff8e8bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_output_type_test_mixed_output_type.assert_zz_nnz_y_comput": {"doc_hash": "8daffa956ea43fb8e11efcfdaa1c1deab53bc6af7e7d4336fff9816c9d3837b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_metadata_test_metadata.if_IS_NEP18_ACTIVE_.if__numpy_117_.assert_isinstance_np_conc": {"doc_hash": "1d0179fb3fe285c273a4e5134bd37ab99130ef7470883f38516a044e0e060212"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_html_repr_": {"doc_hash": "6abd0248081c37b85688a947814dff28de9d8dc64b6311aa56a372b081c957aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_pytest_test_measures.assert_isinstance_result_": {"doc_hash": "32cc2582c7c22ffcbfc32c309a05ea09d40c86daac4baf6498d0073bf6a661ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_bias_raises_test_one.assert_allclose_result_co": {"doc_hash": "44d23cf1e5937ae824ed95baf39179a4c85f3ac790088bd630f3b547f2a0c161"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_two_test_two._assert_dask_compute_re": {"doc_hash": "6f1e4e6e3bb7c5dee41514f499c4c8fba52ceaa842bab6b0ef4ef69631353a11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_moments_test_anova.assert_allclose_result_co": {"doc_hash": "f8d134c7f99354c7824f6fb6cf11d1c20ee4f7d4e80051ff38a880c9cf3f897f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_nan_raises_": {"doc_hash": "e6a245ef3b6c8674f7d8a11aaf64d05110881bb2034a6a51770aa1fc2a64a209"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_da_test_basic.None_6": {"doc_hash": "7d5768328ce2af41309b103faf19574a47dd4e04d786176c2cc4e3a8c5a8e19f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_test_errors.assert_unknown_chunk_siz": {"doc_hash": "a695830fd68d8ae7a03a27bc436c1753987c71b66c1dcd8c46cca4fddd9a5b79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_size_units_test_repr_html_size_units.parses_x__repr_html__": {"doc_hash": "10fe4c5b65f960c073a0cb0704d144d42e351979870aa40c2f1eaf2443d7abf6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_draw_sizes_": {"doc_hash": "388033369c0e6b1cd4748d81ff85b85b0ead6030b34ad0ec2320bf84ede159ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_testing.py_sys_": {"doc_hash": "a416f860d0810cba30cb0c86f627fc38c169b5a07eda28f0f594e6f12a0107ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_pickle_unary_ufuncs._": {"doc_hash": "c50b79d6a3f03cb202970d6c717c9f73f79697b7f236458661a28627332b436d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_unary_ufunc_test_unary_ufunc.None_3.assert_eq_dafunc_arr_np": {"doc_hash": "b568dfb5dcc020bdb9cb43f941e21bd51e49d815df047890e41ed915328cbd21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_binary_ufunc_test_binary_ufunc.None_1.assert_eq_dafunc_10_arr1": {"doc_hash": "855afdfe1c6d6a24d643172abeffb0e993a177c8e5326160fb83e9971a9d6743"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_ufunc_outer_test_ufunc_outer.None_2.da_sin_outer_darr1_darr2": {"doc_hash": "c22a1b226ecbdc561ea4d4965f5f286b13a65da0c3147ba9247f11e6ae9e1b0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_complex_test_complex.for_darr_arr_in_dacomp.assert_eq_dafunc_arr_np": {"doc_hash": "1fe36a3324aad8d712d949516394eff07c19d02977e5d12249d81fd9221c4b49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_ufunc_2results_test_ufunc_2results.None_5": {"doc_hash": "7c36488e259cea07d004831eef07db610f5364e4f1dd5fdd26989e2e13c324bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_clip_test_clip.assert_eq_x_clip_min_1_m": {"doc_hash": "a0bb9c17818baffbcac50efad2e96cdb352bb7d351c8c1f5cf93c808b879268f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_angle_test_angle.assert_eq_da_angle_comp_": {"doc_hash": "f7c68ca77b74e31b6ef0ad433d78725ec0917b90f894c6d2916baa1bed8b2ff7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_issignedinf_test_non_ufunc_others.assert_eq_dafunc_darr_n": {"doc_hash": "ccd37c2060d40efb00baad0f5a38731a9a878c5c1866af3b1f7ee7a8307d40e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_frompyfunc_test_frompyfunc.with_pytest_raises_NotImp.da_frompyfunc_lambda_x_y": {"doc_hash": "064ece928acf5c50fd25a5cf4e6ca7a9785cf1899b12c25a483b1a3143d63ae1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_frompyfunc_wrapper_test_frompyfunc_wrapper.assert_tokenize_da_frompy": {"doc_hash": "e6e7769a21c1543c51072a63eb80f8e618448689dcf1f44f60d490151f893ad6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_array_ufunc_test_out_shape_mismatch.with_pytest_raises_ValueE.assert_np_log_x_out_y_": {"doc_hash": "bfe146f8fc229e85fe339828ee3ddad4089311e584b4fe9376696312a5482c9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_ufunc.py_test_divmod_": {"doc_hash": "2f457847ab2f49ecfa28e537c2e41e1a38637796bf4efe8f73e4c394d43954f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_wrap.py_pytest_test_can_make_really_big_array_of_ones.ones_shape_1000000_1000": {"doc_hash": "36fb0345b73abec493d5f70ab9a6ae18e4786cd7684bc22ca421eb372f913fec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_wrap.py_test_wrap_consistent_names_": {"doc_hash": "df994849e8dcfbccf94fc5fa8c114e311f0e531973f4be04f32fa0235a6c8a7b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_xarray.py_pytest_": {"doc_hash": "9a08f8f36d4ed402bfc5c30d2ad79af836ecb26aaee3aaabd04a18ecabb39998"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tiledb_io.py_core_from_tiledb.return.core_from_array_tdb_chun": {"doc_hash": "0889f8cc3db4d8455178d9997b3063497dd93a0875bfaa75a1002dae1953d28d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tiledb_io.py_to_tiledb_": {"doc_hash": "c4d37af360240ecfb4506f203a001d68dc42262bafe81f9563bc4c4a772a3cef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_from_operator_import_geti___array_wrap__.return.x___array_wrap___numpy_uf": {"doc_hash": "f1e4a9cd37367b2c20b14d4be29f0f5ef50b9ab2adeb8fe77f0796662eae9012"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_wrap_elemwise_wrap_elemwise.return.derived_from_source_wrap": {"doc_hash": "ed19864579ec0b8a9b67f569287131c8cbed810177c918bcdd5a6b3caa733510"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_da_frompyfunc_da_frompyfunc.__dir__.return.list_o_": {"doc_hash": "521c1fc271f1aae1bf2123ed64e2ce5718a93db744203e9e7b0f953dcde6209b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_frompyfunc_ufunc.__repr__.return.repr_self__ufunc_": {"doc_hash": "7e8dbe4e0911f084e2980bc0fd6bccb53306709808735105c4a22790822f6d39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_ufunc.__call___ufunc.__call__.if_len_dsks_0_.else_.return.self__ufunc_args_kwar": {"doc_hash": "52ea435fc3d679f7e9519f9d1c2520da8fb916ea831fe0d62c038fab6eefdf89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_ufunc.outer_ufunc.outer.return.blockwise_": {"doc_hash": "87d67491fc93a5456eadf7bc9cb3776b8d1519418e284366a2d837dbfda553c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py__ufuncs_copied_from_thi_degrees.ufunc_np_degrees_": {"doc_hash": "1c1f97a566358b5dd319d1974838898f0f8f2c4e3274de4b212501da60f475c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_radians_angle.return.np_angle_x_deg_deg_": {"doc_hash": "8eaa6df4a796b849c9dc929d67fe16cfbb6a8956195641e5ed3aba40fdc13ab2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_frexp_frexp.return.L_R": {"doc_hash": "7df10ea761e48e6138debd2e62c747d698bf363cae8bda1cd3409f1199f4e86e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ufunc.py_modf_": {"doc_hash": "0200922afb839283510484838f4b35a0a0c7c54fc51526c3ab8975c110075076"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_difflib_normalize_to_array.if_cupy_in_str_type_x_.else_.return.x": {"doc_hash": "514cc3019dead3ad2212b82b53e77d357464f1f564667cf5ef76c0fad963f167"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_meta_from_array_meta_from_array.return.meta": {"doc_hash": "69fc0416b922bfa051ce6587a6dcb6682e643c22a026377b82528b270480848e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_compute_meta_compute_meta.with_np_errstate_all_ign.return.meta": {"doc_hash": "4ae8fc88e6933c813b42f233b1ed23747a8ec0d2e4cd1348175005591905faa1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_allclose_allclose.return._a_b_all_": {"doc_hash": "2c174f65913381302602963a617252a94a0b4a8c39f54e63eb0fc363908f8612"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_same_keys_assert_eq_shape.for_aa_bb_in_zip_a_b_.if_math_isnan_aa_or_math.else_.assert_aa_bb": {"doc_hash": "09651598c07b9ba2e748208e34e2a08010f997f9661971885b8e3615b04584c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py__get_dt_meta_computed__get_dt_meta_computed.return.x_adt_x_meta_x_compute": {"doc_hash": "ab4e827e7350597b663250e96360948366652c8d6e1487b417a3e48fb9c0f890"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_assert_eq_assert_eq.return.True": {"doc_hash": "34de5bffab3780f516c72c8ac2cf69104cf7c5c37074a00d34ff4f259e3a48ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_safe_wraps_empty_like_safe.try_.except_TypeError_.return.np_empty_shape_kwargs_": {"doc_hash": "56d14afa7ce0ec99e8d116cc262d6d0b3000b87f260269904bf00bace2715714"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_full_like_safe_full_like_safe.try_.except_TypeError_.return.np_full_shape_fill_value": {"doc_hash": "524aa9ab0017ad7f306b6cfa9473c4aa4911fa8552076ff2b0cca484bded860e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_ones_like_safe_zeros_like_safe.try_.except_TypeError_.return.np_zeros_shape_kwargs_": {"doc_hash": "8d84c769e41aeee797706c253dba44e35eb32e921aadc3d115ac608f59c9841a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_validate_axis_validate_axis.return.axis": {"doc_hash": "69bcdc9bc7309839c9378633c49a23e3c4c16ff4c5d602c0593ff29cdf6e67b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/utils.py_svd_flip_": {"doc_hash": "4a9c4b0fb5e2deab6bc84519f2be839da17298ddfc24393479aa8844d832525f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_from_functools_import_par__parse_wrap_args.return._": {"doc_hash": "4d585f9d2e556d98aaa9b55607b8d284b63870441879fa6cbdf3b42078c2f059"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_wrap_func_shape_as_first_arg_wrap_func_shape_as_first_arg.return.Array_dsk_name_chunks_": {"doc_hash": "eaf18a2392cedb66ea5fcb7ecf27f5287507e3cd821f197383234b5b0f60bb5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_wrap_func_like_wrap_func_like.return.Array_dsk_name_chunks_": {"doc_hash": "faac998a73314fea65dbf98e63838cdf6ba33e2fd1b747ed148fe5ec3be18358"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_wrap_func_like_safe_wrap.return.f": {"doc_hash": "1c08c9e6955978d3e4741a07f5700b03de2f9642c792baa06a81d15931f18f21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_w_broadcast_trick.return.inner": {"doc_hash": "626d468e2471da06324d6cf6c0a468e96416b1b901ff3966f7a04fdabf54b495"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/wrap.py_ones_": {"doc_hash": "2e5f57d957dbbfbb0d339442f78974a0a276092705285c4fa93405b83c4fb826"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/__init__.py_try__": {"doc_hash": "93d49d99cad4643022d718a7ea89a32b1c12ee4f8d1281a11617de25b93b07e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_io_read_bytes.return.fo_read_size_": {"doc_hash": "5952210077fafaeaf47892694839e29bef4c95268d03277da03c9e7044bb49e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_read_header_open_head.return.head_size": {"doc_hash": "8f2a6c631fa44c51fc1d0dd8bd2469c94d67fba4cda285837d01422527769ab5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_read_avro_read_avro.if_blocksize_is_not_None_.else_.return.from_delayed_chunks_": {"doc_hash": "202972bdbebad7d6aa946e8283725d67977a328f848262dbd96fcf877c3a978b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_read_chunk_read_file.with_fo_as_f_.return.list_fastavro_iter_avro_f": {"doc_hash": "989cfc734aabb90471da5a1535b9a9f02360c6b125643cf5bd5937ad46aded64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_to_avro_to_avro.storage_options.storage_options_or_": {"doc_hash": "f55d9f46dce978f6b9ae625be46c1277cf5c052d061a7c6d30c647f26ae5c7fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py_to_avro.files_to_avro.if_compute_.else_.return.out_to_delayed_": {"doc_hash": "80a51d27216abfb89532dfa96cb53082a4c34fc0f73dfff81d82fc5730a557c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/avro.py__verify_schema_": {"doc_hash": "d090e20a48979bc698f864f7efed6d50f78d43f7ea2da4f49194a45b58627826"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/chunk.py_barrier_": {"doc_hash": "77c4a57bd6b0d4a17c9b5712ba28335d19ce0eab6f4df8d804c227968b2633ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_io_no_result.type_": {"doc_hash": "ac3e96905e326c1d39d5e3804ebb6631a4114966a8c7fb627a10510799c60b72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_lazify_task_lazify_task.if_not_start_and_head_in_.else_.return._head_tuple_lazify_t": {"doc_hash": "9f34d0598b6d7d3d7fb6d546ee8c435d4f16853a9df9f1b50ef7dd5f1deb1714"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_lazify_inline_singleton_lists.return.dsk": {"doc_hash": "73e9a4a09dd3a9b48b14032de8b872b2e52d4939ec9e03f1da9e44bcbcd98ca2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_optimize__to_textfiles_chunk.with_lazy_file_as_f_.if_last_endline_.f_write_endline_": {"doc_hash": "d26db406d850169bea411272a474591e677d41f78e94a29af3c817790c07e5a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_to_textfiles_to_textfiles.if_compute_.else_.return.out_to_delayed_": {"doc_hash": "dc2aa8d3c059abceb837d8a783cf81c473c6766cf9774e7d9152561b6987ceb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_finalize_StringAccessor.__getattr__.try_.except_AttributeError_.if_key_in_dir_str_.else_.raise": {"doc_hash": "35adfca70fdc5650bcfaf1357478d7cc5d13d9d4a2efa5b9e46cdc3b240ae2bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_StringAccessor.match_robust_wraps.return._": {"doc_hash": "9b47d761a61446dcc9377b3541cad219ef0661e3a944db9eb9bedcb53b2b8ce6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Item_Item.__int__.__float__.__complex__.__bool__.DaskMethodsMixin_compute": {"doc_hash": "a08a01a62e643241fd80624cd183ce8c6d840789cb3eda6194bcb88f90dee66d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Item.to_delayed_Item.to_delayed.return.Delayed_self_key_dsk_": {"doc_hash": "720572333bf338e181568e7d1473d116c1b8637a44999fdc15d8df7ebb0b5709"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag_Bag.str.property_fget_StringAcces": {"doc_hash": "74c982ac0baeaf7d49246bea1e118bd3099fc6cb7bfca15d3bf3cc8e87e9e2e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.map_Bag.map.return.bag_map_func_self_args": {"doc_hash": "d351daa549a3c5eccb2508cce2b06e2c9b5cafd81d4713de7784c644efe24e39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.starmap_Bag.starmap.return.type_self_graph_name_s": {"doc_hash": "143bc09a31284088be457d6e1ac0e1d2189c77bca37b5e64d8f5c13d602baafc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag._args_Bag.filter.return.type_self_graph_name_s": {"doc_hash": "37094a9d9c8fa180e3dcd8b6631f2154b3dc1457408480f96c12bc27c066b676"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.random_sample_Bag.random_sample.return.type_self_graph_name_s": {"doc_hash": "a0bbea49d8f8a5d3a42df3ea4ec0d679b4979428d13bb7f05cc0cc2b70d0c77e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.remove_Bag.remove.return.type_self_graph_name_s": {"doc_hash": "d2e00e54fe43315c070c633d08a541fa8ef810100bb2758fd03e90a6dfc22a43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.map_partitions_Bag.map_partitions.return.map_partitions_func_self": {"doc_hash": "3942f90971a958f20680920559f5de642ad36eb0cbe05322bab4d591299a57c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.pluck_Bag.pluck.return.type_self_graph_name_s": {"doc_hash": "a44f0d4167e043a66a87a28b9fb37092dcaef1981a6d8b70dacfad694697ba86"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.unzip_Bag.unzip.return.tuple_self_pluck_i_for_i": {"doc_hash": "d59d2bf67c283d562015b3f57f974dbb5970bc228fb776c853567e1f0ae3566d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.to_textfiles_Bag.to_avro.return.to_avro_": {"doc_hash": "f8a57b06f364e79e0b2a2b0e5ff843a121bc1b400533cdb6550903cb309749f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.fold_Bag.fold.if_initial_is_not_no_defa.else_.return.self_reduction_": {"doc_hash": "06621116a09b250346898ccd224c1d5245ba6e02655cb6d4b994b935fd6d1063"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.frequencies_Bag.frequencies.return.result": {"doc_hash": "4a5ffc470e850d5dcc8187251c21bc9a836c9cdaffa73627a1b586b59517d7be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.topk_Bag.topk.return.self_reduction_": {"doc_hash": "5cf17607a5e171a30b853123d8a71a06421bb668f6f1b98c9c8f5793c779c015"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.distinct_Bag.distinct.return.self_reduction_func_agg_": {"doc_hash": "cbdc7b9f9bedcbd5ac2358f7170db29ebf6f3ab89dc5c843381a0baf75b5d44d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.reduction_Bag.reduction.if_out_type_is_Item_.else_.return.Bag_graph_fmt_1_": {"doc_hash": "41498c559e0e5f57745b9396ba19e1f1947428bb626c305817bab956cc71d598"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.sum_Bag.std.return.self_var_ddof_ddof_apply": {"doc_hash": "cee5593abc76ce9c8e429095fed26099f97b560edb0606075411a5c4faf3ca30"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.join_Bag.join.return.type_self_graph_name_s": {"doc_hash": "617d39833e70407430a08adc1455563effb33d3f1dda9b09a32bd48d7626ca9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.product_Bag.product.return.type_self_graph_name_n": {"doc_hash": "c85a273c24cdc22002c7bb84b7d4514ba40ef96604e165311b2828d8a561cca7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.foldby_Bag.foldby._Combined_reduction_and": {"doc_hash": "bf7c904fe3d6ae01de464d7fecd1cc61e0045abc543abe4ca0cfb1d943cf2310"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.foldby.if_split_every_is_None__Bag.foldby.return.type_self_graph_e_1_": {"doc_hash": "5c01fa68e1e35fec087c9ac84c09da32c1413b94bf1181f4b62aed969dab3c5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.take_Bag.take.if_compute_.else_.return.b": {"doc_hash": "4d587b911dc5db22f5ab797197d3d0f4c4552f57a0986e3f34f895b57aef073a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.flatten_Bag.__iter__.return.iter_self_compute_": {"doc_hash": "d78f05e5a66c548a13adf3dd55be81c4b734f0515f55520cc1d7d4d09b6f03fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.groupby_Bag.groupby.if_shuffle_disk_.else_.raise_NotImplementedError": {"doc_hash": "f878d101d802bc883aea296837acbdd43e76ff5ab0c85c58bd18e02650b7ffc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.to_dataframe_Bag.to_dataframe.return.dd_DataFrame_dsk_name_m": {"doc_hash": "04fa903701c885c8545bae6161db6e18f5518d62a094244569fa41cc7726575b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.to_delayed_Bag.to_delayed.return._Delayed_k_dsk_for_k_in": {"doc_hash": "4290fdd0f957f1f414da41f8d9d1f31c79189aa3d0a92d3538b5f0ed662c62ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.repartition_Bag.repartition.if_npartitions_is_not_Non.elif_partition_size_is_no.return.repartition_size_self_pa": {"doc_hash": "af1a7f2fe11d87659416939ab21c01f1937a412fe1232ebb7567cb3da99463d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_Bag.accumulate_Bag.accumulate.return.Bag_graph_b_self_nparti": {"doc_hash": "531e988c25a9c4cd40d7537540d8d9fa8c68ba19acfb25b7345d86c65a16021b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_accumulate_part_collect.return.list_d_items_": {"doc_hash": "58fe062d55f7cb7c145994a9ffdc75648ad38f04c3812c0da382bb00d5c2b6da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_from_sequence_from_sequence.return.Bag_d_name_len_d_": {"doc_hash": "8ef82fd2c09635c97bcb32d47908ed0a1b7dacb48b4a41f2f279b960fa5bc2cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_from_url_from_url.return.Bag_dsk_name_len_urls_": {"doc_hash": "528e411215a5241d148b8c76646686b6219ff81c6088213ba354e638a73e525b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_dictitems_reify.return.seq": {"doc_hash": "b3996376dce02250e1c39c45f1dd22f34667f5dab289b19355278d5c571c23a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_from_delayed_from_delayed.return.Bag_graph_name_len_valu": {"doc_hash": "fb6c3ab115471184528795bf62770ea6ec6351be9acc1fc64432ad3b265b2ad9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_chunk_distinct_merge_frequencies.return.out": {"doc_hash": "cdbb1050ad7c682f86d4af3e7807256ecafed2311ee5ec5d380f1aaed6023701"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_bag_range_bag_range.return.Bag_dsk_name_npartition": {"doc_hash": "86fc7db4534b54146edad9c77167a8e101b4bcab8d288477f05e7120f4cbf264"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_bag_zip_bag_zip.return.Bag_graph_name_npartiti": {"doc_hash": "366d1d793f9b7ce25613369a7f2a68021e6e1f433789cd8492c8eef8d6b91c67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_map_chunk_map_chunk.return._MapChunk_f_iters_kwarg": {"doc_hash": "1e15d09daceb28e25cdd59b0dcf840cadd8966c13c6a94f952cbd01e39d13ea5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py__MapChunk__MapChunk.check_all_iterators_consumed.if_len_self_iters_1_.for_i_in_self_iters_.try_.else_.raise_ValueError_msg_": {"doc_hash": "a6194206d15d7afa522515384bb3e8214ca55b2609c844efbde64a5f1e616e63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_starmap_chunk_unpack_scalar_dask_kwargs.return.kwargs2_dependencies": {"doc_hash": "569fdcfdea17cc23ab5e6c5119962009de352d129c1e6b14daef4a307cee3760"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_bag_map_bag_map.npartitions_8.npartitions_pop_": {"doc_hash": "0dc9cc67ccbaec7ecc0a61b947e4606fe79507823e51009420dfcb03230415a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_bag_map.build_iters_bag_map.return.return_type_graph_name_": {"doc_hash": "41232288ae16e954cdeaec4f945f98789c5d1759d2f47291bb8c0211658a2761"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_map_partitions_map_partitions.return.return_type_graph_name_": {"doc_hash": "264c951e25f939039900b82404a71b2c93ab379ed8849a32e4847d133c4bd207"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py__reduce_groupby_tasks.return.type_b_graph_name_len_": {"doc_hash": "d2070097314de707430dcbea51107e535c10092d8f622a947383d70142147f25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_groupby_disk_groupby_disk.return.type_b_graph_name_npar": {"doc_hash": "9bb1e5a5e2038c710d63e95c5d5af3faa9e46789891b558d35ca871cb964960c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_empty_safe_apply_safe_take.return.r": {"doc_hash": "4bae5b3b90357b55005866cbc2707879df17da5e631631834d497b70210fc554"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_random_sample_random_sample.for_i_in_x_.if_random_state_random_.yield_i": {"doc_hash": "f7e20d28b52949abca422ba4ebc4dc64646884b1d4d04d0e64e190b943fdea1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_random_state_data_python_random_state_data_python.return._": {"doc_hash": "f5fe0b96908ee250266ae2f0e9ac949c02638a4e7556e85c9734bc6a52ae64d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_split_to_dataframe.return.res_astype_dtypes_copy_F": {"doc_hash": "f0de6cc5a8338033478a4da9050b2f86ef28fdfb812ab107efcc4cd8dcd2499b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_repartition_npartitions_total_mem_usage.return.sizeof_partition_": {"doc_hash": "f7f96f9841c9e7beb2c20a217438db4981802fc76393246935b34c753d477df2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py_repartition_size_repartition_size.return._repartition_from_boundar": {"doc_hash": "24eed188bb0ecc5573e6015249d88888d41bc5f326056cc728775ec17e1dd2bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py__split_partitions__split_partitions.return.Bag_graph_name_new_name_": {"doc_hash": "0e523a067903ff031fbcf0d8b3ce067f7a3f2cfd41d9b4bf95d496e62a9bceca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/core.py__repartition_from_boundaries_": {"doc_hash": "9648f945b92946e5a8d4e832dcd7cb6649fc802f0f461eb74c5eb37b230e4026"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/random.py_heapq_sample.return._sample_population_popula": {"doc_hash": "d3ffda1e463df14d7c5aba883d488528dd341ae3553662170c763589aca8e549"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/random.py_choices__sample.return.population_reduction_": {"doc_hash": "664565c1213f93b79b4ab2e22a0d3a22e9b5948f5c606a037d4af9b85da57ea3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/random.py__sample_map_partitions__sample_map_partitions.return.sampled_lx": {"doc_hash": "3ca9223b33f4041737cfd2b4920cd53f855dace9a0be2e852f25d01185bb2ad3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/random.py__sample_reduce_": {"doc_hash": "45f7cb4bc4b15313e2dd68158683ea670abf8821f9c5b62c4918191b06ac902b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_os_test_onefile_oneblock.assert_b_compute_exp": {"doc_hash": "7edd41e9b8a207b0b23d5d5faf3e7b8cd93880f05fcab32e6ae781318dd456ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_test_twofile_oneblock_test_twofile_oneblock.assert_b_compute_exp": {"doc_hash": "b6185b3811c6d650cec902cdf8c4f736253044b4e89b57b49c38b44b66be6a01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_test_twofile_multiblock_test_twofile_multiblock.None_3": {"doc_hash": "c3f54e959c2264b7ea675f7564137350f738bc2538728895aeddf234b6456c4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_test_roundtrip_simple_test_roundtrip_simple.assert_b_compute_b2_": {"doc_hash": "c11bdc5a3f657f02520ea86b7bba4220e580133865bd2a7c65f5fb9a682a6e59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_test_roundtrip_test_roundtrip.assert_b_compute_b2_": {"doc_hash": "f01dd0bff9f67e79c3b5c5986c2053b6942d71217c885baa344483598dafb11c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_avro.py_test_invalid_schema_": {"doc_hash": "22993c35870e4851a1977a78bce769886f1006fbe7fae2a922706216688bf318"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_gc_test_keys.assert_b___dask_keys___": {"doc_hash": "9308527cb87799f7d76e9052ce415df362817ba275d76064fa6f3ea548cbbea5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_bag_map_test_bag_map.None_3.db_map_myadd_b_b_unequa": {"doc_hash": "aa7f0efce4c604c060aef70d385a3686e5ab97bfdcea83790e4e890012c99a89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_map_method_test_map_method.assert_b_map_myadd_b_sum": {"doc_hash": "760a546eed50a6bc57558a197178098ede44b92a3bb8d335eb4460d921a9c749"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_starmap_test_starmap.None_3": {"doc_hash": "66176e4187d0a899b67e42f452e5b4b1971daf32e9940cef64f66f8ec0c924a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_filter_test_repr.assert_from_sequence_in": {"doc_hash": "099f6bfc84ea03caeb51ae851cebfaedd22f8e90e3fef1a931d7c88aeaf474ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_pluck_test_pluck.assert_b_pluck_1_0_na": {"doc_hash": "8800635d01d75b02d89f0f9911cf57b66b2a485923e65d05becb6d7e21beac34"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_pluck_with_default_test_unzip.assert_one_name_two_na": {"doc_hash": "95f430def4f29c6c4675d296e5135c9399dc043a76dc0f3df4a78e1f29946ec1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_fold_test_fold.assert_set_e_fold_add_in": {"doc_hash": "3e1f41e0e5e8a2481030f04bf9c6f827c74182254c2745564c3039b71b328e7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_fold_bag_test_distinct.assert_bag_filter_None_d": {"doc_hash": "79cac33404b0e2c11ea3511e5491e1ee7f9180bcfe6640f46b4da4803a1ac0ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_distinct_with_key_test_distinct_with_key.None_1": {"doc_hash": "a8a82100fce227a1042480f23fa58e247049f9d920894b41d5b8e69aca10403a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_frequencies_test_frequencies.assert_eq_bag2_": {"doc_hash": "922aeeca8d7e383ef57ff76f3778618b929865ef3d156138668ce22f900eda47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_frequencies_sorted_test_topk.assert_b_topk_4_name_": {"doc_hash": "3cc7e44d37f213ef28dba3b0858d5353c4dff38d3b8cb9396fd247a02fcb356c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_topk_with_non_callable_key_test_topk_with_non_callable_key.assert_b_topk_2_key_1_n": {"doc_hash": "3bb0002646517311bea362da8f368bd3101d8ea735b82c5b974c41ad9741b22a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_topk_with_multiarg_lambda_test_reduction_names.None_3": {"doc_hash": "e62e2ce9f0a15c3dc728fa4c17f870fac057de875a666399dd988da21285911f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_tree_reductions_test_tree_reductions.assert_c_key_b_sum_k": {"doc_hash": "3e5dabcd765b0057812c758c81bff2b95d4145b622b94d9675226a81a42b0fb3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_aggregation_test_var.assert_float_b_var_": {"doc_hash": "2d80171c298ce3d3dbd6afe5afe74582948800d3a006bc7c2d642d58dac8c955"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_join_test_join.assert_c_name_b_join_o": {"doc_hash": "e4aed67a9cb69878dc71ab408d79c2de111d2a5b1aec5b27c67d69da29814784"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_foldby_test_foldby.None_3": {"doc_hash": "79cc570881a7c18c01fe4c7439afc14a212d77fdcd37cbf8aa48cad3a56cfb05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_foldby_tree_reduction_test_map_partitions.None_2": {"doc_hash": "7e6defc5ac92f37e8ffcffabeb07d78a7a91e09a18d0ae36536159f46c23f33e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_map_partitions_args_kwargs_test_map_partitions_args_kwargs.None_9": {"doc_hash": "eaf9d58ced3176aea90c9b39c6e1c3cd3f1bd54553f471f84058765f1a17fc91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_random_sample_size_test_random_sample_random_state.assert_list_b_list_c_": {"doc_hash": "6ad16f98f12d3e935deea1217eeb9e3e0ad8f80b71b8c52dd6ea792faec60673"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_lazify_task_test_lazify_task.assert_lazify_task_a_": {"doc_hash": "fe8f67007b2fcc8fc9fe6b11e946cce60c3ced538507d755a54defe37d6c4d2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_f_test_lazify.assert_lazify_a_b": {"doc_hash": "09e62c895567a053bd229467d5f9f03292583269abb8e7412293466530dfb674"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_inline_singleton_lists_test_inline_singleton_lists.None_5": {"doc_hash": "3e06bb88fe519316fc933c506636d8d73a47de901209d40fe28a71495aec9707"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_rename_fused_keys_bag_test_rename_fused_keys_bag.assert_optimize_inp_c_": {"doc_hash": "1cd078f729830bd0aff519a1fc3525888375defca41260874a09dc6a00f546c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_take_test_take_npartitions.with_pytest_raises_ValueE.b_take_1_npartitions_5_": {"doc_hash": "0a36b7156d0ba67c5d68eb4d02aba82ecb1c029e72baf9299aee47d8575a7c9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_take_npartitions_warn_test_take_npartitions_warn.with_dask_config_set_sche.None_1": {"doc_hash": "167f72c335a76d54175114a1e2417229862428e9b29f89520b22d2a575c0723d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_map_is_lazy_test_read_text.pytest_raises_ValueError_": {"doc_hash": "0dc00d9f0143b1b5050be96cd763bcc342a742a69758706439fd3d281b272c16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_read_text_large_test_read_text_large.with_tmpfile_as_fn_.assert_list_b_list_d_": {"doc_hash": "64a51748a951370ac14da86965d88003060e611c9a9d6aa596b918a868526f19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_read_text_encoding_test_read_text_encoding.with_tmpfile_as_fn_.assert_list_b_list_d_": {"doc_hash": "dee38d89ba0e64664a4867582791d5790cb198bc287d139c1bb2f8358bfa36a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_read_text_large_gzip_test_read_text_large_gzip.with_tmpfile_gz_as_fn_.assert_join_c_compute_": {"doc_hash": "68174ffd71eb2f2913e99ae98b1a664daa9959a52084b26e965603b44f35f3b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_from_s3_test_from_s3.assert_c_npartitions_3": {"doc_hash": "1a4d07de7570a32c4279dbe40f14f424a1bc74e8800570a709db5eb25613c5e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_from_sequence_test_from_empty_sequence.assert_df_empty_DataFra": {"doc_hash": "e98bb3d75aa093c3d7dd9d3504d4da5a9694daecde30e8a2213ccc8a18eddc1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_product_test_product.assert_z_name_x_produc": {"doc_hash": "7ab76d50dc91caac67c164b3b2193ae71debaaf8c309d26c39c2b18e94190411"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_partition_collect_test_groupby.None_3": {"doc_hash": "00ca06171feb31f448d32abc6fa5dc7612270a61f906068e3391070693e341eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_groupby_with_indexer_test_groupby_with_npartitions_changed.assert_result_npartitions": {"doc_hash": "d75241db51b3cc42fa3264de888125ea82a15f3dc6dd6fa2ce6e2892696ed5b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_concat_test_args.assert_c_npartitions_d": {"doc_hash": "eac083e380bb684029828c645f321b252f4615156fabf43f77f2f5956ef27eca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_dataframe_test_to_dataframe.for_f_in_iter_tuple_.check_parts_df_sol_": {"doc_hash": "f8a858aae4e0bca27171e6a68de19148a274f349899fde49e7705d7ebfb7be65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_ext_open_test_to_textfiles.with_tmpdir_as_dir_.f_close_": {"doc_hash": "0e007b00eebbedab9dd0d2daf0598873659212086d2089b2d64733fd057bde91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_textfiles_name_function_preserves_order_test_to_textfiles_name_function_preserves_order.with_tmpdir_as_dn_.assert_seq_out": {"doc_hash": "16b71a58f3865123050036ed887af62f0686af1aec3d4693a6cb99c8291c2cb1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_textfiles_name_function_warn_test_to_textfiles_name_function_warn.with_tmpdir_as_dn_.with_pytest_warns_None_.a_to_textfiles_dn_name_f": {"doc_hash": "eb506107602f4c07597daf23762d7d8a024bb900f0af582dc21e372e55882b91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_textfiles_encoding_test_to_textfiles_encoding.for_ext_myopen_in_ext_op.with_tmpdir_as_dir_.f_close_": {"doc_hash": "30d8e5acc9c59a9ee86bea04cb2adcd707fc28bba96ca52042f3c9df2364c2a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_textfiles_inputs_test_to_textfiles_endlines.with_tmpfile_as_fn_.for_last_endline_in_False.assert_result_a_n_": {"doc_hash": "6b47638c047779a66830b54c8d714ea0d3bc49076577858488edddc10609ee3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_string_namespace_test_string_namespace.None_6": {"doc_hash": "8facf602e61be44e0efbf5a61e6bace5fad3fca0f770850ee9aa317997663b78"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_string_namespace_with_unicode_BagOfDicts.set.return.self_map_setter_": {"doc_hash": "70cfc2bfeb58d72edb514b1b2a61bc1b3ce9483e8f4b570828796eb913bf1a60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_bag_class_extend_test_bag_class_extend.assert_isinstance_dictbag": {"doc_hash": "851f81cb4bac536f58569251ed295a8fd4004cd1cef8cdb2f4ee0ee5f38877da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_gh715_test_bag_compute_forward_kwargs.x_compute_bogus_keyword_1": {"doc_hash": "019a24cb279ce004bb9342df2a788c2c171c343e9d4c5efa48f1fc1a8b1f514b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_delayed_test_to_delayed.assert_t_compute_21": {"doc_hash": "f67d58abf59fbdaefc2c1d6726a224acd99684f563d1b001f17cf21f2b2b3402"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_to_delayed_optimize_graph_test_to_delayed_optimize_graph.None_9": {"doc_hash": "f60280fffd5db7c359c62e14c890372386ecb445843c65c2d7f6dc01c8048745"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_from_delayed_test_from_delayed.assert_asum_value_compute": {"doc_hash": "550f14dd8e14ec22cc01be245301c947fb65631ac810552b2e5fc8396a185dc2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_from_delayed_iterator_test_range.for_npartitions_in_1_7_.assert_list_b_list_ra": {"doc_hash": "5d50e7de2f9616372ea0ceb505083c59cb214dd5b2d41302972a40160e4b148b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_zip_test_zip.assert_list_pairs_lis": {"doc_hash": "782f31fc9b487063d4fe328c3612cdba4490fdb13658f46b2505e0b879589290"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_repartition_npartitions_test_repartition_npartitions.assert_all_results_": {"doc_hash": "f3195439dac9fe9ebc80f7ce2087a81325b0de4f15c0c7d9b42aae6f8edf1e60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_repartition_partition_size_test_repartition_partition_size.assert_eq_b_c_": {"doc_hash": "420cedb9c100e4a172d6763a91e73beb3434558e8752debf97c52e8811e0757b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_multiple_repartition_partition_size_test_repartition_input_errors.with_pytest_raises_ValueE.bag_repartition_npartitio": {"doc_hash": "3bb673f45bf7635d2590cbc0eec63fa2af265f599b55ca47214c65586bdb5e6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_accumulate_test_accumulate.None_5": {"doc_hash": "8d65b2bc4176301529803248ccdcefb128840719c9984922402ef0f0be6aab0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_groupby_tasks_test_groupby_tasks.None_2.for_b_in_partitions_.if_a_is_not_b_.assert_not_set_pluck_0_a": {"doc_hash": "67a261846175607aa2474a0628a6e69a3ceecefdcae55b42b24cd41e801835d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_groupby_tasks_names_test_groupby_tasks_names.None_2": {"doc_hash": "a6d852a21ed896e8e6534553cdfd9da4f5e4dcb19ed1d65be6e2418756d6cee7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_groupby_tasks_2_test_groupby_tasks_2.assert_dict_result_gr": {"doc_hash": "7d1e285261e2ebf872ad67c10f9b5273b2ac6a895007635ecda1ba9b93c7aa76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_groupby_tasks_3_test_reduction_empty.None_1": {"doc_hash": "3e6bb4d578d6cb9e3800e9decf665c90d721559121e008a32695bc81b19486f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_reduction_empty_aggregate_test_reduction_empty_aggregate.with_pytest_raises_ValueE.b_filter_None_min_split_": {"doc_hash": "4b22aa80341cad3cb3b2e6774da9df632f620a9b57e9603b912cb27199d8fd2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_StrictReal_test_bag_with_single_callable.assert_eq_b_f_": {"doc_hash": "56c85f284080151bdf82eca53e2aedf8f2a040ea86ea6c15a3498a0560226032"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_optimize_fuse_keys_test_optimize_fuse_keys.assert_all_k_in_dsk_for_k": {"doc_hash": "924eb58ae4ecef11f8951e67dbdf1255dcf6a6c1cf3455936c4b0bad23952f61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_reductions_are_lazy_test_repeated_groupby.assert_valmap_len_dict_c": {"doc_hash": "7866f56f92fed79c717ff552b822f54ce51ae073608794977e8625de728db305"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_temporary_directory_test_temporary_directory.with_pool_.with_dask_config_set_temp.assert_any_fn_endswith_": {"doc_hash": "35777bbbc72ce40a5ee6ec7a419269fa06c32d85c949a1120a8f46d9dafd8466"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_empty_bag_test_map_keynames.assert_set_b_map_inc___d": {"doc_hash": "fdb2a3e3df65f1e473f0c24d406b470a023efd2c129fcb082d94fea4b522731c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_bag.py_test_map_releases_element_references_as_soon_as_possible_": {"doc_hash": "7a567f37d62d284c7a97a27b84da2036b96eaa5233a92d7dad84d4a96e3b90d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_random.py_pytest_test_sample_size_k_bigger_than_smallest_partition_size.assert_len_set_li_le": {"doc_hash": "33db67a3b38da1ad04fd187b6cbbdb7acd974cb27c2372214ee8c3b3d72424fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_random.py_test_sample_k_equal_bag_size_with_unbalanced_partitions_": {"doc_hash": "a2d2d6f935905e9bdd8a42ec8624df80bcef0dbdcdb36309c1ab4e4e79bd7447"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_text.py_pytest_fmt_bs_enc_path._": {"doc_hash": "22d418ca6503773c2068e1fa3ef76b91b3d19bb02a1e14e3ede606a80b73c54d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_text.py_test_read_text_test_read_text.with_filetexts_files2_mo.assert_join_line_for_b": {"doc_hash": "a97c8886560d1a68acf402dc4f8a912febfab2d53b5ad3c93cdad85dc48f65b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/tests/test_text.py_test_files_per_partition_": {"doc_hash": "1c3fec87e70a7e631a02eac88a72184c18a57bd181d3896db24b7d195dca2435"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/text.py_io_read_text.if_isinstance_blocksize_.blocksize.parse_bytes_blocksize_": {"doc_hash": "ace6a532a1da707ec7534e5e11c8165ea8234321c39741cac76c9e8b6bb8907d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/text.py_read_text.files_": {"doc_hash": "cc3e6393c3655a57140b54c548ef4b29177af7d872eac0b8f1a256ede3e0230b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bag/utils.py__": {"doc_hash": "930740fc7c6b0f995a0262dca4a34b61e680f6b43c13f5109ae3e852962ae71e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_from_collections_import_O_is_dask_collection.try_.except_AttributeError_T.return.False": {"doc_hash": "9c0be2122ea03d7ab77f0fb285fb63ce88cae2d63b926d955fc779d094470a26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_DaskMethodsMixin_DaskMethodsMixin.visualize.return.visualize_": {"doc_hash": "e971b50f30fc3a92161b79a3bd9c4111124c5a5032789f163be4c119d3a33fc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_DaskMethodsMixin.persist_DaskMethodsMixin.persist.return.result": {"doc_hash": "042dc788ab7ad0e3caa728fd4611acbe94f36d1e989ffca9bc6c41e7ba471d96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_DaskMethodsMixin.compute_DaskMethodsMixin.__await__.return.f___await___": {"doc_hash": "4ec54d31a2c746655be2fe641e3876689b95bf2829eb1f0dd7e771d97d72a698"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_compute_as_if_collection_optimization_function.return.getattr_x___dask_optimi": {"doc_hash": "65d60c1789fa336fa0b7ca06305177caccb680c590e64bfaf1f19af9f5194bfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_collections_to_dsk_collections_to_dsk.return.dsk": {"doc_hash": "b801a8adc556516b953f3bb2d4056aedb284929f18207513af33479b3ea2ea0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py__extract_graph_and_keys__extract_graph_and_keys.return.graph_keys": {"doc_hash": "9a82860491682ba5dca0c587113de6a0dc73321f4c975cd43d6abb66390b6cd6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_unpack_collections_unpack_collections.collections_token.uuid_uuid4_hex": {"doc_hash": "72f5ce6819186cdeba0dbca676984ee3c0d7ff98af1760eb4d970fd06efde617"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_unpack_collections._unpack_unpack_collections.return.collections_repack": {"doc_hash": "29545c5030df477a1ed65f79d56e651de8960301425600d53cd2283d84d22968"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_optimize_optimize.return.repack_postpersists_": {"doc_hash": "8435942f40d9a85fcf270f90867efd179f038134f4af4e51bc8f6fcf173cfa96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_compute_compute.return.repack_f_r_a_for_r_": {"doc_hash": "5b0cac5b8bb1eb368b6794d607148cb26d63a2c14059a962d7298e42007577e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_visualize_visualize.color.kwargs_get_color_": {"doc_hash": "99df00b3a8297b809a0080943afabb3bc5e0f15d3eb950fb80f3680e66f3f75c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_visualize.if_color_order__visualize.return.dot_graph_dsk_filename_f": {"doc_hash": "584b0a3147e1939bb75b6b5cac68dd5138868935ad66691b288d756d36872886"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_persist_persist.if_inspect_ismethod_sched.try_.else_.try_.else_.if_client_get_schedule.return.repack_results_": {"doc_hash": "806fafdfdb009141f827f773ad1e075cf36e8b05955a7d009c21582a0826b3cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_persist.dsk_persist.return.repack_results2_": {"doc_hash": "d66b1209a6b5535fc60e57704c6af074cbd6edb3bc53db079d9136afed06a616"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py___normalize_function.try_.except_TypeError_not_.return._normalize_function_func_": {"doc_hash": "a8b18b88580437879e5ce6b01e2d9466700e6ddb7ba77ef19988a1c73bb8dd30"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py__normalize_function__normalize_function.if_isinstance_func_Compo.else_.None_1.except_Exception_.return.str_func_": {"doc_hash": "a8344cca74ea9aa7c5c312d832030f2d1c7b32e25d49cde9ddc4a0fae54e6a9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_register_pandas_register_pandas.normalize_period_dtype.return.normalize_token_dtype_nam": {"doc_hash": "4cf4212b91c68e018e9111bed622bba7499cd7a7582b82c74ddc2bb4144acf40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_register_numpy_register_numpy.normalize_ufunc.try_.except_AttributeError_.return.normalize_function_x_": {"doc_hash": "ad610fd504ec4f9bf7dc027ecb21fa4d5656b1696973ba4d8a776b8d65fecedb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_register_scipy_register_scipy.normalize_dok_matrix.return.type_x___name___normali": {"doc_hash": "52b08192f31836dde165fd98af5d4c70e14b1ea5372a728f18c4f2d680d368a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py__colorize__colorize.return._h": {"doc_hash": "b06bc20dd6b213e2c8e49ceb441122120e54dbc4cca91b301287997e410d82f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_named_schedulers_get_err_msg._": {"doc_hash": "27e4bafb0a578bf484162c0a419e478232aad71eb71bc05a585dd12511dcb54a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/base.py_get_scheduler_": {"doc_hash": "fd5ec4ff80ba37e1db5bcd5c32844e5fbdb6b84c6c86e82717fae5b2cfffdc0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_itertools_blockwise_token.return.prefix_d_i": {"doc_hash": "30b40a1fce550ad700eec4623670b3a9cad4fcfc6ecd7cdbd98402cc03b98ea1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_blockwise_blockwise.return.subgraph": {"doc_hash": "3b81ba9044cb35fb28ced1d09531bb3feccd6d5d5559fda07df462649d6c81aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_Blockwise_Blockwise.__repr__.return._Blockwise_for": {"doc_hash": "9dbf666cf4c9a41851606bd25436ad5f308c92f7de306b02771bc45a1b22e5b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_Blockwise._dict_Blockwise._dict.return.self__cached_dict": {"doc_hash": "687d5a55bcdde4f86720ce5623d7b98bfb57b7326ae5ae62511d4c8e4a4f39cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_Blockwise.__getitem___make_blockwise_graph": {"doc_hash": "bab5e192902725490c0a9426566f8c84b55b695dc7734cd6c0c5eabae305844e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_make_blockwise_graph._Tensor_operation_make_blockwise_graph._Tensor_operation": {"doc_hash": "1a01785f9c47df415e8184110716e7d01b0e097aa5ad95337406898cf430a9ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_make_blockwise_graph.numblocks_make_blockwise_graph._Create_argument_lists": {"doc_hash": "dd60b04eae1230524cb5ad20b2b9437297e2de6668a7465477050957244ffc0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_make_blockwise_graph.for_out_coords_in_itertoo_make_blockwise_graph.return.dsk": {"doc_hash": "0bd2a288dd169d362474053178da7b27c42890dcbc7d82f61e379f32183a8db1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_lol_product_lol_product.if_not_values_.else_.return.lol_product_head_value": {"doc_hash": "c4b4a6c18ba16e099370e8999ecba925d18347aadb888ab11a83e013b511d0a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_lol_tuples_lol_tuples.if_ind_0_not_in_dummies_.else_.return._": {"doc_hash": "0d4d8c59257339b315885a6c0e145b585373804d05f5d58aea933642ad461c55"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_optimize_blockwise_optimize_blockwise.return.out": {"doc_hash": "928fcf963fb1e414b02b32180914f0d2d77d718c6144439935710819b8ea3925"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py__optimize_blockwise__optimize_blockwise.return.HighLevelGraph_out_depen": {"doc_hash": "38720d713767b4e928477ed1746da8061efd6506b9e433a8cff205b52b06fe65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_rewrite_blockwise_rewrite_blockwise.changed.True": {"doc_hash": "0b05102b634693e4b88f7bb68180da2ed012c2a236b4bf7a0ca592bbf2fd1842"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_rewrite_blockwise.while_changed__rewrite_blockwise.return.out": {"doc_hash": "2d61c4df42d778b815fcb1fe822024d9d702a714f5fc0a373e9ee8d47de9384f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_zero_broadcast_dimensions_zero_broadcast_dimensions.return.homogeneous_deepmap_f_lo": {"doc_hash": "d9fa4855fc586670b7bd6b6d4ff15231e8c191e19315b3c4c52d08469370d5fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_broadcast_dimensions_broadcast_dimensions.return.toolz_valmap_toolz_first_": {"doc_hash": "609f4c2668123c0cb252783dfe20a45045ee9fd12bdc12b60ef98756903c17cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/blockwise.py_fuse_roots_": {"doc_hash": "07ccf83b42c2cddd9550d2de60c07acd06dcdfbe42ad7769a0a609a3ece73372"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/__init__.py_from_distutils_version_im_": {"doc_hash": "fda4a4846f28c94345582ab004b4c097c93b6943f2636b6183445ba79b338381"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/_compatibility.py__": {"doc_hash": "7565fd766589d9633f96ca9b3093bede4ad683f3c872c894b6033e37c601f366"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/core.py_os_is_integer": {"doc_hash": "91d18f6559605b755365cab79ee431280b52f159687147f07cc48af3d4ae23cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/core.py_read_bytes_read_bytes.if_blocksize_is_not_None_.blocksize.int_blocksize_": {"doc_hash": "c6a77827e975438a976527d50812e88479c3ed55ff991a98c1fd90813aee1261"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/core.py_read_bytes.if_blocksize_is_None__": {"doc_hash": "955c7924242676f490e756df8e3bb427a8b24c5050f2fbd30602135d40b3fc3e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_bytes_utils.py_io_test_read_block.for_ols_in_0_3_3_.assert_b_join_filter_No": {"doc_hash": "6217888e97c8160e9be1fc7667d2b28f0af474b26f00bf8545dc5aaecca222c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_bytes_utils.py_test_seek_delimiter_endline_test_seek_delimiter_endline.assert_f_tell_7": {"doc_hash": "1111e20246acb881045d62d1551a6c6e1d2f78a870f8d7f26e3a843917f38380"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_bytes_utils.py_test_infer_storage_options_test_infer_storage_options.None_2.infer_storage_options_hd": {"doc_hash": "38f6beea2666d33e75700e455cec00c953f9b89d014f76c9ab060a1c92dd88db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_bytes_utils.py_test_infer_storage_options_c_test_infer_storage_options_c.assert_so_path_expe": {"doc_hash": "d7e45876f46fe81d11a2e1fbc896da4af7a97d0c1e7ec70cbd50bcd170e215f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_bytes_utils.py_test_stringify_path_": {"doc_hash": "59915d54c3a6b46a109d903c6ac0f38f4a0feb3aa5bf9f57f6b13e7723ea49d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_compression.py_from_io_import_BytesIO_": {"doc_hash": "f0055e8f0e2dcc4935c42b9325d5c6d6123cc6c9c3ba57efd125d49ed7a72597"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_os_require_pyarrow.pytest_mark_skipif_not_py": {"doc_hash": "3960023ba1f5e1955b49329cc6bc588bebda26fc1655bf7ed099df15379124f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_bytes_test_read_bytes.assert_b_join_r_for_r": {"doc_hash": "17e9104a98916329a29e9911c181816795af594a8e21fbc0e7c9e8935861a9ff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_bytes_URL_test_read_bytes_URL.assert_b_join_r_for_r": {"doc_hash": "6d290f359c2ce73e13d84c41f71d33f4aa505a5e296ce64df51cd612ff194884"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_bytes_big_file_test_read_bytes_big_file.for_r_in_results_.assert_set_r_decode_utf_": {"doc_hash": "e2aa272048157180819c62b75269064948e2c9cab78c8dfe41d921484e2ec7f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_deterministic_key_names_test_deterministic_key_names.None_4": {"doc_hash": "c894a21720db49796c06a983ec53fea11ee11669ca20295a73dc66f1c72885a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_open_files_write_test_open_files_write.assert_data_results": {"doc_hash": "d7703a848c3942b443cad6b1e28da8456073af09cfdccd449625531de91933a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_csv_test_read_csv.assert_df_id_sum_comput": {"doc_hash": "252bbf49442f98304052d10aa56278b165d8e1d7f5de13c1a74d6a85c6b44ee5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_text_test_read_text.with_pool_.assert_result_a_b": {"doc_hash": "dbaa4ed9e6248e25cc032b003599a90954c96ed69c2549a771ce87c46c32a5e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_read_text_unicode_test_read_text_unicode.assert_len_result_0_stri": {"doc_hash": "6be00033335cf817561472617f4cdf56dcc955f4a839a6c3595f25285b0930c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_parquet_pyarrow_test_parquet_pyarrow._smoke_test_on_read": {"doc_hash": "04528981a2315c0c22ec4879fc9c83fbabadcce0e134b58bf511c5b49e5a63c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_glob_test_glob.None_10": {"doc_hash": "a546086891053da7ab792a2f562d3783432026f87496972ba9d4bccdcd1c8bbe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_hdfs.py_test_distributed_": {"doc_hash": "a06b4a0544b06d12fc9981ac8c9ce741e04a9f6871cf99bbdd729b23a6b3276d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_os_if_LooseVersion_fsspec___.errs.errs_aiohttp_client_ex": {"doc_hash": "af643b29e5c738b2e34212ff2f7625a26f8c05a4100be123df245303fe3c9670"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_dir_server_dir_server.with_tmpdir_as_d_.p_terminate_": {"doc_hash": "543868ad175113bd28ac22e0c51a595efd40858fc3d5fce3a5d4dfd3a4d53fcd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_simple_test_loc.with_f_as_f_.assert_f_loc_4": {"doc_hash": "b06471d6b35e78ced511b773aeb4f5f46d431ee32dc2ed0f729595d0262ecb1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_fetch_range_with_headers_test_fetch_range_with_headers.assert_data_open_os_pa": {"doc_hash": "288072be6d336bf5508bf0921dc48252d9438ad0b625a8d389f768de33941466"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_ops_test_ops.with_f_as_f_.assert_f_read_data_": {"doc_hash": "285cbc1f2f212f06c606b1e71a4ac66d2af2e3d1b95bbaab55c38ce70add934f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_ops_blocksize_test_ops_blocksize.None_1.with_pytest_raises_ValueE.assert_f_read_10_data": {"doc_hash": "d719ed2b97fc5762437e421d505eac6b159d3f689aa8974b5bb8fa63786e3e6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_errors_test_errors.with_f_as_f_.with_pytest_raises_ValueE.f_seek_1_": {"doc_hash": "bb3693934f8a4c8a12a4a6fd24f83701c75597fd6f41b8b2323234f576adc596"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_files_test_open_glob.assert_fs_1_path_htt": {"doc_hash": "9f61a5b6b74da2df91cf76b793bc13c8ece9a291fb19b348c280ec6ff18bc3b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_parquet_test_parquet.assert_df_columns_tolist_": {"doc_hash": "60322eb456d80f9976158da6b01776d2942ce01e4866e119076a6bb17af146f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_bag_test_bag.b_compute_": {"doc_hash": "b36d1753c0146b333e1f20bd7711bef7614d8694a5cdea8addef36c975e7d316"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_http.py_test_read_csv_": {"doc_hash": "48601d75535070ed8097f30899d0591c07734d7815c9962acf3e845413f5fae0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_gzip_test_unordered_urlpath_errors.with_pytest_raises_TypeEr.read_bytes_": {"doc_hash": "6d12655eb0a7453ce8202ef10fcb2f77f3e94e778c32bfeea0d5e022eb07364f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_read_bytes_test_read_bytes.with_filetexts_files_mod.assert_set_results_se": {"doc_hash": "14e9f27c323f969730088b35edcf975f9c88314e25c1651ced4336d1b3f4806d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_read_bytes_sample_delimiter_test_read_bytes_sample_delimiter.with_filetexts_files_mod.None_5": {"doc_hash": "2f1ef6a417886bb9e788047fd3d1e432b066071fee61487ec6d8774fcf61fbd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_parse_sample_bytes_test_read_bytes_include_path.with_filetexts_files_mod.assert_os_path_split_pat": {"doc_hash": "f4ad7f14d6e26ceeeb3e713929b736047cf0e4dea04aa878e2a6b631cc5d7810"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_with_urls_test_with_urls.with_filetexts_files_mod.assert_sum_map_len_value": {"doc_hash": "378f8c73e8ad20a5b8d7e1abd384822cc1353a55a8ada6eab07d8de711415f5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_with_paths_test_with_paths.with_pytest_raises_OSErro.read_bytes_url_blocksize": {"doc_hash": "dc67c81e3c35a81d571560d3e73152bad6898ec8a419b7a6f6c3ef245c6013e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_read_bytes_block_test_read_bytes_block.with_filetexts_files_mod.for_bs_in_5_15_45_150.assert_set_ourlines_s": {"doc_hash": "268be65e857aefd26b81b0c0e7d2b503e9128ad3cfdb0ed3f2109f6e01424bd1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_read_bytes_delimited_test_read_bytes_delimited.with_filetexts_files_mod.for_bs_in_5_15_45_1_.assert_ours_test": {"doc_hash": "c00aa149c3d985184880516480e5485854e82877d60d19aecfebf3decb5323c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_fmt_bs_test_compression.with_filetexts_files2_mo.assert_b_join_results_": {"doc_hash": "2efd6f79f9dfd10c3c61bc7d9e0cf1ac4a38ee70dba407486a11139f2396eb46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_open_files_test_open_files_text_mode.with_filetexts_files_mod.assert_list_data_fil": {"doc_hash": "82d5ddfe4bb0ebdf839f914060559387dfdb86c7f5ba792ec2fb83e879255c17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_open_files_compression_test_open_files_compression.with_filetexts_files2_mo.assert_list_data_sol": {"doc_hash": "12d7ec7511a915f63d817bb85e4cee78aa438899eec0c2cb5a2edff676bfaec4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_bad_compression_test_names.with_filetexts_files_mod.None_4": {"doc_hash": "490a649b957f7724c290edbd51ecdd961638e0429341d496eb5c86ec7de08139"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_open_files_write_test_open_files_write.assert_d_b_000_": {"doc_hash": "04f30aa83320efb1ffc97ad918333864745abafb3c6d1d2c363dd2994c49a42d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_pickability_of_lazy_files_test_py2_local_bytes.with_files_0_as_f_.assert_all_isinstance_lin": {"doc_hash": "e37b7e683c91fec8b488cb4ac3d0fc484b9603c2c6838d9fa9a9d38bf4eb3c59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_local.py_test_abs_paths_": {"doc_hash": "55a27d4c579dffb8ca53c424899302165616a561836803dd08233efa91a0d359"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_io_endpoint_uri._http_127_0_0_1_5555_": {"doc_hash": "7577c5b9a4308ff25b4d8478530af716bb6eb8cc963f027fecdef1ec69ac2ccf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_s3_base_s3_base.with_ensure_safe_environm.try_.except_subprocess_Timeout.if_sys_platform_win32.subprocess_call_TASKKILL": {"doc_hash": "92688382e8539eca716dddf3e97c303e8524bef79ec08f5b36d421ccff8fc7cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_s3_s3_context.try_.finally_.fs_rm_bucket_recursive_T": {"doc_hash": "0eda9d444523366de397597e4c3ea428a81c660ac5a36e2db7d1e5a96578c614"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_s3_with_yellow_tripdata_s3_with_yellow_tripdata.data._": {"doc_hash": "24827840c59b34d4891b700f730abf849af4c0706e35f405735911a01f25ac0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_s3_with_yellow_tripdata.sample_s3_with_yellow_tripdata.yield": {"doc_hash": "3ca90b408789aac0bdab1317668187f4b1a59d433cc28b18cb6975a3d9db0daa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_get_s3_test_get_s3.None_1.DaskS3FileSystem_secret_": {"doc_hash": "935771fe071c23866b083a16cf4c735c9ed04fd75aebd2ce073794b79c2e3e57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_open_files_write_test_open_files_write.assert_set_list_files_val": {"doc_hash": "bc103e079d1e56778fe14df0f0bb7dfe56f458b3e6a52a666ea9a2c577b35b68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_read_bytes_test_read_bytes.assert_set_results_se": {"doc_hash": "b9be4e1b8d51bfa65b29cdf0875f4e5ddd946f226646d70ba3d5c9eae62cc37e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_read_bytes_sample_delimiter_test_read_bytes_sample_delimiter.None_5": {"doc_hash": "9c21a31fac64cb9e3768997d69cf7bf8a018e4592613e6b7c61a1057943cfec2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_read_bytes_non_existing_glob_test_read_bytes_blocksize_on_large_data.assert_len_L_12": {"doc_hash": "a2b8f6a874b433fb1eeb9b6a9011d3e18751a8f028b9b6625cd7f2833cfc780d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_read_bytes_block_test_read_bytes_block.assert_set_ourlines_s": {"doc_hash": "76abbdf08633d44e3cd8b60027675a61d00c86f00ea9ce2c4747a1e45d42effe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_read_bytes_delimited_test_read_bytes_delimited.assert_ours_test": {"doc_hash": "f83d106178a8e0511df9f4ebe838bca53576b37bd430b516edb349909195a53c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_compression_test_compression.with_s3_context_compress.assert_b_join_results_": {"doc_hash": "38d2de76df00cfdcee0c758dac139f83a2039688aca7169c7bdfc133c5276c5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_open_files_double.lambda_x_x_2": {"doc_hash": "75da4b341127f02be9e66eb4e3d715aaf4ccc22a04accf79e1e63b7869ceb06a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_modification_time_read_bytes_test_modification_time_read_bytes.assert_aa__key_for_aa_in": {"doc_hash": "cca6a4b8fd46c46b0d1089e38202220a15f28bd8212fae078300c1a5f0c79618"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_parquet_test_parquet.tm_assert_frame_equal_dat": {"doc_hash": "d9783c797e4bd3a75ceb69734ecdf83cbf946412252c84fecd305c8bf0ffcc11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/tests/test_s3.py_test_parquet_wstoragepars_": {"doc_hash": "ad721d9bdd68215ba235de946861b5b011991acb4fd2b89706c3edcbe2e8cda3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/bytes/utils.py_io_": {"doc_hash": "0e8b3be2b21d7f619ca3b5844227d205f8bd5406b4fcec35c9e791b4a2674307"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/cache.py_Callback_Cache._pretask.self_starttimes_key_de": {"doc_hash": "ae8d0a66e0f02e6129e0bed76b50d21d42fc6060397d87fd5265bb017d033539"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/cache.py_Cache._posttask_": {"doc_hash": "72bad6928b0ce007ae8aef0d98ebb09b8e98684907c760163938532403125338"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/callbacks.py_from_contextlib_import_co_Callback.unregister.Callback_active_remove_se": {"doc_hash": "1d54298f5882720783fa2d6a75428b766063ad3ea77aef29a038780f8059dc0f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/callbacks.py_unpack_callbacks_normalize_callback.if_isinstance_cb_Callbac.else_.raise_TypeError_Callback": {"doc_hash": "f0f867f25560dfe15e74bd9cd365b546414b7e97dac7948e6647796c8f06b1b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/callbacks.py_add_callbacks_": {"doc_hash": "2cb23fe5e8b952befc17cfbf62ff73948bb7219ef72e7bd5c658b569dbc1460b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/compatibility.py_sys_": {"doc_hash": "8b99453eef26e10d9600102cd3b233cc8d2414de014c9225133850f3c6fef666"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_ast_defaults._": {"doc_hash": "f9d8cc40d148ae499d75e621444b87dafd1fb682fdae8b2a87d0fb71ec45d80c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_canonical_name_canonical_name.return.k": {"doc_hash": "24b4eede0f411e9b88e48ce2800256b3def3b738acbd5facb059f63def9edccb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_update_update.return.old": {"doc_hash": "6bfdec22738e1cb99ba9e8ea1123590665b44915cd12470ff84da5d2cb0c0979"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_merge_merge.return.result": {"doc_hash": "4f023c9b50cf9f122f99233b73ba2b13d4cb0e227f111a5b17d3c9ebd507055d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_collect_yaml_collect_yaml.return.configs": {"doc_hash": "4c36eab724020a01665b14f5103ab39076b3d1c49cdb49e9c71db0d9dbe0b28f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_collect_env_collect_env.return.result": {"doc_hash": "bb6f532f74d5d0e871ebece2b0f2f7937d317714fa661a23e84276448735e637"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_ensure_file_ensure_file.try_.except_IOError_OSError_.pass": {"doc_hash": "c68a42cf4d9a2a4924dda93c6c7d36a5cd92a02a7c9bdc2da06979033509dad2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_set_set.__exit__.for_op_path_value_in_re.if_op_replace_.else_insert.for_key_in_path_1_.else_.d_pop_path_1_None_": {"doc_hash": "c3f0a85881f254547b3ecb5f475fe35f82412f0b4622e984495c3e8ef336b5ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_set._assign_set._assign.if_len_keys_1_.else_.self__assign_keys_1_va": {"doc_hash": "965e26cd5a7bf34f157119742b04ec598480008db9c9990aa30fe844f028de95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_collect_collect.return.merge_configs_": {"doc_hash": "b07075bfa8db8a8f8d065179eedd013bba311f4b2e3a625e3074e84d5e14fe77"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_refresh_refresh.update_config_collect_": {"doc_hash": "7d6527189d04e6140fb5ed3a99ef10d82994a0abcd0564b9d588af6688df7c16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_get_get.return.result": {"doc_hash": "26880a082b9a07922c05818f44cd92663e279f54e3e6c99edd8255e6e25e28d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_rename_update_defaults.update_config_new_prior": {"doc_hash": "e98f4128efada59460cd1fed26e7013b4ad2ac42bba909201c989bf10e450c57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_expand_environment_variables_deprecations._": {"doc_hash": "459b82751bce3c0cc0d12ed4cb8f00f798e7a31d4388682449f49fa2806c0850"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/config.py_check_deprecations_": {"doc_hash": "008515fa9bb8c87de20729bb1bd6c8743d4003a400346a59970b26240bcf6bb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/context.py___": {"doc_hash": "475721192de14f078c7cccbe73f45249b3ad187618bf18df5bddc06973ebfafc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_from_collections_import_d_istask.return.type_x_is_tuple_and_x_an": {"doc_hash": "31a4ef00d2766bd28778e69d72b6a45aa58fa961f56c610dd9afcd071cfb855d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_has_tasks_lists_to_tuples.return.res": {"doc_hash": "71fc5cad846cfcee6e40c39aad569df3c988e01222cc75580c5d7892f3b5c5f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py__execute_task__execute_task.if_isinstance_arg_list_.else_.return.arg": {"doc_hash": "6a15c3edf3515a7e0129829081f1f1a8fd758f503f9cef27de8f1de5275f331e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_get_get.return.result": {"doc_hash": "4bedb44b1d4dd98d92041367797addec36ccc412069899b02ca92093a5693afd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_keys_in_tasks_keys_in_tasks.return.ret_if_as_list_else_set_r": {"doc_hash": "5b9d5b6397ace8dee5f0a8b626c495381f1e76745a2d3335fddffdd867921532"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_get_dependencies_get_dependencies.return.keys_in_tasks_dsk_arg_": {"doc_hash": "e82606560c47aa77e9e170d6cace852f0fb977d1d4b1eedfbe4d56d0e69de537"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_get_deps_get_deps.return.dependencies_dependents": {"doc_hash": "5f40eb7e9d1d79c241cab8baeb72ca8111a242769952bfc7b5e0d96e9feca485"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_flatten_flatten.if_isinstance_seq_str_.else_.for_item_in_seq_.if_isinstance_item_conta.else_.yield_item": {"doc_hash": "246f78dbcbca5966916743d8064a689cea43a380410ac7cac2c9937de2358c6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_reverse_dict_reverse_dict.return.result": {"doc_hash": "61f986782a27d6c5e414f730911857a427d8495e832d37f2e8d4c75fa83fd450"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_subs_subs.return.task_1_tuple_newargs_": {"doc_hash": "bc38bb6d15a6cb773f3145685866ee99074a64a64020939721feae67496ca44f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py__toposort__toposort.return.ordered": {"doc_hash": "8e24723829374d780bd3e3241dd14f88ff1bb792b95b1b09412da1f971395989"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_toposort_getcycle.return._toposort_d_keys_keys_r": {"doc_hash": "be82e487f0aff3c7fea0a460728bf14e83e073dd76ceefc1a4d5356cba1e0ab7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_isdag_isdag.return.not_getcycle_d_keys_": {"doc_hash": "91fe022049e156aa453bb6be6028c4af997d7dee832020aaeb2918ca8516c691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/core.py_literal_": {"doc_hash": "023cb3aaf8a9a03de489cfce9aa1a1dfd586c4653a28996b1f3d0ef151565801"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/__init__.py_try__": {"doc_hash": "521683552fdc020a63ee6fce96d6e5866223661ffa07497b2075276b9aeb6b1e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_accessor.py_warnings_CachedAccessor.__init__.self._accessor.accessor": {"doc_hash": "765c87191d6c53c297521b76a49363407a7f3d78e2cfa1fa1a35b38059d30c15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_accessor.py_CachedAccessor.__get___CachedAccessor.__get__.return.accessor_obj": {"doc_hash": "b22c1c700f0fbdbfea12bfc1c112c361457c5bab0a7e41f826828f824e511543"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_accessor.py__register_accessor__register_accessor.return.decorator": {"doc_hash": "c58c27689816dc68ab3412f073e24c91c9ba1a2ed864a286f05c58c1d8593321"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_accessor.py_register_dataframe_accessor_": {"doc_hash": "3af87056283baa53a4880f4aff0e7a9fbaf40501123732a739a92294711539d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_compat.py_string_": {"doc_hash": "2624a18ee310681a9b42eacd076e50968c3fe1bbaa427b76276931fdde6b174c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/_dtypes.py_pd_": {"doc_hash": "93a2b592f7ada1fa18434dc9fd23a7bb4ac19dba7c87a49ecd70426f87123ab7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_np_Accessor._property_map.return.self__series_map_partitio": {"doc_hash": "ee118e4248a46d40dc7d6a677e19e06a2cc4cba699ae93ed4c7ea178feb8b428"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_Accessor._function_map_Accessor._function_map.return.self__series_map_partitio": {"doc_hash": "9e23b352026474fb8e053401faefd48a95047bf8b75903ac52ec5fc5234732e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_Accessor._delegates_DatetimeAccessor._accessor_name._dt_": {"doc_hash": "ae90699491415b86db5bb5fec1acbdefecb3031f0f5b4e539461fc0db529ba69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_StringAccessor_StringAccessor.split.return.self__function_map_split": {"doc_hash": "09fd9acc2fe72de9a595c9391ff4366c686683de5e9ecc38e1b5539b6721bcd5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_StringAccessor.cat_StringAccessor.cat.return.self__series_map_partitio": {"doc_hash": "f2ce97ec894ae71fb99c87c91e01fb6f484de6260c5818f14e0db39e5638d385"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/accessor.py_StringAccessor.extractall_": {"doc_hash": "5fb47a4bc9c2d58003713edb16b0795ebd7b9ae1309f5e04c4141d83fc5bdce7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/backends.py_concat_dispatch_": {"doc_hash": "377267e8d1bb107de7e4a3bd4a4d9d3909c91fa4ffc76cd1b57e4539868183c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_from_collections_import_d__categorize_block.return.df": {"doc_hash": "53919e77e4260222c259dadb14cb191b1f1fb4c628242c2d1386f4a07be6e53f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py__get_categories__get_categories_agg.return.res_res_ind_0_append_re": {"doc_hash": "13b6dd5ca1507a61853bcc1d5f040d03195b3fda13da4600dbd8da31e35f1e6a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_categorize_categorize.return.df_map_partitions__catego": {"doc_hash": "50a3cfa2c43e87965a0a096e48521a5220b959d15dc18b644c065e1ef3355627"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_CategoricalAccessor_CategoricalAccessor.known.return.has_known_categories_self": {"doc_hash": "3fe5d4b5d07c19e830dc4de50278e7c496e59fe58593e189ebac366e2463bad7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_CategoricalAccessor.as_known_CategoricalAccessor.as_known.return.self_set_categories_categ": {"doc_hash": "4429e7aa6782760148b07fb0ceae4f6328a430fdd814de528965c5470eb30a91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_CategoricalAccessor.as_unknown_CategoricalAccessor.codes.return.self__property_map_codes": {"doc_hash": "8661377c723524e9091d63c608ad7d644596bf781c37da4992f7ea7027edca11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/categorical.py_CategoricalAccessor.remove_unused_categories_": {"doc_hash": "5e1bbcccccb6cec1d5f448aa41c9bbf4b4c7296f6325aefd4a17bd3f11ee2656"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_operator_pd_set_option_compute_us": {"doc_hash": "f799b7a3010fa57c002a663578f7da130226fa817a2f7edf0113cbb4bf0d3eba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__concat_finalize.return._concat_results_": {"doc_hash": "b84dcc351ff13456bfe236a0ea9fedd5aead305d56571756b4ccd4501b3ea9e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Scalar_Scalar._get_unary_operator.return.f": {"doc_hash": "1b29d9fdcd3c6c48649cab318783ef4628a8c44769278786a31130ff2976c84a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Scalar._get_binary_operator_Scalar.to_delayed.return.Delayed_self_key_dsk_": {"doc_hash": "d9a0697c564d5fd4139bc9a2163437656b06807f3d6ee074ca341bc5d8072590"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__scalar_binary__scalar_binary.if_return_type_is_not_Sca.else_.return.Scalar_graph_name_meta_": {"doc_hash": "1b9df0138cf8f97caeffcee0ce14faf199cb2aecfc7b648f2100f93e0042d3e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame__Frame.__array_wrap__.raise_NotImplementedError": {"doc_hash": "a576d83d304e0c8f3fe0de65ef9f7027571447a21ae8e88427f150c7fc3a8939"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.__array_ufunc____Frame.__array_ufunc__.if_method___call___.else_.return.NotImplemented": {"doc_hash": "3bf199d1c4837a1759294d07bfbaf0829cca7f967aa73dcd5037adb39c5cbf15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._elemwise__Frame.__repr__.return._str_fmt_format_": {"doc_hash": "fff89701229f9c59525d6d0e92905d758f760316b3549b76b3ffd15a95d1b3b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.index__Frame.index_22.self._meta.result__meta": {"doc_hash": "26374619103fd79cb7b3d06ab3369afac0dabc5d4e60eb1086fd966985fcf1ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.reset_index__Frame.reset_index.return.self_map_partitions_": {"doc_hash": "1c8f82b436848871be21dc1995a9005be898f5234f90910c29d4e339ceca1580"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.known_divisions__Frame.get_partition.if_0_n_self_npartiti.else_.raise_ValueError_msg_": {"doc_hash": "685c97b5d58309a3885638a2bca99bde942365feef7cfcf0e091ab7e6628f388"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.drop_duplicates__Frame.drop_duplicates.return.aca_": {"doc_hash": "7699ed750ce017b74c2dd525be1cf4f89bd3e02f425f0f8173ed996bf254970c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.__len____Frame.__complex__.return.self__scalarfunc_complex_": {"doc_hash": "39975b3dd1cbf8539912433f717dd9f3921a14c57180dd4668c4e0d192d0cf53"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.map_partitions__Frame.map_partitions.return.map_partitions_func_self": {"doc_hash": "14887de4b8b86db9881f81a6a2bfcbea32b7f90891fded1b8a5a4ec6c8fa418c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.map_overlap__Frame.map_overlap.return.map_overlap_func_self_b": {"doc_hash": "43a6d221d5cade22470e54b0792f3baadadc0f11e572c30a80547a14c220382e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.memory_usage_per_partition__Frame.memory_usage_per_partition.return.self_map_partitions_": {"doc_hash": "566456afc062eee7cf0cc77adbcf44189dff337241c35c3fd878b47aa1b36484"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.reduction__Frame.reduction._Generic_row_wise_reduc": {"doc_hash": "ae5f9449a7dc0d4ddafba71dcc89d974112bd3f37688d214d19b8d2ef692de16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.reduction.if_aggregate_is_None___Frame.reduction.return.aca_": {"doc_hash": "ff4fcec0d10b35a4d5f34fb6b965b9458aad25c7a2638e2bdcd9d082dfff844f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.pipe__Frame.pipe.if_isinstance_func_tuple.else_.return.func_self_args_kwarg": {"doc_hash": "9ed7dd07abe16eb032828dbe16e31ed334762fedefea4a1b8b5fc188a8bc414a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.random_split__Frame.random_split.return.out": {"doc_hash": "45644ce7bc4b37088abc2cf95e5c08f59079189b39b51b5262b652eba6708a2d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.head__Frame.head.return.self__head_n_n_npartitio": {"doc_hash": "8287d0bb05af37192897fa1fb90671123417dfe77a5e588de6f3cbe2f3953398"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._head__Frame._head.return.result": {"doc_hash": "bca8e1671df2f362650b0c61a7a4cd4cf991214d1fc4c7198f16ede965366af5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.tail__Frame.loc.return._LocIndexer_self_": {"doc_hash": "c2771e74c29a85be5caf1897fcf9bf2074847febcedd34c8e493a9e740dc0427"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._partitions__Frame._partitions.return.new_dd_object_graph_name": {"doc_hash": "064d36739508c8a7e51aad2b9f46e4d70ab1f257d62c342760313b6f2ee8a2f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.partitions__Frame._Note_iloc_is_implement": {"doc_hash": "72ef4e3b8aaab183dd8b016670907d736b6f0858624794a9af9128bb3e04023e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.repartition__Frame.repartition.if_partition_size_is_not_.elif_freq_is_not_None_.return.repartition_freq_self_fr": {"doc_hash": "2ff5142f9557d077d6df713a8a3f001b002430495820c2c0c3d8bfffb7733c4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.shuffle__Frame.shuffle.return.dd_shuffle_": {"doc_hash": "ef47e44ee1f06ef4d41778431def17c806e29ec7d633c916182ea8c1712ff288"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.fillna__Frame.fillna.return.parts_map_overlap_": {"doc_hash": "41acfc559a9c2c8a81e4a07b8ed048a3571b46a326600aa0e5a50f90697c391e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.ffill__Frame.sample.return.new_dd_object_graph_name": {"doc_hash": "48fb49bfca56caad92a15e1637c5ab43f643ce875d3133d9ae22cf92eebfcd56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.replace__Frame.to_dask_array.return.arr": {"doc_hash": "c8a62eaf6f94a6974a0633749ed1578da11260e5c02af1828198beae5c378e24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.to_hdf__Frame.to_sql.return.to_sql_": {"doc_hash": "1cb15928e1cdbf0a76376a891d9bfeabf3ea67d3cef125e70fa8bd4706b07d70"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.to_json__Frame._get_binary_operator.if_inv_.else_.return.lambda_self_other_elemw": {"doc_hash": "d1f0c5ae418bd027ab4ec59adeed8e4c528c4bd3d904d2b831afaf15a38fcd43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.rolling__Frame.rolling.return.Rolling_": {"doc_hash": "2abe969aa449b8ad70737da837dda34760c4ebd3f0388ae67543114b4eda6639"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.diff__Frame.diff.return.self_map_overlap_M_diff_": {"doc_hash": "4fb6f2bed1fff80b61e6136ae04903e2a068c9042820c51ba2df8c6fec701d95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.shift__Frame.shift.return.maybe_shift_divisions_out": {"doc_hash": "7ff6f98b12af221c1b7060759422f6cc5392826fe8a62eb94418fb700e73463c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._reduction_agg__Frame._reduction_agg.if_axis_1_.else_.return.handle_out_out_result_": {"doc_hash": "93a24f926b775aa614315d65346b94cda7b2b360fc3494fbbcfd2fcc3f467a7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.abs__Frame.any.return.self__reduction_agg_": {"doc_hash": "8b27d84e79032af37719d3a92d2ae62e5ab2c6fb685fac20add5836f4e930708"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.sum__Frame.sum.if_min_count_.else_.return.result": {"doc_hash": "691c1e57d369b4ebd5c68f5cfdd5b38ecfc82e1402cd735811cd9b00abc7b149"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.prod__Frame.prod.if_min_count_.else_.return.result": {"doc_hash": "af9a9edb100874c09f32d01e333743804c62f4b174ff668168bf312eea70c544"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.max__Frame.min.return.self__reduction_agg_": {"doc_hash": "5a41683c856e500fdf2ac99cca7d574083950999355fa6a191ea471713303d12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.idxmax__Frame.idxmax.if_axis_1_.else_.return.result": {"doc_hash": "f7c27d7bf5a0c74cadf9b7ec6d79728efbf4ae170d46da473fc0ace730bd6957"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.idxmin__Frame.idxmin.if_axis_1_.else_.return.result": {"doc_hash": "6a61682e16b95f5d60869ac551c85bde75b5d118cfd54e7333eb2d3067d060e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.count__Frame.mode.return.mode_series": {"doc_hash": "27e3ae66a6a79012081a8103d47c747d1ff1e6401cacd3434c7fe7321403b43b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.mean__Frame.mean.if_axis_1_.else_.return.handle_out_out_result_": {"doc_hash": "4df97813876e5885f1855a1eb32815c8cae2b5427042684bb2eebf15a8fd0f06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.var__Frame.var.if_axis_1_.else_.return.handle_out_out_result_": {"doc_hash": "6a1243de6056594fdc3f4fc4a55866ee97586c92ed597df311b16d1a94183772"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._var_numeric__Frame._var_numeric.return.new_dd_object_": {"doc_hash": "b7fa964f6efbf1f94fb4a9a845c074ac792323355796adfe85000e4d3cd5099b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._var_timedeltas__Frame._var_timedeltas.return.new_dd_object_": {"doc_hash": "a7ec4dccf1f23b4e2d44db5957890a413f0d1d710fec54e395f8a7ef77befa2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._var_mixed__Frame._var_mixed.return.new_dd_object_": {"doc_hash": "86cb136dfe73aa3bf5699137681cdf4d7c398e44ebeffb4178af96be340710e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._var_1d__Frame._var_1d.return.new_dd_object_": {"doc_hash": "db060ec45f72cc56f63fd415cf0ffa4ea99df150eff7c3aa69a33f5ec04094db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.std__Frame.std.if_axis_1_.else_.return.handle_out_out_result_": {"doc_hash": "774f268fa4c3dac8b2440ac07164746a4e86499610b97c62e8adc80af1f5e8c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.sem__Frame.sem.if_axis_1_.else_.return.result": {"doc_hash": "f44805fad7134e8cf2945a7e407adb65297fb023070d19fd593fcc9dbebb269f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.quantile__Frame.quantile.if_axis_1_.else_.if_isinstance_quantiles_0.else_.return.DataFrame_graph_keyname_": {"doc_hash": "9161383470383603b42bb07ff6a397652ba6f0b748c5eaeb99ba31eba2ef2e5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.describe__Frame.describe.return.new_dd_object_graph_name": {"doc_hash": "b63726bdb0887a4441b1aa4f656cd377b6d6418718422e6b8f20b21800fdb4ff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._describe_1d__Frame._describe_1d.if_is_bool_dtype_data__me.else_.return.self__describe_nonnumeric": {"doc_hash": "e033b4d517ab30419065c2fde3f842703c53f0a9e32a198b4f9b6ff2183794e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._describe_numeric__Frame._describe_numeric.return.new_dd_object_graph_name": {"doc_hash": "1fde032f5316859628829e82a48197721df09204e877023133638206ac94e813"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._describe_nonnumeric_1d__Frame._describe_nonnumeric_1d.return.new_dd_object_graph_name": {"doc_hash": "221070ab4890e7d7a6e4e49f68b8d8542a32a8b1daf9e170318c644353a16d85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._cum_agg__Frame._cum_agg.if_axis_1_.else_.return.handle_out_out_result_": {"doc_hash": "4868ce49bb95d082298799bec018d14c1a1c131f8493fbb2d5f8de36feb6e08e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.cumsum__Frame.isna.if_hasattr_pd_isna_.else_.raise_NotImplementedError": {"doc_hash": "cfcbcbb9f894c5662cd32757a4f88da31e1bea3c40f2ffe18bd43add374b5f6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.isin__Frame.isin.return.self_map_partitions_": {"doc_hash": "bb0eec5f1f2df6265e9c6fab6aed3627b7e8928255edabf886942d9920a1c12c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.astype__Frame.append.return.concat_": {"doc_hash": "48d1a993f62ed5921978f22aaab960af3636e572362bac50220391a8aa031655"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.align__Frame.align.return.result1_result2": {"doc_hash": "a2622bd6ef1ac9f414987e5db81dce7f98dd537d67d0f5154b754e033a964157"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.combine__Frame.resample.return.Resampler_self_rule_clo": {"doc_hash": "c7579590b597b5c063ec23f5fcb56e547a32411c4335b6eb4a37b0a75ea3df53"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.first__Frame.first.return.new_dd_object_graph_name": {"doc_hash": "8bf54a99f6adecf0a8666ad32f2715c2eb1c0623e12601b5f2d5efd08ede7597"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.last__Frame.last.return.new_dd_object_graph_name": {"doc_hash": "99e3624e8ed7e87fc603e7958157518dd0daaad3ca19e8ec56563044ba0601b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.nunique_approx__Frame.nunique_approx.return.aca_": {"doc_hash": "b939ae26f9f169c7c12fecab2b86c985636022f598f54492ba0109cefbebf3c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame.values__Frame._validate_chunks.return.arr__chunks": {"doc_hash": "d10cc0225998f2da95c48d1863ec100dcd32c90bbc0a8b5122173ab94b18cc40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__Frame._is_index_level_reference__raise_if_object_series.if_isinstance_x_Series_.raise_ValueError_s_no": {"doc_hash": "1b911491c258916531ab0de438b2ffea19fe6b9d48b8c31ecc854f9be93d14de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series_Series._repr_data.return._repr_data_series_self__m": {"doc_hash": "4fb2a8a6828e41119c951efd5b050fb0c5fd6187a482265d52f1624621286f7e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.__repr___Series.__repr__.return._Dask_klass_Structure": {"doc_hash": "1fac02675e536538ce6e4f0a07bf9e59213a07a8aee309d57b173db9f1587901"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.rename_Series.rename.return.res": {"doc_hash": "701dd6921892f2fde30cdbd39ca11b789c17e54847e0d2c1f6e4cd9144963ee2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.round_Series.quantile.return.quantile_self_q_method_": {"doc_hash": "7524d3f4ef393c59ac190930d9f4d5731dc6709de67c75d7996610cd3d9f9f00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series._repartition_quantiles_Series.__getitem__.raise_NotImplementedError": {"doc_hash": "0d17bde1367e3712f1947a155ae7882b147c56845aedbd80552b3654bdbb0878"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series._get_numeric_data_Series.nunique.return.self_drop_duplicates_spli": {"doc_hash": "1896b0ddd5a448ffa15211cfd01985180e3c6f7634d831252490c8c6b4a9d60f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.value_counts_Series.value_counts.return.aca_": {"doc_hash": "e456b5e968594342a70929442836bd24bb8d64f2484c0ae53afca2b0a5938b58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.nlargest_Series.isin.return.super_Series_self_isin_": {"doc_hash": "742f2772baa5f84853c385ee39f540913a9357c79323d8ba7a1a3e7f90c94826"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.map_Series.map.return.type_self_graph_name_m": {"doc_hash": "95eb24510c59fe36d778ff704b1b24e599bfc428676b7361a5778f889faefa00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.dropna_Series.to_string.return.self__repr_data_to_stri": {"doc_hash": "b237f69a62bbc70dce4d58f4cfdc1fbcbc188c7126c5fb09418efd95f0bf9c0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series._bind_operator_method_Series._bind_operator_method.setattr_cls_name_derive": {"doc_hash": "1a2a51eb5f2140dcd71ebdf494d369dc5233cbde098acf0d8de1b52ab004dabd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series._bind_comparison_method_Series._bind_comparison_method.setattr_cls_name_derive": {"doc_hash": "ea772cf4a3ab2db025a8ff8b9fc366d0e71cdf61fe245a828da3df43fb4852cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.apply_Series.apply.return.map_partitions_": {"doc_hash": "53e50abcf4318436c215ba6fbcb522c62704a9ec4118e94e781c31fc9b7d94d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.cov_Series.corr.return.cov_corr_": {"doc_hash": "5a2b8e8f66f40ec88b1938e3b596f6294ce91897619cc226a6d7f20c3f46d49e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Series.autocorr_Series.__rdivmod__.return.res1_res2": {"doc_hash": "a5a5954b4e50a2274a402faf4a0b349adc3a79cfc26e2ff6e8a468839fc71288"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index_Index.__array_wrap__.return.pd_Index_array_name_self": {"doc_hash": "fe35b26166966e1f23b9c4b8971e4d53867af5d3757076aaaa7f98991e8c3f8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index.head_Index.head.return.result": {"doc_hash": "427c8a052dce818b496bea08f129808b44211dce6b1a8d934c9c7e342750fd07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index.max_Index.count.return.self_reduction_": {"doc_hash": "c551c26b9057dd03164f0150e4a391558e505de1f0c86284476e58b53665cce7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index.shift_Index.shift.return.maybe_shift_divisions_out": {"doc_hash": "d26042185c3f9b8fd7a57f96a38a95895ac99e70e4bcc6206cee91a859881377"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index.to_series_Index.to_frame.if_PANDAS_VERSION_0_2.else_.if_name_is_not_None_.else_.return.self_map_partitions_M_to_": {"doc_hash": "ebf3357f81ffc90f959676cf91cd814900ccf3aaeb7a86ce8c16434f9fb5351d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_Index.map_Index.map.return.applied": {"doc_hash": "336df78f3805b6ee5c19666643cc81de4252146be3210711cab05f3efe3bbd27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame_DataFrame.columns_2.self.dask.renamed_dask": {"doc_hash": "6ff72d291b50e40b45002d63581947e98bd28e6989a3ada3e212e52ced6b0e06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.iloc_DataFrame.iloc.return._iLocIndexer_self_": {"doc_hash": "a341558da15c3e6ca6b652c585aa40ba27f55b87b81f863a4b01046dc7ccf019"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.__len___DataFrame.empty.raise_NotImplementedError": {"doc_hash": "4b84a20345f44c2f2662e1a944d183f0fe7a74c31e2b1807197e31f20a119d38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.__getitem___DataFrame.__getitem__.raise_NotImplementedError": {"doc_hash": "2970f63880abe231dcbc9d2bbb288cc87a261dce2eea4a926718466b869d0b29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.__setitem___DataFrame.__setitem__.self.divisions.df_divisions": {"doc_hash": "ded45bcad0cf0e9365ae30406af792711a4273346ef204afb7a66b719e03236b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.__delitem___DataFrame.ndim.return.2": {"doc_hash": "955dca6611f9d8d6f14abc10078d73191d0535291e886dc70cf8b08afb6e0058"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.shape_DataFrame.shape.return._row_size_col_size_": {"doc_hash": "b2bbebfa2b85687629a7d3b84796ce974dd4da4205f96939f437413a3dfeadc1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.dtypes_DataFrame.select_dtypes.return.self_list_cs_": {"doc_hash": "c816ace090536629472c20ed51bf859ce012f24e764021d0ad023bf94f683bc9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.set_index_DataFrame.set_index._Set_the_DataFrame_inde": {"doc_hash": "59b42fc966c331628c1bd476ef6bb6105f8a01e92b0fa92fea20fe133d838535"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.set_index.if_inplace__DataFrame.set_index.if_pre_sorted_.else_.return.set_index_": {"doc_hash": "39f7486cf7b22ff837537f6794c543183d420d42c55737cbd4a8b9a71ef71503"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.pop_DataFrame.categorize.return.categorize_": {"doc_hash": "671fb28cae3f0fecb09a45b6ce53267a8733df53906c54dff4ac2eec4c26ae7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.assign_DataFrame.assign.return.elemwise_methods_assign_": {"doc_hash": "78b392aee844b9f3577496032cc81edd8e63995a64015553107845eb55d82a4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.rename_DataFrame.query.return.self_map_partitions_M_que": {"doc_hash": "16107b1828bf4e6f0f5146f319a0143ba2479b59fcfa268a147ae1c4b96e26c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.eval_DataFrame.clip_upper.return.self_map_partitions_": {"doc_hash": "65ccd11e4851ef3849ac09cd937a5647ddce54ad24eaf43104baf17d155fd587"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.squeeze_DataFrame.squeeze.if_axis_in_None_1_.elif_axis_not_in_0_1_N.raise_ValueError_No_axis": {"doc_hash": "622cbb0e95ae1b90577a3331a39b6c9c2c2a1b45014dc04d4ae787f28c8d5178"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.to_timestamp_DataFrame.drop.raise_NotImplementedError": {"doc_hash": "2b3451ce7311e0522ff93f48a21e010bb3e7b12262c0a112c39a5b2903e4475c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.merge_DataFrame.merge.return.merge_": {"doc_hash": "9e4409becea884cc092ace9e73e42be99b5024286f513c710e63386ea15775c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.join_DataFrame.join.return.merge_": {"doc_hash": "908d6f8908efd8882938743ed77abaa0e738c185cd00ae83027843e0ccfee01b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.append_DataFrame.items.for_col_idx_label_in_enu.yield_label_self_iloc_": {"doc_hash": "f84bd52e0262389a55f36c590209b51d45a082bd2effb13efc525cfc56398eae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame._bind_operator_method_DataFrame._bind_comparison_method.setattr_cls_name_derive": {"doc_hash": "9a12bfc8f11f5dfd5c7f8084af8ea1b31b7a43fc9ce26cd2136b62c634860b5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.apply_DataFrame.apply.return.map_partitions_M_apply_s": {"doc_hash": "28629f774e9373a1a232f5b2e95c52339dd6aa3158f89ec96ee1fc4e94b0ddec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.applymap_DataFrame.corr.return.cov_corr_self_min_period": {"doc_hash": "213110f84e3eb52d37fe01022a38b3d15c39724dc13d5233998a1a455d05228a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.info_DataFrame.info.put_lines_buf_lines_": {"doc_hash": "ccdaae9e218f748cc7e1d8f6a36b89580bce1c2ef4e84533269d95db1a13fa88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.memory_usage_DataFrame.pivot_table.return.pivot_table_": {"doc_hash": "98342371e3e99524c7a300b46b692b95b50b4570f8fb11980b3dd8d77e8b561a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.melt_DataFrame.melt.return.melt_": {"doc_hash": "b855cf83783db9df009269f6d437c7d9427f78b385ff3485ddac1680b8122766"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame.to_records_DataFrame._repr_html_.return.self__HTML_FMT_format_": {"doc_hash": "1d2ec3cc8ff6bb125c41df9b6d50ca24e61e46626edafb3f5ee4cf560f8254da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_DataFrame._select_columns_or_index_DataFrame._is_column_label_reference.return._": {"doc_hash": "7b02ed53f82733ea07a03eaca07ad8e904a637801205167da72c6dbb131208db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__bind_operators_is_broadcastable.return._": {"doc_hash": "45fc0d87506b8b013c86473a6500d6dabaff9a9ad0fe85579340305f8ba5b337"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_elemwise_elemwise.graph.HighLevelGraph_from_colle": {"doc_hash": "1ee7b4f931ebc0cf041d553dfe921531486e2194bcffcf9b4ede03b1875609b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_elemwise.if_meta_is_no_default__elemwise.return.handle_out_out_result_": {"doc_hash": "3e686f5f42db7f2d03d02c866c81edfd71ef895ea6a440ba2dd95b270f616c5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_handle_out_handle_out.if_isinstance_out_Serie.else_.return.result": {"doc_hash": "d0d63cded88364fd708b4fa5d084b5c967bbca93c2df1f104369ac366d5f1d12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__maybe_from_pandas_split_out_on_cols.return.df_cols_": {"doc_hash": "7b603e8d7fe76fdae872b8d64015486a850d9a008224c498f01a2e93fd71a68f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_apply_concat_apply_apply_concat_apply.npartitions_2.npartitions_pop_": {"doc_hash": "e2144bf657021c24c64cea3b3f823104793a5257769eac082a1f60daa6c04b7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_apply_concat_apply.if_split_every_is_None__apply_concat_apply._Aggregate": {"doc_hash": "789b092be22cf9d5728464aa8d2b21b3d5fdec3a74ff4fb1bcecd0303ee1c903"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_apply_concat_apply.for_j_in_range_split_out__apply_concat_apply.return.new_dd_object_graph_b_m": {"doc_hash": "09737d3d8c04c9134d70fb93b567b31314e011b09d30e748cbea7a9e3457b538"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_aca__emulate.with_raise_on_meta_error_.return.func__extract_meta_args_": {"doc_hash": "b5c64d9dd138b94728b42f54ccf8f724850492ef0bfbecd8e0bfca5d966e27d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_map_partitions_map_partitions.divisions.dfs_0_divisions": {"doc_hash": "e0678a1378dc33a79a2be578981d03439f7b3df6d2d65a76983303f6803c94af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_map_partitions.if_transform_divisions_an_map_partitions.return.new_dd_object_graph_name": {"doc_hash": "90fd162ad9f391b05a7655280a7cace759352a13bde5223043c09582c9578d96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_apply_and_enforce_apply_and_enforce.return.df": {"doc_hash": "e606df89878704585505bd938ec7e5b86a4b8d62fecb7b1176162b0b6b6f4800"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__rename__rename.return.df": {"doc_hash": "13a8f72b99544060d30010ee8cb4303eb6bdf6b69b835d9d1603e7edf4500399"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__rename_dask__rename_dask.return.new_dd_object_graph_name": {"doc_hash": "df45bdd23834d838fa8156c4f37e502ec002aa7d6b21a1413ef3c9aeb1994d25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_quantile_quantile.df.df_dropna_": {"doc_hash": "9943f3dc733e8803b3b08970f330b6893d65025d80fd37d5369f4ff232b77d97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_quantile.if_internal_method_td_quantile.return.return_type_graph_name2_": {"doc_hash": "5d938e5daeaa84293ca7b88915fa391a5d55857d0062324d12d9a82d276eb5bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_cov_corr_cov_corr.return.DataFrame_graph_name_me": {"doc_hash": "d34fd5813cbe1e20864722360ce2eb988704c699fcaf77362e1ff82401cac3b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_cov_corr_chunk_cov_corr_chunk.return.out": {"doc_hash": "6a3e622bccf742dd2abb8b0d2b853e5aa6f8653e2677e607874b165fb48311d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_cov_corr_combine_cov_corr_combine.return.out": {"doc_hash": "b7fea35d5c949f8cf370a4989d031c9782189bfc4cbdafe3701750d4c66ae895"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_cov_corr_agg_cov_corr_agg.return.pd_DataFrame_mat_columns": {"doc_hash": "588eccccb28d73ab249cb04496485bc00fae6581e02e1e67d1024159d90e3cef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_pd_split_pd_split.return._df_iloc_index_i_for_": {"doc_hash": "239ba94d59c461347575acac40abe2852e1e6a5cd5457bc216bbd8f39d68c7df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__take_last_check_divisions.if_len_divisions_1_.raise_ValueError_msg_": {"doc_hash": "581400b19a60394c9fef2a5f05b0e7831c1a684293cbf7282fb98c4307857cc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_divisions_repartition_divisions._left_part_of_new_divisi": {"doc_hash": "6c7e85736692e95b7be6fb8f51305fb1944a001f126e620064c830560fa2d3f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_divisions.while_i_len_a_and_j__repartition_divisions.return.d": {"doc_hash": "f083b87dfe44bd2a5bd7654949845d8b42b0108f4cb8343f5eb7b9263ac18d82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_freq_repartition_freq.return.df_repartition_divisions_": {"doc_hash": "05eea15e4b2f5e87771d985418451f20ce262c2ae141c1cb92b04c79bdda864a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_size_total_mem_usage.return.mem_usage": {"doc_hash": "a5a7d4006910cc373bb6951723a26a34d090b2024b5bcc9d5f1f41fdc3d6beb2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_npartitions_repartition_npartitions.if_df_npartitions_npar.else_.if_df_known_divisions_and.else_.return._split_partitions_df_nsp": {"doc_hash": "2258d10ba60f8fc5bad0653fd52138fe04a7fc5458f0be268f01fb642781e3c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__repartition_from_boundaries__repartition_from_boundaries.return.new_dd_object_graph_new_": {"doc_hash": "2e553d7af69e861b4d34868ab4241cc0e302e85d6388eca071cfff898821d03f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__split_partitions__split_partitions.return.new_dd_object_graph_new_": {"doc_hash": "22a30028ae05ea4b7ae0807b2530f485a7a02e0f153ae0bb4d76c5b889eb4572"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_repartition_repartition.raise_ValueError_Data_mu": {"doc_hash": "860f1142482c7b92bbb80e5ce0668f41054b4351f04c3339f45e26d53faa0269"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py__reduction_chunk__reduction_aggregate.return.aca_aggregate_x_kwargs": {"doc_hash": "f30416425faba5d33e90d2710eb5ad8417348d089c6e522cd70fadcbc1b78786"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_idxmaxmin_chunk_idxmaxmin_chunk.return.pd_DataFrame_idx_idx": {"doc_hash": "d06e3b38461269b7176649a041f2b988da4e69eea5d565ee8e616bd2b36035ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_idxmaxmin_row_idxmaxmin_row.return.pd_DataFrame_idx_idx_": {"doc_hash": "97884027d4d7f08232744cce68ce1cb6d9d07c102f3a432c8e9088b3fa62d4f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_idxmaxmin_combine_safe_head.return.r": {"doc_hash": "065f8bc05743b0fe64ad1b5ed90f35489d261dabaf466cf56ce79b15b4955265"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_maybe_shift_divisions_maybe_shift_divisions.return.df": {"doc_hash": "0a95863a8801bc1afdac2bdb2d31343f546a6bb05e6214aa19b728bf1b6ea61d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_to_datetime_has_parallel_type.return.isinstance_x_parallel_ty": {"doc_hash": "4b54d14145afe94d6da44136c7589974caa21cc8a55b064d5b5402163bc356ff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_new_dd_object_new_dd_object.if_has_parallel_type_meta.else_.return.get_parallel_type_meta_d": {"doc_hash": "cb3f3f12c151120f6facec028d39b866b6f9ac236b7189407f82616cdd860e03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_partitionwise_graph_partitionwise_graph.return.blockwise_": {"doc_hash": "0e084714c5862b9b457da9d543f78706d97e41e7aba75a5411e69724cf781486"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_meta_warning_meta_warning.return.msg": {"doc_hash": "c8981c3cfd6be84d9502d443e49823edd84a62db4f227f47fa3ef1e96007de39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_prefix_reduction_prefix_reduction.return.new_dd_object_graph_name": {"doc_hash": "543a63a550ddc2c2fc9b4b60e50901f9f33c07900028af2dfb3e3ece705edee5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_suffix_reduction_suffix_reduction.return.new_dd_object_graph_name": {"doc_hash": "a6d50e7a76f40a9ac3519563e65d3f5fe3c61a0d0bdf5a0d041c26880a43f85b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/core.py_mapseries_": {"doc_hash": "6657b60e903c61c4b560c34d51238ae599647a4f2f81f885a6cb608fa947a412"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/extensions.py___": {"doc_hash": "9e24fbef30bf6797f341bfe58f74cc2d6d87f92ff66abfa6b4687331deea7418"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_collections__determine_levels.if_isinstance_index_tup.else_.return.0": {"doc_hash": "8df0984fb7ef69aaef201da0e47e8250e4c97cb830588aa15de80ae04d276e8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__normalize_index__normalize_index.if_not_isinstance_df_Dat.else_.return.index": {"doc_hash": "857ea32c5f593980328fbc72740cabe8c538fa858a1d9627346c8cdcfb3d3ae1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__maybe_slice__is_aligned.if_is_series_like_by_or_.else_.return.True": {"doc_hash": "dd263fe3b986a09ea3f156eb9c7ec873e81e1a31ef2a978412b2b6604d659db8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_raise_unaligned__groupby_raise_unaligned.return.df_groupby_kwargs_": {"doc_hash": "3ffac40f1522ea470028db4bd53233fbb0a7bba05ef983ed28cb4528106264b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_slice_apply__groupby_slice_apply.return.g_apply_func_args_kw": {"doc_hash": "889c56cfc4b6574e0a3a33c58f1f48d073dcfa428bcdfa87b2b072ccc88478e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_slice_transform__groupby_slice_transform.return.g_transform_func_args_": {"doc_hash": "2a07905ef922ebcf56a54588733507f68e763374dccb60d71f02297745474f79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_get_group__groupby_get_group.if_get_key_in_grouped_gro.else_.return.df_iloc_0_0_": {"doc_hash": "0e21f5f0c941126b6b905d108a78fc2851f384b4e2205c30b5df59291cb6a0db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_None_31_Aggregation.__init__.self.__name__.name": {"doc_hash": "ed92f88b6d4b7c617df048474ff598ee10577bd0955008557dd67fe230ad04b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_aggregate__apply_chunk.if_is_series_like_df_or_.else_.return.func_g_columns_kwargs": {"doc_hash": "af106093cbbcf805773a81b817b3b7ee0e1ef75a103f145819dc9ad9d283226a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__var_chunk__var_combine.return.g_groupby_level_levels_s": {"doc_hash": "099e917bf709f8fb3c60692cee31f28f2e1ff34bdbca67f707be0d6e37b8e817"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__var_agg__cov_combine.return.g": {"doc_hash": "03f7957ce8358488feb7cf6cc6450d26fa4b8be64d97d4ade41013de17794f5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__cov_finalizer__cov_finalizer.return.pd_Series_vals_index_ind": {"doc_hash": "4cb544824ba2e969e3ba2e97ed34661666728903b4e417faa2d68369d63e2eea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__mul_cols__cov_chunk.return._x_mul_n_col_mapping_": {"doc_hash": "98c95d6a5e2ac8976760137c2fa804e14163d434d48110cea192c1836f62131a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__cov_agg__cov_agg.return.s_result": {"doc_hash": "39171ff7636c69e4535ad23bd95d2a8b0133b9f8db922416714836351873b4fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_None_34__nunique_df_chunk.return.grouped": {"doc_hash": "7e8bd5600b29b12d971a26054a912fc635f5b862b0c7c555dea80bc302395000"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__drop_duplicates_rename__make_agg_id.return._s_s_format_fun": {"doc_hash": "1acc2ee09be71d88cc965410998039ae5415fed72fba7bd0d07e74963fb974d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__normalize_spec__normalize_spec.return.res": {"doc_hash": "fabec08d5635c4f525b38843ebf997feb9353ae998e131312590b8a4002c777a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args__build_agg_args.return.chunks_aggs_finalizers": {"doc_hash": "d120c8260e360e5230f678e86ae6fdaf792fb7d6987b89f3f0b0e16812cedb3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args_single__build_agg_args_single.if_func_in_simple_impl_ke.else_.raise_ValueError_unknown": {"doc_hash": "2f908921fa01289898abb448ff317a920e9085a887f67cb118daed5076a8aa5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args_simple__build_agg_args_simple.return.dict_": {"doc_hash": "b6355c9cd1ed256be6e11db3c3d96c0154454e8b0164418bd86f13416aaac80a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args_var__build_agg_args_var.return.dict_": {"doc_hash": "9f8e8695ae0d09a48fd5b6a08d764aacbfac2d306b51a8798af73ed685bc926b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args_std__build_agg_args_mean.return.dict_": {"doc_hash": "7502a9e5211d2e3a9ea79236e700fffad2984d8e9a0ccf017a8520c144b966c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__build_agg_args_custom__build_agg_args_custom.return.dict_": {"doc_hash": "635def7548548d02fe44efc4a579486cb0ca1006ad55cbb2718e2aa0c532f399"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__groupby_apply_funcs__groupby_apply_funcs.if_is_dataframe_like_df_.else_.return.type_df_head_0_to_frame_": {"doc_hash": "dfee4438d04716548a2f6127a89e3efd7a73232185b02156593c5ba0dda80304"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__compute_sum_of_squares__compute_sum_of_squares.return.df_groupby_keys_sum_": {"doc_hash": "12ebf6bde14d424b434453d449b63181b1bb762701e54784c41f44147867743e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__agg_finalize__cumcount_aggregate.return.a_add_b_fill_value_fill_": {"doc_hash": "6295c0a41bd498ada3f6dfefd966c1203177dbe1bfa208f2ea39356909e49174"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy__GroupBy.__init__.self._meta.self_obj__meta_groupby_": {"doc_hash": "d2b3aebd1b25d3bbcecccac75bbbf7fb8eb255d67bab69dd0f56293a83abb32e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy._meta_nonempty__GroupBy._meta_nonempty.return._maybe_slice_grouped_sel": {"doc_hash": "7f789cdca28556327b31064223fb37e3cbe371a31a32ae9180720bd9cb212aff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy._aca_agg__GroupBy._aca_agg.return.aca_": {"doc_hash": "5c1434c5980b2482c7b8009918835320021c7ac176eb9fa984050f0408b369e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy._cum_agg__GroupBy._cum_agg.return.new_dd_object_graph_name": {"doc_hash": "edb7efc1490424d657e36b50c7e353bf1e8ebb52bdb038f9d9ef899907d99bcd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy._shuffle__GroupBy._shuffle.return.df4_index2": {"doc_hash": "28333d57ae14e978644a1fb66f27c376462e83ba752d32f1450e1e5180debbb7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.cumsum__GroupBy.mean.return.s_c": {"doc_hash": "e8e1246379f8d8149c51155d549909016ebc888530b1a74e9f71ad9b6d9d6b4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.size__GroupBy.var.return.result": {"doc_hash": "197d0368d5307224b39e7ea5d0d9f382e512f94f231e0ac964a8b212cb408033"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.std__GroupBy.corr.return.self_cov_split_every_spli": {"doc_hash": "3277df8781dc3c4c24be95f475b9bdb6bfc05a7c363d8ccf0c10d81a9b5f7d56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.cov__GroupBy.cov.return.result": {"doc_hash": "f7ceedeb8dc76fc86eaddfddc8c72a0a21da31f460364a3e80769e40a214a8e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.first__GroupBy.last.return.self__aca_agg_": {"doc_hash": "a531cb495339dec16cdd559a94b721ee627849d60f5cd7ebabd1fc5a45d83aaa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.get_group__GroupBy.get_group.return.map_partitions_": {"doc_hash": "c161fa8623bef922a1f1299b93397e38afff5f2e43ea77df3d5c4a1ffb18aee2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.aggregate__GroupBy.aggregate.return.aca_": {"doc_hash": "25b815c2ba7529a03f43778479b129428643bc631777fc4f25e6dbd474749db8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.apply__GroupBy.apply.return.df3": {"doc_hash": "0d136c7c6b42941ce06a56357038c433f45df1f232927c88dcdd5cb54c0e0dfd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py__GroupBy.transform__GroupBy.transform.return.df3": {"doc_hash": "fc6ba8e847a03404c0d102e5ec816dbd8aa12319291bfe1dcc2c8047c2768fac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_DataFrameGroupBy_DataFrameGroupBy.agg.return.self_aggregate_arg_split": {"doc_hash": "16fc848c3900e9e3a297139b7fff107345801317bd5cdf53aebd5aaf6802040a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_SeriesGroupBy_SeriesGroupBy.__init__.super_SeriesGroupBy_self": {"doc_hash": "87c2088123d6fb9edf06b8b4b4fc26672e8d77d2de13b109ca9430c0c567ab73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_SeriesGroupBy.nunique_SeriesGroupBy.nunique.return.aca_": {"doc_hash": "1fe934804f524f63e74e6a44677d193bbcef389be6d6478a4a0ac5d717c820c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/groupby.py_SeriesGroupBy.aggregate_": {"doc_hash": "74d58c00274622f9012b4541205d5ea618ad717b895e8edd599ae5cb2da1b13d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/hyperloglog.py_u_Implementation_of_Hyp_compute_first_bit.return.33_bits_sum_axis_1_": {"doc_hash": "3c2ea59e080699dc738110d1a267fbe558d8d6a507d67efcf249eb678265449d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/hyperloglog.py_compute_hll_array_compute_hll_array.return.series_reindex_np_arange_": {"doc_hash": "b24d9752c56f9d25e92b1038d2f217c6b3129051a7bfcd9643448ad290930291"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/hyperloglog.py_reduce_state_": {"doc_hash": "5f5f486a4ef82275d1a63740d0780f72f0a98859e2ca14db9b3694c9a4c15446"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py_from_datetime_import_date__IndexerBase._make_meta.if_cindexer_is_None_.else_.return.self__meta_indexer_cin": {"doc_hash": "2853c31b88c860b013dff210f784cca9480c09e9af782b0595431d0c50f8885b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__iLocIndexer__iLocIndexer._iloc.return.self_obj_map_partitions_m": {"doc_hash": "ec410441280d2886fb614112270ca7e8af4d8e854938240c42887c18dcf560e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer__LocIndexer.__getitem__.return.self__loc_iindexer_cinde": {"doc_hash": "869a06955a8a061430919195737e4406fc8cdb5cfc45f3036b7ba83864d6c9e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer._loc__LocIndexer._loc.if_self_obj_known_divisio.else_.return.self_obj_map_partitions_": {"doc_hash": "16480b05b91a1a982e7cc9c5dda28c53c95c46cf581c6f82a782a5e01d6792ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer._maybe_partial_time_string__LocIndexer._loc_array.return.self__loc_series_iindexer": {"doc_hash": "aed322dd1021704caf54cd5ce145c8154e94aa79e040d4d55582afdde01ec386"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer._loc_list__LocIndexer._loc_list.return.new_dd_object_graph_name": {"doc_hash": "20c435c01dfebaebd1a4d6ba9dd587de43fa937ac93f5f77ad4f5ef45e7e85b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer._loc_element__LocIndexer._coerce_loc_index.return._coerce_loc_index_self_ob": {"doc_hash": "79e6ec9c246ed76321e4723528c0101cbca36d376fe49b0e2bd7c62454c0c8e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__LocIndexer._loc_slice__LocIndexer._loc_slice.return.new_dd_object_graph_name": {"doc_hash": "80a17f587d58cc1aad50a054e7524db483a389648e58684a4d2c865d40ac4376"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__partition_of_index_value__partition_of_index_value.return.min_len_divisions_2_m": {"doc_hash": "cbe4fb55ad75eed4b2ff9a73f6a87334f680705641be0d5bce31c34ddd4d2161"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__partitions_of_index_values__partitions_of_index_values.return.results": {"doc_hash": "2cb63eeb6240844d327ac03dccee6ec110ebb55954e9b317d0f8756ada6da97c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/indexing.py__coerce_loc_index_": {"doc_hash": "a1aa2487c1723376ed8f2d426e5bd5680bc431e5400650ea7ebf0484d721ec04"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/__init__.py_from_array_": {"doc_hash": "b22320bc0539ec5108992a5aaf455719aef9e252e57d7ba21183f234f26ec868"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_from_os_path_import_basen_from_fsspec_compression_i": {"doc_hash": "07e53f8146d6c18e9d2547cecdb909d78fada96da913e4135baff130e507b185"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_CSVSubgraph_CSVSubgraph.__init__.self_colname_self_paths_": {"doc_hash": "d60bbd976441ec6dbfa0a24d6f709c7b70dc5c4f768afb961af4c71706ae8011"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_CSVSubgraph.__getitem___CSVSubgraph.__iter__.for_i_in_range_len_self_.yield_self_name_i_": {"doc_hash": "304cfe5f667551bbae09e0b0b70e7ccee2312c554c693d2fb26319a10b8ea5dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_pandas_read_text_pandas_read_text.return.df": {"doc_hash": "3894530e8f4d6ab0c9b9f5c5994315b8e93553d02d2afb9042fc4d2d533ffe14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_coerce_dtypes_coerce_dtypes.if_bad_dtypes_or_bad_date.raise_ValueError_msg_": {"doc_hash": "767dc67f9a00d258c8069a53520759f269ea39d43117d54ceeb38bbea635548a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_text_blocks_to_pandas_text_blocks_to_pandas.return.new_dd_object_subgraph_n": {"doc_hash": "b29881a7ea94b081d3cd90988c791d80c24cfcdc418103f51783a8d139cbd490"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_block_mask_if_psutil_is_not_None_.else_.AUTO_BLOCKSIZE.2_25": {"doc_hash": "c10bdfb08aabb44a768dc7e13fcd31ff3a8065984ec494f49ca7727c8b3ae7dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_read_pandas_read_pandas.b_lineterminator.lineterminator_encode_": {"doc_hash": "8eff340a872e44aed315ca636781bb4ce76bb697ead73f6f065d2d2ccb3c4d5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_read_pandas.b_out_read_pandas.return.text_blocks_to_pandas_": {"doc_hash": "63d0c12da657d1e0f7d062049e9fd3bc792371e433b9f13b5488d005281b473a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_READ_DOC_TEMPLATE_READ_DOC_TEMPLATE._": {"doc_hash": "13b276b5edbb629be2f92d63cfa11a7ec45497d283e1796fce12735be082d909"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_make_reader__write_csv.return.None": {"doc_hash": "801e0573ddf7dbea4c59d87b136548f83a54a87a1eea2b121368c1a902ac78a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_to_csv_to_csv._": {"doc_hash": "0bbc2a44e78e7ca3c1cdb469ec64724425ea3a84b4f0e5e51833d1471adf98f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/csv.py_to_csv.if_single_file_and_name_f_": {"doc_hash": "ecd97e9c2c1dad629852b9006b321742ce3ca7b34dbbf638fef9498985eb3c8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_pd_make._": {"doc_hash": "17cf13ae13a5d4ff4c8a00627e67d9e1b475620ed2bf06083e30c51cfd29fbc5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_make_timeseries_part_make_timeseries_part.return.df": {"doc_hash": "fb0e4d46cbfcb8616da058cf898e36b2ee0f5b5d39663a56f057ccd2c9252fed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_make_timeseries_make_timeseries.return.DataFrame_dsk_name_head": {"doc_hash": "33d8ad7fb2f5962f3367afcb5d5ff147a47ad1909c970be4bb12688074f85285"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_generate_day_generate_day.return.pd_DataFrame_": {"doc_hash": "ed185045169e29c72d429976f2bc2bf90635edce66e7b89a2a06854cb2003f26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_daily_stock_daily_stock.divisions._": {"doc_hash": "9524b61f82f7d8536ccfb8484ef0c2f2b2f384055432937e7d0b5048f239f3a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/demo.py_daily_stock.for_i_seed_in_zip_range__": {"doc_hash": "e9a05b0e268ae1145ddcbd9998a1c6b4a5d9c02c24cd88d90cad8bf72410f0d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_from_fnmatch_import_fnmat__pd_to_hdf.return.None": {"doc_hash": "bc8be7b9cf6864b1626a9f03dd71555c6b830940755cb53419838b4945bd52e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_to_hdf_to_hdf._Store_Dask_Dataframe_t": {"doc_hash": "bc9f5d52162422af0aa0f85def60d9da00397901a780a9127b718a0ab82db298"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_to_hdf.name_to_hdf.for_i_in_range_0_df_npar.filenames_append_fmt_obj_": {"doc_hash": "0960a7c82d08e01729a683cc2dd3a0bb4e4f4eb3031360cc9fd2d0163e0b8f40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_to_hdf.for_i_in_range_1_df_npar_to_hdf.if_compute_.else_.return.delayed_Delayed_k_dsk_": {"doc_hash": "2a2b34941005e919ca5dfd1368d78c8cb3c1f5d26d6dbea76e5c0c2b371e7720"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_dont_use_fixed_error_message_read_hdf_error_msg._": {"doc_hash": "ec55d5a64433581a1fb152c9b6c33ce837417eedcbc166d6b5c2467a7941888a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py__read_single_hdf__read_single_hdf.get_keys_stops_divisions.return.keys_stops_divisions": {"doc_hash": "529f788e0e49c0790b75ad158fa9405659cbff4dfd81222116dae10397774b82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py__read_single_hdf.one_path_one_key__read_single_hdf.one_path_one_key.return.new_dd_object_dsk_name_": {"doc_hash": "ae44bf29db82019177b9d7495fa11f5d78186e6b8b574f0e897257e84d622ae8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py__read_single_hdf.keys_stops_divisions___pd_read_hdf.return.result": {"doc_hash": "a213f118bba2bbe6c10e0cf6fb9a18f53958029c07f8f599947f8117eb3bb844"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_read_hdf_read_hdf.if_chunksize_0_.raise_ValueError_Chunksi": {"doc_hash": "aa80131775c19b6dda0a8f4a691f9bed8a1178b2bfa70908b3b3c27c1fec8d5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/hdf.py_read_hdf.None_7_": {"doc_hash": "74469e0f5fd3a453ab9d8cadf55f24de697c10448c381aaad71251f9fa04664b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_math_import_ceil__meta_from_array.return.meta__constructor_data_c": {"doc_hash": "104cc6c1e5ed5f675ab55edf2a2e9acc8b11b2c8aee4d42c88f9a32214aa7e1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_array_from_array.return.new_dd_object_dsk_name_": {"doc_hash": "b9250930bf19fcc550dc1d533955c1e8384b5673360d15d8305b250257354fd6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_pandas_from_pandas.if_chunksize_is_None_.chunksize.int_ceil_nrows_npartiti": {"doc_hash": "033d1648de8a9e289ff73e0bfe2a448dd4b479dcc25d8aa3f72bf51e62178cac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_pandas.name_from_pandas.return.new_dd_object_dsk_name_": {"doc_hash": "7784e8c940a6ea34990b40840d7a70034a1df399a1daa91222ac905c4e5b480c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_bcolz_from_bcolz.if_index_.else_.return.result": {"doc_hash": "c741e3e5b9a4ecb293d684103517fb607c08b6aeaddf7ed4008b8650175daf0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_dataframe_from_ctable_dataframe_from_ctable.return.result": {"doc_hash": "f565af2b4c9d771f5571ba1a26c78a9df39af61634496c09e0907305bde4d44b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_dask_array_from_dask_array.dsk._": {"doc_hash": "a4a048dc021be03b849eb8fa0ae9a2c43969b42d5cab8dcd3f691a08d3abb385"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_dask_array.for_i_chunk_ind_in_en__df_to_bag.if_isinstance_df_pd_Data.elif_isinstance_df_pd_Se.return.list_df_iteritems_if_i": {"doc_hash": "b05b65c11e6f603080e3050589f0c475ca760e2ffc928f7db29de1424dd31784"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_to_bag_to_bag.return.Bag_dsk_name_df_npartit": {"doc_hash": "bb6ebc4d11486c2246dc85579d9f940458ab539ea6a48610bcb878adab418ad0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_to_records_to_records.return.df_map_partitions_M_to_re": {"doc_hash": "653dc95a910129ebea985993ba9c60f1aada792d1abac71db60c66b0c5f766dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_from_delayed_from_delayed.return.df": {"doc_hash": "fac053b20150acd8b42bc5f0c40f161b8968ad19f6c1d7ce980b3ed72101aa29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/io.py_sorted_division_locations_": {"doc_hash": "d35fabe35f4455f9bae1510d22977c1d21b0afe50e5afb1d35483ef10acc5ba7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/json.py_io_write_json_partition.with_openfile_as_f_.df_to_json_f_kwargs_": {"doc_hash": "5a9bf76bb4d9b17564894cc66f80262b5827114981f68612a38103a8a4b957b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/json.py_read_json_read_json.storage_options.storage_options_or_": {"doc_hash": "543027d75f551aacab39d1ff04ea1ab81006011e7adaef23ec36c9928ecd0085"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/json.py_read_json.if_blocksize__": {"doc_hash": "2f9c353e2185f4f0357016443db4c6d00d1bd51dbeb9889008b0e2603483b3a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/orc.py_from_distutils_version_im__read_orc_stripe.if_pa___version___Loose.else_.return.table_to_pandas_date_as_o": {"doc_hash": "e19a8455994a7142becb84433388898cf3f2ef74c96ae224cac2191c787975ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/orc.py_read_orc_": {"doc_hash": "85dd9bdd7328d3f9b05dbc18a8a95e948cbbb5f7077f759bc24ac2cf8b1df9a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/__init__.py__": {"doc_hash": "f0f2ec33b654aaa781cdd147f79f3b7231216be8bc5054bd9aa8f04b87a78192"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_from_functools_import_par__append_row_groups.try_.except_RuntimeError_as_er.if_requires_equal_schema.else_.raise_err": {"doc_hash": "91b162e83260e785aee13911ed9c40a56bae39c5c36e6db162a3b8eaac4f1345"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__write_partitioned__index_in_schema.if_index_and_schema_is_no.else_._No_index_to_check": {"doc_hash": "aa47f9833fec2496e64e56cc7e296689455ede25f33c0190849a815688731eac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__get_dataset_object__get_dataset_object.return.dataset_base_fns": {"doc_hash": "4c110ffd1eca6e1bb59613425ca976a2e963d36a9a2f26a01362121c6d84cd8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__gather_metadata__gather_metadata.if_dataset_metadata_.else_.return._": {"doc_hash": "1860c128ddb14841eeb007e2bc0cf0731aa865140b7c70d88eaee2de06076b07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__generate_dd_meta__generate_dd_meta.return.meta_index_cols_categor": {"doc_hash": "844123b181e211e9bfc20c6e728525726f3bebb8c494c629baf07e6834a8dd77"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__aggregate_stats__aggregate_stats.if_len_file_row_group_sta.else_.return.s": {"doc_hash": "e66f27f183dfd18c551b6a3bc470df85b6856d355bf75bbc02c9ae16abb8c038"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__process_metadata__process_metadata.return._": {"doc_hash": "c8e8ae6a2c3b01b47a03978e68b4d7ab0204d92549d28fb6472d280733c74c10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__construct_parts__construct_parts._": {"doc_hash": "de7ad8a8bfd555e5cb76f71113061ff109b23289a4db973836d8e22f2e589ca5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py__construct_parts.if_split_row_groups___construct_parts.return.parts_stats": {"doc_hash": "aeb36646ed586d4d7a097fbced94a4124c3a5c77aa1dd3ddf3c1e7fcda13d3bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine_ArrowEngine.read_metadata.return._meta_stats_parts_inde": {"doc_hash": "dc7dfbac78f7a28dd543aeb3731bd8725318e875cb6891158cd188ffc2b3ef01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine.read_partition_ArrowEngine.read_partition.return.df": {"doc_hash": "51f8a38089aded115dfd0b03b6a1ded70f79a4363de792797a95322014f21cbe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine._arrow_table_to_pandas_ArrowEngine._parquet_piece_as_arrow.return.arrow_table": {"doc_hash": "79a1b4d0586dac024c17a991a378f801c3693b70bd24cbc1cec4a5db5d7a182b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine.initialize_write_ArrowEngine.initialize_write.if_append_.try_.except_IOError_ValueErr.append.False": {"doc_hash": "1f68cd48842e65b7f863e20b73866cd38a1640c6a87b6fdb6c6b4db5ed3dd3c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine.initialize_write.None_3_ArrowEngine.initialize_write.return.fmd_schema_i_offset": {"doc_hash": "a1a30d8f9095d7b883a5c9d6f04c6719619b17a920a69a6e6f44a745393d0563"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine.write_partition_ArrowEngine.write_partition.if_return_metadata_.else_.return._": {"doc_hash": "ebc9f4c2466696cd3f54febc12f73235ef75f3df27d5dd16cfbbfaa18a1071b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/arrow.py_ArrowEngine.write_metadata_": {"doc_hash": "1ed8feab60d6d0d3d362ca6bbb6a79667685dd0aa55856f1cd6bcf166effc809"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_from_distutils_version_im_NONE_LABEL.___null_dask_index___": {"doc_hash": "14b39796a00bdfd359ca515f07f5321fceea11e76d39dd4ae47f138ad4bb5bad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py___ParquetSubgraph.__repr__.return._ParquetSubgraph_name_": {"doc_hash": "a53b89a172ad67d2649aef14012a8cee44644530d0490f506e530e99e356a050"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_ParquetSubgraph.__getitem___ParquetSubgraph.__iter__.for_i_in_range_len_self_.yield_self_name_i_": {"doc_hash": "24ea8ea172335826a7996d6c98fbf78c7b76d8d7d491752bf2d9a7db1982de30"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_read_parquet_read_parquet._": {"doc_hash": "97e573b82910ae6067a623ecac451f85b730a8f99d89d22f8211aec0f4739bf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_read_parquet.if_isinstance_columns_st_read_parquet.return.new_dd_object_subgraph_n": {"doc_hash": "be4999e3767c376b1463c1f33d461ad1a55dfe25aa2d98ee93b0fd7a5610cf56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_read_parquet_part_read_parquet_part.return.df": {"doc_hash": "fd3aa90e135e0cef6901983ab78ad63468892ac585e936d4c5c8257408204503"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_to_parquet_to_parquet._Store_Dask_dataframe_t": {"doc_hash": "c26df96194cc2318dc75e3ea04e84d2610e7d427c60fc56e1c3f4ba837442b95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_to_parquet.from_dask_import_delayed_to_parquet.if_write_index_.else_.df.df_reset_index_drop_True_": {"doc_hash": "0c772441cd1a7a6f185e9dd7b8659d13dbce08db37640cae37609367ba2784a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_to_parquet._to_parquet_kwargs_to_parquet.return.out": {"doc_hash": "fd7ec9468ddb3408e3fffdf71a5dbbf3fa91ff9d16949d59bc731865706fd60b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py__ENGINES_get_engine.if_engine_auto_.else_.raise_ValueError_": {"doc_hash": "96204661779238fc6b1a560f0b85deee361f798b89113a509cff876de79e1ab1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_None_3_sorted_columns.return.out": {"doc_hash": "75f95b297bdd748657024fb0e56c4247350c4d59f0cf56afe76dfa33197e42e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_apply_filters_apply_filters._Apply_filters_onto_par": {"doc_hash": "41a56a983090698ac355e99551b3257b16058561212e045a38e6f219a0d846f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_apply_filters.apply_conjunction_apply_filters.return.out_parts_out_statistics": {"doc_hash": "6490603ca9738aedf3674f4bfe68c33b596c00c2955789e493044e7b1c4c8408"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_process_statistics_process_statistics.return.parts_divisions_index_": {"doc_hash": "73444539ac30b8ebebf75cadbb834469334b42218728b4252c8b8a76f6097f40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_set_index_columns_set_index_columns.return.meta_index_columns": {"doc_hash": "5246c4260d6ed4180b099194328eaa8c9ad6903c8fe66c4e8d0ecaa608a11fe4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/core.py_aggregate_row_groups_": {"doc_hash": "a0e96efbe764dfdbf90177d327291575b66f16345030a4782dc0c185c4669d9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_from_distutils_version_im_Engine": {"doc_hash": "fe7af24243694ce2f32a23eccb5dff68eedeaacea612e4d195b511a968357387"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py__paths_to_cats__paths_to_cats.return.cats": {"doc_hash": "55183a04587d71dc0be2e089f07731601ec0c2c926962a9418fe8ab62c3a88cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_paths_to_cats__determine_pf_parts.fast_metadata.True": {"doc_hash": "104d1107535e15863fb06565bf24b4bbab38e576459c05bd78046fd5b6f9af54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py__determine_pf_parts.if_len_paths_1___determine_pf_parts.return.parts_pf_gather_statist": {"doc_hash": "f1c32ea372c2e5ab9e841ed7836ac639b4ee6cbaa90c45434b36e3e659003685"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine_FastParquetEngine.read_metadata.for_catcol_in_pf_cats_.if_catcol_in_meta_columns.elif_meta_index_name_c.meta.index.meta_index_set_categories": {"doc_hash": "968cfbe0b4a9c1647bcfbf323ac269a4f103979ddca8fc18927e1f70b502b5aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.read_metadata.if_gather_statistics_and__FastParquetEngine.read_metadata._if_we_have_a_list_of_fi": {"doc_hash": "7ab570f370ff138a61811085b5d96c7a5895effe41b7177427d20a426990285c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.read_metadata.base_path_FastParquetEngine.read_metadata.return._meta_stats_parts_inde": {"doc_hash": "431fcff6080e227b9bdb0c9f67d6f6986b27605c449f3f589348948e61baf2e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.read_partition_FastParquetEngine.read_partition.if_pf_is_None_.else_.return.pf_read_row_group_file_": {"doc_hash": "072cc9c3e58fbc5cf3b81812d31cec77fdfd9fbcfc5981a2726ad8ad1d4af52b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.initialize_write_FastParquetEngine.initialize_write.return._fmd_schema_i_offset_": {"doc_hash": "b4e130d7cf0f35ede96dd8084587986f052047039fa9addb7bb8bf8a5bbe71d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.write_partition_FastParquetEngine.write_partition.if_return_metadata_.else_.return._": {"doc_hash": "68eaf7650e30acad3a185a4062789cd4a01c035036a1511eed6e5727f726e5e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/fastparquet.py_FastParquetEngine.write_metadata_": {"doc_hash": "ad45be034fe3867af43d6d1eeb9e074fadd33f02d907e13fa0899676d178999b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py_re_Engine.read_metadata.raise_NotImplementedError": {"doc_hash": "4ec574cf0e536991ccb78a029ab9d3a6ffe0f4f7d3bde9fa56a0271dc11abebd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py_Engine.read_partition_Engine.read_partition.raise_NotImplementedError": {"doc_hash": "439bea3c68b26190dc93c755807ed7622d9313069cdb94642058d20d5915cf11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py_Engine.initialize_write_Engine.initialize_write.raise_NotImplementedError": {"doc_hash": "973b98ebe6617015bc498c785f4e6a4c259f8582e224bbb22c68bcd58a8be670"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py_Engine.write_partition_Engine.write_partition.raise_NotImplementedError": {"doc_hash": "83019f2d0181559d2826064e0fbba31366a93df2f2f8527d4f383bd189be7782"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py_Engine.write_metadata_Engine.write_metadata.raise_NotImplementedError": {"doc_hash": "1b5602b8675a6d98e568a363b233d41c23147f28ca6ee86ff2b3d25f95470b63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__parse_pandas_metadata__parse_pandas_metadata._0_8_0_allows_for_dupli": {"doc_hash": "47b6ef76ffbfeaf044b0f17c4609c6964366faa238c92cc85bf73040dfb3e83b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__parse_pandas_metadata.if_not_index_names___parse_pandas_metadata.return.index_names_column_names": {"doc_hash": "c464d4f516a1919e04f3e244e6c96c0932dc7f486db6980fbcfd2a40ba579978"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__normalize_index_columns__normalize_index_columns.return.column_names_index_names": {"doc_hash": "3364e81381f12531be3f08603ce946178842c3e8b535d70090c49a61153c6c7a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__analyze_paths__analyze_paths._join_path._scrub.return.p": {"doc_hash": "ce6aa273529b7667abd7834174ac7b4ad8667c212d9ead34903dd4db8c4186f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__analyze_paths._join_path.abs_prefix__analyze_paths._join_path.return.joined": {"doc_hash": "7a5f295adc273257c79f4c0cc16f36aac927036d3cdc3745f665ab078c7e9504"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/parquet/utils.py__analyze_paths.path_parts_list_": {"doc_hash": "af813bd367afe90a70535b5324d3dfd6475c974f88c7721b78a6491ffc71df7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/sql.py_np_read_sql_table._": {"doc_hash": "6d1bdff83bf7b60f79899fc6da208e6365872ffa10190949d013866b7fdda542"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/sql.py_read_sql_table.sa_read_sql_table.if_meta_is_None_.else_.if_divisions_is_None_and_.raise_ValueError_": {"doc_hash": "6ac7b8da71505fd282f62efc3f811420c5425f34d86aa5860dda56b8d3a30496"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/sql.py_read_sql_table.if_divisions_is_None___read_sql_chunk.if_df_empty_.else_.return.df_astype_meta_dtypes_to_": {"doc_hash": "0a9811a007d685a49eb41770012cc481d8f7c7a1aab0d85c6b6d7b08c9c06426"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/sql.py_to_sql_to_sql._Store_Dask_Dataframe_t": {"doc_hash": "aa7b377c0d1cc37a3a80766f8889c8110c0437a9b15e99c056ee64c6b2e3e8d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/sql.py_to_sql._This_is_the_only_argume_": {"doc_hash": "b29c7d026f7dded6a79b6be2a4214a089395df519e405b1e2aa79ccea2b2ff95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_from_io_import_BytesIO_timeseries._": {"doc_hash": "d64c2071d4da0d891a625f488892f68454912987a3ae72a660d35e1b4d60ad3b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_csv_files_test_pandas_read_text_with_header.assert_df_id_sum_1_": {"doc_hash": "4d063ba39cf7c5f433f859bd1c746665841266b1fc0962e4f4300b68fc61160e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_text_blocks_to_pandas_simple_test_text_blocks_to_pandas_simple.assert_eq_df_amount_sum_": {"doc_hash": "bf710217da4bc62c3c9bd357877d9523fe43617ec1a5093cb476dab3a04fb328"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_text_blocks_to_pandas_kwargs_test_text_blocks_to_pandas_kwargs.assert_result_columns_": {"doc_hash": "b6ff139a4c3bc5ad8445fffd6f07ece3c7db12d9d11d1b44308e125088913ddb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_text_blocks_to_pandas_blocked_test_text_blocks_to_pandas_blocked.None_1": {"doc_hash": "5e29465922d6488a9621c09c7c1033416a3141c1f449cdc93b9c84c8157953bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_skiprows_test_skiprows.with_filetexts_files_mod.assert_eq_df_expected_df": {"doc_hash": "532dcd894b4e268c8f913ae2894b081f134715af7aafdd466e7b51325791dd1e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_skiprows_as_list_test_skiprows_as_list.with_filetexts_files_mod.assert_eq_df_expected_df": {"doc_hash": "887c683ee59e903f386e6fb647305ddbdca9a0976788febfe05813ffc124c794"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_csv_blocks_tsv_blocks._": {"doc_hash": "0099c80dc505bd657e1f01e7d28070d0bed901785da41c031c4d1668e5332dea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_enforce_dtypes_test_enforce_dtypes.assert_all_df_dtypes_to_d": {"doc_hash": "4a2ab0caaf4e0cb36946f070d4e5edb27276e7c4c3848311363a5b3734eade5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_enforce_columns_test_enforce_columns.with_pytest_raises_ValueE.dask_compute_dfs_schedu": {"doc_hash": "cfca617b822a26eb0dbb67fd3d97a1cf308427de5a961e92f5914205ab622b6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py___test_read_csv.with_filetext_text_as_fn.assert_eq_result_pd_read": {"doc_hash": "df6cbda0e0564a471b360e2e4da7d1e24a7eecac40e969fa7a49b748ea89256c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_large_skiprows_test_read_csv_large_skiprows.with_filetext_text_as_fn.assert_eq_actual_pd_read": {"doc_hash": "84697de2bd058f20af81d50abb4aa55f681d2b948e0097715e09c227fb0f69b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_skiprows_only_in_first_partition_test_read_csv_skiprows_only_in_first_partition.with_filetext_text_as_fn.None_1.with_pytest_raises_ValueE.dd_read_fn_blocksize_30_": {"doc_hash": "3523f6858a2eefbf406129d449eda98afcd70bcdcff7f51d1bd5292a6fab5f03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_files_test_read_csv_files.with_filetexts_files_mod.assert_eq_df_expected2_": {"doc_hash": "10e7e154631fd1d81c1319ca682a9a422ad34dbc1ee261183066f94ac36d2ff6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_files_list_test_read_csv_files_list.with_filetexts_files_mod.with_pytest_raises_ValueE.dd_read_": {"doc_hash": "8bc7644c0df0e029afb8962aa56cbafc25e0720d18ccdfacbb8165206162cdd3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_include_path_column_test_read_csv_include_path_column.with_filetexts_files_mod.assert_2014_01_03_csv_i": {"doc_hash": "96fddad54b8eb15cab1a19b9371b31ae8f59c4d362550f42b38388ce657af917"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_include_path_column_as_str_test_read_csv_include_path_column_as_str.with_filetexts_files_mod.assert_2014_01_03_csv_i": {"doc_hash": "ba6a44ef536fe1808b9505163f4148ac34a08f5ac6279e8e56771993bfcc4677"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_include_path_column_with_duplicate_name_test_read_csv_include_path_column_is_dtype_category.with_filetexts_files_mod.None_3": {"doc_hash": "d14c667add824aa384bf910e1c67098503c33f09a70a935c891005c98d191cb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py__After_this_point_we_te_test_read_csv_index.with_filetext_csv_text_a.assert_eq_result_expecte": {"doc_hash": "2f254672417eedc89956ff54be7baaa08d9d113517a61549b06ced024d38c237"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_skiprows_range_test_consistent_dtypes.with_filetext_text_as_fn.assert_df_amount_compute_": {"doc_hash": "254c1f5fff81bf7c1394d1cbeeb5e0c578bf8b188ddcff6513e4bb928b794e75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_consistent_dtypes_2_test_consistent_dtypes_2.with_filetexts_foo_1_cs.assert_df_name_compute_": {"doc_hash": "17bd19e311ae294e7d3627f196525c86c2cb3a5b01c9926266fd632343e81153"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_categorical_dtypes_test_categorical_dtypes.with_filetexts_foo_1_cs.assert_sorted_res_fruit_c": {"doc_hash": "859864e9c8128041505314ae4873b132be36217686007e272c84750d8bcb4eb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_categorical_known_test_categorical_known.with_filetexts_foo_1_cs.None_10": {"doc_hash": "1f5f3523daef1c3fee9974190e81187fcb5d1eccb7b773ec607087fc4486ef7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_compression_multiple_files_test_compression_multiple_files.with_tmpdir_as_tdir_.assert_len_df_compute_": {"doc_hash": "54fb7cc1d40681153a16453843258389ad6e9d7ee8c33f0fe4569f607b168ff5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_empty_csv_file_test_read_csv_sensitive_to_enforce.with_filetexts_csv_files_.assert_a__name_b__name": {"doc_hash": "4f2f529a78c5b8eb66fdd5e9bd7e3c022954d85122ee2e56c9338cfeffc8823c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_compression_test_read_csv_compression.with_filetexts_files2_mo.assert_eq_": {"doc_hash": "c3feb7a1c6418dcf30ad8063554f06a37efa63cc9c49ae1eb769f9e37e1056d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_warn_non_seekable_files_test_warn_non_seekable_files.with_filetexts_files2_mo.with_pytest_raises_NotImp.with_pytest_warns_UserWar.df.dd_read_csv_2014_01_cs": {"doc_hash": "09ca2cb0dc7193a3760fd9f2553d40528aafedd5ea807b56f9088577f64100ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_windows_line_terminator_test_windows_line_terminator.with_filetext_text_as_fn.assert_df_a_sum_compute": {"doc_hash": "2cbf202a53ad3f185135002da31adb4ff6d42351dce90e8467b8fc3f9c03d569"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_header_None_test_auto_blocksize_max64mb.assert_isinstance_blocksi": {"doc_hash": "f448cce687d6eb5bedb18323d7f66c7a6e28f7caa229f25313a7bdf770b5a1ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_auto_blocksize_csv_test_auto_blocksize_csv.with_filetexts_csv_files_.None_1": {"doc_hash": "c8132450184938802e0cf17992e9ce67979d7a71628f86556d73eb9411e0e86c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_head_partial_line_fix_test_head_partial_line_fix.with_filetexts_files_.assert_df_dtypes_i8_": {"doc_hash": "d7c4d45e81a9661e558ad8d9b371262b8234d5eb5473664b9cbf473e2fad9320"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_raises_on_no_files_test_read_csv_of_modified_file_has_different_name.with_filetext_csv_text_a.assert_sorted_a_dask_key": {"doc_hash": "59ccdc60b29b09dd123482243c8265ed9fea6d8e53ed9e379e5c6a1d6ef68711"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_late_dtypes_test_late_dtypes.date_msg._": {"doc_hash": "041a4c6431059e42c4d97badcd69b929741b2b33a2441b216022ffbcba9bf99e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_late_dtypes.with_filetext_text_as_fn_test_late_dtypes.with_filetext_text_as_fn.assert_eq_res_sol_": {"doc_hash": "4e56d147f95767dc9bbe23c2008bccf47c5c0b186479e719e802c20508fd398d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_assume_missing_test_assume_missing.None_3.assert_df_numbers_dtype_": {"doc_hash": "27c8b3f748b3c5f18b6354d9a5e5fb2ce0614167e9cba7796f007b8bce10ebb7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_index_col_test_read_csv_with_datetime_index_partitions_one.with_filetext_timeseries_.None_1": {"doc_hash": "0b41e95d6faefe487982510b9e2b6cbdf4b189d8d6e7bf4777bac10d2902f3f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_with_datetime_index_partitions_n_xfail_pandas_100.pytest_mark_xfail_": {"doc_hash": "25c3845cfdf65d016c04ff13dac3edee7ba4ea3ddd38d2ef6ad06a86bbb19d76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_encoding_gh601_test_encoding_gh601.with_tmpfile_csv_as_f.assert_eq_d_a_": {"doc_hash": "e6cb4d919d8fc629ba854bde0e283eb5233e291dc51383b7de8e2eafbd5dd3b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_header_issue_823_test_none_usecols.with_filetext_csv_text_a.assert_eq_df_pd_read_csv": {"doc_hash": "5fa628a3a100f2efe30f65e3a4e1202548a57e5947120a17663a1ec245e4b4af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_parse_dates_multi_column_test_parse_dates_multi_column.with_filetext_pdmc_text_.assert_len_df_len_ddf": {"doc_hash": "1405ca82e589fda0f27671ac4af0929aeb5e6c783fe7ba4fb35f360950aa6140"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_sep_test_robust_column_mismatch.with_filetexts_files_mod.assert_eq_ddf_ddf_": {"doc_hash": "8182556cfe4cf4fa9f65106f159273e0e3c5f3299891922093eb57b9cf73a618"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_error_if_sample_is_too_small_test_error_if_sample_is_too_small.None_1.assert_eq_": {"doc_hash": "0b848cbb43d12ce69b3f3d597c9095d7a90bf7009f6a7c9e6de73f0dab700789"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_read_csv_names_not_none_test_read_csv_names_not_none.with_filetext_text_as_fn.assert_eq_df_ddf_check_": {"doc_hash": "81e178b2138ca454ada2c747390bf32ad391a4842007bf0954f6bae86a44636c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_None_6_test_to_csv.for_npartitions_in_1_2_.None_2.assert_eq_result_df_": {"doc_hash": "cca543f7eda01854bab286b95b678f082b142fef232eea4caa0429e0507500f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_multiple_files_cornercases_test_to_csv_multiple_files_cornercases.None_3.assert_eq_result_df16_": {"doc_hash": "0c8f568d7a89331c5619fca00112b0eddb9042ae54ff468e0f2747ab24821f65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_single_csv_test_to_single_csv.for_npartitions_in_1_2_.None_1.assert_eq_result_df_": {"doc_hash": "25c7bf2c76f6f309f0761a7627a2c1dc6ff062c414f7548babcdc9fda8643061"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_single_csv_with_name_function_test_to_single_csv_with_name_function.with_tmpdir_as_dn_.with_pytest_raises_.a_to_csv_fn_name_functio": {"doc_hash": "9a816e0953c3a3f0ea0c05096b99e02bc4c3e3115a2fb716a19ceb6ee251d015"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_single_csv_with_header_first_partition_only_test_to_single_csv_with_header_first_partition_only.with_tmpdir_as_dn_.with_pytest_raises_.a_to_csv_": {"doc_hash": "3568b22c9af8bb47f5310c6bdafd2b9d65dce062d7074b467b7399333c27b61c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_single_csv_gzip_test_to_single_csv_gzip.for_npartitions_in_1_2_.with_tmpdir_as_dn_.assert_eq_result_df_": {"doc_hash": "0e7d9d730c78923920420298a51c4fe278a9f1de03830002d61892953816a473"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_gzip_test_to_csv_gzip.for_npartitions_in_1_2_.with_tmpfile_csv_as_fn.tm_assert_frame_equal_res": {"doc_hash": "62f749b6282e253a4a33b6fbe649a503a1e0a716f9340768d6055f44d3d552f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_nodir_test_to_csv_nodir.assert_result_x_values_": {"doc_hash": "73b3fcf06bdaa45605667b1cb64dea779c99065264af2e39dcb87ed3fe2a42d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_simple_test_to_csv_simple.assert_result_x_values_": {"doc_hash": "d225527be6de23e9992866334e1f1699f4984418fa4c48d5a993660c65ae7bfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_series_test_to_csv_series.assert_result_x_df0_": {"doc_hash": "06a05c0b9be00e21b7bfbe78e1f1c2d6cbb4a677d601cd15fdb9a7c36451416c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_with_get_test_to_csv_with_get.with_tmpdir_as_dn_.assert_eq_result_df_che": {"doc_hash": "197aa5a0dd4c146361730b3a0ebc4b1abc39a268031436d6959f6121a9dd5b36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_warns_using_scheduler_argument_test_to_csv_warns_using_scheduler_argument.with_tmpdir_as_dn_.with_pytest_warns_FutureW.ddf_to_csv_dn_index_Fals": {"doc_hash": "c1d913122dbac9d1696895528033556eaa6cd623ec9b374b913437370ef1b150"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_errors_using_multiple_scheduler_args_test_to_csv_errors_using_multiple_scheduler_args.with_tmpdir_as_dn_.with_pytest_raises_ValueE.ddf_to_csv_": {"doc_hash": "0327914c997849bac56e4acc98ea4dd07c25435540a91cd94ee40d501c672940"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_keeps_all_non_scheduler_compute_kwargs_test_to_csv_paths.os_remove_foo1_csv_": {"doc_hash": "cd9c462adc46350e38894c1b61fb0486b7fef47e168f1d863f57c90119e99c98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_header_empty_dataframe_test_to_csv_header_empty_dataframe.with_tmpdir_as_dn_.os_remove_filename_": {"doc_hash": "5afc7cc035f0ada18eb517ddecf96054959eab5cdf8c92b47af1a89cfbfa2c14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_header_test_to_csv_header.with_tmpdir_as_dn_.None_2": {"doc_hash": "30f5faa2a77e803db57a5cb9c58a1918ac094906edab5d34237028c46aa7abae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_to_csv_line_ending_test_to_csv_line_ending.assert_raw_in_expected": {"doc_hash": "3add9e8f49b6e48571ebf2d759f83ad42e06c2a5fa6f124f404d5db868bcba58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_csv.py_test_block_mask_": {"doc_hash": "f0eca8a48404bbdbf477eaedc3a578362e09e17f5dd3443e918064a1c09a6d05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_demo.py_pd_test_make_timeseries.assert_a__name_e__name": {"doc_hash": "a2a61adfa0a41c3c3e95ed1b8536fa8dc4d878618ed06ea15fbe92d6084ad42b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_demo.py_test_make_timeseries_no_args_test_daily_stock.assert_eq_df_df_": {"doc_hash": "dde638262f8dd20b1319d9bc9f4d38b279ecf77f9e5f5b0891f02f65493ccce4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_demo.py_test_make_timeseries_keywords_test_make_timeseries_keywords.assert_1_bb_100": {"doc_hash": "410f7c58e6f3544221b48b0686017ba5899c8d2d6c89c7e05ec8c2f55cbfe4cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_demo.py_test_make_timeseries_fancy_keywords_": {"doc_hash": "4535abc0f00d9c76f13db17a335fd570563e3859f8990a0fb70614a1bf1b0a3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_from_distutils_version_im_test_to_hdf.None_3.tm_assert_frame_equal_df_": {"doc_hash": "d4a22e61869588c4f86611e382c567561ae4c57508cfeb961713325888ab4a7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_multiple_nodes_test_to_hdf_multiple_nodes.None_3.with_pd_HDFStore_fn_as_h.assert_eq_df16_out_": {"doc_hash": "0cc988530ec9d7da710b1576a773ede890f33dc638ef5baca31185154e08d038"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_multiple_files_test_to_hdf_multiple_files.with_tmpfile_h5_as_fn_.with_pd_HDFStore_fn_as_h.assert_eq_df_out_": {"doc_hash": "535703411b6ec05dd05dcba74c3c3249808e8394a9c812570194507a426798fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_modes_multiple_nodes_test_to_hdf_modes_multiple_nodes.None_4.assert_eq_df_append_df_": {"doc_hash": "0bd538a691c8867ae846ad586c30b36222b071614782ed6bc7eac1218bff0415"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_modes_multiple_files_test_to_hdf_modes_multiple_files.None_3.assert_eq_df_append_df_": {"doc_hash": "adf09f842be5bb9b50d0d98b51718fdfb226fac73f8bc91e628f902c96991695"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_link_optimizations_test_to_hdf_link_optimizations.None_2.assert_dependency_depth_d": {"doc_hash": "5a31857f643fc4d8b33ebb56aec2d9e9bb7d87228288c9f255de4bb4c8f9542e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_lock_delays_test_to_hdf_lock_delays.with_tmpdir_as_dn_.assert_eq_df16_out_": {"doc_hash": "7ca0717d1d82964aca3772e75df1d2a78886fe3511362464f918f5aac2de6d4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_exceptions_test_to_hdf_exceptions.with_tmpfile_as_fn_.with_pd_HDFStore_fn_as_h.with_pytest_raises_ValueE.a_to_hdf_hdf_data____": {"doc_hash": "c170370377e125edc70aec091ab129a5fa4af7c1b9bebb3cad6bb3bfdccba68c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_schedulers_test_to_hdf_schedulers.None_2.assert_eq_df_out_": {"doc_hash": "c3580870a37dad63a2a957de5f710e946affd160fe22027a56cb89c461b05938"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_kwargs_test_to_hdf_kwargs.None_1.tm_assert_frame_equal_df_": {"doc_hash": "a3b9270a49d01576fad8d05a684dae48f1413ad484cc4539f5345472e9a0c1d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_fmt_warns_test_to_fmt_warns.with_tmpdir_as_dn_.with_pytest_warns_None_.a_to_csv_fn_name_functio": {"doc_hash": "201f6d37b23760948cb84688ef520e6ce60dfb5fb088c8722235a8e56b5ac32a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_read_hdf_test_read_hdf.None_2.compare_a_compute_sort": {"doc_hash": "667c9010e84dbb02666a651de4ce00fa34f56b9c81879e81ea0fb26121d7dfd7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_read_hdf_multiply_open_test_read_hdf_multiply_open.with_tmpfile_h5_as_fn_.with_pd_HDFStore_fn_mode.dd_read_hdf_fn_data_": {"doc_hash": "5e5beab4adafb5eea6912a37ef7d5938599c145699b72ad20816e1d803c9a340"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_read_hdf_multiple_test_read_hdf_multiple.with_tmpfile_h5_as_fn_.assert_eq_a_r_": {"doc_hash": "cd8c01976d1c28fd656c85af1a78691422453d481924e8b996ed2fa27ad10c13"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_read_hdf_start_stop_values_test_read_hdf_start_stop_values.with_tmpfile_h5_as_fn_.None_2.dd_read_hdf_fn_data_": {"doc_hash": "8aed0cfece1c2f6a1c52bd73a577e186a0ab103082b156beb72c5f67ab38c612"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_hdf_globbing_test_hdf_globbing.with_tmpdir_as_tdir_.with_dask_config_set_sche.None_4": {"doc_hash": "bcf94ea4a7ac2d9b22ebe9dcf6567298abc45b24e8fabfc4c9f2a76e9813d696"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_hdf_file_list_test_hdf_file_list.with_tmpdir_as_tdir_.with_dask_config_set_sche.tm_assert_frame_equal_res": {"doc_hash": "146f5757cca3915e6ae026e0bbfa97a28300b6874d5702514210f070115c949a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_read_hdf_pattern_pathlike_test_read_hdf_pattern_pathlike.with_tmpfile_h5_as_fn_.assert_eq_res_df_": {"doc_hash": "7fb67657ecd4b6f5db86649b3d46f0bd631e045abd8969b5119f2ecd49992722"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_to_hdf_path_pathlike_test_read_hdf_doesnt_segfault.with_tmpfile_h5_as_fn_.assert_len_ddf_N": {"doc_hash": "6eb0ffbb91625c289b7c1ef0bbaeaaca478fb224f07385ef523afbea768d6ed1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_hdf_filenames_test_hdf_filenames.os_remove_foo1_hdf5_": {"doc_hash": "0419e00f47fd4ac512080ef1d550a248f7f3730d21e2191f0ca5edab2d187a95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_hdf_path_exceptions_test_hdf_path_exceptions.with_pytest_raises_ValueE.dd_read_hdf_tmp_": {"doc_hash": "c6fd0ba3cb06244fe2a2a9ed4561f83e9d426bf5c33c8fd7b968ad912475e8ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_hdf.py_test_hdf_nonpandas_keys_": {"doc_hash": "2a349f28e60822c997f892d2033847546198201f8ccd12022c0a2a044e2728af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_np_test_meta_from_array._Should_be_5_partitions_": {"doc_hash": "f6fe44db155cc0777bd05578cb53ed198ccbb4e98a3996593c49f82bea2dd270"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_meta_from_1darray_test_meta_from_1darray.with_pytest_raises_ValueE._meta_from_array_x_colum": {"doc_hash": "5816f4ece05c8a493d0f64cd896ccc6b9bea8e3ff4f645d55f3bd7db083c369e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_meta_from_recarray_test_meta_from_recarray.with_pytest_raises_ValueE._meta_from_array_x_colum": {"doc_hash": "79c000be533d704fd616c415f193d3ce0256b9496f4af54d0df3d32ab658fa7b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_array_test_from_array.with_pytest_raises_ValueE.dd_from_array_np_ones_sha": {"doc_hash": "6641183919342883c173e3284c08f91b5c450725ef49a1993007d3d1b25a5779"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_array_with_record_dtype_test_from_array_with_record_dtype.assert_d_compute_to_re": {"doc_hash": "a2fa16e2163010f2ba0a4f1dd58055719fbf24914e9dc2020369d8042ef877a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_bcolz_multiple_threads_test_from_bcolz_multiple_threads.pool_map_check_range_5_": {"doc_hash": "66f58cb2419ecb867fd733832da9a89ae1d6e4df278c497a1e3aedbcf9b02ae4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_bcolz_test_from_bcolz.None_8": {"doc_hash": "f80df9b0fcf8f38ea948830986118b573f303a2ed0add98573b1d1bcd80d92f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_bcolz_no_lock_test_from_bcolz_no_lock.assert_not_any_isinstance": {"doc_hash": "d540b5bec2caeaef40a07507b7c0330713163f24e7795329d691d754a30adb3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_bcolz_filename_test_from_bcolz_filename.with_tmpfile_bcolz_as.assert_list_d_x_compute_": {"doc_hash": "8e76d4467ba8a1bb9a6badbbe98524ee2bcefc467141a9f1c3497f84c927ad80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_bcolz_column_order_test_from_bcolz_column_order.assert_list_df_loc_0_com": {"doc_hash": "ca289409253147a90c0a74907210c6a4a1a660135cd6bcaba0eeee5be1310a74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_dataframe_test_from_pandas_dataframe.None_1": {"doc_hash": "af67469e63a30ce7089997a9820b25477ec0aad1f585e76ef5a0f4de242548a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_small_test_from_pandas_small.for_sort_in_True_False_.for_i_in_0_2_.assert_eq_s_ds_": {"doc_hash": "be41fa43548ea185034aafe429b11cf1da579fd0cfb8129e53ac8669485705a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_npartitions_is_accurate_test_from_pandas_npartitions_is_accurate.assert_dd_from_pandas_df_": {"doc_hash": "ff6de579b1fdaf8845bf182a86cdd2b674ef0c1893255c26a70c74d66958d4e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_series_test_from_pandas_series.None_1": {"doc_hash": "da7fc0515365b02bfe004b682852416e5a51689bd105ef54f1932e932dc6c834"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_non_sorted_test_from_pandas_single_row.assert_eq_ddf_df_": {"doc_hash": "4579b36733badea73721e512694c2318fbaa1de1b6e7916d94284690dd0f8f3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_pandas_with_datetime_index_test_from_pandas_with_datetime_index.None_1": {"doc_hash": "350e79d60973980d011b50c60be56c237d070271d03e0a581f3fb20fd52d48d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_DataFrame_from_dask_array_test_DataFrame_from_dask_array.assert_df2_divisions_d": {"doc_hash": "1ad22f27e9bfddfdd5181a281604ce89ee6f3a5575426c324caf9250835a753c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_Series_from_dask_array_test_Series_from_dask_array.assert_eq_ser_ser2_": {"doc_hash": "8d53ff6d6675a07c91b34b771881da6e36e950552907161e081f7bcebeabffd9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_index_test_from_dask_array_index_raises.assert_m_match_4_2_": {"doc_hash": "0071a5526a1c86ca5cad5b1060aa776568b011c0887ab244a9f283d8d5afd0a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_compat_numpy_array_test_from_dask_array_compat_numpy_array.None_3": {"doc_hash": "4f63048360e2b532d123f9f743fe5cbf9eed66b91e14167b1b4d80b985c17703"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_compat_numpy_array_1d_test_from_dask_array_compat_numpy_array_1d.tm_assert_index_equal_d2_": {"doc_hash": "f6b44ba2b3dd2f7faa4a24c89fe32c213f430a1651d65fcd7c4b656b9a111898"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_struct_dtype_test_from_dask_array_struct_dtype.assert_eq_": {"doc_hash": "5da6e8c7b0fc83af9a8c66c0827f58937b7d779af87886f6bc65407af1dca4f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_unknown_chunks_test_from_dask_array_unknown_chunks.with_pytest_raises_ValueE.df.dd_from_dask_array_dx_": {"doc_hash": "36ee3c206f18be49f47b69d9b5605988b9b6b7d721f57c0363d2d89fdd392704"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_to_bag_test_to_bag.assert_ddf_x_to_bag_com": {"doc_hash": "ee1c70da4ff1370e98f8a93e1c48a85539392291e5d4834f8cfe95ee9d1f4d8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_to_records_test_to_records.assert_eq_df_to_records_": {"doc_hash": "f9e0d54d8552252beb9ceafa2bc8b68f374ba1497c642798694aa7681f350d9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_to_records_with_lengths_test_to_records_with_lengths.assert_result_chunks_e": {"doc_hash": "91fcbb14b7fc071f353cf1c25bbd47b0ca5afa7ad0928d3375a8f89f8cd9769a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_to_records_raises_test_to_records_raises.None_1.pytest_fail_Unexpected_v": {"doc_hash": "1adba1988b7b45de9957b2934a7fded69436b7f16483a8639e2cdae83edd9d36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_delayed_test_from_delayed.assert_str_e_value_start": {"doc_hash": "742cbc5a6dd733b2f7a6848f94b4923ea8b9d50a3676289b38a8e4f7b81e073e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_delayed_misordered_meta_test_from_delayed_misordered_meta.assert_msg_in_str_info_va": {"doc_hash": "719419cf9fb1b3f7aa57a8209e7e0b71a9218e4b4d6d0cac0493286765e08df3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_delayed_sorted_test_to_delayed.assert_eq_dx_compute_x": {"doc_hash": "06f807281c9b4a7338413d10ea0fdb71bdb396e7894603e10d69959c0ab2ecc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_to_delayed_optimize_graph_test_to_delayed_optimize_graph.assert_eq_dx_compute_d": {"doc_hash": "f57fe8c3894174ffecc69a4f5cb5132bbff17b5ddbb75208408578428a7ac03d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_io.py_test_from_dask_array_index_dtype_": {"doc_hash": "2e65929284817857929b3971ef6b1dbaccf765d68b1d48be13ecef82bb4108b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_json_test_read_json_basic.with_tmpfile_json_as_f.assert_eq_out_df_": {"doc_hash": "319f6bc845c5a8b2923f4069dfcf49bdc436250b4460d585d9c222a8235a62d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_test_read_json_fkeyword_test_read_json_fkeyword.with_tmpfile_json_as_f.assert_eq_actual_actual_": {"doc_hash": "c4314d6bcd411f2cf9c8172061d874e7f566f02bb8322604f6561d022d970e26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_test_read_json_meta_test_read_json_meta.if_orient_records_.assert_eq_res_sol_check": {"doc_hash": "adcf274b5220fd27dc39c57280e17cd4e4de3e7e78b9bfdb88f65e4be388b2d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_test_write_json_basic_test_to_json_with_get.with_tmpdir_as_dn_.assert_eq_result_df_che": {"doc_hash": "a1d6eee2b3cca032ce5ae0dcdbc1639647f642247046b01d96b79f89fb8fe09c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_test_read_json_error_test_read_chunked.with_tmpdir_as_path_.assert_eq_d_df_check_in": {"doc_hash": "b2934c354be5512d517a59ade7c7f2f4ebb669db24f9da59492b7a24d02e0549"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_json.py_test_json_compressed_": {"doc_hash": "2c6069f7995920380f444871fab2cafb4e958d5f966378a2379534b0f9507eba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_orc.py_os_": {"doc_hash": "23f8afba464b8a26972dc8211cd1c90850a4eb95602a6756f6007ac571a1c55d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_math_engine.return.request_param": {"doc_hash": "297839c40704dd7607cd417047ff14ed0acd9346db4f16fe730ba549163baad9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_write_read_engines_write_read_engines.return.pytest_mark_parametrize_": {"doc_hash": "369e43376144030b4e847f680193650215f0f7b07483c51148416aa6f6bae219"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_pyarrow_fastparquet_msg_test_local.for_column_in_df_columns_.assert_data_column_o": {"doc_hash": "48359775d3ad4c1a739d2d94162ccfa80dd3c541d756f2a82640a75bfe8ba6a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_empty_test_empty.assert_eq_ddf_read_df_": {"doc_hash": "257501b3215af90d67e723c45f2eca38fb05e42421c0a580b0724e4e6e4dd772"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_simple_test_simple.assert_eq_ddf_read_df_": {"doc_hash": "00dd8fe1b9551cc03550ec0e25eb69b5c9be3997375423fa560c8055c9042111"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_delayed_no_metadata_test_delayed_no_metadata.assert_eq_ddf_read_df_": {"doc_hash": "fca3091abe076577b532627923e9cac441fe961bfbf874bf832f8ec74b8190c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_glob_test_read_glob.assert_eq_ddf_ddf2_": {"doc_hash": "995af5297713a30e55a0e7f0843379eb5268dd939178d94c110567ac120e06d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_list_test_read_list.assert_eq_ddf_ddf2_": {"doc_hash": "2f37b160ee46615ac8cb8c7b63c461c4c3ed6c72722ace91c1d03a0b6e60c663"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_columns_auto_index_test_columns_auto_index.None_4": {"doc_hash": "900148a0cd4fb700f6d127a8d3644e137ce86849af888a0aa4a0ebb4a1e843c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_columns_index_test_columns_index.None_6": {"doc_hash": "3dfad27c6e0eff1307f85c54f513c5bbcd72339cdba204ecb9f8032915a810f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_nonsense_column_test_gather_statistics_no_index.assert_not_df_known_divis": {"doc_hash": "c7cdff9ed955fb2b413e07d137f681691513d5137305bb7a1b581e1c7c0dc983"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_columns_index_with_multi_index_test_columns_index_with_multi_index.for_ind_col_sol_df_in_.assert_eq_d_sol_df_col_": {"doc_hash": "2ce599a6cfdb3124237a9fd194620e0f0a79e183bd1c7723e0f24e91aea0c354"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_no_index_test_read_series.assert_eq_ddf_x_ddf2_": {"doc_hash": "2bc7236bcac1d3943a5a8d27b03b0c0eb294c7fb3226021c9cd82d76b31b2547"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_names_test_names.assert_set_read_fn_colum": {"doc_hash": "c396434a38ad94facedee8062484f3ef4424990ef3b83d34b49202cfab9ef072"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_roundtrip_from_pandas_test_roundtrip_from_pandas.assert_eq_dfp_ddf_": {"doc_hash": "b50186ef25e79dd6677f0958233fbc1d1106874c3f47ab6d46748d8e8a785474"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_categorical_test_categorical.assert_df_x_ddf2_x_a": {"doc_hash": "63795c396292c3fc5a69bfc2a01519ff47e97138572a54e872b0faad6bfb43dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_test_append.assert_eq_df_ddf3_": {"doc_hash": "a0725e76a6efa9e479cfa30372df449e4ec5e859e0b2e5e13ec7618a55e3da8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_create_test_append_create.assert_eq_df_ddf3_": {"doc_hash": "5f53858500fd21a8c93dbe1d16b2a9b234cb5920d5dfead8c580947db18f0ce6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_with_partition_test_append_with_partition.assert_eq_": {"doc_hash": "389cbd522ca2e7071b232f80e51452101d60a2fd76cb6b2ff87a1cc514a84e47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_cats_test_partition_on_cats.assert_set_df_b_cat_categ": {"doc_hash": "d8023e805d3b2fe448a51cae3eff4a65513c0d03f9691310d37b0027b2ab0690"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_cats_pyarrow_test_partition_on_cats_pyarrow.assert_set_df_b_cat_categ": {"doc_hash": "3c7076d81f03450a9bfb25f8b8d2906694305c22840757d15d1b4615d4599821"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_cats_2_test_partition_on_cats_2.assert_set_df_cat_categor": {"doc_hash": "f3547f88ee189a242d2ff788b75a14be3bb60e7b63e88b1bdb09364a3f1b2d07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_wo_index_test_append_wo_index.assert_eq_df_set_index_f": {"doc_hash": "f47c802635fb5365bef246d7c38ed058c07e3408b2b7bb851401095c1d8d7679"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_overlapping_divisions_test_append_overlapping_divisions.ddf2_to_parquet_tmp_engi": {"doc_hash": "c114d364f87801cb1c6d20a08b04fadf576bd2b88b9f88d3b9b7f763ad427b24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_append_different_columns_test_append_different_columns.assert_Appended_dtypes_": {"doc_hash": "1fce1bc967f5b030ffbd710f0a7e974d01e6f03f2f0ca17f0594c6d1fd38dbe2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_ordering_test_ordering.assert_eq_ddf_ddf2_chec": {"doc_hash": "341e9fb94c254f44729adb84635ea7f06741f184d48c377e7527a39004dec84c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_parquet_custom_columns_test_read_parquet_custom_columns.assert_eq_df_f_i32_": {"doc_hash": "9d595b451cdd67f4aa7452be6faef1564cbb32679d5063e0b39fb45b85e800f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_roundtrip_test_roundtrip.assert_eq_ddf_ddf2_": {"doc_hash": "7695ef5eb9faea63e7494cc6f52f547c40261ffe71d3140a2f91b3c3664d4818"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_categories_test_categories.with_pytest_raises_Value.ddf2.dd_read_parquet_fn_categ": {"doc_hash": "b60564999fbd822299bc9085345a36c228fbc0f82c82e6cb45181a46029df34d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_empty_partition_test_empty_partition.assert_eq_sol_ddf3_chec": {"doc_hash": "6cebf1cb52066117c97e9749a5599e9f647183f7dc80f2a5e925f53da4f2057f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_timestamp_index_test_to_parquet_default_writes_nulls.assert_table_1_null_coun": {"doc_hash": "c76278284859c2742a0058149948eeda40de914ba889cdf38790ec6cd74b56b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_to_parquet_pyarrow_w_inconsistent_schema_by_partition_fails_by_default_test_to_parquet_pyarrow_w_inconsistent_schema_by_partition_fails_by_default.with_pytest_raises_ValueE.None_1": {"doc_hash": "b362b43b1b875a6deeb50b9b22afb4fdaec23491e69447d45eba325e41523c75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_to_parquet_pyarrow_w_inconsistent_schema_by_partition_succeeds_w_manual_schema_test_to_parquet_pyarrow_w_inconsistent_schema_by_partition_succeeds_w_manual_schema.None_1": {"doc_hash": "2fb1ffb29389d3bf19883156faeba326e71578c38b8e12d73853814d35ba448f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_pyarrow_schema_inference_test_pyarrow_schema_inference.if_index_and_engine_f.else_.assert_eq_df_df_out_": {"doc_hash": "7eb9de1056cef18ac72a474adefbbef9a644b0140180148abe8c49ecf98a2457"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_test_partition_on.for_val_in_df_a2_unique_.assert_set_df_b_df_a2_": {"doc_hash": "4cc22aa0796d433bc8a82bc042fcceb9297f0ba4054ac11a360b3e0028841a88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_duplicates_test_partition_on_duplicates.for_root_dirs_files_in_.for_file_in_files_.assert_file_in_": {"doc_hash": "1e3d700d2f55c4629cf813dc990e6042f106d1da7e60f53c87a75ca930d80897"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partition_on_string_test_partition_on_string.for_val_in_df_aa_unique_.assert_set_df_bb_df_aa_": {"doc_hash": "ca7fae00d56908e7de6d3a4189f71e25e7e363f9c5a8059d0b0b7653e9f6baf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_filters_categorical_test_filters_categorical.assert_len_ddftest_read_": {"doc_hash": "d7c0d2d5cd120bd683a1e6becc1d4878e8f79eb28b29f6930cdae8f1b99b2cf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_filters_test_filters.assert_e_x_2_e_x_": {"doc_hash": "2464046c1b78ede042a71c854ff50ea7bceb59778ac38594160dea3d5f1973dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_filters_v0_test_filters_v0.assert_len_ddf2_0": {"doc_hash": "44dc537b585ad5c931dc6c9adee9178de5464248694368ac0a5d51f4a5f7627b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_fiters_file_list_test_fiters_file_list.assert_len_ddf2_0": {"doc_hash": "f722ae46db50bb22f58a23b362a3eb00f967a2ee30ec7d180a2885d1540639a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_divisions_read_with_filters_test_divisions_read_with_filters.assert_out_divisions_e": {"doc_hash": "392639d60375401d83f551e7d1224f682b05d0c02cf097995bf7bc96fce46876"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_divisions_are_known_read_with_filters_test_divisions_are_known_read_with_filters.assert_out_divisions_e": {"doc_hash": "14879a7ebde170c7b48e1f26867709dcd2152a491faa479647cf92d5453ace19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_from_fastparquet_parquetfile_test_read_from_fastparquet_parquetfile.with_pytest_raises_Assert.out.dd_read_parquet_pq_f_eng": {"doc_hash": "822be7de8aa6c624264aefa767421f4376e11503f9fdc6a7377cbb39b269915a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_to_parquet_lazy_test_to_parquet_lazy.assert_eq_ddf_ddf2_": {"doc_hash": "65d315ebfecb52b1c677ce4f92225c7c3003cf7d167c4918ec1ddfab4e5cc5f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_timestamp96_test_timestamp96.assert_eq_out_df_": {"doc_hash": "7e06ac0b3a9a4c2f99646602850ea9b157dd812683063225f50c5b7c98aa30ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_drill_scheme_test_drill_scheme.assert_np_unique_out_dir": {"doc_hash": "9f12741efe0600b8d5893da5beb588a7f843f259a660bea87c2e83b960c3757d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_parquet_select_cats_test_parquet_select_cats.None_1": {"doc_hash": "fde3b9a5a2ef68837fa2c09126e20c33e1d58bb88ed197a9095b57388dd8fd65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_columns_name_test_columns_name.assert_eq_result_df_": {"doc_hash": "308a927f5b75c5be11d73cc10bd8c2832e926f1f97f7c745c000fd2d5a7206bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_check_compression_check_compression.if_engine_fastparquet.else_.for_i_in_range_metadata_n.for_j_in_range_len_names_.if_compression_is_None_.else_.assert_": {"doc_hash": "460299fdbe5be32db1ae526158adfbf7a536b4732cf13462225c6e2c3e34d100"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_writing_parquet_with_compression_test_writing_parquet_with_compression.check_compression_engine_": {"doc_hash": "289c80cee2c30a88c83e1e902ac317a3957cc7a443414eee1005c29b45f18dfd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_writing_parquet_with_partition_on_and_compression_test_writing_parquet_with_partition_on_and_compression.check_compression_engine_": {"doc_hash": "37276d2eea40dffd8e868288e7a74f79bc1fd87825189e39976c6ebf196035f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_pandas_metadata_pandas_metadata.return.request_param": {"doc_hash": "fc479da81e5986846dc5e3d2994034b7b264fbfdab3a9b35362c9570db6be52a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_parse_pandas_metadata_test_parse_pandas_metadata.assert_isinstance_mapping": {"doc_hash": "2467e3e6a4782eec8730cd926d9e8ab992ba2644eb819d3a3fb3026aac31e9d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_parse_pandas_metadata_null_index_test_parse_pandas_metadata_null_index.None_9": {"doc_hash": "09c63fcb7374f9562b856dbdede17e95fc03838fad32508fc4f1df5e3602e310"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_no_metadata_test_read_no_metadata.assert_eq_result_expecte": {"doc_hash": "2565b3b7df0826eb1815a127de310705d3c48ce5e6c602a739fc14b3e615b37c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_parse_pandas_metadata_duplicate_index_columns_test_parse_pandas_metadata_duplicate_index_columns.assert_column_index_names": {"doc_hash": "d7d87ad0c81e8ddfa3620b53d56e6e0bef1b9cfb2240919021297ecddf914aa1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_parse_pandas_metadata_column_with_index_name_test_parse_pandas_metadata_column_with_index_name.assert_column_index_names": {"doc_hash": "d789468f551f4530eef7a43d0b0250d7a08bd1ba62d1dc54564bfc93a6c67961"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_writing_parquet_with_kwargs_test_writing_parquet_with_kwargs.for_val_in_df_a_unique_.assert_set_df_b_df_a_v": {"doc_hash": "489395db80227833998214829ce5e0963779fb387b577272a2b3bdec74a1db2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_writing_parquet_with_unknown_kwargs_test_to_parquet_with_get.assert_eq_result_df_che": {"doc_hash": "bb6f4b5870a31c11f716237099200cea6ea2577530241330169a66c84f63dbc1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_select_partitioned_column_test_select_partitioned_column.df_partitioned_df_partiti": {"doc_hash": "67a735cf5f9387241935ee0a7ea61aac10f04ded08cb0ae84bb0951dfc5eeeeb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_with_tz_test_with_tz.with_warnings_catch_warni.if_engine_fastparquet.assert_eq_df_df2_check_": {"doc_hash": "d24e4f4368b366d846dfc6f12fae3ebf96ce87375fecd17c1fe8402261cae6cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_arrow_partitioning_test_arrow_partitioning.ddf_astype_b_np_float": {"doc_hash": "b9c279c99b943d024db5361ae81fc278f2798d4312abe1dba51a6ae56020638a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_sorted_warnings_test_sorted_warnings._still_may_have_some_arr": {"doc_hash": "9372daaf00cafcc2370c6831f4e2f0d12c2e3812c1330aedb4d4314dd4d9127d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_informative_error_messages_test_append_cat_fp.assert_d_x_tolist_": {"doc_hash": "7fdc1a0c9efe947ad589eb1a4f693338ce327c13807e7f35221dbe42f604b9c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_roundtrip_arrow_test_roundtrip_arrow.assert_eq_ddf_ddf2_": {"doc_hash": "e4fecc4451ae6b97f5fef3bb22830fd00305bdfac8877f1e6098a4c079a7d1bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_datasets_timeseries_test_pathlib_path.assert_eq_ddf_ddf2_": {"doc_hash": "60d5ffb40ca1ba155edf169a6a27373dc14ef143095530d71a8d46af93f72fa1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_pyarrow_metadata_nthreads_test_pyarrow_metadata_nthreads.assert_eq_ddf_ddf2_": {"doc_hash": "05302691fd22665c095efaca8e5575321692fd635c3688949f2bd6ed92ff218a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_categories_large_test_categories_large.assert_eq_sorted_df_name_": {"doc_hash": "abad7436e8111e000e5356bb57127fbb40b8390515d50b400e2f618bf0cf34ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_glob_no_stats_test_read_glob_yes_stats.assert_eq_ddf_ddf2_chec": {"doc_hash": "8d4bfff66ea43ed6c78206e42e7b41adff51853d6303679e69c8d718f7792f07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_dir_nometa_test_read_dir_nometa.assert_eq_ddf_ddf2_chec": {"doc_hash": "689f7c32f835a37c29f30224160b6ec059615ccca951b78c74859a2814741ead"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_timeseries_nulls_in_schema_test_timeseries_nulls_in_schema.if_engine_pyarrow_an.with_pytest_raises_ValueE.ddf_read.dd_read_parquet_": {"doc_hash": "e3e0bbfbbbc6e9ac570b230b918b9c2de7ef97d0e73095ce6d5f68da285f99a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_timeseries_nulls_in_schema_pyarrow_test_timeseries_nulls_in_schema_pyarrow.assert_eq_": {"doc_hash": "007458f199ae3385c4392e32b46c01619b88ad8de9217d7099c7189acff6dc93"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_inconsistent_schema_pyarrow_test_read_inconsistent_schema_pyarrow.None_4": {"doc_hash": "e31f3664ef08c9c41d4e99422fb47f8686df5c3e2a4a397ca6a5b9bcaaf773df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_graph_size_pyarrow_test_graph_size_pyarrow.assert_len_pickle_dumps_d": {"doc_hash": "8e200e06668722ef39b60ad4e0e020c268ba3998455ab342067e8bca007a5f3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_getitem_optimization_test_getitem_optimization.assert_eq_ddf_compute_opt": {"doc_hash": "b77fde1ab4c80f1ccc3564785c9dfcec4ee912f40c495a04f56d9206201e088a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_getitem_optimization_empty_test_getitem_optimization_empty.assert_subgraph_columns_": {"doc_hash": "18054da9afb164a1fe5ac6194fa3b11fc047e6e86bdec542c448fcbf0908ce60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_getitem_optimization_multi_test_subgraph_getitem.None_2.subgraph_name_3_": {"doc_hash": "7b698c2939f062837ceb437a868a2ec6765ff81cfc9895a9032781effae55664"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_split_row_groups_pyarrow_test_split_row_groups_pyarrow.None_3": {"doc_hash": "8599985a92f88d85a0edc877bd360d7650299d0d524bfed7f2e79e9c97446d2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_split_row_groups_int_pyarrow_test_split_row_groups_int_pyarrow.assert_ddf2_npartitions_": {"doc_hash": "8b0221c7a9628d7b0bf9fb91354234171aaef6146ebf32f111d17eea4addd36b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_split_row_groups_filter_pyarrow_test_split_row_groups_filter_pyarrow.assert_eq_": {"doc_hash": "d70e40afe16f180ab6ace9ec88edfaeb5343007898e2313c27362d35bb2aa2c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_optimize_getitem_and_nonblockwise_test_optimize_getitem_and_nonblockwise.df2_a_b_rolling_3": {"doc_hash": "fa1379972ad103a48f58625646608e149e79b4f08df1ec925c4dbb768bdb276e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_optimize_and_not_test_optimize_and_not.for_a_b_in_zip_result_e.assert_eq_a_b_": {"doc_hash": "dfe86c48e50be5f8e45aa0e55c9f2758e8ae1a61d9831e71815de84cf8768289"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_chunksize_test_chunksize.if_not_chunksize_.else_.assert_ddf2_npartitions_": {"doc_hash": "f9505e4f8a71c5746da41df1e89b444b089c7d9a3f334a34defbce5aef475b78"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_roundtrip_pandas_chunksize_test_roundtrip_pandas_chunksize.assert_eq_pdf_ddf_read_": {"doc_hash": "cc0534dca939cb9a25664b46416f11f9b77b461ec2b44ba6421c4cb07619b85b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_pandas_fastparquet_partitioned_test_read_pandas_fastparquet_partitioned.assert_len_ddf_read_compu": {"doc_hash": "22bd67136ff0f421e25636e5f755a0ec4d175d8b1efb521c43686c9a90c2962a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_read_parquet_getitem_skip_when_getting_getitem_test_read_parquet_getitem_skip_when_getting_getitem.a_b_dask_optimize_ddf_": {"doc_hash": "02b1593cdd2277c860fe877025216e2f8b3a16da91f392c7ca139c250ece2d48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_filter_nonpartition_columns_test_filter_nonpartition_columns.assert_df_read_time_ma": {"doc_hash": "270eca13cc9b0dcb1ccddebf205c943fdf8231ff33d65a68d2d4fdd81aef2d4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_pandas_metadata_nullable_pyarrow_test_pandas_metadata_nullable_pyarrow.assert_eq_ddf1_ddf2_che": {"doc_hash": "e56b63e02bce6c503be9a0381b1b6e381d7e5c9468509885fab547dc691a4247"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_pandas_timestamp_overflow_pyarrow_test_pandas_timestamp_overflow_pyarrow.from_dask_dataframe_io_pa": {"doc_hash": "d933f29c76b8fee20252ad9b0886650c250e51fe5bcbe3c38c54371d9cae036d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_pandas_timestamp_overflow_pyarrow.ArrowEngineWithTimestampClamp_test_pandas_timestamp_overflow_pyarrow.dd_read_parquet_str_tmpdi": {"doc_hash": "06e3f8b1220fe4991fdf19d35ba9bdd1beba4e3d1edc5f347d2b47b77f5b42bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_partitioned_preserve_index_test_partitioned_preserve_index.assert_eq_expect_got_": {"doc_hash": "3caf4b2e6327e47a4957fdc9ffa0396b5769ebd3012e69e27bc3a55d08fd2501"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_from_pandas_preserve_none_index_test_from_pandas_preserve_none_index.assert_eq_expect_got_": {"doc_hash": "0e02d2e1ccb31626c263d074b318bb0097851d3b481f5c701123c5d8bf7d6d79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_from_pandas_preserve_none_rangeindex_test_from_pandas_preserve_none_rangeindex.assert_eq_df0_df1_comput": {"doc_hash": "59d2159c9690a411d249fc783870f9f9f12ab03446dd7236bd56120b173255e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_illegal_column_name_test_illegal_column_name.assert_null_name_in_str_e": {"doc_hash": "aa26800d6ddd01c4c62c6b00df7a69b731f4f87250535aa394680d2f853bf7f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_parquet.py_test_divisions_with_null_partition_": {"doc_hash": "99bb17dd5569a102ce88c80357e3971a73e5868efa24a6035198830aff95b8ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_from_contextlib_import_co_db.with_tmpfile_as_f_.yield_uri": {"doc_hash": "999497aed48eaef2943fb225e2e2a33ac8d2d74ee0a941aefb7049989179bd41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_empty_test_empty.with_tmpfile_as_f_.assert_pd_dataframe_empty": {"doc_hash": "b24886ea299503778d7f0a20341ce070c19e23b103227509e6d113be7415f525"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_empty_other_schema_test_empty_other_schema.engine_execute_DROP_SCHE": {"doc_hash": "969c92d07522933615eb5664468af8b11654fd7f28932ad6cc4bc72e339fa80e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_needs_rational_test_needs_rational.with_tmpfile_as_f_.None_4": {"doc_hash": "fbd40a5a602c5c0b952e15368c3ca40017a02d13025e93df7ef34dc04449e153"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_simple_test_npartitions.None_6": {"doc_hash": "2c15f86ff6eeec823996516ba5e30ed204ef49e38386d529bf20e36d36424ee9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_divisions_test_division_or_partition.assert_eq_out_df_": {"doc_hash": "691dceb07ba1b9a1cf9c89345e5d3bdde54971bb37d1ec75f2b2cc333646096a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_range_test_datetimes.with_tmpfile_as_f_.assert_eq_data_map_partit": {"doc_hash": "ea4e3229245499df6e32a58856b4c67e25d0ceaa6cdc952984a44681bfc10ee9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_with_func_test_with_func.assert_d_index_d_ne": {"doc_hash": "cc692a8d02daa5bdcf8383b1a81d5af7be71e397311cd3c9830eacf6046492c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_no_nameless_index_test_select_from_select.assert_eq_out_df_name_": {"doc_hash": "e8acbd48b2f699aeb1c4f970e2b15011ca409dc9b204860adb265dd8bf1d1743"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_extra_connection_engine_keywords_tmp_db_uri.with_tmpfile_as_f_.yield_sqlite_s_f": {"doc_hash": "aa8e41301ab6c88dc52ad97671e24a2945b1223a66b4670ded9d49d19984d7c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_to_sql_test_to_sql.None_5.assert_actual_npartiti": {"doc_hash": "585eb593e113d6935a71451de552ce31b6504ef4d8a6ac64f3f4797ee7a2867c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/tests/test_sql.py_test_to_sql_kwargs_": {"doc_hash": "7e691ca4f68f46b83655ce3c3f2b3c5f89c66136068d558cc436582d9a727d35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/utils.py_pd__get_pyarrow_dtypes.return.dtypes": {"doc_hash": "f5a8dc790ba399bde19d437eea4f3d1e91d416fbb68f2737c0548190ae66dd19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/io/utils.py__meta_from_dtypes_": {"doc_hash": "82bdc0ca8b5054c15e88abed08c2d02f15b67b198a9a6b6c6d5f311a9b558b44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_warnings_try_loc.try_.except_KeyError_.return.df_head_0_loc_cindexe": {"doc_hash": "e3c1edaff84d0f890d610e14cb38db039133a6b571d54e06b5977bd224db3a5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_boundary_slice_boundary_slice.return.result": {"doc_hash": "1c05e71953dd75262617c5e1b92ec305d2462ac71ac64231dd2a2e47c1fe91a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_index_count_describe_aggregate.return.pd_concat_values_axis_1_": {"doc_hash": "3f9191d38e6f34a056ce63dc8ce97562b360fbeeb0fcab161f9ed87dbd0f0b60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_describe_numeric_aggregate_describe_numeric_aggregate.return.result": {"doc_hash": "6228498ac8e2427fe97014091a29647922199d3e04d8326c632f548cf27ac5b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_describe_nonnumeric_aggregate_describe_nonnumeric_aggregate.return.pd_Series_values_index_i": {"doc_hash": "f8ccc8653706d65444fe17c9de2a1a367a1ed980fabf27799aad74dd073af362"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py__cum_aggregate_apply_concat_dispatch.Dispatch_concat_": {"doc_hash": "347e03f2297c9c341a236ff84fdb81c47e21a2722a7dd9878687573536fea674"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_concat_concat.if_len_dfs_1_.else_.return.func_": {"doc_hash": "6456e2e383ff975cea0eef9396d87889f0474602c0719b4f66f9103bed571274"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_concat_pandas_concat_pandas._Concatenate_the_partiti": {"doc_hash": "bd7286a5c7522a5aaa5a008884c3820976e1f7986fa87d01756d0ffb6788cc40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/methods.py_concat_pandas.if__": {"doc_hash": "c260f05c4aa43e59f81bd65183779a943e234142433a00b3544ce1a9dcd60b81"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py___M": {"doc_hash": "9c9963558b65d5a8014f01783fad6e6f4ab1a1e46aedbb5c6fcf43920ddf2198"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_align_partitions_align_partitions.return.dfs2_tuple_divisions_r": {"doc_hash": "f94c1da1d99c67c01bdf6f993283a3e5a8004e30d480f8758ecb0b4fc92980fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py__maybe_align_partitions__maybe_align_partitions.return.args": {"doc_hash": "ae7d74c9a0947735e1b50de2a40790df7d631103997c5d779ea3fda0fca614ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_require_require.return.divisions_parts": {"doc_hash": "7312709933437668b0a2180ce502bd18e5c412bd415b4e3ff835c6464c4aef99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_None_1_merge_chunk.return.out": {"doc_hash": "2aa0acfb38ac62d36b0ce40eb1a14ea05347507a70dece437141c902c89ae754"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge_indexed_dataframes_shuffle_func.shuffle": {"doc_hash": "50e3d0e9a0ce25fa89c43af94d44c0e136fbeb2fc2630def9000ddb44586f02c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py__name_sometimes_conflict_hash_join.return.new_dd_object_graph_name": {"doc_hash": "2d144cfed7b754f3657c90b3337a78140f8dc4856b8f3e2bcf2a18dfdf3fc137"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_single_partition_join_single_partition_join.return.new_dd_object_graph_name": {"doc_hash": "a4ca685f6397de2c3d415b18fe0771bb7a6089299156fbb58a77fe875766d764"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_warn_dtype_mismatch_warn_dtype_mismatch.if_all_col_in_left_column.if_dtype_mism_.warnings_warn_": {"doc_hash": "680da0b29348d1dad9f75487e8099d5bb1ac1b8b07e9aeceaa612485581f7d41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge_merge._Both_sides_indexed": {"doc_hash": "cc8ca1d815c53d57ebd5e703b9a1df2404cd6d0ada3ab2745ef46431c789ca5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge.if_merge_indexed_left_and_merge.if_merge_indexed_left_and.else_.return.hash_join_": {"doc_hash": "e554b175ffa4db3d08698417627abc42c0dc72ce5b171a524273282b6f37e658"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_None_5_compute_heads.if_by_is_None_.else_.return.suffix_reduction_most_rec": {"doc_hash": "88c7ed7730ed3b944e0034904712f3ad8c49bbf0875f27472658bde9163fec0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_pair_partitions_pair_partitions.return.result": {"doc_hash": "b96d83e8ee219a2fd263cf1536b2e6e536d58ebaa8c2fe77a1c5e4ae8841d2a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge_asof_padded_merge_asof_padded.return.result": {"doc_hash": "59c7b7d2447f0eea27137f5812d2dc6ca2939767a20d0124aac9ee8db63cea10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_get_unsorted_columns_concat_and_unsort.return.pd_concat_frames_columns": {"doc_hash": "229b763988070ac73282144d71da2be65188093ceca5a578005e02b3a6b74a9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py__concat_compat__concat_compat.if_PANDAS_GT_100_.else_.return._": {"doc_hash": "6bb528b0914f16769df85520a5f7d136e3126646ebeb282bf7b7d64108dba1af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge_asof_indexed_merge_asof_indexed.return.result": {"doc_hash": "639db23966275c9a773befa97c5b22061f6fd413fb13e54d7d42f82656f5aa01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_merge_asof_merge_asof.return.result": {"doc_hash": "324562d026294cc9d17b6f58b095d6e9ffa3cc1be50a89798d94273b4ec9bd15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_None_8_concat_unindexed_dataframes.return.new_dd_object_graph_name": {"doc_hash": "90e7b0692ae895d622cdcc8f27ffdabcb60c55c29e45822b54a6466ad91c4227"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_concat_indexed_dataframes_concat_indexed_dataframes.return.new_dd_object_dsk_name_": {"doc_hash": "1b1d356dec52bdf9fab3577c36ba860259e3b417847890e36753a849dae88b62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_stack_partitions_stack_partitions.return.new_dd_object_dsk_name_": {"doc_hash": "41918b67660aff004665339fe961fa0b6a676a1b1aa95058f2756d2acf2578ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_concat_concat._Concatenate_DataFrames": {"doc_hash": "c8b5a89d98f4e5727ed89917db5765554e8816c6af8aed260ed39391b376d92b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/multi.py_concat.if_not_isinstance_dfs_li_": {"doc_hash": "6cddeb78124b0137d60d1496bafb9e20065b0c0cc8151d1e0ffa07684c402d61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/numeric.py_pd_": {"doc_hash": "2a142b7c3b3a82348aedfd3bdc7614e913af6483c5b734f5be227c0333853f4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/optimize.py__Dataframe_optimizatio_optimize.return.dsk": {"doc_hash": "38f126feed1654c236f55abf2cc0ea41b888741e7524a9e0c2deda9620a71f3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/optimize.py_optimize_read_parquet_getitem_": {"doc_hash": "780b9ae748b2ec7bb1d542e60cf7e858aa05a0f1f103887cc8ad13aba102fc9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py__Determine_new_partitio_math": {"doc_hash": "334bd96cea6d0b7a7d94a0f0816efa69518e4398c431281c8de674bd50775ab5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_np_sample_percentiles.return.qs": {"doc_hash": "b8713aea577f0da1fb3468867d5a3bc678c6e374658faee43f705f489e3e4d49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_tree_width_tree_width.if_to_binary_or_num_group.else_.return.num_groups": {"doc_hash": "66eb22ff94aaf9d79bd9227029debb76d8f10504e0cb8147ffb0aaffd47ce808"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_tree_groups_tree_groups.return.rv": {"doc_hash": "d2c8499c9e970fc53d080a41e59138ba19efbc63c18fa5eaaaafab63ab3afde4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_create_merge_tree_create_merge_tree.return.rv": {"doc_hash": "8c952f3295fd53dd74ec1205ae3b85953b3916b8b4c1c0874c6156d4044e5242"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_percentiles_to_weights_percentiles_to_weights.return.vals_tolist_weights_to": {"doc_hash": "1209a14b73fbb306bbf65ded2f9faccd53d9b56363c218656a3f1b8b82624533"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_merge_and_compress_summaries_merge_and_compress_summaries.return.vals_weights": {"doc_hash": "ae6d2afab3ceba92bc3a7404513f9087ab0a0e8518b42d2ec8499e0ee946f90e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_process_val_weights_process_val_weights.return.rv": {"doc_hash": "219c560d1f844739dc56ba87e9fba5fab190be5507014a594ec593760846a853"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_percentiles_summary_dtype_info.return.df_dtype_info": {"doc_hash": "26f9fe0f1d01d5f2cd8110a1fa94881384060db8e37629a819209f9d54a68416"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/partitionquantiles.py_partition_quantiles_": {"doc_hash": "5c313d7e1e4852d8c8e791809c032b1395ad7002547f233fd1267809e4955f6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/reshape.py_np_get_dummies._": {"doc_hash": "320b6eb077cb1644e03b2b7fcef118596da3e3a84f02c16bcf5d8b8c90cee691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/reshape.py_get_dummies.if_isinstance_data_pd_S_get_dummies.return.map_partitions_": {"doc_hash": "8b64fb46c5e0778378569c9fa2f2b62d2d3cf0453c8be5c96a3b5f09ef308cae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/reshape.py_None_3_pivot_table.if_aggfunc_sum_.else_.raise_ValueError": {"doc_hash": "5c55bd1700e471824c9b1faea53eb7ead49b97ed00230854c3cd754b1558b6ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/reshape.py_None_6_": {"doc_hash": "f8b12f9935d31676f2d267aed4db0e464c47e5ccc2db4f71e5b6fe34053fd388"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_datetime_overlap_chunk.return.out_iloc_before_after_": {"doc_hash": "84581243745c586c44085f4c67e24505f9648b4a9cbf6499a41deb282e52aa79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_map_overlap_map_overlap.timedelta_partition_message._": {"doc_hash": "b0ffa6aaf49b6d2e3441a1e8d7598a92cc47bf27c761da8c3b8ac18d7bb03838"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_map_overlap.if_before_and_isinstance__map_overlap.return.df__constructor_graph_na": {"doc_hash": "8cbb11a8ccc34e83bee4661e2d74112a2742363634f6324a9977b86f964f01c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py__head_timedelta_pandas_rolling_method.return.getattr_rolling_name_a": {"doc_hash": "df6fa0115c09c6db9c775ba53df50ac339311af4c585110291aa3da446c10dc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_Rolling_Rolling._has_single_partition.return._": {"doc_hash": "19220193e55dd0386676fc80cf7997682f91f5fde8f0b514e53999f6a0a2be33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_Rolling._call_method_Rolling._call_method.return.map_overlap_": {"doc_hash": "ba8ff0a803f823a0ec9487d521186203e7f354b5ec9163f53a948e322a621bd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_Rolling.count_Rolling.quantile.return.self__call_method_quanti": {"doc_hash": "18e2aecb65984a18ff5d045fb48669f0214a0de25c223321b771e12145c3681c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_Rolling.apply_Rolling.apply.return.self__call_method_": {"doc_hash": "9740a2a42132e95247345cd179185bd1176d6f95f425a3cbc8e97e459d1c28db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/rolling.py_Rolling.aggregate_": {"doc_hash": "d0705f88ea786ecba41701653f7a39a6f6133fb7e64999d30b3534abb3d0f5be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_contextlib_logger.logging_getLogger___name_": {"doc_hash": "fcf50b16805043083a0ee15e74422e38db16ecedae6abaea5126bbf96bcef791"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_set_index_set_index.return.set_partition_": {"doc_hash": "d099db4a38c7590690897d98572d0837fe3423a03201a6612c0e7317d2cd7a3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_remove_nans_remove_nans.return.divisions": {"doc_hash": "ccd74e9904c18611ccbe201d506293c82f0e2fead40597e130ee37714fe6726a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_set_partition_set_partition.return.df4_map_partitions_M_sort": {"doc_hash": "dbafb3156d499ba8b1477c62ffd099a6baa18dfab34a694a9d0db47fccd3ad31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_shuffle_shuffle.return.df3": {"doc_hash": "20b28c5405a17ebf88c589c6f289ce4500be30563ccc247dec775f0054f0d897"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_divisions_rearrange_by_divisions.return.df3": {"doc_hash": "e9d48a9f536b33307a39ecbf67582a6fd6aae23231fad34ff4089788717af780"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_column_rearrange_by_column.if_shuffle_disk_.else_.raise_NotImplementedError": {"doc_hash": "1922dc3f415048a2cd1ec56692923e7d957e6da93b49cceeeff004f29b68dda4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_maybe_buffered_partd_maybe_buffered_partd.__reduce__.if_self_tempdir_.else_.return._maybe_buffered_partd_F": {"doc_hash": "339119ec3d1949cc14618a6ce9697799ad713dd926c5faa88092159aae65169f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_maybe_buffered_partd.__call___maybe_buffered_partd.__call__.if_self_buffer_.else_.return.partd_PandasBlocks_file_": {"doc_hash": "e46e5aaaecf6a399248c7f0f82fed7869a62c8b4ef95015b806c8ad0dd06c80e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_column_disk_rearrange_by_column_disk.return.DataFrame_graph_name_df": {"doc_hash": "6ad59059f7d682edc10530fa5e67f10aa9af38897c9e7654fc6cf81c4abfa243"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py__noop__simple_rearrange_by_column_tasks.return.new_dd_object_": {"doc_hash": "bf278dfc7d9e77c10bc12be7e316f7fa87f209648e61c82ab433851e74983284"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_column_tasks_rearrange_by_column_tasks.if_stages_1_.else_.k.n": {"doc_hash": "ab093793ce2c25aab4c02ed7336b5848c7168645ecc2f72bfd5c267c6bd19a0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_column_tasks.if_npartitions_or_n__rearrange_by_column_tasks.df2.new_dd_object_graph_shuf": {"doc_hash": "931705f5423d7842a46c71b3168a10c98f8462c801f12464a84a4547ef6f0268"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_rearrange_by_column_tasks.if_npartitions_is_not_Non_rearrange_by_column_tasks.return.df3": {"doc_hash": "e2b0a625eff9a1e784664759b829cf5f240ea9d7925c755287f4030fbc319651"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py___partitioning_index.return.hash_object_dispatch_df_": {"doc_hash": "516156ee0146cb9b06bcb504d8fb134a92d5ae3a57f78e58f9e4d1318283c71c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_barrier_set_partitions_pre.return.partitions": {"doc_hash": "e95ad0186b31d84a8da1f9d235727522a27c590faf85c860ebce9b5b94a6d115"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_shuffle_group_2_shuffle_group_get.if_i_in_g_.else_.return.head": {"doc_hash": "3a0c5aa57c515ba40f8c7f4f8954578c167c09ce66888256ce210676d4791d0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_shuffle_group_shuffle_group.return.group_split_dispatch_df_": {"doc_hash": "5941d0b1a4af3b4d9f07974ef5889aa18963836ea119dabf54594a6165822af1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_ensure_cleanup_on_exception_ensure_cleanup_on_exception.try_.except_Exception_.raise": {"doc_hash": "c644d2737240e62dd245912fdf8ed360f83ac92a5fa96c8b715b620f9d4040c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_shuffle_group_3_get_overlap.return.df_loc_index_if_index_": {"doc_hash": "cff74768816b7d825885434cb212d9d08d55002e81523553be81860fdcdc49e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_fix_overlap_fix_overlap.return.new_dd_object_graph_name": {"doc_hash": "86a556d26680c6b99cc3da3f2111d361c70df13cc9459eab3be1f1962aa9c58c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_compute_and_set_divisions_compute_and_set_divisions.return.fix_overlap_df_overlap_": {"doc_hash": "dc673f3b6065cd3b834749ac5d86751588adc340aa763a68d012e4ba86a9b94c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/shuffle.py_set_sorted_index_": {"doc_hash": "2638a2eaa1f76b136eb2608bf9331cd378208fc78bdecfe4940ada801d2dfd47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_contextlib_MyAccessor.method.return.self_item": {"doc_hash": "4ea444cc8d671971db09dc15ee85d52f3775767cf9af590064c39d43577fcda9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_register_test_accessor_works.with_ensure_removed_dd_Se.assert_b_mine_method_": {"doc_hash": "5d866894c442da9317ed3e5bd811e3e9eebb36888facd9b3f9cf7343eb343f00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_df_ddf_df_ddf.return.df_ddf": {"doc_hash": "1b8f86350ad54792624c242dc808fec8d93768164da0542341624d31c2acfa12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_dt_accessor_test_dt_accessor_not_available.assert_dt_accessor_in_": {"doc_hash": "adae725be97812f3c2f2d7b36c7101f98e33a68612a552140f4bd129d5ea91b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_str_accessor_test_str_accessor.for_regex_in_True_False.assert_set_ddf_str_col_st": {"doc_hash": "6ef5af5078fbac75a565c4859bf1962657effe3f1dcb72c20198ad1f7b40d69e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_str_accessor_not_available_test_str_accessor_extractall.assert_eq_": {"doc_hash": "33ed514b6b733d48a58035b4656756c516b61a3faf1a9b0843c83b47d9b6de36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_str_accessor_cat_test_str_accessor_noexpand.assert_ds_str_split_n_1_": {"doc_hash": "98e8269f8396a7ca6f60c5f73822ae6070cfea80ded5a7dda1219f29a2d4f504"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_str_accessor_expand_test_str_accessor_expand.None_2.assert_eq_": {"doc_hash": "df1b897c10e95d3f7a36d893f15ebf0afc8bcad6a6042c6d5b1b08320893f17d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_accessors.py_test_str_accessor_expand_more_columns_": {"doc_hash": "1122c22381ef7c3e0d155069f2a256e0d9fa97eddf851f748bb38292cf4b01c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_from_datetime_import_date_test_arithmetics._Arithmetics": {"doc_hash": "ce870b43074430c30f7da7ca47d8b1ac604db3dfb2883f71a2aacdbf1eb46bd2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_arithmetics.cases_test_arithmetics.ddf8.dd_from_pandas_pdf8_4_": {"doc_hash": "4f98a906fe18ac98b84ca092f1c04059af4b58ced7fcba949484dd240fb1622e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_arithmetics.pdf9_test_arithmetics.None_1.check_frame_arithmetics_l": {"doc_hash": "5ec5c7a4f133649ff0948cfe51e002c81dbb4f715ae46549b9a35a1655f64518"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_deterministic_arithmetic_names_test_deterministic_arithmetic_names.None_2": {"doc_hash": "f99d6a65e0c8788251cd26fa827c061aecb8c6d99648a0bf69d2f902834e347e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_arithmetics_different_index_test_arithmetics_different_index.ddf6.dd_from_pandas_pdf6_2_": {"doc_hash": "a7b875111deb85e378db952492391f82532f31254dc4791f9253aa0bcf17a59b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_arithmetics_different_index.cases_test_arithmetics_different_index.ddf8.dd_from_pandas_pdf8_2_": {"doc_hash": "49b384c6aacf81dde10d88505b52f040c13bda62766f54a127747d23e9fcac22"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_arithmetics_different_index.pdf9_test_arithmetics_different_index.None_1.check_frame_arithmetics_l": {"doc_hash": "ce9e6c53fb1182129abe2d0ff496e8a218f225827b3b63ab2d65fb62ee2e4797"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_check_series_arithmetics_check_series_arithmetics.None_1.assert_eq_l_r_el": {"doc_hash": "827abcce2382a274948bd71383b3371ef8a83c3413a4e0f650adf221ac83ac84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_check_frame_arithmetics_check_frame_arithmetics.None_1.assert_eq_l_r_el": {"doc_hash": "2f789443e1e3b9bd02db2a0caf4dae2a79597c19c1bc30910e1368be6b8b39c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_scalar_arithmetics_test_scalar_arithmetics.assert_eq_l_r_el": {"doc_hash": "777f93f7e9b2dbd2c39e4398fcbe06c43ad19ecd48de1be0d9817ffc9c895434"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_scalar_arithmetics_with_dask_instances_test_scalar_arithmetics_with_dask_instances.None_7": {"doc_hash": "a3b07c2d7b1e47bcef4f2027188c2925a4ad6b45571d3627960bc9be539b94b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_frame_series_arithmetic_methods_test_frame_series_arithmetic_methods.s.dd_core_Scalar_s_0_": {"doc_hash": "ff83f635105d72160e3ebf53f028b0de39b5284f88e3268bb46f11efbb0c03b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_frame_series_arithmetic_methods.for_l_r_el_er_in__test_frame_series_arithmetic_methods.for_l_r_el_er_in_.None_1.assert_eq_l_rmod_r_fill_": {"doc_hash": "ac49eb080bcd90e203ce260d4b36cdd636e485b61f62eafc8e3b12e0c6d26abc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_frame_series_arithmetic_methods.for_l_r_el_er_in_ddf_test_frame_series_arithmetic_methods.for_l_r_el_er_in_ddf.pytest_raises_ValueError_": {"doc_hash": "82b8658b72fa65adfc3154f7230fd01c8c0244c054a7ea000b58de24345e2a64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_frame_series_arithmetic_methods.None_2_test_frame_series_arithmetic_methods.None_2.for_axis_in_0_1_index.assert_eq_l_rmul_r_axis_": {"doc_hash": "03c6fcad459da82de55ecc8d15276b5dacc2c1718fda8caea2a7c68909827583"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_test_reductions.boolds.dd_from_pandas_bools_2_": {"doc_hash": "fd965bf862b25117f4fb003fb485381aa64043999f04d3d76b4cc451112695c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions.for_dds_pds_in__test_reductions.for_dds_pds_in_.None_17": {"doc_hash": "747e3916726f9abaed7a8acadece1fe107b34d372288e08600ec9faee3f08f82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions.assert_dask_graph_ddf1_b__test_reductions.assert_eq_ddf1_index_coun": {"doc_hash": "86032984ce60a70cf2adfee07303f879efe58606fea729be5acd1099d96bda3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_timedelta_test_reductions_timedelta.assert_eq_dds_count_split": {"doc_hash": "113f4e0d2fdc2e4073ead66b10b50837841f2aae73e3935532ea07f7f66b98ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_out_test_reductions_out.None_4": {"doc_hash": "3daab12ec97b452a87393c0998d415aef743fd02bd3ab5c976208d6da92d6de0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_allany_test_allany.None_19": {"doc_hash": "19f3db16841ceab3b6f09c936577042c0a7897f2af560b496813baf1017db352"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_deterministic_reduction_names_test_deterministic_reduction_names.assert_": {"doc_hash": "555f4b4a5b761327f9459844c2be5169dfe915315f1fa1b2b05cade0cc6b7346"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reduction_series_invalid_axis_test_reduction_series_invalid_axis.for_axis_in_1_columns_.for_s_in_ddf1_a_pdf1_a_.None_8": {"doc_hash": "2e56d38cb15b25d080f901c62601aa0c6c8e4fb39132429a96151cb35c41e828"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_non_numeric_dtypes_test_reductions_non_numeric_dtypes.None_13": {"doc_hash": "80ee85fc3b00038963e6e7200a21de37526e26bf111ed1ae806f4929e2ae566d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame_test_reductions_frame.assert_eq_ddf1_mean_split": {"doc_hash": "690424583ee09c400888216787a5585ff473fc197e40673ae73b03bbf5d0d2df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame.for_axis_in_0_1_index_test_reductions_frame._axis_1": {"doc_hash": "c35878af0f5f3edee1cae6af93ae8d5ccafac48a40cd313f759ead0dd2ceaa06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame.None_31_test_reductions_frame.None_39": {"doc_hash": "1f7ca155cee57d640cf59044779584961766b7ecdc959bb6c866163930e536e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame_dtypes_test_reductions_frame_dtypes.None_3.else_.None_1": {"doc_hash": "7319355078eefc8b251fd76c20cb0fbb39c5d2881e81d831f1bcf87c7e9ffd2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame_dtypes.assert_eq_df_sem_ddof_0__test_reductions_frame_dtypes.assert_eq_df_numerics_var": {"doc_hash": "860239183964138617667b89229cad9e2bc2d262b5be429b110c4881f07b942d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame_nan_test_reductions_frame_nan.assert_eq_df_mean_ddf_": {"doc_hash": "d5f0f22bd3233dcdeef998157c73c31c4c62a72c4114b32b237d388eaef77888"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_reductions_frame_nan.None_1_test_reductions_frame_nan.None_1.None_21": {"doc_hash": "ac75972928907c0a8757bce94dfc4676e488b05db729278e9e2912f140057afb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_series_comparison_nan_test_series_comparison_nan.assert_eq_": {"doc_hash": "398365e3ff529e10b9c5158aa3496454e0c43ec826e3248aea4bedb7ce29fb17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_skip_if_no_intna_test_divmod.None_3": {"doc_hash": "56dbf3ebeaf953b3aed191ee86feeea52ed7385685e917ff63e274cbbcab12b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_moment_test_empty_df_reductions.None_1": {"doc_hash": "9a207695ef2d84e0c93630bca1c9f61e224c787463195e33b144972ce628ce76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_arithmetics_reduction.py_test_series_agg_with_min_count_": {"doc_hash": "3d0a30f30da9f19a5e786cf910334de645cc66bbcd25b95bbcfa1a323d80a31d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_boolean.py_pd_test_meta.dd_utils_assert_eq_": {"doc_hash": "7b06fc7b5a3b4f233761c496d4bc86fdfc36805c91185c67f0fbee1835c4cfff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_boolean.py_test_ops_": {"doc_hash": "488fe3a1d13b57cbba6636bf7b404f610c6ea88122b0cf22dc25873db39ef944"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_operator_frames6._i_set_index_i_y_i_x_": {"doc_hash": "b952c683f8d41fa40579c8aaaf05805c60ee75bf080b9ebfbacd3a426370b9b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_concat_unions_categoricals_test_concat_unions_categoricals.None_8": {"doc_hash": "f0d11539fa8cab276e9343b3c295e6d465e4e4688aef3c1547c98000fadfd53b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_unknown_categoricals_test_is_categorical_dtype.None_3": {"doc_hash": "fc43475a4f568ffb17e6d9c9c9f2b6c569625327dd17c994f6b031116d95ba50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorize_test_categorize.None_2.ddf_categorize_split_ever": {"doc_hash": "707a51be02f0d6be8a8c281bb6d786c633dbb199a8d4c87764a61e52afa34ec7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorical_dtype_test_categorical_dtype.None_5": {"doc_hash": "51ee7aa209ad84c46901223e44414b8f0c98c8054fd2df5586431dfdd4e1a4fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorize_index_test_categorize_index.assert_ddf_categorize_i": {"doc_hash": "c13d71593aa75a29ea3198d61ec61cf35d50a5e171b501d7811726c8c26cf04b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorical_set_index_test_categorical_set_index.with_dask_config_set_sche.None_8": {"doc_hash": "396be4b80e4b30783c19a99869cda56ff17080ef9808e23599de378e6cd2c03d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorical_set_index_npartitions_vs_ncategories_test_categorical_set_index_npartitions_vs_ncategories._Test_passes_if_this_wor": {"doc_hash": "fd8145630dbcd888e77851f56fc8e0d5060068210155358364397eb7810d8d5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_repartition_on_categoricals_test_repartition_on_categoricals.assert_eq_df_ddf2_": {"doc_hash": "b4a5e28f0a999891056190e8fe889b1115666cf71b624de9eba9b0314e5f1c0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorical_accessor_presence_test_categorical_accessor_presence.assert_not_hasattr_ddf_in": {"doc_hash": "62eb9f8c34927ce7557a4b7da7192958fbc4e10771f8c54ea0ba601758e94c2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_test_categorize_nan_test_return_type_known_categories.assert_isinstance_ret_typ": {"doc_hash": "823c90631d1648b8fc053b832493b6dba91f5a39a803acf32f92e83f23773b5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_TestCategoricalAccessor_TestCategoricalAccessor.test_callable.None_2": {"doc_hash": "5e8848f857de277e9ea5ae5a2798c9443b9b1ba622a81ad49f335aa69a14eb96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_categorical.py_TestCategoricalAccessor.test_categorical_empty_": {"doc_hash": "711d787134f4038ddb2d39d988829f3f4f99919db5ab2c0fc16fcaff14a21922"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_warnings_test_dataframe_doc.assert_disclaimer_in_doc": {"doc_hash": "34e1f10453ac1a7c5a96af0ba18a0877be1b5ffee0738229423f508719c702de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_doc_from_non_pandas_test_dataframe_doc_from_non_pandas.try_.finally_.del_dd_DataFrame_foo": {"doc_hash": "cdc41c1f1a5331665ce60432902cc57316b2ff8e797c82494af64b3f9e9acb60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_Dataframe_test_Dataframe.assert_repr_d_": {"doc_hash": "725328faca936925a9f9ce034c58ed255a0f0811ee57aa45d02af4956612233d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_head_tail_test_head_tail.None_3": {"doc_hash": "54de0932a9d11cceb50b6ebff03edbf3d20671d65f813334aba09b3525d85135"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_head_npartitions_test_head_npartitions.with_pytest_raises_ValueE.d_head_2_npartitions_5_": {"doc_hash": "ef5ba091322b14ecf091c745229502ab69a79febff24f31fd9349ba1d1649d62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_head_npartitions_warn_test_Index.for_case_in_.pytest_raises_AttributeEr": {"doc_hash": "0fffb81e4aaf40b8aae753312eda1fbdd17c5df299df9e75fff9af68cc163d62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_Scalar_test_scalar_raises.with_pytest_raises_TypeEr.bool_s_": {"doc_hash": "6a54869976d938eef84db74c33c1b474aed51e5d7641d3c828d9634296242a8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_attributes_test_attributes.None_1": {"doc_hash": "fb244849b780aa5165f5b31cc27a7e00794c9e0eb2eea539defec5ef62938857"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_column_names_test_index_names.assert_ddf_index_compute_": {"doc_hash": "fd32732776990475340dc6e5acf8af4c210c12c3ec57bdda18970edd95ca9132"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_timezone_freq_test_timezone_freq.assert_pdf_tz_0_freq_": {"doc_hash": "2df77f68e82961a84c0044346294884fd7ad011f4e106c598fb09c761250e895"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_rename_columns_test_rename_columns.None_5": {"doc_hash": "871cea156ff4bd81d85c1bf6494238fa20cdedfdf19e0c6fb92e339184db6dac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_rename_series_test_rename_series.with_warnings_catch_warni.assert_eq_dind_ind_": {"doc_hash": "4d9d408b0269cb7590666899acde5d5951a38ab7d6320d5f968a476ea3ddd708"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_rename_series_method_test_rename_series_method.assert_eq_ds_s_": {"doc_hash": "7ee5066f4e099d29d2564c86b02bfb4d1dcc072a25a2d50eead076dc03d408e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_rename_series_method_2_test_rename_series_method_2.assert_eq_ds_s_": {"doc_hash": "7c852e0815982aca79ff5ba3441dc3b76f6b3bd9afa8afc07a519f134559bd61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe_numeric_test_describe_numeric.None_6": {"doc_hash": "a087f134db12563319dd56078e0a8234aa78c20e5b81116241bb4bdf5a2c2da4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe_test_describe._Act": {"doc_hash": "e3a97c1ff6e62717cdfa49dccc91a9d1deab7982e3a7d000a9bed6998d9a32b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe.desc_ddf_test_describe.if_subset_is_None_.for_col_in_a_c_e_.assert_eq_": {"doc_hash": "a17429f3d4c91244d7b8e49a3fd5e57c38f3819c890a39733f556a05818dbaa0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe_empty_test_describe_empty.None_2.ddf_nocols_describe_perce": {"doc_hash": "e4707820bac263eda75e0fa4c35e02b7ab390ec323cde885833abd945de2b8af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe_empty_tdigest_test_describe_empty_tdigest.with_pytest_raises_ValueE.ddf_nocols_describe_perce": {"doc_hash": "68d5fd80cd3b3acc7a5fbfe349f57ac2964c95a25379a2a5b6db5b2498da854f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_describe_for_possibly_unsorted_q_test_describe_for_possibly_unsorted_q.for_q_in_None_0_25_0_.for_f_convert_in_list_t.assert_eq_r_75_75_0_": {"doc_hash": "d8451b86494b40294336aaebf672d0e7672af6e3dea28bfb73f41939c59d1255"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cumulative_test_cumulative.None_43": {"doc_hash": "dd9c216d3d11d6f5fcbe2ab6d79eaf416ed059eba59fa2bf1ceae1adf497e6b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cumulative_empty_partitions_test_cumulative_empty_partitions.None_1": {"doc_hash": "e5a8d10558f58b91ce49d5d12057432e72b13919e97a231a761051a59a8aa0e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dropna_test_dropna.None_17": {"doc_hash": "69f0c31c74a105e516c3ac3ff59954074280fe0e1f0664854090ece7b6a2a1a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_clip_test_clip.assert_eq_ds_clip_upper_u": {"doc_hash": "426bf8a56ee330b507b3a672d09aa5239d679f9570c2be427282387130e7bac6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_squeeze_test_squeeze.None_2": {"doc_hash": "ebbeea38e32beb1b99c1f66b2b0161be5bf50060f7469826e805048a7b39ae97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_where_mask_test_where_mask.ddf6.dd_from_pandas_pdf6_2_": {"doc_hash": "c7d714dbb8261de30a7eaa59dd0fd5d946bcddbf8b6dcb0291789db6bde4c1df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_where_mask.cases_test_where_mask.for_ddf_ddcond_pdf_pdc.None_9": {"doc_hash": "afc23dd8d6d6bd5bf7a1ac3c155bc66cee741a7b8cf76ff926d2be0b212b14b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_multi_argument_test_map_partitions.assert_result_dtype_np": {"doc_hash": "6a22f33b51c549820da38b8efc3ac4eb61151b039933ea2a8866f58797198b98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_type_test_map_partitions_names.None_2": {"doc_hash": "859d0e3c73c26f9fd64e7f773f01caac352d7fd3d4907e9f24f983572bc36316"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_column_info_test_map_partitions_column_info.None_6": {"doc_hash": "3a471086deabf3afdae427343fa48ddc27474582224577d407da879db0050c3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_method_names_test_map_partitions_method_names.None_5": {"doc_hash": "a9f7ce1a7462fa4f59899f98443bf291ed3f87f4ac61c1108f75b16ca5bc0fb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_propagates_index_metadata_test_map_partitions_propagates_index_metadata.None_1": {"doc_hash": "dd12e0e98dd1e9f3ffba8d547e7c16787dc40d5258cb326b27f079d6c8dc4cf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_keeps_kwargs_readable_test_map_partitions_keeps_kwargs_readable.assert_a_x_map_partitions": {"doc_hash": "f1f36a383528f87c286dec27ce16e9e0ed096ddad8c64a35187de53129a26be0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_with_delayed_collection_test_metadata_inference_single_partition_aligned_args.assert_eq_res_ddf_": {"doc_hash": "cc4a13da158aed378a6e88631f43e6ee791b7e84c900e9f18f2d02d8a8ab9ade"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_drop_duplicates_test_drop_duplicates.with_pytest_raises_NotImp.d_drop_duplicates_keep_Fa": {"doc_hash": "90153c8e53ce749d0b88aa8ed674b4d9658a1251a69ea4cff1a1036c952ee49a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_drop_duplicates_subset_test_drop_duplicates_subset.for_kwarg_in_keep_f.for_ss_in_x_y_.assert_eq_df_drop_duplica": {"doc_hash": "5726d5d34914d497948cb37e745755e7685ddf262ebe7778810151926514ec91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_get_partition_test_get_partition.None_1.ddf_get_partition_3_": {"doc_hash": "ef47f3a026a2663788f2b0ef3804bc52efebc3d6ee90ecb5e781bba69df9503f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_ndim_test_value_counts.assert_result__name_re": {"doc_hash": "d36a0a89cd387fca2ebf1577d803dc23c49a4ee6ccf4d63df4090f4bd391c1a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_value_counts_not_sorted_test_value_counts_not_sorted.assert_result__name_re": {"doc_hash": "253764737b31f1d729f9efa0b0794589586c57ddd1d9fabbaa91c744d3e0de79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_value_counts_with_dropna_test_value_counts_with_dropna.assert_result__name_re": {"doc_hash": "5e55672516983ef1420aae4599e10ffd270483c778892b428bc2939761a63eb7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_unique_test_unique.assert_ddf_x_unique_split": {"doc_hash": "b1c13e39f48b5d7633592a41fac90c3f6425296aee120a5aacdbb5b700e3ff73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_isin_test_isin.for_obj_in_d_f_series_.with_pytest_raises_NotImp.d_isin_obj_": {"doc_hash": "f3937298088992afc8f9f3aeec98d8528780e67427b63a26f02bf97ad1ecf806"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_contains_frame_test_size.assert_eq_d_index_size_f": {"doc_hash": "9ed5eecbf01b4a6838bbb8de0de6b7c61ecd4d256d068acf925a4a18e7115880"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_shape_test_nbytes.assert_eq_d_index_nbytes_": {"doc_hash": "36e85ab63a39057387805d4cb231bf80969dbac88aaac36371b39a48349a043e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_quantile_test_quantile.assert_result_expected": {"doc_hash": "07a24c9eb0a8f37973dc473789a0e25604cd99a84653f3cb7ba24a14a076a88a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_quantile_missing_test_empty_quantile.assert_eq_result_exp_": {"doc_hash": "7274b1178ef38efb88bc107d9281c901f819e3a569b300e716d6a65fe0f4041b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_quantile_test_dataframe_quantile.pytest_raises_ValueError_": {"doc_hash": "29ce668c1c9feea5d730823f64fef1e3a140161f11306700e75c18c02d4c53c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_quantile_for_possibly_unsorted_q_test_index.assert_eq_d_index_full_i": {"doc_hash": "b8b0c8c63916bf86780a0b26e01775dfef20a265ffa4f9487456d3de58ae3e98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_assign_test_assign.None_3.ddf_assign_foo_ddf_unknow": {"doc_hash": "c62a3e7034e19cc9e9d7e4d9bea40b6a8876cd649d2cead3630078f61e36c3eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_assign_callable_test_assign_dtypes.assert_eq_": {"doc_hash": "3e4fd22046ae9d0a2fe408fe8a463e9d6c3f8feb8d7057b912f01dfa72388f11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_test_map.None_6": {"doc_hash": "4399403f8905ef2b064229539ac5148493ab806f7bce80a107e76c252c61ec67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_concat_test_known_divisions.assert_not_df_known_divis": {"doc_hash": "7a55851514ab3fc54438e6ae86c86383ece154e600b78e7ce28b55db75efa5b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_unknown_divisions_test_unknown_divisions.assert_eq_d_a_d_b_1_": {"doc_hash": "9725f40d9cf79c396ba3e530d90b6bb18af4c28fb7ad25ca48bbda97b9dfb05e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_with_min_count_test_with_min_count.for_df_ddf_in_zip_dfs_d.for_axis_in_axes_.for_min_count_in_0_1_2.None_1": {"doc_hash": "a49143de9e8a24256dc9eb8aad3f7721fab0df64e31bf9387fa21711e402f736"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_align_test_align.None_15": {"doc_hash": "894de5570951a745f984554212402b038483e67bfa442f0ab2af379f65c7d8a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_align_axis_test_align_axis.None_1.ddf1a_A_align_ddf1b_B": {"doc_hash": "37beea4ebd0be84b11296a09d3d717726048e158f9f89b8f0a3585917680dc7a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_combine_test_combine.assert_dda_combine_ddb_a": {"doc_hash": "9d83bdd95be426db9b718da57e85e11794ac84c9978ab3a77bcdc62622181311"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_combine_first_test_combine_first.None_5": {"doc_hash": "66c8867f750fe3883ad61cf1eb51cbc684ead1910866c37529348fd223c5d658"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_picklable_test_dataframe_picklable.assert_eq_s_s2_": {"doc_hash": "ab3cdb514106a0b0bb0b9c4d135a1ad74c1500e9cf6499cb5f9147dcfec02749"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_random_partitions_test_series_round.assert_eq_s_round_ps_r": {"doc_hash": "bb2f8b6457a77ac6eef5173a9c70d560880083ddce14a5d79c4ef90a7d8f1c3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_test_repartition.for_p_in_range_1_7_.for_div_in_5_10_2.assert_eq_pdf_x_rds_": {"doc_hash": "87a889f13b5741555c25e47abf2a2283d9e5e4c8024c5be85bba623f03770f0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition.pdf_4_test_repartition.None_2.for_div_in_list_Yadijm_.assert_eq_pdf_x_rds_": {"doc_hash": "e011d144b761de75248c978a59c3ef06c629f31297912a30ce2b9edd4db37472"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_divisions_test_repartition_divisions.None_1": {"doc_hash": "e867c0c8f90b29cceeb9ff2fa79a7228a33dafbe11c1237de3dbda707e029ce8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_on_pandas_dataframe_test_repartition_on_pandas_dataframe.assert_eq_ddf_df_y_": {"doc_hash": "3c4dbd461d1e9fc867013398c8f6ca1a6e56a53d0e128a08db423f21057f69e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_npartitions_test_repartition_npartitions.assert_all_map_len_parts": {"doc_hash": "8fc931802d16a1ace76528684597f3f831d95905d473a5e43e1eda85fba21a13"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_partition_size_test_repartition_partition_size.assert_all_map_len_parts": {"doc_hash": "d25229d47ae0222c412f6cec21f94ad3c4f07e49addfeb8b9d1a636829e790dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_partition_size_arg_test_repartition_npartitions_same_limits.ddf_repartition_npartitio": {"doc_hash": "754da2e61fc5f2f5371f1d67d3b17afee7ce105876f7af36449187db75a466c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_npartitions_numeric_edge_case_test_repartition_object_index.assert_not_b_known_divisi": {"doc_hash": "7eb4913b2f961521d955fc88953e8986b47a6a59720eecb1e09cf8fed82685f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_freq_test_repartition_freq.assert_eq_ddf2_df_": {"doc_hash": "f4b885bf106644bad7e62e4867e7dc3417e73fb1f4169be175618a81bcf0e7e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_freq_divisions_test_repartition_freq_divisions.assert_eq_ddf2_ddf2_": {"doc_hash": "deaae062b3eb7925d1900cc0c57dcb653ff4e57fab0433b5e708b4baaab13654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_repartition_freq_errors_test_repartition_input_errors.None_1.ddf_repartition_npartitio": {"doc_hash": "255d5022781d0dece6e8701eae8e146e09b2243c3b7f959c72e1b62fc5115b5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_embarrassingly_parallel_operations_test_embarrassingly_parallel_operations.assert_len_a_sample_frac_": {"doc_hash": "a7fff95ca9f1ad4ca5bfc6d87f5abd36c4460aa9221c0d947d27ae7dfb964924"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_fillna_test_fillna.assert_eq_df_fillna_metho": {"doc_hash": "6f78f012e37d0d48193506d1f84ce62e2df2a72b68687f2efea70661e478edcb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_fillna_duplicate_index_test_fillna_series_types.assert_eq_ddf_fillna_fill": {"doc_hash": "fd4b6bfb10bf5e0d5990d33515e72a56026a480de75205ee47ce239aef0649dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_sample_test_sample.assert_a_sample_frac_0_5_": {"doc_hash": "645db31d6e1ab5f10eae96686705dd7327ba3ad142d831a8b05d5a65ab4dc1d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_sample_without_replacement_test_sample_without_replacement.assert_len_bb_len_set": {"doc_hash": "1c3e46ba27024ba6a4a6a1bcde70d3dedfa40fe06f1ffc684de75dbeb197adbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_sample_raises_test_sample_raises.None_2.a_sample_frac_None_": {"doc_hash": "00313406d1914ad3567f6d010afe915e8ef9c036a71c8e377dda8c26492fe684"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_empty_max_test_query.assert_eq_": {"doc_hash": "53d80f6fda15b19f0d5ead5d5952ad2ad10ca142098082e06a476469e581475b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_eval_test_eval.with_pytest_raises_NotImp.d_eval_z_x_y_inpla": {"doc_hash": "c8e803d1395b8a98fe87bd54bec10daf479438cc6ad6b64c9bb64546571b1ad6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_select_dtypes_test_select_dtypes.if_not_PANDAS_GT_100_.with_ctx_.tm_assert_series_equal_": {"doc_hash": "43a85d49820244542003e8e3269d88dc0812c8e2189f6b6be5f0febfd4406817"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_deterministic_apply_concat_apply_names_test_deterministic_apply_concat_apply_names.assert_eq_res_df_x_sum_": {"doc_hash": "c0b84f01c1feef9269bd29daae758a7cd3c1b186fd61bfac95bba01fd98ab8e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_aca_meta_infer_test_aca_meta_infer.assert_res_compute_d": {"doc_hash": "8f5498be7174ab8abe5f94d9ed8647f86db274c7fe8a952ae1a64e4ad461ec6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_aca_split_every_test_aca_split_every.None_1.aca_": {"doc_hash": "bb74a07b94ca51e69fff7698ed1c9ab86d61adf4cbbc14987edf13607789051d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_reduction_method_test_reduction_method.assert_eq_res_pd_DataFra": {"doc_hash": "a8787a8e4cb5c32c7ac517f72c84941343c590a58e736a8aaa692be83a3a917d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_reduction_method_split_every_test_reduction_method_split_every.None_1.ddf_reduction_": {"doc_hash": "8f9caf81e72623af52815b2723eaf44808fa484a3aa61b905ff3def6f927d237"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_pipe_test_gh_517.assert_ddf2_index_nunique": {"doc_hash": "ef4cb7b7974bd00451eafa054d579a52848996299c2c2e5bba22c784a81e613b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_drop_axis_1_test_drop_axis_1.assert_eq_ddf_drop_column": {"doc_hash": "ee61f650a7416b656f0849c76855bba07bb726d35476ace106264d8a47a1e28f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_gh580_test_rename_index.pytest_raises_ValueError_": {"doc_hash": "248f4348f8061487f25b51fab3ec45ef309de2829ce154d2800d5257d91c9ae3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_timestamp_test_to_timestamp.None_3": {"doc_hash": "3f7107fa36b03d3dd76d9f6bb5d92c62b2ec787945fe114c01dcb5c406a22ede"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_frame_test_to_dask_array_raises.None_2.a_to_dask_array_5_": {"doc_hash": "7b84b87db4f3fcb1e12ab4df70697a7407bd56bacc383efaa18b45c6816d2f2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_dask_array_unknown_test_to_dask_array_unknown.assert_all_np_isnan_x_fo": {"doc_hash": "086e0e405bd0555b78a240926ddce1b8f547415f6e60a4d87e84f878d5b39a1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_dask_array_test_to_dask_array.assert_result_chunks_e": {"doc_hash": "b393a59d917d37b7fc7e38519ab3cc5f9fbcdcae1233453d8f5d1c2e23f3119c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_apply_test_apply.None_4.ddf_apply_lambda_xy_xy_": {"doc_hash": "090d9043071877ba9d924b3310fd71bf7f5905c83fe8bf86e42b0bd90e527b1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_apply_warns_test_apply_warns.assert_int64_in_str_w_0": {"doc_hash": "eeb23a7c6982ed24b20a13dc85f8bdb7e8d17703060360d81360ba333198b3b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_applymap_test_applymap.None_1": {"doc_hash": "93131f8973e3bce9f28b9bddb7d9c00afb077b244e394b15a9604e5fc0cdf099"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_abs_test_round.assert_eq_ddf_round_2_d": {"doc_hash": "b9b894def99cfc511ae1194cd336de76ef7d35e7ffbd087cf7212f4760b4e74d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cov_test_cov.None_7": {"doc_hash": "9d62460c1e4089d70f739852c75ca25a8d3aad83c47fe27924ae1d3146cbad71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_corr_test_corr.pytest_raises_TypeError_": {"doc_hash": "3c7bfa2957d4740bfd29a25d536803eb19b87148d304adee8d55c6f02982d108"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_corr_same_name_test_corr_same_name.assert_eq_result2_expect": {"doc_hash": "6ce2446c9cb8332c5d2396d288ff00e0287b4346f3a499015a430e95912b9836"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cov_corr_meta_test_cov_corr_stable.assert_eq_ddf_corr_split_": {"doc_hash": "8efa97aeb8044621e622263598c262a18f4a7541d40e8f7ee4e2c2b461474f2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cov_corr_mixed_test_cov_corr_mixed.assert_eq_ddf_cov_split_e": {"doc_hash": "3744203ffeeb4a04f28411e46cfd8632063e1003cd117cd99f170bfd4372eb9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_autocorr_test_autocorr.pytest_raises_TypeError_": {"doc_hash": "a427b9039b45d3e6338565b6808f650191221a9da05be235bff0ef7b530761e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_apply_infer_columns_test_apply_infer_columns.None_5": {"doc_hash": "6dd7946e4ade8ed50ef552886d772b48fdd3b51f9f3da9d35c9d74da285643e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_index_time_properties_test_nlargest_nsmallest.for_m_in_nlargest_ns.None_2": {"doc_hash": "764c571d2070dbc2e4c8b749a895e78e847f65c63b4d0d5eb350d0dc42d372e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_reset_index_test_reset_index.None_3": {"doc_hash": "20a7bea6f49044e41386519b73a21221ea65113f5b263940ba0094879958cb78"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_compute_forward_kwargs_test_dataframe_itertuples.for_a_b_in_zip_df_iter.assert_a_b": {"doc_hash": "8ad7ad83f0f5b8ce4229002a00977166af070f113c6021869144bdc5e2c925c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_items_test_dataframe_items.for_a_b_in_zip_df_item._column_values": {"doc_hash": "42ebdf3d60c4cedea5443992353746581b9601747d2fc38dc6a837d1a48b8abf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_itertuples_with_index_false_test_astype.assert_eq_a_x_astype_floa": {"doc_hash": "0807170d14e43482999bdb8cd17478f8a3a9d24c623ca0aec4b773de19c19fa2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_astype_categoricals_test_astype_categoricals.assert_dx_compute_dtype": {"doc_hash": "83981dda45199074fcc9668061b76579df2967f50fdbe75263487a819cca530f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_astype_categoricals_known_test_astype_categoricals_known.for_dtype_known_in_ca.assert_dx2_cat_known_k": {"doc_hash": "ae27cf70f84c5f21f753925ea04586a0a48c508110f5b37e9e2da1964f79469f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_groupby_callable_test_groupby_callable.assert_eq_a_y_groupby_ise": {"doc_hash": "bfcdc0d86557a265d3d90d949bee2582b7c81ef01e7c90a4e2added45a0574aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_methods_tokenize_differently__assert_info.assert_stdout_pd_stdou": {"doc_hash": "c906003d1e3db4585e3934f970f12d446702bd7add231c02c885cc9784be782c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_info_test_info.assert_ddf_info_buf_None_": {"doc_hash": "7cbebdb45aafed1cad20db46347ce4f04ee1a742cd3397cd14122cb839fbee95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_groupby_multilevel_info_test_groupby_multilevel_info.None_1": {"doc_hash": "5f7f1fc85469721d4d05cd816884e84a836e019724610bdf091c3a9af8413743"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_categorize_info_test_categorize_info.assert_buf_getvalue_": {"doc_hash": "d13aa35da163721ba59b5da9713d48d842451db2df535f3b6eedc3d63ba4f7ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_gh_1301_test_column_assignment.assert_z_not_in_orig_co": {"doc_hash": "f6a3ac45ea30e279bc41a818e58fddc555ccb96cc4d3c297507f1865995f3c06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_array_assignment_test_array_assignment.None_1.ddf_z_darr": {"doc_hash": "102b09f892b285bef752a8dedeb4cf60f38831329082270e284b48712ceacfea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_columns_assignment_test_columns_assignment.assert_eq_df_ddf_": {"doc_hash": "93d07cb3d20c10ded5461b73398cb041c9fcc8dc5a8bdb1acfae3c08d01e9054"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_attribute_assignment_test_setitem_triggering_realign.assert_len_a_12": {"doc_hash": "de74c6df5fc284c900b28fa0288e77565476a549ca45464e82d5a930c63242d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_inplace_operators_test_inplace_operators.assert_eq_ddf_df_assign_": {"doc_hash": "e1413ed8a74ca887ee5d51b6d430129360f92653d7cc20b8380e65e23e34f186"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_idxmaxmin_test_idxmaxmin.with_warnings_catch_warni.None_3": {"doc_hash": "b39fc3073fdfe840e514ea619489064e99f18ccdc7807f17ce76132f1923162a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_idxmaxmin_empty_partitions_test_idxmaxmin_empty_partitions.None_2.ddf_b_idxmax_compute_": {"doc_hash": "bc7b77423ecde279ec67d2b41cb21ac229cff5cc443ac88360ba8bb3e01de600"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_getitem_meta_test_getitem_multilevel.None_1": {"doc_hash": "48c52cd58e0dc7f6dfcb07adbf7a558a47d833840881043df851a1165ba1ab6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_getitem_string_subclass_test_ipython_completion.assert_c_not_in_complet": {"doc_hash": "9f1417ef0bd0c52352e316cce63573ad52da1ef26ac24edf9b8121c96e9884e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_diff_test_diff.pytest_raises_TypeError_": {"doc_hash": "1199764247b7b6638d3ac85ff3d35bf2b2c2222d5df2e32597f316687bbf6f9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_shift_test_shift.with_pytest_raises_TypeEr.ddf_shift_1_5_": {"doc_hash": "4c35f3d3da199e3d19dae22c4dbecaa4623171301c2b9a345080c5b6ae0c28f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_shift_with_freq_DatetimeIndex_test_shift_with_freq_DatetimeIndex.assert_res_known_division": {"doc_hash": "5842d207264e6bb4a3426009c0eda13a328ad92ee2e514ac0e5cfdbe9b0a6392"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_shift_with_freq_PeriodIndex_test_shift_with_freq_PeriodIndex.with_pytest_raises_ValueE._freq_keyword_not_suppor": {"doc_hash": "75f96370f06da6d812203db5fc15ab16cc837b0399b9c34f65bb7623fa9d32b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_shift_with_freq_TimedeltaIndex_test_shift_with_freq_errors.None_2": {"doc_hash": "81b8e61310b8b34c79a4296adf17d7fa63617ad57a82678b61519aafdd539e11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_first_and_last_test_first_and_last.for_freq_in_freqs_.for_offset_in_offsets_.assert_eq_f_ddf_A_offset": {"doc_hash": "cc46fa1a1478063333d1860d5fee68bb18c78328eb84ac882cee1114d150c5d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_hash_split_unique_test_hash_split_unique.assert_sorted_dropped_com": {"doc_hash": "ea88b7ce364ca28f68faf87fd61a1e40f726c007eaef2ee246875accddabd19b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_split_out_drop_duplicates_test_split_out_drop_duplicates.for_subset_keep_in_produ.assert_eq_sol_res_": {"doc_hash": "e69b12da1f01b1369b1e5ef1aacef3ce610f7db1898d1b90525416c7087470e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_split_out_value_counts_test_split_out_value_counts.assert_eq_": {"doc_hash": "0ef68ac621f4b90cafafd27588035cfc206884928daf5c9b0a70b6a87257ac90"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_values_test_values.assert_eq_df_index_values": {"doc_hash": "13eaf1a6041f5017e3036eb7a0fb47d50ff9ff5e3860cd9ea8e9f7c9a3f7af9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_copy_test_del.assert_eq_a_df_": {"doc_hash": "511a274182e050abfec190d5b9eab267d9e0b8c5c60f56a00bc697d026ca7a19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_memory_usage_test_memory_usage.assert_": {"doc_hash": "3f9a8e4112f669654dffddfa5821f28915699295cbb1d793e2297366066eb439"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_memory_usage_per_partition_test_memory_usage_per_partition.None_1": {"doc_hash": "9a4ea76ffeb1bc30df514495d66750f4cb602cc7927518eb16742c624100da3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_reductions_arithmetic_test_dataframe_reductions_arithmetic.assert_eq_": {"doc_hash": "db9be274083dfbb586e6fa69190b536cf3c932c933f136a1353985c00ee132f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_mode_test_dataframe_mode.None_2": {"doc_hash": "c743e1abe81ff37505579698cafed409aca95ce253476f7abfe974b78fee52d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_datetime_loc_open_slicing_test_datetime_loc_open_slicing.assert_eq_df_0_loc_02_0": {"doc_hash": "cb8db85e689d7cfaaaa764d5b226d72adb02d369d8fc226a387c997d900443a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_datetime_test_to_datetime.None_2": {"doc_hash": "880c1b99a8b2e9c7bcb88dffffc8e176ba5d26178f953870c36778764eed81b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_to_timedelta_test_isna.assert_eq_pd_isna_s_dd_": {"doc_hash": "ed67dc4586630bf7d9f8a053ac4cbfb5321126a23dc38bb7ed530b837d1fdec3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_slice_on_filtered_boundary_test_slice_on_filtered_boundary.assert_eq_result_expecte": {"doc_hash": "d1a601f0747b53d1dbd8df1d77dd634bf9f02ce62fe2296c9572797381fa07d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_boundary_slice_nonmonotonic_test_boundary_slice_empty.tm_assert_frame_equal_res": {"doc_hash": "5ddadc972c474fe4f91d0874a7a61fff1d2c9611a8fe99971e0027de24c2308c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_with_boundary_test_with_boundary.tm_assert_frame_equal_res": {"doc_hash": "52ebb08725b4baaaa1a54b1b21382c3f00c13c270f97a662f971fbe25feed776"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_boundary_slice_same_test_boundary_slice_same.tm_assert_frame_equal_res": {"doc_hash": "82bc9a1eb48ecaa5edb73391b43e0bd7a51d262249c82304b5311260796a1fc5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_better_errors_object_reductions_test_bool.for_cond_in_conditions_.with_pytest_raises_ValueE.bool_cond_": {"doc_hash": "c7952fcdaed136f0e08cf36de6227760ff8ccd32d34e1ffc41e044f85c60a35c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_cumulative_multiple_columns_test_cumulative_multiple_columns.assert_eq_ddf_df_": {"doc_hash": "ee805f19eff084d6d4a886857b0355f0f5223301d21690ad5e023c121a3ad300"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partition_array_test_map_partition_array.for_pre_in_lambda_a_a_.assert_x_chunks_0_np": {"doc_hash": "ed1a82140c9a4388b2ad348fcd512e8394e64c19dc9043b59ef20ff67cea1b16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partition_sparse_test_map_partition_sparse.for_pre_in_lambda_a_a_.assert_computed_coords_": {"doc_hash": "60312e50102565819f1e1f0bbcef46e50696a0850dc57c8d7436ccf366f90182"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_mixed_dask_array_operations_test_mixed_dask_array_operations.None_4": {"doc_hash": "e2775176027170b016feed28136154330bbfc52254bc3b48ce4650c2356a14c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_mixed_dask_array_operations_errors_test_mixed_dask_array_operations_errors.assert_add_in_str_info_": {"doc_hash": "341bae8e997002f42f237988f7da720b352707e715c72310571315bd428009af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_mixed_dask_array_multi_dimensional_test_mixed_dask_array_multi_dimensional.assert_eq_ddf_y_x_": {"doc_hash": "503275182ef591eabd48df65e8a0a69d29e7f8b611eda60e8c243fcb11e222cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_meta_raises_test_meta_raises.assert_meta_not_in_str": {"doc_hash": "130ec219e4dfad13829b414dc65132be6741744a0baa70d749ad6dad2c624423"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dask_dataframe_holds_scipy_sparse_containers_test_dask_dataframe_holds_scipy_sparse_containers.assert_all_isinstance_v_": {"doc_hash": "26bcef508e37ec1f3367672c87944513e0114d05a852686a765a629f9e069436"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_delays_large_inputs_test_map_partitions_delays_large_inputs.None_1": {"doc_hash": "8ad45731f907376e8a9822339c9cff2d7115b5404641991ccd4f04972bd2613f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_partitions_indexer_test_partitions_indexer.None_2": {"doc_hash": "5fb81f9334865750723f737b059b88313e8848d2263e81368e4ff8c0657d7b36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_mod_eq_test_meta_error_message.assert_pandas_in_str_in": {"doc_hash": "e2a3208ef0efde507bb267ecf50c7e9cb1e1892e6085eeef37c043d2b986a626"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_index_test_map_index.assert_applied_divisions_": {"doc_hash": "2ad89942ec0d0a6d7298dd6d95b122308c8d3445bcbe4c0e7984e65442193fdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_assign_index_test_index_divisions.assert_eq_ddf_index_df": {"doc_hash": "287ed2bc75ea891dbc437ad92112a2e93abf754f17d820c5b49850dfac009fdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_replace_test_replace.assert_eq_df_x_replace_1": {"doc_hash": "9c2812e830f3124c78616b08b9071c7826fd43c9e42418051be4f1e208f86ad9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_map_partitions_delays_lists_test_map_partitions_delays_lists.None_1": {"doc_hash": "18ec3751a8ea40cc65e2ca8caa22aafac58e17e31285e03f0f4ba991c65a1a07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dtype_cast_test_dtype_cast.None_7": {"doc_hash": "366b36038830b79f5ee02071bd2a48aa900ff43e541d5dabcb843e21fca8f0d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_series_map_test_series_map.dd_utils_assert_eq_expect": {"doc_hash": "173b47a953ed4f0d295c75571b39e27a417e33f3731c40dfb93e17a9e7ab98bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_dataframe_explode_test_dataframe_explode.assert_eq_exploded_ddf_co": {"doc_hash": "d79cd69ada52ba3c9d3b76f1a8570145a2508d36a90199f6bb18c329eeb0842e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_series_explode_test_pop.assert_eq_ddf_df_x_": {"doc_hash": "2fd40f450242ff72cc14b782a5b20f5afcff34c4cb4b4c9ed33973cea2351865"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_simple_map_partitions_test_simple_map_partitions.assert_v_0_M_clip_or_": {"doc_hash": "857d1e3d77a6bfbc9e1b05da3dbf86d05fa66d400ab85594025ff3b2fed3e749"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_iter_test_dataframe_groupby_agg_empty_partitions.assert_eq_ddf_ddf_x_5_": {"doc_hash": "2b16af7bb73297503dc3e291472c7982f253dc70de9f217df4db887e168e7c20"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_dataframe.py_test_fuse_roots_": {"doc_hash": "eff715eccde0079c8407c11c5c287257d18b34581fc1d51ec39a6e947caaac4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_extensions.py_from_decimal_import_Decim_test_register_extension_type.assert_eq_df_ddf_": {"doc_hash": "cd58120e3e2dd4bc39195e23419fd51c1ce436c79826abda7516c628f7454f3e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_extensions.py_test_reduction_": {"doc_hash": "9aafbabb178e3e15242934502e0f99ce11cd5e515b83c65d39e4af40cae7f43d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_pd_test_repr_meta_mutation.None_1": {"doc_hash": "7999c6d91a5025b2241eb6b90ed904ca3bf6150a4c7e985e7f3d709852b6ce56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_dataframe_format_test_dataframe_format.assert_ddf__repr_html__": {"doc_hash": "f57e99a879df03674084cee09d9f03cb19b7cfa0d51a6193d304c218d4fe7385"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_dataframe_format_with_index_test_dataframe_format_with_index.assert_ddf__repr_html__": {"doc_hash": "68db2ee0241298a6cf41214ef4a0def9d247bc8892372f655217eece65d6986e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_dataframe_format_unknown_divisions_test_dataframe_format_unknown_divisions.assert_ddf__repr_html__": {"doc_hash": "7d60a1b42922ac28e23100030ffff04a493a9e9e7ef061ebd49bedfd6d9f5412"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_dataframe_format_long_test_dataframe_format_long.assert_ddf__repr_html__": {"doc_hash": "cbb3014703169cd483618edc9e3d10fdb8c42881870a24de89958f828f819671"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_series_format_test_series_format.None_4": {"doc_hash": "a8b78ad98ae61d662f258f7e8684cf9dce48c650678656e7b7015f05ed7d0322"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_series_format_long_test_series_format_long.assert_ds_to_string_": {"doc_hash": "4a1ab90dcc84ee221a3b1536fa3435c1d4d6d7abded448c10e5cb06543820033"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_index_format_test_index_format.None_3": {"doc_hash": "b253f00668e61b5a6b6fb4541c992ffa9c8e08c04929abfc85bf37bb83d9de44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_categorical_format_test_duplicate_columns_repr.repr_frame_": {"doc_hash": "03a199dad409f31019057e9f2e59bef941fe0acb4e82d692a7a3d3fdcfddd59c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_format.py_test_empty_repr_": {"doc_hash": "a89cb4b6a2eb7a37276a7086262c153969ad9e793bf73e7687bdc1ab5a43bc3b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_collections_agg_func.return.request_param": {"doc_hash": "9e40b36a1795c1e34bcdb63b289d573cd1037a4071287ee96a1f63afe8cf1e74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_internal_repr_xfail_test_groupby_internal_repr_xfail.None_1": {"doc_hash": "3e2c6df0669ad8e0b4802efae5c721f395a8aaa7b6f4e4df929fd09219425798"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_internal_repr_test_groupby_internal_repr.None_2": {"doc_hash": "adacae37ba987694348c2bef094c7c2a7090ea30108fad82124b06bed883f1f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_error_test_groupby_error.None_1": {"doc_hash": "1133e03e880b0e928d5c398e2ab108c6b3dc64da53a225f136a804255ad98b5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_full_groupby_test_full_groupby.with_warnings_catch_warni.assert_eq_df_groupby_a_": {"doc_hash": "72d0dac458dab6af9dfb54bfe8336faeee0e3ad615ded55e88ede6c4baabd705"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_full_groupby_apply_multiarg_test_full_groupby_apply_multiarg.None_1": {"doc_hash": "f1e23d941c0d2b027c3ffdbdaf2a041154e91947f85ff80b2718f3d17fb612b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_full_groupby_multilevel_test_groupby_dir.assert_b_c_d_e_not_in_d": {"doc_hash": "8aec871da8dc3836175557e81fe78410744f04dd7e74a6eccdd27211efcd4e5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_on_index_test_groupby_on_index.with_dask_config_set_sche.with_pytest_warns_None_.None_4": {"doc_hash": "c518920d637b976782cc72f9329ecae5f99af899fcf5738fc703bf93bf3b25eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_multilevel_getitem_test_groupby_multilevel_getitem.if_agg_func_mean_.else_.assert_eq_a_b_": {"doc_hash": "b93f75763e86c28e696954435fcffca865b4018e66820fb549876eda130a96ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_multilevel_agg_test_groupby_multilevel_agg.None_2": {"doc_hash": "809498d84c88debd6bb8921fc8017b530fe8ed9997baa0adfdc84ac4c7b980b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_get_group_test_groupby_get_group.for_ddkey_pdkey_in_b_.None_3": {"doc_hash": "9e870cf3082732be652ab5e1fd89d1dfe24e283151f59eb02190c5827764f1ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_dataframe_groupby_nunique_test_series_groupby_propagates_names.assert_eq_result_expecte": {"doc_hash": "89e2d705d7bbe6cafb4e793a51386f4e8bff77877036245bb6f7bbc11ab230d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_test_series_groupby.for_dg_pdg_in_dask_gro.assert_eq_dg_prod_pdg_": {"doc_hash": "64878d2a15f68043acbfe1bf5653a0e09a070d7b699456c5cef755c47a73a4d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_errors_test_series_groupby_errors.None_4._dask_should_raise_the_s": {"doc_hash": "2ca7e97f65d5939e36e260f2115726095e780efea703de6b44f6b66e4068d926"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_index_array_test_groupby_set_index.pytest_raises_TypeError_": {"doc_hash": "a5b51c917ba30ef27a296df3e6b4caa9464fa030eb2d60771cccb2786604ea0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_apply_combine_on_series_test_split_apply_combine_on_series.for_ddkey_pdkey_in_b_.None_1.None_1": {"doc_hash": "19b67ac5040e0194acc4eda3936a7c6439b943bf077666aef026b06eecdc6912"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_apply_combine_on_series.for_ddkey_pdkey_in_ddf_test_split_apply_combine_on_series.for_ddkey_pdkey_in_ddf.for_ddof_in_ddofs_.None_1": {"doc_hash": "138d413191b547f3b7c0ce846aaf882c0eb3ebcd993c7ea44d8786fd8bc57e58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_apply_combine_on_series.for_i_in_0_4_7__test_split_apply_combine_on_series.for_i_in_0_4_7_.for_ddof_in_ddofs_.assert_eq_": {"doc_hash": "7b023559c1a74dd106db2621796eaacac4cf5d69412ed572c0d93705606cdd5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_apply_combine_on_series.for_ddkey_pdkey_in__test_split_apply_combine_on_series.None_7": {"doc_hash": "04c08ba996147d342f097e2ceb800adf9fc921c17b61754d6c86da028ef95240"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_apply_combine_on_series.None_8_test_split_apply_combine_on_series.None_26": {"doc_hash": "36d5db3db9acf474316dbb7c2b28b6225b10656bc85ac7f8dd40a2037fa8075f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_reduction_split_test_groupby_reduction_split.assert_call_ddf_a_groupby": {"doc_hash": "d5b267c49a5bd2b3b673a767bf1348d0caa48c46540edfce41a7f0d8106c4857"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_apply_or_transform_shuffle_test_apply_or_transform_shuffle.with_pytest_warns_UserWar.assert_eq_func_grouped_pd": {"doc_hash": "f660623f18c290b60b1bfe94b62e4f1c0910c2586e53168e917d7222bc6f6544"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_apply_or_transform_shuffle_multilevel_test_apply_or_transform_shuffle_multilevel.with_pytest_warns_UserWar.None_2": {"doc_hash": "e5e5dbcb3b6460a36011a62c902685cbf1dc00459ffb2fa6190dd5d3ccc2ce4b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_numeric_column_names_test_numeric_column_names.assert_eq_": {"doc_hash": "4eaa1d950490c13d2a5b895caf25d9357e3bf5a917835f450fd2f2ee0dd0b06a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_apply_tasks_test_groupby_apply_tasks.with_dask_config_set_shuf.for_ind_in_lambda_x_A_.None_1": {"doc_hash": "1727ec1242320fa581c12bab5f4cf0f5c14ea32acb3d5df24e51a18b7c610c91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_multiprocessing_test_groupby_multiprocessing.with_dask_config_set_sche.assert_eq_": {"doc_hash": "659a8f471dcc1dc2fb3752f7fe5c2ba4ab2bda17a25df9653b3d4204fe2a2138"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_normalize_index_test_groupby_normalize_index.None_5": {"doc_hash": "a44eaa15c20d5778ecec1279e39a1d8dec812d7e4821127475d6cfe3310ed56a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_aggregate__examples_test_aggregate__examples.if_not_PANDAS_GT_100_.with_pytest_warns_None_.assert_eq_": {"doc_hash": "ef8d89f5bb2f8bd6843ccdc6b4b98ecff230595a3bb9aa618d0e93d78166fc4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_aggregate__examples_test_series_aggregate__examples.if_not_PANDAS_GT_100_.with_pytest_warns_None_.assert_eq_": {"doc_hash": "13207c2c472f7e426cb18960e75a7fcb700c0d363195516f1d5aa8f722b67778"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_aggregate__single_element_groups_test_aggregate__single_element_groups.assert_eq_expected_ddf_g": {"doc_hash": "31f23211e94bcedefb5b7c0737076594b981210b9e42e44877b129a0d18d645d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_aggregate_build_agg_args__reuse_of_intermediates_test_aggregate_build_agg_args__reuse_of_intermediates.assert_len_with_mean_fina": {"doc_hash": "dceedbd9ffb9ac84389a6e8ff0c12d4a081a88d6ce46e27ef2ffbb7cf5f8e365"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_aggregate__dask_test_aggregate__dask.for_spec_in_specs_.for_other_spec_in_specs_.None_1": {"doc_hash": "59ec12beb903b1b9c60ecacc59f1a6deb4c3e4fcdd888f16baf30ed3e50fa278"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_dataframe_aggregations_multilevel_test_dataframe_aggregations_multilevel.if_agg_func_nunique_.if_agg_func_in_cov_c.else_.assert_eq_": {"doc_hash": "635610e1b3de9967c7dba73a009d6360f044a80c7a47686dc82ea8bb084262ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_aggregations_multilevel_test_series_aggregations_multilevel.assert_eq_": {"doc_hash": "a3215c790401c5cb199cfc9328ed268ecea23b934bdda1be6dd20ed1df1a0f5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_meta_content_test_groupby_meta_content.None_1": {"doc_hash": "af7963a1aab7deca021905133fcbe21fbac9a59bc192234e271ad5ec6c98fc67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupy_non_aligned_index_test_groupy_non_aligned_index.None_4.ddf3_groupby_ddf7_a_": {"doc_hash": "663e22fb581fa1b617a86d9d70a82d5318029cbf286355c347f72b54857d806b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupy_series_wrong_grouper_test_groupy_series_wrong_grouper.None_3.s_groupby_s_df_": {"doc_hash": "1fe4c617894b2c3b49d601b0d0fe1414305f4698755554b4cf95c5a788617f8a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_hash_groupby_aggregate_test_hash_groupby_aggregate.assert_eq_result_df_grou": {"doc_hash": "dd76cdc27872c5e1829a653a37b435662b2e780cc217f82574ae1dcd7753e5e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_split_out_multi_column_groupby_test_split_out_multi_column_groupby.assert_eq_result_expecte": {"doc_hash": "667b04a19c6e41aa65246476d18da3c1a288ec5e553b4be0c178bf6a194f2d45"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_split_out_num_test_groupby_split_out_num.with_pytest_raises_TypeEr.ddf_groupby_A_split_ou": {"doc_hash": "9d0231def38ec1eeae576797c869d297c36499dbb163b0921058771ffa2eaf58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_not_supported_test_groupby_numeric_column.assert_eq_ddf_groupby_ddf": {"doc_hash": "31319f08f49ec1b9fde82479d35e1d642ebe2d904ad0e8b99425b7a6c9da99b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_cumulative_test_cumulative.assert_eq_getattr_g_func": {"doc_hash": "0b4ebb31d9075731ce72949e44bb277e888ef137dfb98857bbfdba487680cfda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_cumulative_axis1_test_cumulative_axis1.assert_eq_": {"doc_hash": "08cea69c9eed6cdbb94d8836717c1bb95139f7bdd2218df54a30e901ce838d28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_unaligned_index_test_groupby_unaligned_index.for_res_sol_in_good_.assert_eq_res_sol_": {"doc_hash": "ea38c2667034ce94467b2d6de465773c3afc04a76a192181287fbb09e607678e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_string_label_test_groupby_string_label.tm_assert_frame_equal_res": {"doc_hash": "5d92f31eb9c463beca411bcddecd00a514c33972bbeda7582241fd5c93718d92"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_dataframe_cum_caching_test_groupby_dataframe_cum_caching.for_op_in_ops_.assert_res1_a_equals_res1": {"doc_hash": "e3d6eb6b844a56d3eee8e19167c6dfd84b564bbfb6c52ad88e0e740e7e3cbc44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_series_cum_caching_test_groupby_series_cum_caching.for_op_in_ops_.assert_res1_a_equals_res1": {"doc_hash": "e377b596772bd16e2759d51aa36077c165a7d36a22c62e3b4f0912c6d798fff3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_slice_agg_reduces_test_groupby_agg_grouper_single.assert_eq_result_expecte": {"doc_hash": "68c9e936b361d2f9d8da7f4961251dbfb6f74a9d676772b7df1c862c58cbb8aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_agg_grouper_multiple_test_groupby_agg_grouper_multiple.assert_eq_result_expecte": {"doc_hash": "3380a0f8e912ea6fb01c6af96abf213923ec5db0deade244d51317287aba6101"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_column_and_index_agg_funcs_test_groupby_column_and_index_agg_funcs.None_5.assert_eq_expected_resul": {"doc_hash": "36d8ea4e76312c63ea1b7a9024136e7dba0222550070d16711cc212ea0056071"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_column_and_index_apply_test_groupby_column_and_index_apply.with_warnings_catch_warni.None_3": {"doc_hash": "4ff5b9026f2c5b9ba20def009751712d13876992e14f0a812be3f7d32079d5cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_custom_mean_test_dataframe_groupby_agg_custom_sum.assert_eq_result_expecte": {"doc_hash": "41529c50237a3d5c52895a7f820ab44f48be5f2a9f48dee631b943ffe55bd22b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_agg_custom_mean_test_series_groupby_agg_custom_mean.assert_eq_result_expecte": {"doc_hash": "eb575caf00ab507373e03ce643ae359540fc9f7b82353abf60842b0396307678"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_agg_custom__name_clash_with_internal_same_column_test_groupby_agg_custom__name_clash_with_internal_same_column.with_pytest_raises_ValueE.a_groupby_g_aggregate_": {"doc_hash": "dc1117d107f6cdd497bcb3c2dce67bc8eadbde655d1770d3248137140f218d67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_agg_custom__name_clash_with_internal_different_column_test_groupby_agg_custom__name_clash_with_internal_different_column.assert_eq_result_expecte": {"doc_hash": "0b41d759feb27ba3975884f21f0f70ba34dfc6638dbfb6576377cd3d88769609"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_agg_custom__mode_test_groupby_agg_custom__mode.assert_eq_actual_expecte": {"doc_hash": "1033208e755c1b7a471be8a29f4902b6853937e37cdbe38cf32e2d6e507e5098"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_select_column_agg_test_groupby_select_column_agg.assert_eq_actual_expecte": {"doc_hash": "63fd7f883105fb3e8bf0f28f1910a4602cf134e7e5305f1046dddb1749e4ec8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_std_object_dtype_test_std_object_dtype.assert_eq_func_df_func_": {"doc_hash": "c28e8d03461026edcc1755a5b4dd52a70b8f2d2b6c0f74e7a132bcc3001bdf45"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_std_columns_int_test_timeseries.assert_eq_df_groupby_nam": {"doc_hash": "8a970303d785291e15d7e15a7f39b21bf507e8b0190728e343f7d507f8ecba4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_with_min_count_test_with_min_count.for_df_ddf_in_zip_dfs_d.None_1": {"doc_hash": "7efaa1f8221ee4a2fa950f6efa6311a0fdb397824c284e1d65cf1dd22cc6b65b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_group_keys_test_groupby_group_keys.None_1": {"doc_hash": "8d41877d484a5d6edaa04f09b175d15d10f27f31892b9d1e184b48b1fc2e4a96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_cov_test_groupby_cov.if_isinstance_columns_np.else_.assert_eq_expected_resul": {"doc_hash": "74cc8992b8262e78e01e567deffe3ef0e77d4df759e1ed09c6fab40baa857d13"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_df_groupby_idxmin_test_df_groupby_idxmin.assert_eq_expected_resul": {"doc_hash": "6ad0f11a5851aef1d06c59bb4b253ea0af892851e3fcc6b26ddcc3cf0181b8d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_df_groupby_idxmin_skipna_test_df_groupby_idxmin_skipna.assert_eq_result_pd_resu": {"doc_hash": "40591b5e173e96b362dc2fa7a1c9fed696cfe29605627fd43319048bd0207949"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_df_groupby_idxmax_test_df_groupby_idxmax.assert_eq_expected_resul": {"doc_hash": "2cbedaf61109ef2207ad0699c259edc74d3991d87a1d19159e44e5b29441e2c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_df_groupby_idxmax_skipna_test_df_groupby_idxmax_skipna.assert_eq_result_pd_resu": {"doc_hash": "ee9cfc198f0de2baa3c8feee2c09f033682979485e4b5d5ff80829df4ab2c939"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_idxmin_test_series_groupby_idxmin.assert_eq_expected_resul": {"doc_hash": "3bdf85163af14c18f9c0a58e911d52bb90a050f41716aa879f5ff12edcd2dbaf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_idxmin_skipna_test_series_groupby_idxmin_skipna.assert_eq_result_pd_resu": {"doc_hash": "0d211391d76fbb1cae447cc6e79a6036f5ed77c15ee8b6a77dc0ddfaeff59ba4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_idxmax_test_series_groupby_idxmax.assert_eq_expected_resul": {"doc_hash": "b28b9d7cab6051915d30c16eae18b566d7619be13029167350fc8b75d1a1bfc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_series_groupby_idxmax_skipna_test_series_groupby_idxmax_skipna.assert_eq_result_pd_resu": {"doc_hash": "93f4211fee82dd74f3de292ad995fce3d50f52b9bcac0a534748bc28ab65c361"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_unique_test_groupby_value_counts.assert_eq_dd_gb_pd_gb_": {"doc_hash": "34590894164b0b17af67544fce8a8b6ec796f68cc66bf73e6666cd1b838a310f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_transform_funcs_test_groupby_transform_funcs.with_pytest_warns_UserWar.None_1": {"doc_hash": "e90328b5586c6ab47c51e486de7f602da1c746f399b819447da4d2aa5890e012"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_transform_ufunc_partitioning_test_groupby_transform_ufunc_partitioning.with_pytest_warns_UserWar.None_1": {"doc_hash": "6a93de237c8caba4e69caa8aad5333307f3212c7de85e5743a6511ab8d3ee9b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_aggregate_categoricals_test_groupby_aggregate_categoricals.None_1": {"doc_hash": "29e254bc6d8891860ce0059c48e57b63f41f98505101df31a91e0184450dedce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_dropna_pandas_test_groupby_dropna_pandas.assert_eq_dask_result_pd": {"doc_hash": "feb2c1ff0f4e3ebed56e04f7ed8811c4a6e04e1d0ae046e7e59bec137de318ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_dropna_cudf_test_groupby_dropna_cudf.assert_eq_dask_result_cu": {"doc_hash": "e010dc9cfe830164e161f1c3127128b4b3ea31076ace6d1299f08330b7a606ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_rounding_negative_var_test_groupby_split_out_multiindex.assert_eq_ddf_result_ddf": {"doc_hash": "acaede15f5a58619e3ed5ec312810f24592a4de633f0370d0557645f361257c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_large_ints_exception_test_groupby_large_ints_exception.assert_eq_": {"doc_hash": "d9a97a53a3c42ac71d8192df701f2eaea449ae0c1f2b45e50aa30143a953439f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_sort_argument_test_groupby_sort_argument.if_agg_mean_.else_.assert_eq_result_3_resul": {"doc_hash": "1b0c7a40778856c7feb3c6c047affc319748d9729feff4096ccd4fc37c216e5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_sort_argument_agg_test_groupby_sort_argument_agg.if_sort_.assert_eq_result_index_r": {"doc_hash": "f9d320f32e74ec9329af3c51800c863ae863dcd40b9f39364d2fd917a228d58b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_groupby.py_test_groupby_sort_true_split_out_": {"doc_hash": "cb7c28eda3c9010c50c256e65e2f9621ab1d5545bebffa789e67d997059a5792"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_hashing.py_np_test_hash_pandas_object.if_isinstance_a_np_ndarr.else_.assert_eq_a_b_": {"doc_hash": "de9ea04e19d701460efbf4245a4605a7e2fe8200f8582b52f74199e0499c98a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_hashing.py_test_categorical_consistency_test_categorical_consistency.for_s1_in_.for_categorize_in_True_.None_1": {"doc_hash": "73b13ba4d010aec72ea654e90834e0536cf733320793ed6b59a26333e3cb4946"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_hashing.py_test_object_missing_values_": {"doc_hash": "8f3b15d511eafc38afd205c20083de4ddadd8ae39abcc794b9cf42835621603a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_hyperloglog.py_dd_test_basic.assert_abs_approx_exact": {"doc_hash": "bea2d442c50d2489a2a46e25ace2e849055379d2aafe099d033da98eefc0a073"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_hyperloglog.py_test_split_every_": {"doc_hash": "25ecfde19f2cf1e1d6d7d1ee6107bfb7422556165fca16e6ca9c8214b85d6fdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_pd_if_dd__compat_PANDAS_GT_1.CHECK_FREQ_check_freq_": {"doc_hash": "7485abec7a762533c89fe091efd06018f32a20e6548e627e1b18cea216edd44a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_test_loc.None_4": {"doc_hash": "e68050560866a6ea0c2523c607cbca347eafda5397a6b96352c64755e6011eef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_non_informative_index_test_loc_non_informative_index.assert_eq_ddf_loc_20_df": {"doc_hash": "3b3d84cd601d205d8fa71e7b5da22a763f8c2a5cc32bdf3e93e1cd191685b24e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_with_text_dates_test_loc_with_text_dates.assert_len_s_loc_2000_01": {"doc_hash": "3637d0d5e3091babbfd3c6abaa30fd4f02e402b8e39be32a4f40a8c4e08f5c0f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_with_series_test_loc_with_function.assert_eq_d_loc__col_l": {"doc_hash": "e68b5cb43e497473c6b51892fa453aa855c3fa82b82196c2677cd7d81242ee65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_with_array_different_partition_test_loc_with_array_different_partition.with_pytest_raises_ValueE.ddf_loc_ddf_A_0_repar": {"doc_hash": "517d484eeea45eb0bf34b8ceaaf20d079beb92b1d5a05eabda5c4f7bfe1e5418"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_with_series_different_partition_test_loc_with_series_different_partition.assert_eq_": {"doc_hash": "d56cf6212890ab1e70777367f47322bfe560b287b460d31b61544058f6aca737"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc2d_test_loc2d.None_3.d_a_loc_d_a_2_0_3_": {"doc_hash": "d81afdc744098518707f0ec2d84b9cbd77fa2591eb82b6cc17353193140fa17f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc2d_some_missing_test_loc2d_with_known_divisions.assert_eq_": {"doc_hash": "a1447a02ce0a07ee6953791e5fa61db465ba2fdda55bb8b77410f5ddab562de2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc2d_with_unknown_divisions_test_loc2d_with_unknown_divisions.None_3": {"doc_hash": "6ef932474299d0df90c454de7f42ce460a6d14d244bce4c7318292f5e55384ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc2d_duplicated_columns_test_loc2d_duplicated_columns.None_13": {"doc_hash": "ee6f0c35ee88ff1ff75494e78186559cfc86480b039bb764d6071f4fc6e635c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_getitem_test_getitem.None_13": {"doc_hash": "e3078e7b03cc902150430632f8226c58baaf9a96a13978ccfc880005ce385829"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_getitem_slice_test_getitem_slice.assert_eq_ddf_f_df_": {"doc_hash": "5a1b46d91b4d043006908c26d45ad073c33ddeb156265395218983d08ca86c5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_getitem_integer_slice_test_getitem_integer_slice.assert_eq_ddf_8_df_8_": {"doc_hash": "f5ebf4f355788e9af5b5a86b046af9090b7cc2ccf1fe251819c620fbd6562b41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_on_numpy_datetimes_test_loc_on_pandas_datetimes.assert_eq_a_loc_2014_2": {"doc_hash": "8d07a78b9208ede7a6fbe3c563d27dc4e1dbd8dce41eb95ebdb7a26916011470"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_datetime_no_freq_test_coerce_loc_index.for_t_in_pd_Timestamp_n.assert_isinstance__coerce": {"doc_hash": "1ddd663e4babbff915fe1c59365a7d3ee38100bc380548fb5ef63274f9ac68c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_loc_timestamp_str_test_loc_timestamp_str.None_15": {"doc_hash": "4077426eb62dfe39b37dca71d37675a1d1aabe9933856106365d7a882b44d8ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_getitem_timestamp_str_test_loc_period_str.pass": {"doc_hash": "6b0002d4ec54f1de1e9a81b4c9cec01f4117978537252d1ad3fcc0159618c0ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_getitem_period_str_test_getitem_period_str.assert_eq_df_2011_2015": {"doc_hash": "2a0609801c1fbaf17602c0a1457738408f6c48f04e65abe8bf423f4529bfca01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_to_series_test_to_series.None_1": {"doc_hash": "086bef35ebecd11cc9bb7afe0234b248d3be4e616fd4f3e507908a301ca4e294"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_to_frame_test_to_frame.None_1": {"doc_hash": "3a71bc5e0ecb741f913d9ace7efb56cdc074d18d28e62c05a160590fb489310a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_to_frame_name_test_to_frame_name.None_1": {"doc_hash": "173745f77743dfcb2ab34ac1663d8874ebd575cf2d6237140d12dd67eb3fa3a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_iloc_test_iloc_series.with_pytest_raises_Attrib.ds_iloc_": {"doc_hash": "5de2d4e568d357dc74753f2174b1a52a274734cf7759dfd93c88231849c8e540"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_iloc_raises_test_iloc_raises.with_pytest_raises_IndexE.ddf_iloc_5_6_": {"doc_hash": "25383d0be50a8c24d36b315ae9275bf9c66605e7570e2de436459afdfce3a233"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_iloc_duplicate_columns_test_iloc_duplicate_columns.assert_eq_select_negative": {"doc_hash": "0c06b6da6d2ffe6a76742fc7570582f4f0196927c1ba7664ca43b8514819718d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_iloc_dispatch_to_getitem_test_iloc_dispatch_to_getitem.assert_eq_select_negative": {"doc_hash": "a0f1ebf7a5ea6dff7b4c72e9a6dd7056991482d678f3f0e19c802d1527eb9e82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_indexing.py_test_iloc_out_of_order_selection_": {"doc_hash": "fb0e2add33d2a8c1be5112f7fe45aac114540d39ee605aa976f8f401e33f3a57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_dd_df_left.return.pd_DataFrame_dict_idx_idx": {"doc_hash": "bd699314b453d8344264870aa91d435d1cb66c35ffedb256f8d869a7296f6866"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_df_right_df_right.return.pd_DataFrame_dict_idx_idx": {"doc_hash": "7f068968f9baa31e668e8d8573d6a6015bce1f359c6c7ba79548f5659a3f3b26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_ddf_left_on.return.request_param": {"doc_hash": "ab50cbc15a8e15cfaa6708a3c457f99460ef2454363bc2eaff74662330b34654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py__Tests_test_merge_known_to_known.assert_len_result___dask_": {"doc_hash": "fe86340cdffc73b6b04978cdd8e88a54400d26b91345c95b3bfe556f54b7f7bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_test_merge_known_to_single_test_merge_known_to_single.assert_len_result___dask_": {"doc_hash": "b7023fbd0852e4c4c96357a3cdca857af9d0aa2ce83cfeaebab723f784b8b319"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_test_merge_single_to_known_test_merge_single_to_known.assert_len_result___dask_": {"doc_hash": "90385d64364140b2b3647a7c09a19c15517f7214dcf1ba5ff96fd198dec62316"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_test_merge_known_to_unknown_test_merge_known_to_unknown.assert_len_result___dask_": {"doc_hash": "e3a4a474a50017dfbe173ad30cafeb0e4c5cd0375088911cfe52ba8edd168d26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_test_merge_unknown_to_known_test_merge_unknown_to_known.assert_len_result___dask_": {"doc_hash": "d5aa58f3aea3ddf9540bc191800fa808ab24419106dbcdcfdd9a2ba8ce6615aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_merge_column_and_index.py_test_merge_unknown_to_unknown_": {"doc_hash": "2f648dbeadbb0df2029ef30e647aad51a3167a2843d0f1a97c5ce2cb4f406e35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_warnings_pytest": {"doc_hash": "9c0167a0549c49793d2473b34c3c3798aa27c9e4857930311bff46adcac0a310"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_align_partitions_test_align_partitions._different_index": {"doc_hash": "b490752b68f19efc81fa2f0fbc13869e0a84f5c5b3731ee2ecde877ffebc8561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_align_partitions.ldf_7_test_align_partitions.None_1.assert_eq_rresult_rdf_": {"doc_hash": "0412c074a8b9e6631298890265643cd4f1c972bf219ba9c03257b630722f8499"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_align_partitions_unknown_divisions_test_align_partitions_unknown_divisions.None_1.align_partitions_ddf_ddf": {"doc_hash": "bb84054a5e435665cf6dcfa65840a475525972f06caefa97e52fe0f61e0258ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test__maybe_align_partitions_test__maybe_align_partitions.None_1._maybe_align_partitions_": {"doc_hash": "886b23dbbd9c503486dffdb2b51243770c05ffe5266358300592fa5f95bf7b02"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_indexed_dataframe_to_indexed_dataframe_test_merge_indexed_dataframe_to_indexed_dataframe.None_9": {"doc_hash": "e75366e702fa37bf554a4134dba3e862f6f9434489867f1ac8f2071f6269fc07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_list_eq_list_eq.dd__compat_assert_numpy_a": {"doc_hash": "ffdceb54b41400152405c6e84e4f3c683c397897081a42a00f4b6957e0b5fedd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_hash_join_test_hash_join.None_2": {"doc_hash": "57bbe2dbd63be178d72aebc2f7061abf11f1238d38c1690a1995821afbb2c4dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_sequential_joins_test_sequential_joins.assert_eq_multi_join_pd_": {"doc_hash": "dedef0d135978f6607a780bc0c339b74949fd62ad7df70af605528d197fe77ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_indexed_test_merge_asof_indexed.assert_eq_c_C_": {"doc_hash": "0caa46ec40bc69658c83a584b5609415f03b44b5e6496e058961c67368527e6d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_on_basic_test_merge_asof_on_basic.assert_eq_c_C_": {"doc_hash": "d9b52f8aad39c41020323d56088445d84297e75d7b3413e1393387b434ec2ea3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_on_test_merge_asof_on.assert_eq_c_C_": {"doc_hash": "ca14093514e89d2a6dbaeb46a8cf3b3f5779411941ee05eaf5a45ea9f448408c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_left_on_right_index_test_merge_asof_left_on_right_index.for_nparts_in_1_2_3_.for_a1_idx2_in_.assert_eq_c_C_": {"doc_hash": "c1f7a1bf2c5ba3a6c56ec45bb7e37990fe1d0505bdf53dd17f5157be6aaff18c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_indexed_two_partitions_test_merge_asof_indexed_two_partitions.assert_eq_c_C_": {"doc_hash": "023ce7e0ea32d9ec2a3d0f48a3a4d8daa34fc85e70cece8ff1c0659dc439802e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_on_by_test_merge_asof_on_by.assert_eq_c_C_check_ind": {"doc_hash": "ee6f0d573a3894f2ea30395211b465edc927bfda41fc8b57bf63ad7a945586d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_on_by_tolerance_test_merge_asof_on_by_tolerance.assert_eq_c_C_check_ind": {"doc_hash": "579af33d63b0dbc3714e7770488b936f704b17319dbcf81a2820ac20b35245be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_on_by_tolerance_no_exact_matches_test_merge_asof_on_by_tolerance_no_exact_matches.assert_eq_c_C_check_ind": {"doc_hash": "3b3cd6c4165ccbb9aba75180188097813bfb2441d7469bc12a756ef7dca167ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_asof_unsorted_raises_test_merge_asof_unsorted_raises.with_pytest_raises_ValueE.result_compute_": {"doc_hash": "327fa78dcce370deff2fe6cd8ead75b570d5366cb080216a12c8412ec39958c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_indexed_concat_test_indexed_concat.with_warnings_catch_warni.None_1": {"doc_hash": "f8436bf018c56ed5b7797cc762120271b0345e0c13c6464e3d37dcbb2655f489"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_test_concat.None_1.assert_eq_result_expecte": {"doc_hash": "6d0522b63702c1c2c5737fa7122784d76cce607858e801cf486169199e0dc92d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_different_dtypes_test_concat_different_dtypes.assert_dask_dtypes_pa": {"doc_hash": "8e97b5d002dac12177f7377ce35a293e460bb67d8fe472e11d2b31f91461f9f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_columns_dtypes_test_merge_columns_dtypes.assert_has_nans_and_warn": {"doc_hash": "75b3c5abc0f75cedf5720d79894479d1ccb6ce71476d40d7b0e90b8d8495c81c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_test_merge._pd_merge_A_B_": {"doc_hash": "a2087230ce5f36ec4856b4b1ee02caaeaec908e8cb342c358c1e461c474603d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_tasks_semi_anti_cudf_test_merge_tasks_semi_anti_cudf.assert_eq_result_expect_": {"doc_hash": "b6ab8e417feb6ccb3bc497b387d0eebfbc52dc486025880f766307c42868ceb2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_tasks_passes_through_test_merge_tasks_passes_through.assert_not_any_partd_in": {"doc_hash": "a315e5df72628496ccee4d2d1c6d2d385d6d0af4bbf489d3515a337ad517bec1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_by_index_patterns_test_merge_by_index_patterns.pd_merge.return.out": {"doc_hash": "566de5cc6c3e9dbc48dd980d7897ce21b6e73d370ce6972eca3dbf1ed8765cfd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_by_index_patterns.for_pdl_pdr_in__test_merge_by_index_patterns.for_pdl_pdr_in_.for_lpart_rpart_in_.None_15": {"doc_hash": "ef45e04c06abb31ed42bc6620e946330cc4cb3dbd457c88f2faa35e0c121cb50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_join_by_index_patterns_test_join_by_index_patterns.pdf7r.pd_DataFrame_c_list_": {"doc_hash": "422fbcb1c7f8b71e416666a36c1e59b10aea9e2c7e7a22521ce86e63548540dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_join_by_index_patterns.for_pdl_pdr_in__test_join_by_index_patterns.for_pdl_pdr_in_.for_lpart_rpart_in_2_._": {"doc_hash": "1e44cf5e7adf49c29b7a04948f71357bb38798519bdea02aa090164cef2299c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_by_multiple_columns_test_merge_by_multiple_columns.pdf3r.pd_DataFrame_": {"doc_hash": "7442a429023e846f1b0c02dd1d03702e09a8329921305819f45ed99b745ebcb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_by_multiple_columns.for_pdl_pdr_in_pdf1l__test_merge_by_multiple_columns.for_pdl_pdr_in_pdf1l_.for_lpart_rpart_in_2_.None_8": {"doc_hash": "ee4d90bb1a007a395adebd92454c5a0377e6a41b47da5777a1c5260e64413c98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_melt_test_melt.None_9": {"doc_hash": "9f2aba53f761935d63ef37318a56e68e682d4b57357eede12a11e6c024c985e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_cheap_inner_merge_with_pandas_object_test_cheap_inner_merge_with_pandas_object.list_eq_da_merge_b_on_x": {"doc_hash": "afcd7b03b6d1cddefb5dcfe07afdce17928b404aacf68db479be1f0aab9631cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_cheap_single_partition_merge_test_cheap_single_partition_merge.list_eq_aa_merge_bb_on_": {"doc_hash": "f08e557771394c8e7beba29e6c298881c82b0c2aea32dacb309ecfb1ff22540b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_cheap_single_partition_merge_divisions_test_cheap_single_partition_merge_divisions.None_1": {"doc_hash": "095c178b5f3b5be49af495de99818a2297fe79f10e5110a1b6a9506046a914f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_cheap_single_parition_merge_left_right_test_cheap_single_parition_merge_left_right.None_1": {"doc_hash": "141c0c629d5aedb88088386580942f0e92c7a14d6a4a807189286dc9e3ecb11c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_cheap_single_partition_merge_on_index_test_cheap_single_partition_merge_on_index.None_1": {"doc_hash": "b40346ca17e49db75c6ff1109a876b77f20f6ecaf87fd40f6db64fb12c42493f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_maintains_columns_test_merge_maintains_columns.assert_tuple_merged_colum": {"doc_hash": "9a67a32265c3d95304b4fde64cdf4765e7774d1d09a9239b5721ac15ad72cc99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_index_without_divisions_test_merge_index_without_divisions.assert_eq_result_expecte": {"doc_hash": "e7d4f93555196e4f91bf97f5c604dbad917d0997db7b863124749bacf66e0b0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_half_indexed_dataframe_avoids_shuffle_test_half_indexed_dataframe_avoids_shuffle.assert_len_cc_dask_500": {"doc_hash": "97334d5dd9c678731afcc5f61d1decc0c3236d267f03712e0fc2d79fca38c916"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_errors_for_merge_on_frame_columns_test_concat_one_series.assert_isinstance_c_dd_D": {"doc_hash": "62b07c8c8fc16d9161eb167726f953bb77d45f0ab1b8a2bcbd20948986b0df71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_unknown_divisions_test_concat_unknown_divisions.with_pytest_warns_None_a.assert_len_record_0": {"doc_hash": "d347a5b00915a70bf5cdca2c7f92410054f01d61ce427f3b107541a1e25705ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_unknown_divisions_errors_test_concat_unknown_divisions_errors.with_pytest_raises_ValueE.with_pytest_warns_UserWar.dd_concat_aa_bb_axis_": {"doc_hash": "2aabb716f63c01a4e1e6cfda61ce688d0eb37034c3bb2a6e3b8d33933442cee4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat2_test_concat2.assert_dd_concat_a_is_": {"doc_hash": "0d83e977563732a64a4646a9669bccdd8d00ead16be95cdcae8b77e9e982c150"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat2.for_case_in_cases__test_concat2.for_case_in_cases_.None_5.assert_set_result_dask_": {"doc_hash": "76207abe0191a1f882af26b862f6ef915a1f3a0e1842b60c38c8dc711629bbdb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat3_test_concat3.None_5.assert_eq_": {"doc_hash": "239c88ad03f821dcf59cae96523cf82b3995b16bc0e7f5e46cbd47bad44983c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat4_interleave_partitions_test_concat4_interleave_partitions.assert_msg_in_str_err_val": {"doc_hash": "f6d6944cb5395d4c080996da46519359d5dfd9dea8faaf2fe47836f77cb52a89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat5_test_concat5.cases_11._": {"doc_hash": "c8f3e6fe22e41048c8f6473896e34f620c32c4482a85e287712b7f02a2353fa4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat5.None_1_test_concat5.None_1.None_3": {"doc_hash": "62a830d75435dfda6d2389a18c349488c6a40fe892b5e0144a68d47dbdfb2fc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_categorical_test_concat_categorical.if_not_known_.dframes[0]._meta.clear_known_categories_df": {"doc_hash": "899c3a37ad52fa46e60b88c40237c7dc145428f8d35f0dcd5f37a8a864fa68d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_categorical.check_and_return_test_concat_categorical.check_and_return.return.res": {"doc_hash": "a713d3d167fde1de65fb9a0f3b5dda047e1a2329a28ed80f430b25aa7390bf91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_categorical.for_join_in_inner_ou_test_concat_categorical.for_join_in_inner_ou.None_4": {"doc_hash": "47bfa3ffbadc08ad6ba104781cbe3776c091b62f0a8b5f54e3b3e155eaf823b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_categorical_mixed_simple_test_concat_categorical_mixed_simple.assert_eq_result_expecte": {"doc_hash": "58e7b18775dd2d3a4efb55c311f8b398a3dc5dcb18e649a90c3c23bd69a82fad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_concat_datetimeindex_test_concat_datetimeindex.assert_eq_result_expecte": {"doc_hash": "2ebdf9aa614fbdcb8de0ed94636252bff299583399b7b671f0906a836f10cd4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_append_test_append.None_8": {"doc_hash": "365166169b4bfa8a04de2bc3988325d691c796b20bd34e764d9c8cea4e5b6eff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_append2_test_append2.None_7": {"doc_hash": "a367c0f9b4bae34e2c8a9b3f874224400a8fc38e4c1c1c2790ad17074f27b07b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_append_categorical_test_append_categorical.for_known_in_True_False.None_5": {"doc_hash": "7894885ea2d19c202a00431fe6bae41c302d8bf492e7a1083c458c0a685f62a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_append_lose_divisions_test_repartition_repeated_divisions.assert_eq_ddf2_df_set_in": {"doc_hash": "0dea3f62af8d2f02ef63dc85860b76c0d7eb2658decf750bf2a47a58ee310603"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_multi_duplicate_divisions_test_multi_duplicate_divisions.assert_eq_r1_r2_": {"doc_hash": "42fd93a1215d94370968c5bc45e52d6c8594858bf4a9ce229bbfeb6d9879a151"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_merge_outer_empty_test_merge_outer_empty.for_x_in_range_0_k_clust.assert_eq_": {"doc_hash": "5120b072f17db994b5b9ce6a87ddf3c779f2350c467e69dbfde2400af323c5dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_dtype_equality_warning_test_dtype_equality_warning.assert_len_r_0": {"doc_hash": "9639bb547643e8c66c58169e4b2e700895f582d820b7c26d81b144598e695846"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_multi.py_test_groupby_concat_cudf_": {"doc_hash": "c2d059a12548a2d0428b71f8c21d907fdf6be6bf1dd9b0684693d462acef0e63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_numeric.py_pytest_": {"doc_hash": "0f1c8670f065c90f4c8492811f23b9638d27624ef3918246ab3efcceed341d8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_optimize_dataframe.py_dask_dfs.list_dsk_values_": {"doc_hash": "3e66af7e4aa716070a1b2d63d618927c6178de0fcf09756f6bd8bccbd8b8fbdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_optimize_dataframe.py_test_fuse_ave_width_": {"doc_hash": "fbce4f4df15b911629334590d05abe6649d37c5a1e507c7cc9caef5d66cae24f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_np_test_get_dummies.tm_assert_index_equal_res": {"doc_hash": "1923d632bd34dd5f708f846610c99e3e6549d02ba39c29f7896719b329ff1ffd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_object_test_get_dummies_object.None_2.dd_get_dummies_ddf_colum": {"doc_hash": "169a38ad553299c64a4b040be5f17e287065b09a3187a94c27f763457beff852"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_kwargs_test_get_dummies_kwargs.None_7": {"doc_hash": "9dc61fd582f4bbb4f492cd797cf66574454a1690ea7779869ffc2f2a5e0b5992"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_sparse_test_get_dummies_sparse.None_2": {"doc_hash": "645244b77596205b36b469823a76c8ab92b96ba9ae42ecd6bc9e1c05e034cdf3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_sparse_mix_test_get_dummies_sparse_mix.assert_pd_api_types_is_sp": {"doc_hash": "7ece4f8ac0b2d0b463192773990e4ff10ac80f391124a107b03c09c311fe72a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_dtype_test_get_dummies_dtype.None_1": {"doc_hash": "15678f1d22844501cecc10843fba622d53e42a47210827fbb62ebaa839f5c9fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_get_dummies_errors_test_get_dummies_errors.None_3.dd_get_dummies_ddf_x_": {"doc_hash": "ddd2d7ba99d632752d2f840e3c522bf28056cf5ab0990a1a16430458f2d39ec7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_pivot_table_test_pivot_table.None_1": {"doc_hash": "ff3fb50c77eb9bc50575cd14623a4bc41eab756450686de55969c28ab8f172c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_pivot_table_dtype_test_pivot_table_dtype.assert_eq_res_exp_": {"doc_hash": "d05815d671ac1df6786d170f10cbc853d1f324930349add522b8f521fc3116dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_pivot_table_index_dtype_test_pivot_table_index_dtype.assert_res_index_dtype_": {"doc_hash": "aeb8ef76490505ecc04145e04a84765ca00b8d0d67b90bd95896f69ac03a5967"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_reshape.py_test_pivot_table_errors_": {"doc_hash": "57de7b7df747ed4f3d55dad412eebb0a75c6979c20b9f63a93963888832e2d3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_from_distutils_version_im_shifted_sum.return.df_a_b_c": {"doc_hash": "cae42371d5dd10ba7a941385e0f9df44a34f1b2fbf02cfdf01b63006424a9de7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_map_overlap_test_map_overlap.for_before_after_in_0_.None_1": {"doc_hash": "238610693aa2146ec9161c8111adb1c7c41fc76a0f06224dee9e2352f67a8e2d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_map_overlap_names_test_map_overlap_names.assert_res4__name_res_": {"doc_hash": "1e30c120e101ebc911a343ff67ba87da4369528ff4eeb899c8061824cd31f3d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_map_overlap_errors_test_map_overlap_errors.with_pytest_raises_TypeEr.ddf_map_overlap_shifted_s": {"doc_hash": "9a7d7bfae14eb33e78af5d1e4b08b3b140d38f0f153eb2d2d67466f2a10df421"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_map_overlap_provide_meta_test_map_overlap_provide_meta.assert_eq_res_sol_": {"doc_hash": "662a35b8588bc2549bf8da58efd62e6cc703fc53634761c94288e22d522e2b53"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_mad_rolling_method_args_check_less_precise._": {"doc_hash": "48bcb8b6341a571839a9c07b7a9f2f366f8c1d723dda7522b3826f4e510cca9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_methods_test_rolling_methods.None_1": {"doc_hash": "ab71070aeffbe764cd2409ae180151bd1a7bdf88c36c407c8477f20c88261746"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_if_PANDAS_VERSION_0_2_test_rolling_cov.None_1": {"doc_hash": "67e798c25e210d7729149e38912fb9b2183e1abfdce33cf30086ac97ae17acc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_raises_test_rolling_names.assert_sorted_a_rolling_2": {"doc_hash": "055afcaac0963a09bf86c65c26dfa72bf6558d2ac841ac692cf17a115cc4012d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_axis_test_rolling_axis.assert_eq_s_rolling_5_ax": {"doc_hash": "782776aa96a8f854257b7153fb9ca7907b4e9ae6c8b214f9367a333d52b35962"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_partition_size_test_rolling_partition_size.for_obj_dobj_in_df_dd.with_pytest_raises_NotImp.dobj_rolling_12_mean_c": {"doc_hash": "e1a579d80ac5b157bf149592ef9a9b2bef3307f0d1b8db491ec38a08628b72a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_repr_test_time_rolling_constructor.assert_result__min_period": {"doc_hash": "7f354c0753621528699db9864671babb6bbd599826b9122ebbe0ca4ca3068688"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_time_rolling_methods_test_time_rolling_methods.None_1": {"doc_hash": "0596526146baa44ac6f6c0f66a40efbca533aaebd26231f2eaa7e4c5fb9dc42c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_time_rolling_cov_test_time_rolling_cov.None_1": {"doc_hash": "37b301862086dcca6a86541a9d1890e8a58f2d7ef899dc47b050e2e3a5300b6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_time_rolling_large_window_fixed_chunks_test_time_rolling_large_window_fixed_chunks.None_2": {"doc_hash": "55fbd0f4e1c275d36f5b58b133b0b3c3fc24a5b2863daad76873c53ed7611ac6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_time_rolling_large_window_variable_chunks_test_time_rolling.assert_eq_result_expecte": {"doc_hash": "feabd8c2c4cf3cdab6a441d0ac610214e69e0f826b7a2541404229bdfa6518ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_agg_aggregate_test_rolling_agg_aggregate.None_4": {"doc_hash": "938459439fa07eb10c7e97f8eff6003affeec08150d99697b7cad118cc5c34f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_numba_engine_test_rolling_numba_engine.assert_eq_": {"doc_hash": "227e6811def3d4b9ed55ddf91927388775650a4453ca8ee9d2ae6777b96f3b15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_rolling.py_test_rolling_apply_numba_raises_": {"doc_hash": "abaab1ff4ef6532371d3ed10c53e54b4860fa408f80dc411516e0d4543e25a38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_itertools_shuffle_func.shuffle": {"doc_hash": "62d25e911456efc00e6ca90512f17ffcaa430b7dd7b41ebf2ba445f2c70d4d6a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py__conflicts_with_keyword__test_shuffle.assert_shuffle_func_d_d_": {"doc_hash": "3e434e2af9ceea15fca6bc0d5037ed08bae82e7e40d6de6c789270e8e8b1b679"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_default_partitions_test_shuffle_npartitions_task.assert_set_map_tuple_sc_": {"doc_hash": "5f3b7e84d778180f6fbf5ddb466b0803a455b76b8805f2aa03eeccc1a0ffe565"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_index_with_non_series_test_shuffle_from_one_partition_to_one_other.for_i_in_1_2_.assert_len_a_compute_sche": {"doc_hash": "08c5311a7010849d57ebb09d281b5d22d8246e28c04dc852dbd8867415469f01"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_shuffle_empty_partitions_test_shuffle_empty_partitions.for_p_in_parts_.assert_s_columns_p_col": {"doc_hash": "c416cc002515f2deae996ababb81f0b5df6384123a7f93bb1ba954f1c626d47b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_df2_df2.pd_DataFrame_": {"doc_hash": "f2d31838ea0565f0ef352b4a5fa9d7dc64eccdab0aaf647036b4f61d27eed428"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_partitioning_index_test_partitioning_index.None_7": {"doc_hash": "95e01189dbf1c179d30e09f03b540b9f69b9230ce5f786c3ede32d6d576c824b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_partitioning_index_categorical_on_values_test_partitioning_index_categorical_on_values.None_1": {"doc_hash": "b5739c62acf6dd4f61298e7620fb480855ec6bcc71222634a1d88808ce1823ff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_tasks_test_set_index_tasks.None_5": {"doc_hash": "a65bbe2a77820d20df068225e41b25393316c9cd849d549696182947cb2a5de5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_self_index_test_set_index_self_index.assert_eq_b_df_set_index": {"doc_hash": "777504922ab4ba2dd96c43833ad12b48b2e0d35db97c176199e10aaf5e9d6573"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_names_test_set_index_names.None_3": {"doc_hash": "e31ac534ae129dd94ae9830d6972fbf0e06d8345f20c1b35f3acf272f4acdc37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_tasks_2_test_set_index_tasks_2.df2_value_sum_compute_s": {"doc_hash": "7794f934a874f2dd29c835bf456310fdfdbad228679b38ab089904a732a44c8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_tasks_3_test_set_index_tasks_3.assert_ddf2_npartitions_": {"doc_hash": "9e2c6a44ed3bff3da2dd9e42b6be3dad4bab5706836460f6e2152f85173fd694"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_shuffle_sort_test_shuffle_sort.assert_eq_ddf2_loc_2_3_": {"doc_hash": "b9cb7ec4744a4c38d3ea44181c1afb11dd5123d88f712baec7a3fbe42473dfdd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_rearrange_test_rearrange.for_i_in_a__partitions_dr.assert_sum_i_in_set_part_": {"doc_hash": "4ac82aaf241783f514756309ed7d9a59d4e1f81103a5194c271ddaeec9aff1c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_rearrange_cleanup_mock_shuffle_group_3.raise_ValueError_Mock_ex": {"doc_hash": "819f44a25fb7f2e346cd710ea57a7a465c5e640e4e332a6ee41e2d42bcb97895"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_rearrange_disk_cleanup_with_exception_test_rearrange_disk_cleanup_with_exception.assert_len_os_listdir_tmp": {"doc_hash": "a445c75b72107ed42d9314df8bde6ebe657798005dd52d40442c321e95de7c7b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_rearrange_by_column_with_narrow_divisions_test_maybe_buffered_partd.assert_isinstance_p2_part": {"doc_hash": "c94b57c4aa1392ba1708bc4875e653d12f6c50042cc44544f7b57a12889f65ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_with_explicit_divisions_test_set_index_with_explicit_divisions.with_pytest_raises_ValueE.ddf_set_index_x_divisi": {"doc_hash": "bc95fcf5926e10990a102d01a364f2d1b5c7904a5e689c6b6de973df0cf59b67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_divisions_2_test_set_index_divisions_2.assert_list_result_comput": {"doc_hash": "58fb9dac426ff7e0fc88b7b0f007216c0d9dc406ace607cd5eaad0a43faeb4b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_divisions_compute_test_set_index_divisions_compute.assert_len_d4_dask_len": {"doc_hash": "2f7410c575d49270308029e55d3dbc6d9bdedf825900ffec1d6d8e65392615d5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_divisions_sorted_test_set_index_divisions_sorted.None_3.ddf_set_index_y_divisi": {"doc_hash": "2a9a0548e7dad60210c89a9f52609a9c48faf08419f14f22424218c3e17dba31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_consistent_divisions_test_set_index_consistent_divisions.assert_len_divisions_set_": {"doc_hash": "30f6568f1f43c83c30cc84ecc8ba42b762c307656e9e566f0b214c9003b79f4b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py__set_index_make_part.return.pd_DataFrame_x_np_ran": {"doc_hash": "c741a35d2f75e79288bab70a5727506623d20320204d3232000c0fc3f1ed4ac8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_reduces_partitions_large_test_set_index_reduces_partitions_large.assert_1_ddf2_npartitio": {"doc_hash": "7993117a595a9edb95a232e3c4f206161a0c7446e6b8d2cfbe0c46f97df8cb5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_doesnt_increase_partitions_test_set_index_detects_sorted_data.assert_len_ddf2_dask_d": {"doc_hash": "ca37b4e1d66c1464e3733a56f78ccd7fc28c7521e5b7e4599b13879968338de3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_sorts_test_set_index_sorts.assert_ddf_set_index_tim": {"doc_hash": "88d7a7c76691e7fa60671f89d43ef3b9c3f0c39d62709f9ef67e02dd149cb4cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_test_set_index.assert_eq_d5_full_set_in": {"doc_hash": "f4021bf7a5e71e251fb9e057e8a85545db3b9f79c8bb81110431d45ae46d8927"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_interpolate_test_set_index_interpolate_int.assert_all_np_issubdtype_": {"doc_hash": "e179456ec8610b040e8c3d42811f1f2808822c897f9fa888c05bc5c3df7149d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_timezone_test_set_index_timezone.with_pytest_raises_TypeEr.d2_divisions_0_s2badt": {"doc_hash": "3344819f30235ae06172a11263476ca0348144d5deaff81e60565cbab7c27fa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_drop_test_set_index_drop.assert_eq_ddf_set_index_2": {"doc_hash": "4c4bc8ec37fd59351f43fb558f737bfadc33b5e1d4da447ad15df9fc330bc4a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_raises_error_on_bad_input_test_set_index_raises_error_on_bad_input.None_2": {"doc_hash": "a3a057cb02d2185f10adb90cfb7b31fdf3d65c8cd1c6a8f7a2aa59faa2b1d32d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_sorted_true_test_set_index_sorted_true.with_pytest_raises_ValueE.a_set_index_a_z_sorted_T": {"doc_hash": "079307848146ea2fd222164e142bb4f3c1998335c4ae31bdfa24cb8f87af8f73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_sorted_single_partition_test_set_index_sorted_min_max_same.assert_df2_divisions_": {"doc_hash": "f366a5626c5a8695c6614761d857541c1dba5b97b071b2e94494ad86b53052e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_empty_partition_test_set_index_empty_partition.for_conv_in_converters_.assert_assert_eq_ddf_set_": {"doc_hash": "83960d50e19132a6fb3cd5e2aa8fb5eec1f49023a2de8fed80ff7d2029218350"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_on_empty_test_set_index_on_empty.for_converter_in_converte.None_2": {"doc_hash": "89209b944e83cd5107caaddb6fdf1c0404405be2b230fcf94d7d2ee0c357ed4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_categorical_test_set_index_categorical.assert_categorical_equal_": {"doc_hash": "9bf2ce13e3e5d3456af2dfc235e2f53b38457d65fb4706c8e61b4ef3621b3edb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_compute_divisions_test_compute_divisions.assert_b_known_divisions": {"doc_hash": "17cd7841c7445f2f8fc6efe05672a5a46480f842eaca9499836f73d8a22439a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_empty_partitions_test_empty_partitions.None_2": {"doc_hash": "44f2c7856e5f2c1d6e4df3ab47ac3824231229f5f2dc05bc50f5adcc9c84276a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_remove_nans_test_remove_nans.for_conv_none_val_in_con.for_inputs_expected_in_t.assert_remove_nans_params": {"doc_hash": "015550f57283ac393a80d356c3fb7bd98f0b1b90960b8b33a0a60b8ac84bd575"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_gh_2730_test_gh_2730.tm_assert_frame_equal_res": {"doc_hash": "d3fd6cc3e14ae3a317547ce58332f17cd754fa4198434a84939e5935a10d00ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_does_not_repeat_work_due_to_optimizations_test_set_index_errors_with_inplace_kwarg.with_pytest_raises_NotImp.ddf_set_index_a_inplac": {"doc_hash": "8b9fa48d57ee9eda51570896fab93acb9727302cda1d16eccbca84fe0ab77111"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_set_index_timestamp_test_set_index_timestamp.assert_eq_df2_ddf_set_in": {"doc_hash": "735efb3b5b59c96bbd1a55646c30dee71da24909a4a6a85ab182671ada5a6cf1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_disk_shuffle_with_compression_option_test_disk_shuffle_with_unknown_compression.with_dask_config_set_da.with_pytest_raises_.test_shuffle_disk_": {"doc_hash": "b7a28140e945d745b83c42cdc618a4029ce79cb790f85baf2f5d06c49e20d21a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_disk_shuffle_check_actual_compression_test_disk_shuffle_check_actual_compression.assert_len_uncompressed_d": {"doc_hash": "ac7e87b1c91101869c7b9871a557bbf407b1422ac69c2388081c68388ab21a97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_shuffle.py_test_dataframe_shuffle_on_tasks_api_": {"doc_hash": "0ebfdf0990a552302beec3ab19458e5bcec5d0008218a9e439a993dd2c8b7c85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_pytest__BASE_UFUNCS._": {"doc_hash": "a4a5a492fc03aa90984c4e1ae3672a27d5f853c6d8e02a0e5d59edb7646d308e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_ufunc_test_ufunc.None_4.assert_eq_dafunc_pandas_i": {"doc_hash": "a39dc42f23f7f26ec7a5557cb35a04a41120caf5ff354924d16943e75b6190d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_ufunc_array_wrap_test_ufunc_array_wrap.None_5": {"doc_hash": "b0a549342573bbaa932e93e4307741a0c65a0ac0a7df9ff486b7496b27eaaf9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py__UFUNCS_2ARG__UFUNCS_2ARG._": {"doc_hash": "682cea3989ff75991dbb648a9ea24ca5470d236992f7db748ff0867e6160510b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_ufunc_with_2args_test_ufunc_with_2args.assert_eq_dafunc_pandas1_": {"doc_hash": "9ce5b68d787dc90833dee78b28493198c216b04f19fdc1efbc6333a5f6f32d64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_clip_test_clip.assert_eq_da_clip_pandas_": {"doc_hash": "1d9e4d0fc6071c7a8216d77ca79cc1cfa47903019484054a39bbb8cdf7e80557"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_frame_ufunc_out_test_frame_ufunc_out.None_1.assert_eq_ddf_out_np_exp": {"doc_hash": "51f51f4b3f4310f2cc233a1616fd501873f85a7c3ac269053bc2580a8a17bf58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_frame_2ufunc_out_test_frame_2ufunc_out.assert_eq_ddf_out_expect": {"doc_hash": "15322ea73f43e36a47db974eb8f8a314b4e0188d95bc33b0c56fb54805378252"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_mixed_types_test_mixed_types.assert_eq_dafunc_arg2_ar": {"doc_hash": "c2405024918f9ab24ef6d2cceeb3b8318441dcfc10b7386fe7485a9270719a5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_2args_with_array_test_2args_with_array.None_2": {"doc_hash": "d03d823a589954a8e5e84f71ee76fe8d94d83a3e0a28451d785616d48124df5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_ufunc_with_reduction_test_ufunc_with_reduction.with_pytest_warns_None_.assert_eq_np_redfunc_np_u": {"doc_hash": "5c96ffa313daf366bf5857d63178d5e605b60f543c4bbe47b8d604e8a36fa3ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_ufunc.py_test_ufunc_numpy_scalar_comparison_": {"doc_hash": "bfc62c17ee426ab9a7d9f1e5c8584fb7073685f8a1fc8100e031e1772bafd31c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_re_pytest": {"doc_hash": "781b6b8e6ce12b620f9be8880723ad699831c2c38e602c334e14c3a07358df2d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_shard_df_on_index_test_shard_df_on_index.assert_list_result_2_ind": {"doc_hash": "c67c2aafbd2aae11e0c527063ac5f4fc728b970c236b6e80f97194ea000961bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_make_meta_test_make_meta.assert_pytest_raises_Type": {"doc_hash": "a8a963128e41b9ee35681131c5a74ae0bee0247e8911f0de236c45f0dbd972f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_meta_nonempty_test_meta_nonempty.assert_df3_A_s_al": {"doc_hash": "7a6a9855fbc1a81cb396a93332b8f034c68379c79ed19cd3ba8b4d3e121fed6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_meta_duplicated_test_meta_nonempty_empty_categories.for_dtype_in_O_f8_.assert_res_name_s_name": {"doc_hash": "1f3a52d252c271806427c68b72d5fa398bc5b187f12b9dd9401ba5942b278862"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_meta_nonempty_index_test_meta_nonempty_index.None_26": {"doc_hash": "3d3627056d623c91914ea8c3a4791d452798c48818f9784900da11e1e037c4f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_meta_nonempty_uint64index_test_raise_on_meta_error.None_1.else_.assert_False_should_hav": {"doc_hash": "37b9aa63cde4ad06fa4f6cdcb98231f1a00a6cbd29d3f710c3b872b48c55d72f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_check_meta_test_check_meta.None_6": {"doc_hash": "775c454f4c087d5da82cfb4763c50d58103a8f45f9055e9c674d1babc62e857d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_check_matching_columns_raises_appropriate_errors_test_check_meta_typename.assert_pandas_in_str_in": {"doc_hash": "cd3895d69cf041cbf8423bfe06bd089805f4cd1d94fcf02ec0ef3866120dc870"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_is_dataframe_like_test_is_dataframe_like.None_20": {"doc_hash": "64351e5b69038ad75e9f98252658fe48ec1b55dbb5baa5b7768a9c163073babb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tests/test_utils_dataframe.py_test_apply_and_enforce_message_": {"doc_hash": "b23fd7366f21f1088784b2c4e6da474d3c8b2c745b8e2bd6deb833bd42b1b5de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/resample.py_pd__resample_series.return.out_reindex_new_index_fi": {"doc_hash": "e2db3c41737f9c72b4bbd7b05707b91363e00022ea29348973fdfae9d2d8fe1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/resample.py__resample_bin_and_out_divs__resample_bin_and_out_divs.return.tuple_map_pd_Timestamp_n": {"doc_hash": "869b00d8282915e55ebc3dbb1f187b58e7a850dc969e0d097c13e9d548571fd6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/resample.py_Resampler_Resampler.__init__.self._kwargs.kwargs": {"doc_hash": "7f843037d162c814c2f8364975f1b6cd4462a0f52c9fc0558876a986737e8a67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/resample.py_Resampler._agg_Resampler._agg.return.Series_graph_name_meta_": {"doc_hash": "efff48b3dc3c378381cf0ad2eb7d273b6d11d3e7dc7a71014a6280d933526afd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/resample.py_Resampler.agg_": {"doc_hash": "6d38f41b9c93728a1cb9d302ed818b9c880ba8089d6247f04f8dc46b68faddbe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_from_itertools_import_pro_test_series_resample.assert_expected_index_1_": {"doc_hash": "945c70a17842c6a4b831fdb8619ff170d7202fc6332a50584a91d3c5cac19f85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_has_correct_fill_value_test_resample_has_correct_fill_value.assert_eq_": {"doc_hash": "109900deb1970e39bdb2e81dd060a8fb9d6e4b31caa3a5a92e7cd9d12662d04e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_agg_test_resample_agg.assert_eq_": {"doc_hash": "25ea79888b69df3d8597310f635ab59cd761215503e4eb0d02bfaa9f20379907"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_agg_passes_kwargs_test_resample_agg_passes_kwargs.assert_ds_resample_2h_": {"doc_hash": "161e0d8ad5fa7c66d42a51c17185f930923ef5cb18ac6ba7a82c3eaab8c5a686"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_throws_error_when_parition_index_does_not_match_index_test_resample_throws_error_when_parition_index_does_not_match_index.with_pytest_raises_ValueE.ds_resample_2M_count_": {"doc_hash": "b9f958fa14cba0a78f2884a5001afbf0fcde9ccc74f0ea17b9eb07306efdfdcc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_pads_last_division_to_avoid_off_by_one_test_resample_pads_last_division_to_avoid_off_by_one.assert_eq_actual_expecte": {"doc_hash": "a4d3fbdcf9c52da10bd44391e5446502751d287b951cfa6126cd6db7865e6088"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_resample_does_not_evenly_divide_day_test_resample_does_not_evenly_divide_day.assert_eq_result_expecte": {"doc_hash": "98369f31a8d3d7ffe67656441f61fdb72e69c8202f2414d920ee4bb294e2a8fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_series_resample_does_not_evenly_divide_day_test_series_resample_does_not_evenly_divide_day.assert_eq_result_expecte": {"doc_hash": "380b49a67165115f960604729859dd409b8c72619ca7f1448527166e94111498"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_unknown_divisions_error_test_resample_index_name.assert_ddf_resample_D_": {"doc_hash": "c00ae061eb16e00300f9ef10977f64ada3acd34ec8906f911d49003da2b2b7dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_series_resample_non_existent_datetime_test_series_resample_non_existent_datetime.assert_eq_result_expecte": {"doc_hash": "c6c0cfe80508dd72c94a78601a6aa19f0e89d29ca633da35e3e5d6a04f71ece9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/tseries/tests/test_resample.py_test_common_aggs_": {"doc_hash": "84820aa09fe0d85e591db2e0f91026f2951054deee1a58160e813219ce71da96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_math_is_integer_na_dtype.return.isinstance_dtype_types_": {"doc_hash": "434fe3a1b7994804e9ca8c3414749367a94be63b8cf77acebfbe0976487ba326"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_shard_df_on_index_shard_df_on_index.if_not_len_divisions_.else_.yield_df_iloc_indices_1_": {"doc_hash": "939ee5fe17dc2dcb257c2ac3e2cab1f720ceb854c106558b74d7b810c01494fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__META_TYPES__META_DESCRIPTION._": {"doc_hash": "e21341d6e3d2d65be790f0ea3ddf5d92e3986dbcea27286f6708d120838d0375"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_insert_meta_param_description_insert_meta_param_description.return.f": {"doc_hash": "9682b72efec8f512ab58210c9c5eda7390db6a71a8839e77fc86f949cbf61bfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_raise_on_meta_error_raise_on_meta_error.try_.except_Exception_as_e_.raise_ValueError_msg_fro": {"doc_hash": "af747d5b49de939b3d8a2d890f78f55f77b6521a0507a04b260b1d4f9dc58468"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_UNKNOWN_CATEGORIES_has_known_categories.raise_TypeError_Expected": {"doc_hash": "f1c28ebc6d2a7f2659afcbe67626c13b31f3923186e4261420cc0ff152b9f3d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_strip_unknown_categories_strip_unknown_categories.return.x": {"doc_hash": "400fe89337935786071caa790c430cb8fb8d60c339bacebef3bddff4c0c960c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_clear_known_categories_clear_known_categories.return.x": {"doc_hash": "6fc3cb9f7f2da9c54899d35e65d66b59fde3f7275f49e890e652a7f2008cd216"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__empty_series_make_meta_index.return.x_0_0_": {"doc_hash": "38503d3fc9966cbb4ebffc0ddc482894439e75ae9ba11ea4efc63bdcc90289c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_make_meta_object_make_meta_object.raise_TypeError_Don_t_kn": {"doc_hash": "b14650f71502f3fa9d29a73770e42c9c84a916122d2c0cae8b023368a7bdf88c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__numeric_index_types_meta_nonempty_object.if_is_scalar_x_.else_.raise_TypeError_": {"doc_hash": "3c20a0df689b532d76955b9c5136410e869ef5c44bd4169122f07196cbd16a17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_meta_nonempty_dataframe_meta_nonempty_dataframe.return.res": {"doc_hash": "e5f2384b5efdf2eeaa9502b7fc5925736e2fe5675637e7bdd635ef0ff1e7a219"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__nonempty_index__nonempty_index.raise_TypeError_": {"doc_hash": "f38251e19021c31982ddd1bea4dd59e317a75c33ac4a3d3a15c9b1d06587df4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_hash_object_dispatch_group_split_pandas.return.dict_zip_range_k_parts_": {"doc_hash": "9bd08e8ff1a116bbf36acea65c802347ee6b84cf8dbe6c4bb08645bf2bcfb48c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__simple_fake_mapping__nonempty_scalar.raise_TypeError_Can_t_ha": {"doc_hash": "a8cfb8942ad429783454513494a86e8d917de0c9604cd6ee091c41bac4cebb46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__nonempty_series_is_index_like.return.dask_is_index_like_s_": {"doc_hash": "88260a1fac17e388b27fd53e96bb4d17f9d42bf51e010aab543e4e842133e818"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_check_meta_check_meta.raise_ValueError_": {"doc_hash": "b1c757445bda673db7485c6bca477a752d755426cc01a4a7e0f6b9e2254381dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_check_matching_columns_index_summary.return._entries_format": {"doc_hash": "c9ccacaa258044d2bd8826901c123c6d21b4d1713c2880f2f75a0b2324f773a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py____check_dask.return.dsk": {"doc_hash": "d6037ede8f4b047c35b89d64ec5453bcf79f80bf4977c04862db5383b3714ccc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py__maybe_sort_assert_eq.return.True": {"doc_hash": "cccfc367016d85eec969ad26612caa3768c8b91eac1346b36c8e88d9c8469d7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_assert_dask_graph_assert_sane_keynames.for_k_in_ddf_dask_keys_.assert_k_split_0_is": {"doc_hash": "613bea6067acda560fb53fcb97652f620c77ecd6d0516c9394bd67421691c6cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_assert_dask_dtypes_assert_dask_dtypes.if_not_is_dask_collection.else_.if_hasattr_ddf__meta_dt.else_.assert_type_ddf__meta_": {"doc_hash": "b90b6f1ce40303720b3b056eb5610851fd9fad3d44c352a4a85181a2cea26ee3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dataframe/utils.py_assert_max_deps_": {"doc_hash": "1463bd2ee1a551f4337abc5d20a767c5532cc42c5f455a9aef76671155eb276c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/datasets.py_random_timeseries.return.make_timeseries_": {"doc_hash": "844bc834bf97fe5fd8a5b6103c1b47d13fc52a930b3b0c4383b86d823f2c952a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/datasets.py__generate_mimesis__make_mimesis.return.db_Bag_dsk_name_npartit": {"doc_hash": "f8de8f86dd61d58b63021e0c6658cf5002e42f0c31fdc004cc259b01e870f5f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/datasets.py_make_people_": {"doc_hash": "d87ffc995f44f8f730cc2a9664f299542e270fa1afcc637c81d431524e4707eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_operator_finalize.return.Delayed_name_graph_": {"doc_hash": "5db98cedb9feb14cdc297d298f7efa08b1bc081cccc49e8e104b396a897621e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_unpack_collections_unpack_collections.return.expr_": {"doc_hash": "0b1f487148e3e4d238cefea0eec60bf89948aa31540eb915931a5308ada46f3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_to_task_dask_to_task_dask.return.expr_": {"doc_hash": "16c61951d38c925c80e05c10f8f5bd6486fab3668dca24b86c770755e4e89e52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_tokenize_delayed": {"doc_hash": "7e7f57f4cc2576a07f185ed5cdfe5f2d0dfc0b102471d907992de3f1ea080d40"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_delayed._Wraps_a_function_or_ob_delayed._Wraps_a_function_or_ob": {"doc_hash": "39028330796c95a9858702ced1ff15faaffc2d89c7c44b91d6bcd655ebe2150a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_delayed.if_isinstance_obj_Delaye_rebuild.return.Delayed_key_dsk_length_": {"doc_hash": "c3468c002c035d094f7fafb2c1e73bc25a050d81c0570c21b8cc17cbee439d80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_Delayed_Delayed._get_unary_operator._get_binary_operator": {"doc_hash": "3856f5311ca2b17cc83c3216c6150c0cbf4d40b40cb00a0b06537186b692506c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_call_function_call_function.return.Delayed_name_graph_leng": {"doc_hash": "5a3c621a7be087864c91f8d565dfc2d81f4896f3ccc208ad4fd2733740502766"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_DelayedLeaf_DelayedLeaf.__call__.return.call_function_": {"doc_hash": "f280444eaa5b866551742b04c7c4d6d04d2dbb0c76ed6a9f1e7f97279979587f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_DelayedAttr_DelayedAttr.__call__.return.call_function_": {"doc_hash": "809c5279afc6218fc0d7dc247a9ad4f6d64419a8bed78367d3978b49195517e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/delayed.py_for_op_in__": {"doc_hash": "ede61c9f231a86f7f6ffcba39a3a27d70eafa748d1027985bae93f27cb4d9fd3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/__init__.py__": {"doc_hash": "2ffd5ced0b3acd134e1509dceacd62232013436469d4702d9ae021cfda3d7306"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile.py_from_collections_import_n_Profiler.clear.self._dsk._": {"doc_hash": "ccbfdd94cd8d307fd0a593301b32586b71953bc68a7012bb09e06b8cad6d281b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile.py_ResourceData_ResourceProfiler.visualize.return.visualize_self_kwargs_": {"doc_hash": "2b66115ebbc8137924d047df85657598f702b02090144423cc524d32554a7e81"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile.py__Tracker__Tracker._update_pids.return._self_parent_": {"doc_hash": "894631b6ff4b7601ae18a9f0e708634396ee1e863e17eee62c892e74ed2ff80e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile.py__Tracker.run_CacheData.namedtuple_": {"doc_hash": "d677181f692ea459a2e2a28227ceba312fd1e329970126ef5ad89bd22895f260"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile.py_CacheProfiler_": {"doc_hash": "0c1d43ab5ef6f7efee0d40f4835d94109d5fae61e4fc834434354ca2605ba089"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_random_unquote.return.expr": {"doc_hash": "b227923d73e2abbb1cc99b90c1fd6b247128c935a8808cf8bf8c69568349bddf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_pprint_task_pprint_task.if_istask_task_.else_.try_.except_TypeError_.return._": {"doc_hash": "b3ce0db0d73506d09f33149d86bea6111dc73d1ecb8bf11c9de9d37d41d19a08"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_get_colors_get_colors.return._color_lookup_n_for_n_in": {"doc_hash": "ab0080c8d9eb96dd2d011dbc859422110115d58bb2d20f07f79086aec5e36654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_visualize__get_figure_keywords.return.o": {"doc_hash": "f9f150b5b2ae34f2bbab1f1f9107e892a95610e3f5b040634060ad069c83f55f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_plot_tasks_plot_tasks.hover.p_select_HoverTool_": {"doc_hash": "a608f25106c95744571d59ceb5431a8d5d8913aac17fbe42f8b0c10ce11124f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_plot_tasks.hover.tooltips_plot_tasks.return.p": {"doc_hash": "1e4746f07e35bf17b9fa607bae3c8f87d7e47ab2639dbe3eff851da71c5213fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_plot_resources_fix_bounds.return.start_max_end_start_m": {"doc_hash": "74ceeb4deeda7bac5c6233d676b48f0ce1d15b3ba318f4b00b8c2be4bd448bc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/profile_visualize.py_plot_cache_": {"doc_hash": "8ba784796cf07d64e0035abd69ed6e54be85bb3b47b15c4e91efa9068660e0d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/progress.py_sys_format_time.if_h_.else_.return._0_4_1f_s_format_s_": {"doc_hash": "5d121cf59c46309ad38bdaf4d5251733342acd58e5c2ea516331c0a104e8d945"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/progress.py_ProgressBar_": {"doc_hash": "bb74e42493d403a3cde24d0e6f79597f3f76bb772395231b9db4ad830dc172e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_from_operator_import_add__ignore_abc_warning.pytest_mark_filterwarning": {"doc_hash": "67a6a6ec0b4dcadcdd6d0f2c89ba52069e01bd368b4193ca3d0e5de7a57eff75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_profiler_test_profiler.assert_prof_results_": {"doc_hash": "f2e4b703ab22a55d81a45ee638522e241838b3db4e1244634a67a1fbc78b0f8f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_profiler_works_under_error_test_two_gets.assert_len_prof_results_": {"doc_hash": "79a22a50f4472eef893f9c1987e42f831555d5eafeb760bf814d272a1619a9cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_resource_profiler_test_resource_profiler.assert_len_rprof_results_": {"doc_hash": "8b69c82cdc5218268075f81ded7cbe271961e423230a80ffa12a3f04ec232f6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_resource_profiler_multiple_gets_test_resource_profiler_multiple_gets.assert_not_rprof__is_runn": {"doc_hash": "917f016c892d0b33793c16885e203c587ec6764e996eee7908dccf16fe3432d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_cache_profiler_test_cache_profiler.assert_CacheProfiler_metr": {"doc_hash": "d65b4c94f95faae035daca1b844fab3bc1f95d3da08c6cabe1b802207cb739dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_register_test_register.try_.finally_.prof_unregister_": {"doc_hash": "0b7e10348e11d03590dff2518337100020ecd0fe6e8d53cb980f17bcbcad86bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_unquote_test_unquote.None_2": {"doc_hash": "68fb9e4f3d078d1a35b97b69ada8edaa87788337cee4d7ad7de4c26fbef689e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_pprint_task_test_pprint_task.None_9": {"doc_hash": "5020fbebf7350f7b2acbd15ec02d7519f93a60196744ceba83edc877c7179311"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_check_title_test_profiler_plot.assert_len_record_0": {"doc_hash": "030bc92ad7a2a33d53ceac132b7c03b44be575cd3d6f00f18bb78f14c230aa7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_resource_profiler_plot_test_resource_profiler_plot.for_results_in_1_0.None_6": {"doc_hash": "182460db10296542131875363d81b82ffbd243b3bc6e8103501c10031b0a4a27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_cache_profiler_plot_test_cache_profiler_plot.assert_len_record_0": {"doc_hash": "62a806d54a0f138d6a8c76f211f35cc0685d03a76a5532d84df420f5efa50809"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_plot_multiple_test_plot_multiple.visualize_prof_rprof_": {"doc_hash": "949ebdb3d64468f10fcee00786cbe9e5cdfd55be004b899ecbbbb622fd37402c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_profiler.py_test_saves_file_": {"doc_hash": "e8169876a6af62640a2bdcdf1deb67f167f0741b347220bf8799e4d031488d32"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_progress.py_from_operator_import_add__test_no_tasks.check_bar_completed_capsy": {"doc_hash": "d440f1fc5cd3892d038829467345a4c607f53cd14de3cb1da140dd31392d6774"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_progress.py_test_with_cache_test_with_cache.None_1": {"doc_hash": "01c579d87a542c9b389a93a1f41273d0d28882316548262a834b5e46e3cdc490"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/diagnostics/tests/test_progress.py_test_with_alias_": {"doc_hash": "73d2fbaa553378db30a84a25f375b73fcc11fca99eeeda6eaeaf173e4093339d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/distributed.py__flake8_noqa_": {"doc_hash": "5235a405751be8dfd10a7b3b4678ea3f4ac140a8d85171654ff2730602afc9ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_re_task_label.if_any_has_sub_tasks_i_f.else_.return.head": {"doc_hash": "2048cbe021ac16c331137ca6422ef030511d5235b16880d714cc770a943f78ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_has_sub_tasks__UUIDPAT.re_compile_0_9a_z_8_": {"doc_hash": "5f31363e824da09a889b2f27e4962f03eff0e9cc3e22659c884dc9b546aa5558"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_label_label.return.s": {"doc_hash": "084d406cae98b33946923c57a9d620577e47fb5a78057fc94c5caa4890e41f1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_box_label_box_label.if_isinstance_key_tuple_.else_.return._": {"doc_hash": "4db15a7f0091a536abf727c33e71eeb5ebca6ba1c78f9cbcc5f97242bcbd3e1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_to_graphviz_to_graphviz.return.g": {"doc_hash": "2242111e9f267c54791a804561af46b837a2725a80f55ab273921e7bb403598f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_IPYTHON_IMAGE_FORMATS__get_display_cls.if_format_in_IPYTHON_NO_D.else_.raise_ValueError_Unknown": {"doc_hash": "24df063f9ec3016ba9d8d5dca957865ad121eec5fffff62a7145ba1b16b2aad6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_dot_graph_dot_graph.return.graphviz_to_file_g_filen": {"doc_hash": "e7150a3bddd83ec56dec4c680940a1999526b5dfdd41c630222b75949055a919"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/dot.py_graphviz_to_file_": {"doc_hash": "8ef2318b4282b9c00fa5e26737aef8c929c25e4baa1c9226eb32e48ead5b206c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/hashing.py_binascii_hashers_append__hash_sha1": {"doc_hash": "6127a3780e0b5824f4f13ec21137d294078cfccf62ec4547b836ee5f256541b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/hashing.py_hash_buffer_": {"doc_hash": "bdf7b9057442fcd5132cc7d390b92ebddeaf586151fe3051a22e737df8773f0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_from_collections_abc_impo_compute_layer_dependencies.return.ret": {"doc_hash": "7a180fe5683b70fb7e55274176ad4ccfad5e3c31b2d65600a7875dba50b331b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_HighLevelGraph_HighLevelGraph.dicts.return.self_layers": {"doc_hash": "8d0d8739e1f581e36341cc0a9b61bf660a454a274cdbf0756c88452c87912e39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_HighLevelGraph._from_collection_HighLevelGraph._from_collection.return.cls_layers_deps_": {"doc_hash": "fd3a0262b17d4f22fd61c00d2f9241283acf0de70b007d021d0c0b8326951769"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_HighLevelGraph.from_collections_HighLevelGraph.from_collections.return.cls_layers_deps_": {"doc_hash": "a2ff3a744cf7c899b59c571420dd9fb74ec83d7c6404aa0749d8413e62fd89e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_HighLevelGraph.__getitem___HighLevelGraph.visualize.return.graphviz_to_file_g_filen": {"doc_hash": "f1a5ad0afa3fd49efa079803bca51b9289002b01cfa236d2c8024f116e9ea403"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_HighLevelGraph.validate_HighLevelGraph.validate.for_k_in_dep_key1_.if_self_dependencies_k_.raise_ValueError_": {"doc_hash": "3ff0365e5811892408957cc073efac35781bd2c3255d2c620fa558918263a5e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/highlevelgraph.py_to_graphviz_": {"doc_hash": "e60fcb83a86030c093f1722a172338fd3a6b1ca6e9bc187d10ddbeff9aca04b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py___os": {"doc_hash": "78da90cb65852aa27f86f405727ba6aad1195356704155b5ab0b106562e94e99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_from_queue_import_Queue__DEBUG.False": {"doc_hash": "b217a56bb091dc2c2798043b4415c7ad25ad623f08bc5f258036fe0b6f80ae6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_start_state_from_dask_start_state_from_dask.return.state": {"doc_hash": "06b47febe5b36c4a36fdcf97b67dafcbebfeaa354eb3792bf56cb63bc2fd7aa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_None_2_release_data.if_delete_.del_state_cache_key_": {"doc_hash": "aa24c9cf6acf9686790ff6caeffc616bba6cf66376c66515362a197edb7941dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_finish_task_finish_task.return.state": {"doc_hash": "6a807265d8eb8b7468221d65efc05a6b45e1f2812f39df7c764b848c9580d487"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_nested_get_identity.return.x": {"doc_hash": "615f651c68be8590a090a01364eccc17e2b6991661afd462fe8e206c4ea56be1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_None_3_get_async.dsk.dict_dsk_": {"doc_hash": "333a60b0562ae3c79734ab8d398420cfaae91f29a56a33a1d606cdf25141ef59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_get_async.with_local_callbacks_call_get_async.return.nested_get_result_state_": {"doc_hash": "94806e55e1e9c1c0cc14c3b069826e5afe92e5256b66d22287231c850c36e576"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py__Synchronous_concrete__get_sync.return.get_async_apply_sync_1_": {"doc_hash": "e966a28284b47e242f04bffa828274deaa9e06d1bd1784369d70e6ee25cd88ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/local.py_sortkey_": {"doc_hash": "872b984619fc732fcef8c87bc815242121c67c0631b57f9cc68c077d82e8d68e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/multiprocessing.py_copyreg__process_get_id.return.multiprocessing_current_p": {"doc_hash": "51e24a06ee86d2a067928304a3bff087105ef463fecd610eaa06b41bd158991b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/multiprocessing.py__Remote_Exception_Han_RemoteException.__getattr__.try_.except_AttributeError_.return.getattr_self_exception_k": {"doc_hash": "2eb61d6bf8bcadecefd4415af8b5c500dc9d6696aee8af4ac0ada0227d3b2748"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/multiprocessing.py_exceptions_get_context.if_sys_platform_win32.else_.return.multiprocessing_get_conte": {"doc_hash": "5a5bbfc90944d32e34ff6d97c211866fbe1d3c84f632c47b9ee73839e56cc591"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/multiprocessing.py_get_": {"doc_hash": "e551350b9d80a33d3c64f14a262c265f4b1bceedaff4be9e5eb41641484847f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_math_cull.return.out_dependencies": {"doc_hash": "24dbd2315417a08b4bc01887935da65330cfb8583454d5a5d87e403f4526c621"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_default_fused_linear_keys_renamer_default_fused_linear_keys_renamer.if_typ_is_str_.else_.return.None": {"doc_hash": "78b47c1cf58aaffc6de1cbcfce0f9403ea6ec66c196c282dc482ba536dd05461"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_fuse_linear_fuse_linear.dependencies._k_set_v_for_k_v_in_de": {"doc_hash": "115685c43794355002a8ce440095ba6ae12f4774ad92a832449f37811287a46f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_fuse_linear.if_rename_keys_is_True___flat_set.return.set_x_": {"doc_hash": "4860b738cd3eaf1d45590749816832479311ddd6b1c2ad93852db1fe7b47d32e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_inline_inline.return.dsk2": {"doc_hash": "601871860479f00aad93043914f93b66a1542056aba2d8644dc20e9f19463fc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_inline_functions_inline_functions.return.dsk": {"doc_hash": "4bd8600a18b6abdbd9641355b6540c78f6dd26c79e3479b59f791424be23fa06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_unwrap_partial_functions_of.return.funcs": {"doc_hash": "dd9f443d8b32873136c07079f85bb02ed6307d529f418dbfbffafe53e5815137"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_default_fused_keys_renamer__default.Default_token": {"doc_hash": "c4327ce98611882d192732b55183384e0ac7871f69afa0ede2f803ebbc28944e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_fuse_fuse.if_not_config_get_optimi.return.dsk_dependencies": {"doc_hash": "65989bd341820917dafcb44335641bf5f448a04ac4084737c07b7212829a3fa2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_fuse.if_keys_is_not_None_and_n_fuse.children_stack_pop.children_stack_pop": {"doc_hash": "b84e276bbd3abba9c3374c6116defd75d782abe20596055f56c7f019006a3d62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_fuse.while_reducible__fuse.return.rv_deps": {"doc_hash": "84d32698506bdbd819153b1b2b8a2d1b97d063ff15c85fa110814bfa1290f537"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py__inplace_fuse_subgraphs__inplace_fuse_subgraphs.for_chain_in_chains_.if_rename_keys_.fused_trees_outkey_cha": {"doc_hash": "979cbcbfb9ef7b50ae8e186df6b1f3d4c7697737db9a568bcbf04fc993718d58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/optimization.py_SubgraphCallable_": {"doc_hash": "808096ff96b697bcbba8d8462c22018bdf841db38445c3cdf83c737ad2957ea7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_r_Static_order_of_node_add": {"doc_hash": "deb3429c25d24d49359f0f1350ec4d25e5754db822dc0cbbf85b265ce6a68fa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_None_2_order.initial_stack_key.init_stack___getitem__": {"doc_hash": "456015776057bdba8ce1aab74bedd26de68ee9f5fab92850ec2e6a106074cb1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_order.dependents_key_order.dependencies_key.return._": {"doc_hash": "a6820ae0481077bf463ee86a9988a3bbf5d333be5794b3dcd4c35315ccdbb638"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_order.finish_now_key_order.is_init_sorted.False": {"doc_hash": "eb5c260af0d7c380e1897f4f92fa841e4433e4c9934ddb3c8706a2394f004c22"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_order.while_True__order.while_True_.if_inner_stacks_.continue": {"doc_hash": "fb2e04be658c4aaf92395b478faa1531504944894591bfeb5f872a63477ffbbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_order.while_True_.if_later_nodes__order.return.result": {"doc_hash": "c2bc925472479fd71ceb22b93c46b868ccc07d0c264c13d76e6a8196a33c1a68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_graph_metrics_graph_metrics.for_key_deps_in_dependen.if_not_deps_.for_child_in_dependencies.if_not_num_needed_child_.current_append_child_": {"doc_hash": "7922c0de6298b1b975168e8a15ffa158a675a6ce56a405489a319d1762e87928"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_graph_metrics.while_current__graph_metrics.return.result": {"doc_hash": "841b0f89b848d4c91bcff9a34829a8d5ef93b5a5c2acf470880a38164c2cb5c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_ndependencies_ndependencies.return.num_dependencies_result": {"doc_hash": "08c6cc063799d121677887688a81f46c003b069ef94c313b8b1678b29a8819f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/order.py_StrComparable_": {"doc_hash": "cbfd0bdc24a8aeb546cec795823bb868208e67f359c8c5614ec6ab438c4ea120"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_from_collections_import_d_Traverser.skip.self.term.self__stack_pop_": {"doc_hash": "9ebbaafa2ae89b5a8a849d85bbe53148ddbf98d79fbd19ff8863e9cec2107b1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_Token_END.Token_end_": {"doc_hash": "80685bf58ccf905d4421c958b9b0437e2ea90add3540563842ffd37b22e67277"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_Node_Node.patterns.return.self_1_": {"doc_hash": "e24e38c76ac9afa8de7bbb3a64166cf86d7c347a22727b2f5501e3f650e3678d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_RewriteRule_RewriteRule.__repr__.return.str_self_": {"doc_hash": "5e2dd9597a5211626a706786466f7c8e5d1940460232e26b52438de967a7e976"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_RuleSet_RuleSet.__init__.for_p_in_rules_.self_add_p_": {"doc_hash": "4901ebae456cce32fdb1814c0277a5b315e64dd22c5545000af0d69ab3500b8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_RuleSet.add_RuleSet.add.self_rules_append_rule_": {"doc_hash": "d5f7aad61717860643cc1ef9da26904870b350fd7d0926b5c31c854067a54fca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_RuleSet.iter_matches_RuleSet._rewrite.return.term": {"doc_hash": "4e8f2e86e16a28a1ceacf94410659b7930b976bca44107ab75e1ec819a24c883"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py_RuleSet.rewrite_RuleSet.rewrite.return.strategies_strategy_self": {"doc_hash": "929ed2b76e7f445e729b2ae394be784ff2866631ae6f489211fd755d4a00a813"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py__top_level__match.while_True_.None_1.except_Exception_.return": {"doc_hash": "41114f888aa5f2681e3393c50a68f0397a0532bb9f59c8d46e3294c17189bfed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/rewrite.py__process_match_": {"doc_hash": "ba5e0bdca77afc2711452d1bd187e8e9cf7b7cd3c16b82cf2cb10f36b1075b7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/sizeof.py_random_register_numpy.sizeof_numpy_ndarray.return.int_x_nbytes_": {"doc_hash": "1f3aecf3170b9f509fa5982d4f4e1fad5df9e00ff873a189dad4bbec45787f3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/sizeof.py_register_pandas_register_pandas.sizeof_pandas_multiindex.return.int_p_1000": {"doc_hash": "7d0c156bd8bd65563de543a57f0b5d34622362edc38ecd48d4a1b97608342098"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/sizeof.py_register_spmatrix_": {"doc_hash": "da3c0c2e677f8db021b010bf76cfbc857faef8b087523f9f45760f6c63a1ef15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/system.py_math_": {"doc_hash": "17923f072debe7fad63c27945bae9b0fef109c1cda2992ec9696ad87ab8f7248"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_os_f3.pass": {"doc_hash": "cdf64c2dc59da1585ffc3aa0402c706555cca7d1435fa430703ea07317bf9831"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_normalize_function_test_normalize_function.None_10": {"doc_hash": "0ec835e22ccb477ed35873e1bf68b936e29d0bbb72cec082e3cd77036bbd2d54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_test_tokenize_numpy_datetime.tokenize_np_array_2000_": {"doc_hash": "bc894dbe580d1c56138596c92f1bb18814517ba27c2c1b5ccd1bf29652a1c8c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_numpy_scalar_test_tokenize_numpy_scalar_string_rep.try_.finally_.np_set_string_function_No": {"doc_hash": "46e64c08351b411ef50cf1983693df7cdc5edcbe20bf4579b8b34c82d58ce6fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_numpy_array_on_object_dtype_test_tokenize_numpy_array_on_object_dtype.assert_tokenize_": {"doc_hash": "8f65da48b6a26edbf07e8a3260594857df7b65e01a28c26d97c4579b4f6d4b23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_numpy_memmap_offset_test_tokenize_numpy_memmap_offset.with_open_fn_rb_as_f_.assert_tokenize_sub1_": {"doc_hash": "459373dd9a0dfa078120d6987b2b7e2326803554ad4dc08e959d9a95d28f6a65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_numpy_memmap_test_tokenize_numpy_memmap.None_2.assert_tokenize_mm_1_": {"doc_hash": "4b7f1e3e1767aea02fe1b9f5d9d02b6129bc39d1f8bd7e2fdbe303d4ce1c0259"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_numpy_memmap_no_filename_test_tokenize_numpy_ufunc_consistent.assert_tokenize_inc_t": {"doc_hash": "8680bcda023ace23f5ce959a31b2611be1b1f82308805f700bc8115aad240bf2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_partial_func_args_kwargs_consistent_test_normalize_base.for_i_in_1_1_1_1_sl.assert_normalize_token_i_": {"doc_hash": "d394cf6c711a8c3c40c9b4f937e3ae7978110a9d99bd62c90bdc229591a015ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_pandas_test_tokenize_pandas.None_5": {"doc_hash": "1619e7c37e9fcf29b7f5a6f05f2a17a6df52e934cbafd21033eba23731f90b52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_pandas_invalid_unicode_test_tokenize_pandas_no_pickle.tokenize_df_": {"doc_hash": "e604b47237d206691465eb187aa0c131d1dff7314f7e3ffe70e3a86636056e1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_pandas_extension_array_test_tokenize_pandas_extension_array.for_arr_in_arrays_.assert_tokenize_arr_t": {"doc_hash": "55850c5f557e13f0ffd640a79eadb5da21e6fdb25f4d1c5e1ed03abb8d815fe5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_pandas_index_test_tokenize_ordered_dict.None_1": {"doc_hash": "25ed951de73d22df64900871ad5f66c768727402b78728986e9e9ed859224d22"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_range_test_tokenize_range._Different_step": {"doc_hash": "048a464b7e48424f5e40fc56d08b8207dfacba16413c02e7c84cea8170532cd5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_object_array_with_nans_test_tokenize_numpy_matrix.None_2": {"doc_hash": "40685cb6ca3e9aab2c2a743e6f2c5ff116d43ee1bbc544f432a69caf1a41efce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_dense_sparse_array_test_tokenize_dense_sparse_array.None_2": {"doc_hash": "4223eb9eb17799024f816eaad0e6462f2026e3af6dc47d43f7b4633f347fc43a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_tokenize_object_with_recursion_error_returns_uuid_try_.except_ImportError_.dataclasses.None": {"doc_hash": "e1954bf29d14698ad01fd00cb77a08b69fff648260a3f1d0e266dac4e7edc08e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_unpack_collections_test_unpack_collections.build.return.t": {"doc_hash": "f36f667a1cc93be80ac507ec91f03046aecd72c9ba9f3fcd57571c591bd15591"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_unpack_collections.args_test_unpack_collections._Smoketest_results_that_": {"doc_hash": "03e67386fda9bec90848c0f103e3cd40647c0a3617bc81ca635b44e05b92e7c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_Tuple_Tuple.__dask_postpersist__.return.Tuple_self__keys_": {"doc_hash": "3105019c30075f34f3e9f10e24fce2ba33b9ce417c4291524f4e01a0629f48bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_custom_collection_test_custom_collection.assert_t2__dask_t3__da": {"doc_hash": "7707d9c10495e547a62cfdc8687cde0f3231a4f346c5cfa8f4d1588457bb772c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_no_opt_test_compute_no_opt._See_Renamed": {"doc_hash": "a0c0601a1ddbbc8f4404539b423ccf14aff9f2d48e323e3a5ed554894999ff5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_array_test_persist_array.assert_len_y_dask_y_n": {"doc_hash": "f42dced34b7d37ed03be8fee90c2d5d7a9aec9debfd51c9349a43244ab5f256e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_dataframe_test_compute_dataframe.None_1": {"doc_hash": "ec6352d9b2b8fcaa72b30edda414d0953d3d785a9175572c04f48791ba18bb73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_array_dataframe_test_compute_array_dataframe.dd__compat_tm_assert_seri": {"doc_hash": "3e0d3769f91e4a86e6292d10fbed18dddae0917ea100490614f8c64e7b60bb35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_dataframe_valid_unicode_in_bytes_test_compute_with_literal.assert_compute_5_5_": {"doc_hash": "bc90066ddf252c8f20c3fddeb0db7556247ebe0eef31da83416cde1288bde4fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_compute_nested_test_compute_nested.assert_res_1_8": {"doc_hash": "6f72afc90809f3f5964bde808bed0b1730642c5b186e6ea56ccb2390e3673d79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_visualize_test_visualize.with_tmpdir_as_d_.None_4": {"doc_hash": "dbc061a71800d42aa9ecf2ae7b6d3599d27e77473d3f3d7b7f8b7647cb50a317"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_visualize_lists_test_visualize_order.with_tmpfile_extension_d.assert_color_in_text": {"doc_hash": "f979f04ca6e6f5e7ade6a9851c4500470458dfe15d8ce25d79a45030f6a067d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_use_cloudpickle_to_tokenize_functions_in__main___test_optimizations_keyword.None_1": {"doc_hash": "6ef19f0dc50eb895776e5ac35a7689b1daa650949483d46d273017a6890e76f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_optimize_test_optimize.for_a_b_in_zip_x3_y3_.assert_dict_a_dask_di": {"doc_hash": "2f75815f1bcf3fd68776d132bdf124a37259a8bc634592e36294f76377d3720f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_optimize_nested_test_optimize_nested.assert_res_1_compute_": {"doc_hash": "bb6edf1fc411903840ea3aaa4693a6b213a9c2e24548821d595c4dbcf19ed1ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_default_imports_test_persist_literals.assert_persist_1_2_3_": {"doc_hash": "5df287cabeb865b4c61f43824f5bdd4846924e4b8675f964c3a7807afc86f58c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_persist_nested_test_persist_nested.assert_res_1_compute_": {"doc_hash": "91d61aa4fa809c441b0476b59e334f34b086e5701f620fc880e587bba456e0df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_persist_delayed_test_persist_array_bag.assert_list_b_list_bb": {"doc_hash": "021c7e25c005a1dae75e83298818bc1f52c0744fc17432e55920236a39cd8a7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_normalize_function_limited_size_test_optimize_globals.None_1.assert_eq_xx_np_ones_10": {"doc_hash": "9b307a85993c66bc5640d252f3a389fa0352d87da3dc9c506d73acfe000f57cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_optimize_None_test_optimize_None.with_dask_config_set_arra.y_compute_": {"doc_hash": "0400c5af849693bcd3d8fb063782be9a3ea9ce45e13208e4ba8ce9f7b2567d9d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_scheduler_keyword_test_scheduler_keyword.try_.finally_.del_named_schedulers_foo": {"doc_hash": "33bd9afd41d169b5a0bbc6b8ed02bd0278c598baafdbe93fbf23d7c2319447f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_raise_get_keyword_test_callable_scheduler.assert_called_0_": {"doc_hash": "7198d0eb76b44cfe6017ea16cee6b9baa49c422105bd1003932297b00724004d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_base.py_test_num_workers_config_": {"doc_hash": "b3f5aae3af7ee4394870b7e5e56703dd20ffc15976c3f3164e6631fb419b8c2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_cache.py_from_dask_callbacks_impor_test_cache.assert_not_Callback_activ": {"doc_hash": "5019ff2099d626b8ee927cbab179c9131f74fe9eb4bc61828c9bff064c23a729"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_cache.py_test_cache_with_number_": {"doc_hash": "ae04d3cd4b0ce18d7248301323966f1fa3f8d8fe7a63e0900a597c8f4e1ef5c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_callbacks.py_from_dask_local_import_ge_test_start_state_callback.assert_flag_0_is_True": {"doc_hash": "6dd28f323184d63009b11072fb74fe94b167fd2b2c62a4f55b2a31da131c4aa4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_callbacks.py_test_finish_always_called_test_finish_always_called.None_4": {"doc_hash": "1c60d77d24b67810fb14bf0c7388cd389027a684bfd839a2abc501a57dcec0be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_callbacks.py_test_nested_schedulers_": {"doc_hash": "4dcc3a5963fc0c57ffe75417a8d99a07eb1211643ab0aa5b6e40e047d1947a7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_os_test_canonical_name.None_5": {"doc_hash": "2745d03254e314243b959bd76858939f1bd519b52e382dc5776dfbd61e682bf3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_update_test_update.assert_b_x_2_y_": {"doc_hash": "1f04410735cbde262fe80e6fb6e6401760f0a9849999b4d1f3dca365cbc6788f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_merge_test_collect_yaml_paths.with_tmpfile_extension_y.with_tmpfile_extension_y.assert_config_expected": {"doc_hash": "21b40fa7fc0caee6e09ce211d3c46d3d065d6c1a85edc3ff0a659168dcbc02e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_collect_yaml_dir_no_read_permissions.try_.finally_.os_chmod_path_perm_orig_": {"doc_hash": "c59a87bd89a9b178ce5d7ca21a936a75453bdf4249d3694cceda27c0910bbaf6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_collect_yaml_permission_errors_test_collect_yaml_permission_errors.with_no_read_permissions_.assert_config_expected": {"doc_hash": "27cfe7a212ec6e6d0601c7aea6a5dea34d4adb1ce87c8e644f4ec4e312bbbf3d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_env_test_env.assert_res_expected": {"doc_hash": "4536571705e25a6064e23a8df3efad15ddbaea25dfdaba0530428fd9eaa05af1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_collect_test_collect.with_tmpfile_extension_y.with_tmpfile_extension_y.assert_config_expected": {"doc_hash": "8e6c6ee7b1d798290d8ad16dc98adfca86b73009c30701e905ffef33f6a10a91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_collect_env_none_test_get.with_pytest_raises_KeyErr.get_y_b_config_d_": {"doc_hash": "f1b95facb38888c518f91f0654afd0c504ab7d3ae2ec7d090d2581ab13869ff7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_ensure_file_test_ensure_file.assert_not_result": {"doc_hash": "d63f60c516c0fb20d6a429f2c63ce8a5d2c49a2f2c48d4d89d2058339a388f64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_set_test_set.assert_d_abc_x_1": {"doc_hash": "d8cee9ad775c127fe3219f5da65b722912b52c81b736098ee119b707276758d9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_set_kwargs_test_set_kwargs.None_2": {"doc_hash": "49ff0b8fcc13a53967ffb6bcba1c4d44d7cd4d1d76c37b69a087183688f902c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_set_nested_test_set_hard_to_copyables.with_set_x_threading_Lock.with_set_y_1_.pass": {"doc_hash": "c812e88928d22efa8ac7e82df77f69db760f388e127f776520e8f7565708471d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_ensure_file_directory_test_ensure_file_directory.assert_os_path_exists_os_": {"doc_hash": "ff5d69a9d8888cb8647217d646630b314f85fb8ac903f86616d8637b74bd3383"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_ensure_file_defaults_to_DASK_CONFIG_directory_test_ensure_file_defaults_to_DASK_CONFIG_directory.assert_os_path_split_fn_": {"doc_hash": "963b8982c0aa98f50c9b2575a3abd5ca19ba7302cb1352dd89e9407166c8973b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_rename_test_refresh.None_2": {"doc_hash": "49e7357208a0fe750bfc9ee625f10366e56b8003d02eccb854396e234ba0006c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_expand_environment_variables_test_env_var_canonical_name.None_1": {"doc_hash": "84c112c8a38655b507ff506d4077bfef32b7c51bbf5ba3da69441963e8a832cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_get_set_canonical_name_test_get_set_canonical_name.None_2.None_1": {"doc_hash": "21f9f1034af5f175b15ea25d58d8092b536b6a0ef560a08b905c3c23de73f03c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_get_set_roundtrip_test_schema.jsonschema_validate_confi": {"doc_hash": "1cc18b9fcf4e9ef8847a20d284fd53877812408b884c724a48b8d888686f012f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_config.py_test_schema_is_complete_": {"doc_hash": "fa281395fee9e5d3769f6934f3cf4d8cdd0defd027126eb6be1a0a1386b7b0c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_context.py_from_dask_context_import__test_with_get.None_4": {"doc_hash": "57d046b6aeb8b2e9d7c6d20f160b297a89b1d95f3a83985c6dde8746422a876d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_context.py_foo_": {"doc_hash": "0fb9b5187b9520c770f1b19b509ee62797bd22e90b171f5e3af1f0e061d40bc2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_from_collections_import_n_test_istask.assert_not_istask_f_sum_": {"doc_hash": "023aee8eb7d042e3257a59b7ea4a9e677bf2dfeeee2a308872737fe0f2113f66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_has_tasks_test_has_tasks.None_5": {"doc_hash": "27c4dbffed6d5c2e373fb0d54e6d6cc7fcd2adbf9c8ccc6992b07982714ee320"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_preorder_traversal_test_preorder_traversal.None_2": {"doc_hash": "38b86cb05172c2cbcb00d506fa515e3766e31475572201026f326def238f97ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_TestGet_test_get_dependencies_nothing.with_pytest_raises_ValueE.get_dependencies_": {"doc_hash": "b33af7fb28b4e641f703e0635529b04eddccfdcd422e5c69322f264c43caaafd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_get_dependencies_many_test_get_dependencies_task_none.assert_get_dependencies_d": {"doc_hash": "453450ce16e82300e3a939e685dcf70c11b8758d27c6b191d04375ce3b040bf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_get_deps_test_get_deps.assert_dependents_": {"doc_hash": "c8ccd2fe6da745c910e2b1abc6ecb6c68064796312707bd37a8d2eb9e79aa3b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_flatten_MutateOnEq.__eq__.return.False": {"doc_hash": "951bdd5513b015a9f4d350de7d5ecf34dea4b8ccd33c8e6e1c96d0d648515527"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_subs_no_key_data_eq_test_subs_no_key_data_eq.None_1": {"doc_hash": "abd22c191606d563518ef9c0195a94eda4dce02b8176df78e18210e3dba11bad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_core.py_test_subs_with_unfriendly_eq_": {"doc_hash": "ae729a2bae4e1fe0991445ea62aa4f880d81f5284b06b1321a2283c284b33c95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_datasets.py_dask_": {"doc_hash": "a660d7d70e93a2db0d15024c7a0dec08786f0a78fb5dcf307df6ab60abab28cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_from_collections_import_n_Tuple.__dask_postcompute__.return.tuple_": {"doc_hash": "9d187dfabb76d3c0a7e0bbe993c6154e7545e050efb329d8df54c77b8f60a46d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_to_task_dask_test_to_task_dask.assert_dask_x__dask": {"doc_hash": "ded3f3eb7ad23dff9613cad9f89edf8a2148f831d4e39396f23ae7797054778e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_test_delayed.assert_a_key_in_b_dask": {"doc_hash": "0a9be292c3d5e8389e8b552001fcb3fd725395ceb35eb9d0f4087dcac5eb20f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_with_dataclass_test_delayed_with_dataclass.assert_final_compute_": {"doc_hash": "023b1f7a06817c764f8c1a176b8e5da25e83e0b6fade6c7e0752b523f27317be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_operators_test_operators.if_matmul_.assert_eval_c_d_co": {"doc_hash": "dc296e5169cadfe567d104807ac78340f6ae452adfcfb97f4b376b8d4a43ea33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_methods_test_np_dtype_of_delayed.assert_delayed_np_array_": {"doc_hash": "c4bb7a29e48bec83589dd5c66f9a02f4a027c9d5a58f03890e40b655c6d47d0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_visualise_warn_test_delayed_visualise_warn.None_1.z_visualise_": {"doc_hash": "6abbdbaca5bfd05f597c00894ead63ebeda4af3278ceb6d386107a3869bc2219"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_errors_test_delayed_errors.None_5": {"doc_hash": "97383ab834f3c07d9a0d9b68b95b4de990c5a7fc5ffef58f24cffb2fa81e4c7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_common_subexpressions_test_lists.assert_c_compute_3": {"doc_hash": "9ebfeb8f7949a4f84dbf3e229c15d0ff9d9f4a0f725b093bdd25a5936f7e013f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_literates_test_literates.assert_delayed_lit_a_": {"doc_hash": "ac90b422b7f74b26399abe72415ecf3ab0bb90c9bf549824936fa6e6d27f0afc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_literates_keys_test_iterators.None_1": {"doc_hash": "4a651de49e41788f490a270695fafe6a1a60e182746067893bb0a12ca9e55bea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_traverse_false_test_pure.assert_myrand_key_my": {"doc_hash": "4b9a103d42218607d84316bfa5be1d380f906d64882900fcf4dc163c9b0e4ee8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_pure_global_setting_test_pure_global_setting.None_7.assert_element_element": {"doc_hash": "d60c3d22e6f3648e5d74d1bbeb494c7783fe8f90758bce3852575021ba0bd12d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_nout_test_nout.assert_x_compute_tup": {"doc_hash": "a1dfae102043704f92ffa8d8c2f5e9b9671d99fd7371ecf3a7394f0636732be0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_kwargs_test_kwargs.None_5": {"doc_hash": "6b53989ee848acd61ad71195b2c3877ca8bdbf38b4ec53c09f700248ff05594b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_custom_delayed_test_custom_delayed.assert_compute_n_x2_x_": {"doc_hash": "738bad5633d8f9237ac2130c60c9f72282775295324f94d6dfe7f14663e69cd6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_array_delayed_test_array_delayed.assert_delayed_arr_compu": {"doc_hash": "671b4a0880dba4222fcd0ceb61507eda8763ac4b104443a85cb34ba9d49a935b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_array_bag_delayed_test_array_bag_delayed.assert_out_compute_2": {"doc_hash": "d9e82088b36d2af8caacb79cf51df250738727ee361251baa576d68c6ceaa060"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_picklable_test_delayed_picklable.None_10": {"doc_hash": "3fae957077df9e9ae2b6ce8187c274a10ffbcb52cabb777839a00878b53be9f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_delayed_compute_forward_kwargs_identity.return.x": {"doc_hash": "844b3d6104244524a34aeba831de58a3d351174fbcb46c56eefeae6289e90831"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_name_consistent_across_instances_test_name_consistent_across_instances.assert_func_1__key_i": {"doc_hash": "2316d3f38ee2d096edb0ec127548d6de9da8189510c7a5552cff0116b2f5efbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_sensitive_to_partials_test_keys_from_array._check_dsk_xs_0_dask_": {"doc_hash": "9b16509e04d4ab9ce9183bf071e108970feae09064363499c9cbbd139386fcf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py__Mostly_copied_from_http_test_delayed_decorator_on_method.assert_isinstance_A_addst": {"doc_hash": "d24639f56c47c38836c0cfdd439a81d78df916ba6ab54928f876cc028df396c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_delayed.py_test_attribute_of_attribute_": {"doc_hash": "355b00c05e5f39a5868df6c7868735e93372dcc71e2d2d04a9374fffa4d33438"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_pytest_test_persist.assert_y2_key_in_a_data_o": {"doc_hash": "b8e85600b6e754d051746ae48530aa1a5148b77ddcdc94d96e637218deed5ce1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_persist_nested_test_persist_nested.assert_res_2_4_5_": {"doc_hash": "e53c4b24f2866df84c4d4ebe6a60e490dabfb7a7e2f727812be1ced6ee594f9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_futures_to_delayed_dataframe_test_futures_to_delayed_dataframe.with_pytest_raises_TypeEr.ddf.dd_from_delayed_1_2_": {"doc_hash": "1cca66fc418728623308717616f213b9d5019abbdf791cb5290d35dcffb5acd0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_futures_to_delayed_bag_test_futures_to_delayed_array.assert_eq_A_compute_np": {"doc_hash": "5cd3262f5c6da21a332fb6a6d3d18f18d8436fb4016f27ed07a41af1f3fa2f78"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_local_get_with_distributed_active_test_to_hdf_distributed.test_to_hdf_": {"doc_hash": "2ab8ff738c131adeeff7850be0c36dd7fe63097b9df25da6d7dc3f90306d83ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_to_hdf_scheduler_distributed_test_to_hdf_scheduler_distributed.test_to_hdf_schedulers_No": {"doc_hash": "65670529b6fd90b2c2f2d41c9f88f4ed11113d389eb3df38ad72b075ca668179"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_serializable_groupby_agg_test_serializable_groupby_agg.yield_c_compute_result_": {"doc_hash": "7e9d934011092978df68135d49b222ee1c280963906ea73da89388fefe0fe9bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_futures_in_graph_test_futures_in_graph.assert_xxyy3_compute_sche": {"doc_hash": "0fbd94208d389cd9b2ab5d0fc425e06b0b9386ae4f76114c47fb641ea370f36a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_distributed.py_test_zarr_distributed_roundtrip_": {"doc_hash": "77950028d64ec1e590ec1bebd8d540cfbfd49bd24117912296582a3be62dafec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_os_test_task_label.assert_task_label_add_": {"doc_hash": "e39263d9b1ebfe7ee8499430b09456cbe2a18112a5c6d034591e2864cbc46622"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_label_test_label.None_10": {"doc_hash": "24d01e798113b7f09b31fa5472b34a5e39eb07c394429ea1ef04ae795655cab6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_to_graphviz_test_to_graphviz_custom.assert_set_shapes_set": {"doc_hash": "8f671ec18f6727e078d19325196e53bc71bf0da7b228ee0d334c0d49233f3e35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_to_graphviz_attributes_test_to_graphviz_collapse_outputs_and_verbose.assert_set_shapes_set": {"doc_hash": "ad916c8ba43d051743f466721c862ffcc105e98ca7142e3d70d1de0318e19c2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_to_graphviz_with_unconnected_node_test_to_graphviz_with_unconnected_node.None_4": {"doc_hash": "8b07fe228f479a560f25c1311746e6e65a59928505b695688946735bd8cfe3de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_dot_graph_test_dot_graph.try_.finally_.ensure_not_exists_target_": {"doc_hash": "4053896a0b427bc0e1a13ef8349e86d0e5e9e30c1bdce36687700b4dac81583e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_dot_graph_no_filename_test_dot_graph_defaults.try_.finally_.ensure_not_exists_target_": {"doc_hash": "61c80514e66f00bec5b7f12ce950ea80458ce729ab9e9902263ddf5ffd3d7129"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_filenames_and_formats_test_filenames_and_formats.assert_isinstance_result_": {"doc_hash": "5f5da8458ea8d71ca76d0fb77fa196241d036932f2ded38a9e79fceef64461ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_dot.py_test_delayed_kwargs_apply_": {"doc_hash": "162f5985a0baa38a40e10463201f5b3d96c4720a727527f2d060ed967dc8d63a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_hashing.py_pytest_": {"doc_hash": "9d64c9b7c5b6d1444c5915e9c19e2b63c95beab327f82954dd80b96004d268eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_highgraph.py_os_test_basic.assert_dict_hg_x_": {"doc_hash": "ccc327f3c59f15b12fa91b4b7fd84c6fc01541aaf3f3b24a8613ef0b7ee5393e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_highgraph.py_test_keys_values_items_methods_": {"doc_hash": "fd4d5b0f01bf544ee16e233c2e5e5aba13147fb7870a5227dee820195c90b431"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_dask_test_start_state.assert_result_expected": {"doc_hash": "22cc1cd3ecff619c2590a9cbd896d742b2b24677416ed2bf3411b73b6d4f7300"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_test_start_state_looks_at_cache_test_start_state_with_independent_but_runnable_tasks.assert_start_state_from_d": {"doc_hash": "66252bfbdfce49046b74059dd2c38de78eadfbcb481fe47e904a58015f5dd260"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_test_start_state_with_tasks_no_deps_test_start_state_with_tasks_no_deps.assert_state_dependents_": {"doc_hash": "c26079019b46eb81af2ab8a6913273919d49230f1982ab8ecc776104b219df19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_test_finish_task_test_finish_task.assert_state_": {"doc_hash": "cccf94668eed97425c5850fe99369e9f7268017c24642ca7d9291b284d2e7776"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_TestGetAsync_test_sort_key.assert_sorted_L_key_sort": {"doc_hash": "8c9c051146dec3698ce3d738dd85a32455b62fd658e52b6f76be9310de7ed516"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_test_callback_test_callback.get_dsk_a_start_callb": {"doc_hash": "f6c80a34ed4302010c13f52192bb1d81f8b07d5f906aa08c728e77548c47676b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_local.py_test_exceptions_propagate_": {"doc_hash": "a1c542e3665a9134b3659bc095a836dd4f44f9c58bdeabb3613de39eabc9d685"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_from_distutils_version_im_test_pickle_locals.assert_b_unrelated_functi": {"doc_hash": "d29185197bbe3b81f45834410eaa1f373e784da7699a1fc3d3436ea25da5990a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_pickle_kwargs_test_pickle_kwargs.assert_my_small_function_": {"doc_hash": "50d36ec08bb83f0b632731759e8709f6d979f1dd1bf078f3aeb954cc138b0bf3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_out_of_band_pickling_test_out_of_band_pickling.assert_np_all_a_a2_": {"doc_hash": "7a2ead6f87dec5bc6fd94352306ecae7df7c9f3e8125c672e36fd0af3b2ef132"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_bad_test_optimize_graph_false.assert_len_keys_2": {"doc_hash": "562709e830cd8ccb44abfcc3fd60671c53c10d10574a59c555c6046003ab7e0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_random_seeds_check_for_pytest.return._FAKE_MODULE_FOR_TEST_in": {"doc_hash": "13a6dc4b37706c5bf2b69de80e03144dbfa0eefa45f00e81acdcab72e7d89eb2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_custom_context_used_python3_posix_test_custom_context_used_python3_posix.try_.finally_.del_sys_modules_FAKE_MOD": {"doc_hash": "e94f05033408ee3c0ed0132519db2e41c70135a5aed0bf976d94639c1dcafd47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_get_context_using_python3_posix_test_get_context_using_python3_posix.None_1.assert_get_context_is_m": {"doc_hash": "936fba02bde24bab2fa022b63170a3d8149418caae5768206cc3f6669d0c5259"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_multiprocessing.py_test_custom_context_ignored_elsewhere_": {"doc_hash": "18837812d77388d8bd2ccb41caf65c098516c198068d24cf2e0b33aaa8f01222"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_itertools_with_deps.return.dsk_k_get_dependencies": {"doc_hash": "451cb3e091a1f6a51285480ce0cdae0ae8946507fc27230ca8d11906d5d2ef57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_test_fuse.None_5": {"doc_hash": "e6b7ac602cd25e98d721c5bc9f3acf3dd93e6c2037130d8a2a9a9aa0ce560065"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse.d_4_test_fuse.None_9": {"doc_hash": "dcc64d4cf2eaf4261081543417285cfbc61a1a16710655b87f03a7c68da37ff8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_keys_test_fuse_keys.None_3": {"doc_hash": "7586c3001052d99543dedf8a3f6fa5c1088a632a6d3674b9ad9c5f29faee6b79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_inline_test_inline.assert_inline_d_a_inl": {"doc_hash": "0a65cb1790408a103ce5ed8d14d63269d0aa949e58a9e635a1d97c9271743c02"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_inline_functions_test_inline_ignores_curries_and_partials.assert_a_not_in_result": {"doc_hash": "a0368c9f556ac63f38e20e035e3bef900210fdd6868f2d19e333ff483f4a94bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_inline_functions_non_hashable_test_inline_functions_non_hashable.assert_b_not_in_result": {"doc_hash": "a6384785b8f91495315713c868e2e75aa31bcfa2943778f7600a9cafd073b572"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_inline_doesnt_shrink_fast_functions_at_top_test_inline_traverses_lists.assert_result_expected": {"doc_hash": "8c403ebe01cf1eb6ed45f6f6fe119b4555964027311cff145b06aa4ce3035a88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_inline_functions_protects_output_keys_test_inline_cull_dependencies.inline_d2_b_depende": {"doc_hash": "2889be12cd932c8c6ed061b763d55438848fb1d2b3400602d6b4451f584fbcb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input_test_fuse_reductions_single_input.d_3._": {"doc_hash": "d22a85a590b8399c4ff7573c612d918da7163761a0edf0b99f9dded118135392"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_12_test_fuse_reductions_single_input.None_22": {"doc_hash": "9231fac71f13aabcd3881d4b6ab6daa36d788cd9b4f5cc1ec8c5dcbad38facd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_23_test_fuse_reductions_single_input.None_27": {"doc_hash": "857ac7797281830dc0381365f80a2c9d954f564b15cd714be59389121e7e3ad8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.expected_9_test_fuse_reductions_single_input.None_34": {"doc_hash": "17810043500540132fe16aa29971333c019eccd0c3d2541c5841237a6c362874"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_35_test_fuse_reductions_single_input.None_37": {"doc_hash": "efd9aa0bce7e0b026e232faf5af070c9be168d2e4369465848ab753f1170c1b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.expected_13_test_fuse_reductions_single_input.None_39": {"doc_hash": "43a07e337f5ad657572f1654706c026c3ae76d4bfe5d3994c2a118857ca70256"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.expected_14_test_fuse_reductions_single_input.None_43": {"doc_hash": "bdda57ad66f4f72ae71fc1f8c3c4003a65fe32bd394d1ab17ad6a05b628268cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.expected_16_test_fuse_reductions_single_input.None_47": {"doc_hash": "70a70bb986dbc357237ac02daf6246da94c13920d8e8a3750524ab8b5be59a00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.expected_18_test_fuse_reductions_single_input.None_50": {"doc_hash": "7b363e65101c988ee5261776a6896528a839c08f2c395cf04e2b321775fa03eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_51_test_fuse_reductions_single_input.None_57": {"doc_hash": "89be61853cfb41b1278fcfde8388a34eb4e809097832c57a1580bd09bdd20cb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.d_22_test_fuse_reductions_single_input.expected_27.with_deps_": {"doc_hash": "ca6cd36000bcc9030079d2a5d0553677de7185e37b3d14e5d1aab0353cf67535"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_66_test_fuse_reductions_single_input.d_29._": {"doc_hash": "38bf72271a9e6cb8e09158cb2a5d1876a2556aed80139f6e4df0bd4117ed52cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_single_input.None_72_test_fuse_reductions_single_input.None_73": {"doc_hash": "e46a7921d70cb52fc729beb6aa066563d958be143698a39ad04576f404c6b385"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_stressed_test_fuse_stressed.d._": {"doc_hash": "a1d397e9ab1b94dd0ab83ac9b1eefbdd43d40dd8d62e3496cfecbfe8927b922f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_stressed.keys_test_fuse_stressed.assert_rv_with_deps_rv": {"doc_hash": "30e4606c0d472073715654c60134400d529f92879edc25cc486fb46a2940e5a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_multiple_input_test_fuse_reductions_multiple_input.None_11": {"doc_hash": "e03d2cd4670e0ee632196c8e9001c76371b4965ec087aca6c5fb17c0b5667563"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_reductions_multiple_input.None_12_test_fuse_reductions_multiple_input.None_17": {"doc_hash": "cd5014ebf5c1a4448c5e7b3fe9ab28b97e4914daaa55c6be82f3256716285b7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_func_with_kwargs_test_SubgraphCallable.assert_f2_1_2_f_1_2": {"doc_hash": "0ddb994feca97af99561a199e5636c43e27b3c4f1669dad05036b7d412b5f231"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_subgraphs_test_fuse_subgraphs.sols._": {"doc_hash": "05d3e698058633d1bf6c95b3e9fc39355d0642a4f18549167d9b105dea342128"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_subgraphs.for_inkeys_in_itertools_p_test_fuse_subgraphs.None_4": {"doc_hash": "5106bd53a1fa3df9379227f6843e1666fc97af838878eade5b253b8a7e390c2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fuse_subgraphs_linear_chains_of_duplicate_deps_test_fuse_subgraphs_linear_chains_of_duplicate_deps.assert_res_sol": {"doc_hash": "d5376539817e77a48d29526f14c723e6ed85380c0ed5d4a00bb1149ec5e374cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_dont_fuse_numpy_arrays_test_fuse_config.with_dask_config_set_op.assert_fuse_d_b_depen": {"doc_hash": "787cfac79e92ba86f2a57a7d3d7dab553cf5154c8b5209b0ab22f0a3e58a50ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_optimization.py_test_fused_keys_max_length_": {"doc_hash": "b8c6e91999e7650c1627db571b0f7a378776ab36609b417264d64a21cb345ee5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_pytest_test_ordering_keeps_groups_together.assert_abs_o_a_1_o_": {"doc_hash": "74d80f3486ea3e0320ae2f19468e16ba21ea6f2886e9a124f2f81d0ead1ae732"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_avoid_broker_nodes_test_avoid_broker_nodes.None_3": {"doc_hash": "aa0ed2b9ded9667d53bc4a2fbfda2d97f26a90a2032f56655154b0b670a4b0dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_base_of_reduce_preferred_test_base_of_reduce_preferred.assert_o_b_1_6": {"doc_hash": "33c13914f972b513bd778e394b9943febd513ef97dc822c9f1b29d5121739a94"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_avoid_upwards_branching_test_avoid_upwards_branching.assert_o_b_1_o_c_": {"doc_hash": "3d0a91bf8375de60fd6ea8fabd992a40976f3ad50472d1ccfb3a8bf4ac70f4a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_avoid_upwards_branching_complex_test_avoid_upwards_branching_complex.assert_abs_o_d_2_o_": {"doc_hash": "bd549ced7944723534bc73ba7a89b7a28440070517611995b15f7be1aafaa5a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_deep_bases_win_over_dependents_test_deep_bases_win_over_dependents.assert_o_b_o_c_": {"doc_hash": "357ed23880c3713eda113fe37ae2b5dd12d03038513ed03782a127ae2cef1eff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_prefer_deep_test_prefer_deep.assert_o_b_o_d_": {"doc_hash": "c7ad0109d75fa6f509c072ef0d8b67f58ab415192600b67874a5098ec897db36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_stacklimit_test_order_doesnt_fail_on_mixed_type_keys.order_x_inc_1_y": {"doc_hash": "0f8f4756895c2cbbdbe463657898654c7c8b58cbcf18866d39845451b24279ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_gh_3055_test_gh_3055._operate_in_order": {"doc_hash": "3545d5e61051bb05980d55de6c547ee74856d44d47f4bdfff8aedd9346272670"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_type_comparisions_ok_test_prefer_short_dependents.assert_o_e_o_b_": {"doc_hash": "cb8c62a22955fffad9075f1f769129b37cf1a8b767af612f17846f969e413373"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_run_smaller_sections_test_run_smaller_sections.assert_log_expected": {"doc_hash": "c92bc343046f8a3f52f5dca03198d56604f15d96be41643ad3b737132dfa1568"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_local_parents_of_reduction_test_local_parents_of_reduction.assert_log_expected": {"doc_hash": "1ff07b1fcd1845236351889c62fb43e6931aae4c45151cf3dae470b2c7acbe5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_nearest_neighbor_test_nearest_neighbor.assert_o_min_b1_b2_b3_": {"doc_hash": "f28e831777eaf81d9dc546c5dba72407e436d4718b82dc62e88723996e86f0f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_string_ordering_test_string_ordering_dependents.assert_o_b_0_a_": {"doc_hash": "14428d54e5b0b8871e6c159561540a2dd5f7535c882023aafb81268fbdf0a68a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_prefer_short_narrow_test_prefer_short_narrow.assert_o_c_1_o_c_": {"doc_hash": "1f4585908698272f5a60dcabe38e67d43c4e43d31fadc657d3dd5fb954a38853"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_prefer_short_ancestor_test_prefer_short_ancestor.assert_o_c_1_o_a_": {"doc_hash": "ddc9414387ac7e1a9251187b61865d1c179060b046fa88e468a96e88f5829599"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_map_overlap_test_map_overlap.assert_o_b_1_o_e_": {"doc_hash": "328cce5d782f1aece71f069c4ab306e3a703ad10c593e9c63295131a59547eec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_use_structure_not_keys_test_use_structure_not_keys.if_Bs_0_3_.else_.assert_Bs_1_3_5_7_": {"doc_hash": "bbe9e1c19779e8cfbecd8ca4dd22d828e04b04b51bb03b5bdfa3510924d51f9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_dont_run_all_dependents_too_early_test_dont_run_all_dependents_too_early.assert_expected_actual": {"doc_hash": "38cbcaaa1b57fe78c12817a745ee77197b3c0c30317b9e97553c4ee3ae494668"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_many_branches_use_ndependencies_test_many_branches_use_ndependencies.assert_o_c_1_o_a_": {"doc_hash": "0217ed553afd3aa961694ec847a81aace7ca27e3157534275622e07fc9baca37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_order_cycle_test_order_empty.assert_order_": {"doc_hash": "a1cbc8bd129468e380e89cacd583f70903b738cfcc1255c9c1f90f33261fedbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_switching_dependents_test_switching_dependents.assert_o_a_5_o_e_": {"doc_hash": "48cd0f2e5827210334c2957a7b0f5f68f178a3a2ece2b9d2d2e2cd440f78b0f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_order.py_test_order_with_equal_dependents_": {"doc_hash": "6b441632eb28b5ff7c5f13e621c25fc555758d0402b101a537019b5bf3892852"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_from_dask_rewrite_import__test_args.assert_args_1_2_3_": {"doc_hash": "793f057642c4988fdce5726a7a0be073784fe51f742b54bfc47be76eab16ae5b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_test_traverser_test_traverser.assert_list_t2_add_": {"doc_hash": "9a16791aec3529c77b68e7c0ef1bf392576e71892fc3b74027fdf8627e1baa8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_vars_rule6.RewriteRule_list_x_": {"doc_hash": "ec5290f4e0ad43bcf8207b77d9e80872d539668777c2deb79a8fb5429e08e187"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_test_RewriteRule_test_RewriteRule.assert_rule5__varlist_": {"doc_hash": "019245b1f0ce4ce32e4931de5b492bbd39aef3b23fb6540367483bd8bf7496fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_test_RewriteRuleSubs_test_RuleSet.assert_rs_rules_rules": {"doc_hash": "96a959fc9181f2a966f7ac2e298584c40ef509b0891218f5d42849d9b6305941"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_test_matches_test_matches.assert_len_matches_0": {"doc_hash": "0431cd8a176d77cb942e79d27990c36544d7b54448563806b099b73a93642d31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_rewrite.py_test_rewrite_": {"doc_hash": "9bcd6b237394e1128f2f42621bc9f034851bae3b24495718da7fc8ec34bbf678"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_sys_test_numpy_0_strided.assert_sizeof_x_8": {"doc_hash": "fbe7b8f114e7b58ac3f767e2d53ed4b386194c8b7da70d130e019a278a1559ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_pandas_test_pandas.None_6": {"doc_hash": "18c5b26bd4a2ffb28903edb86d0d92166980b4d25fb280d4e3ff23f95bc3d7d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_pandas_multiindex_test_pandas_repeated_column.assert_sizeof_df_x_x": {"doc_hash": "64ad1e4680fea9842fb8ffa8c6f49952400dfbdff83ec311561376411554f8bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_sparse_matrix_test_sparse_matrix.assert_sizeof_sp_tolil_": {"doc_hash": "4d900f2face5b92dd585b34389ea7561b4b73ba96b79d1df3815559b338c3844"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_serires_object_dtype_test_dataframe_object_dtype.assert_sizeof_s_100000": {"doc_hash": "cb462f15d7804fae66440e384790f464549727c670edc61480e4dc1565449580"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_empty_test_empty.assert_sizeof_empty_index": {"doc_hash": "031586606cbeac6806d39b943872ded2573d62d91c7ce9fb561571f190ca4d1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_sizeof.py_test_pyarrow_table_": {"doc_hash": "3da3ecaa572048726db1908f985ee44825803d2d5e17f4f32247cf79ceabcfb4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_system.py_builtins_": {"doc_hash": "4a35e98eff2430bb4986d84652c10caf2c9e3f4b2bcf759b338e1dc9353de94b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_threaded.py_os_test_pool_kwarg.with_ThreadPool_3_as_poo.assert_get_dsk_x_pool": {"doc_hash": "221ae6bad805abb13b36cc9a9600c69c5681cf0c1f78f764a04ec9176368dd59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_threaded.py_test_threaded_within_thread_test_threaded_within_thread.while_threading_active_co.assert_time_start_5": {"doc_hash": "89c5984a535edab4f5b62d5806b814dada74fd53998578faf58a320b50c9989f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_threaded.py_test_dont_spawn_too_many_threads_test_thread_safety.assert_L_1_20": {"doc_hash": "819b79504d3b6cad4985c25159c1fdd88cc40b34cc0b2f00e24a67651016de9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_threaded.py_test_interrupt_": {"doc_hash": "fc8f8ede73f187afe7d9be9f2a66c4954ece1a525d09d5d7e5655110347b907c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_datetime_from_dask_highlevelgraph_": {"doc_hash": "4b01d360e756c79aa8af0daf16a2d0c9f4a7e3072f8845b3f0eb24f1b07a51bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_getargspec_test_getargspec.assert_getargspec_MyType_": {"doc_hash": "0b13e05345ea6a1f4b5dbb3b846459c76f9ef8ac6c81cbddc2ba7124fd05606f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_takes_multiple_arguments_test_takes_multiple_arguments.None_7": {"doc_hash": "96ecf9940332c4114b0823785141de2773719d8f47c91c8f2339aefd30a503de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_dispatch_test_dispatch.assert_foo___doc___f__": {"doc_hash": "b79f8b9dbb78399c96a5e14b4d8d8d4906d73e6e27886135a787cf247f935de6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_dispatch_kwargs_test_dispatch_variadic_on_first_argument.assert_foo_1_0_2_0_": {"doc_hash": "372df096fb5d9a0cf281fe65322a9c8bb875bfe4f454d2c2e292d51383f1393b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_dispatch_lazy_test_dispatch_lazy.assert_foo_1_1": {"doc_hash": "d13f5cee190c52e60cb16a945f7653cef960571f06688812af9fb805a85be44d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_random_state_data_test_random_state_data.None_1.assert_s1_s2_all_": {"doc_hash": "3896dcfdac50b0e28e0259569b156f3ec52e949e6b5e9b69f8f4029bc6973e75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_memory_repr_test_method_caller.assert_count_in_repr_me": {"doc_hash": "15ee5150247788971c29eefd3eea1d1d29b7f1da3cdc4c5987f8422ecce5b8f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_skip_doctest_test_skip_doctest.assert_res_expected": {"doc_hash": "cdea1416d156e484176a66ace470b16df0c1847c5a0f3dd73d8d439680492f9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_extra_titles_test_asciitable.assert_res_": {"doc_hash": "357060ca9378cd58270706e7084cbec93570a06f56010140c6947953d25f4203"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_SerializableLock_test_SerializableLock.None_4.for_y_in_b_b2_b3_.with_y_.with_x_.pass": {"doc_hash": "058416eabc107817d87b00ea18b72020eddb178ee612577289d8a9e03af22fbc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_SerializableLock_name_collision_test_funcname_numpy_vectorize.None_1": {"doc_hash": "3fa9477cc13d03928dcae575f0b64433e2c30cc391d58e27ded3c0d9fea63b07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_ndeepmap_test_ndeepmap.assert_ndeepmap_3_inc_L": {"doc_hash": "89e502df51e93986205c785f4c8099b503fa04799365d8f77725689c6b55bd9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_ensure_dict_test_has_keyword.None_4": {"doc_hash": "2588a0c9b0153efec3f86350ed6dde7e3850b5b3e0666166ebc419e2eced4db3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_derived_from_test_derived_from.assert_extra_docstring": {"doc_hash": "7e7adc5dcef1a0684aa47dab5a4ca7e7d7dc154080d75305db24d1baaf51e46e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_derived_from_func_test_derived_from_dask_dataframe.assert_dask_in_axis_arg": {"doc_hash": "301a667886d05b071692404b7fbaea4b157aa3a422dd0a58efa7d0ac29edb332"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_parse_bytes_test_parse_bytes.assert_parse_bytes_5GB_": {"doc_hash": "1d95c67e70d6e5d3d3b5307ab04fc1ad80dfc35c2a99a9d1f5ab9350c480bcf5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_parse_timedelta_test_parse_timedelta.assert_parse_timedelta_1_": {"doc_hash": "28cf7c3e2842ab62a28e515d7f868e1c16c2bacea833a088ff95d843f8f6114f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/tests/test_utils.py_test_is_arraylike_": {"doc_hash": "ffa5ef06e1cc4a2398f3c83d6e04a1c94781bd000d18137c83318af730964a8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/threaded.py___pack_exception.return.e_sys_exc_info_2_": {"doc_hash": "b19165dc49de18592e1e175ceaf3f8968a379a0fe8d05513b113930fdaefc978"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/threaded.py_get_": {"doc_hash": "d566dd59a33a35f5eeccc4bd2f548e187069011d668660d1e06d9b10ac4fcfa0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_from_datetime_import_time_apply.if_kwargs_.else_.return.func_args_": {"doc_hash": "7ccb748594d893fcac0f7c3cafa5762ffae02b67f9d6b2ab047542df09bcf588"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_deepmap_deepmap.if_isinstance_seqs_0_l.else_.return.func_seqs_": {"doc_hash": "b40aade22bd829b2f41d4c78956aacf7b6e702e899f264ac8760c4cdf0330d70"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_homogeneous_deepmap_ndeepmap.if_n_1_.else_.return.func_seq_": {"doc_hash": "ed94fd9ad74f659145043536ef7e3351ba17015a69d1166e8d71ca17df13f5cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_ignoring_IndexCallable.__getitem__.return.self_fn_key_": {"doc_hash": "db82dabb422c44ce90c8d21919ab3e4baa1880f664097f78db833eaf26f342f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_filetexts_concrete.return.seq": {"doc_hash": "89e81e098de46fb2d81aba7aedcdaeb2b61afb576e26dedf1fac7338ae05216e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_pseudorandom_pseudorandom.return.out": {"doc_hash": "cf58f910afa1198efe0d3b0471a8470e3058510743e546b38ba8cae40735f746"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_random_state_data_random_state_data.return.l": {"doc_hash": "694d05aaab692e72175f51aa4074caabb6c17792d3f16b61cb0289aabe296159"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_is_integer_getargspec.if_isinstance_func_type_.else_.return.inspect_getfullargspec_fu": {"doc_hash": "c4c204703a9cbf802bfa88e0def4240135bd9b19490674734bb369b7ce1ce519"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_takes_multiple_arguments_takes_multiple_arguments.return.len_spec_args_ndefault": {"doc_hash": "228771ddddb5ec810d0214f0cd98bd72741195ef74a23a265ccf808986261b4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_get_named_args_Dispatch.register_lazy.return.wrapper_func_if_func_is_": {"doc_hash": "d63b4582829ba322677bcd9849e546cc78113b93cb928c53c95463d7abd90aa7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_Dispatch.dispatch_Dispatch.__doc__.try_.except_TypeError_.return._Single_Dispatch_for_s_": {"doc_hash": "972cfa4cc097459280d237c15c5bcba7ed753c531c66c77c5074bf520d872404"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_ensure_not_exists_skip_doctest.return._n_join__skip_doctest_": {"doc_hash": "909143ffbc94d024b44789ee576e9bfe43d4c82037d996b740ee5a5a4d53b8ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_extra_titles_extra_titles.return._n_join_lines_": {"doc_hash": "972ef85d5459c395ac7c2b180d23d3e4f6aa59ea41f1f1be0fb5d8fcdf6b16a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_ignore_warning_ignore_warning.return.doc": {"doc_hash": "aedd9079ec8717ecec74e6cef9a5235e617420e7de837e26be4cceb4570a111d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_unsupported_arguments_unsupported_arguments.return._n_join_lines_": {"doc_hash": "a713ab6052573ba7444f3cf4ef050c58de687435bb2e2008824be8d117e6b32c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py__derived_from__derived_from.return.doc": {"doc_hash": "c1a3fb03e0b126ef8e883f7a41090295cc19f81ef7ebc6421c69916f38ccd6db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_derived_from_derived_from._Decorator_to_attach_or": {"doc_hash": "ef70b839300a0b3a60a7daff1588c70441dc5bc335d24fa49a3dd4f6eab1befe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_derived_from.wrapper_derived_from.return.wrapper": {"doc_hash": "2cdafd2cb269bc71080f6d01e9e7a7a85c8b7a0056451be8e7aca33808a5fdfb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_funcname_funcname.try_.except_AttributeError_.return.str_func_50_": {"doc_hash": "5b4dadc7ec906ece6a05575a0fed3646430cb83a023de3ab2e8e74d99201348c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_typename_memory_repr.for_x_in_bytes_KB_.num_1024_0": {"doc_hash": "01d899da7fea7afc6f5244466bab59c5d9538e7cb4fd702af6ad81b86f46e299"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_asciitable_asciitable.return._n_join_bar_header_b": {"doc_hash": "b41737cfcd53ca1ee9d34fcde249575665374a69ea7c04689ca15f9cafedb63c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_put_lines_methodcaller.__repr__.__str__": {"doc_hash": "d758c2cd8f5c43bec44aa0a09820f347636d038670d2a4f1e82e3d4ad1bb7821"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_itemgetter_M.MethodCache_": {"doc_hash": "b1a631c77d27a83819926735f65eef7061f8582ef01b71f7d26a25bd9833de1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_SerializableLock_SerializableLock.__repr__.__str__": {"doc_hash": "340af8ec3bf73347d85fcb1fb902034190729bbf05971dbd533499a7290cad05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_get_scheduler_lock_ensure_dict.return.dict_d_": {"doc_hash": "da2c96eb0913974760cd9e47b68a3311779f63b375fa671a50b9a1de441d466f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_OperatorMethodMixin_OperatorMethodMixin._get_binary_operator.raise_NotImplementedError": {"doc_hash": "4d8d170dc440f5eeea3bf71e52430913fa21fb670af4822ca17905c8b8e05ae4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_partial_by_order_is_arraylike.return.bool_": {"doc_hash": "48127eff22a2edd2ba94a98591fab04fd21e3aed05289eccaebf9d58f4a74200"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_is_dataframe_like_is_index_like.return._": {"doc_hash": "f541513acd728fe6903bcf6e6ed2c28f70e453fcc134d0ae8a17c38fbdc648ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_natural_sort_key_factors.return.set_functools_reduce_list": {"doc_hash": "143f3d82630ca6abc4e41e024f9ab4d69c5bef00ffef9c0f04a375da57f4f5bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_parse_bytes_parse_bytes.return.int_result_": {"doc_hash": "8955fc71f421ea32c4553a3af883010ad62800649e849b2ef9905dc36c46b297"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_byte_sizes_byte_sizes_update_k_1_": {"doc_hash": "70f56a9a3fbba4e02e54e6c4bd7de366571ecba1bb793d9c17427f6783d1c0af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_format_time_format_time.return._2f_us_n_1e6_": {"doc_hash": "d5ee79c142d28c294ddefd198601407bbc1d8a6c6b5f354ceab890d54a1c4d24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_format_bytes_format_bytes.return._d_B_n": {"doc_hash": "cc9acf11ec666fba4399d7e0138aeec1dbe77650ee82f1399fad239e2f4cabaa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_timedelta_sizes_timedelta_sizes_update_k": {"doc_hash": "9ccd9fb8113a247987c7a7f15451f56b2f88519af1d720e3ea0bb353a46e3026"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_parse_timedelta_parse_timedelta.return.result": {"doc_hash": "247037d9f862e90a54515cfe6059c71ae6f0e4d757ce5d25f06dee4b7c338d28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_has_keyword_hex_pattern.re_compile_a_f_": {"doc_hash": "7e7832b24b3fa8e8d43e70f5599e93f6c59400feeb8eacf439a13885708bbf9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils.py_key_split_": {"doc_hash": "c3fa85d026ea8b8ac114d70f27efefe8e0a09f6007c130a1a0bf9b369e4424a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils_test.py_inc_GetFunctionTestMixin.test_get_with_list.assert_self_get_d_z_": {"doc_hash": "d70b59cc6df5400ad016f882c4a84c4cf4151193784dd71f8f50980cace859e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils_test.py_GetFunctionTestMixin.test_get_with_list_top_level_GetFunctionTestMixin.test_get_with_list_top_level.assert_self_get_d_f_": {"doc_hash": "4b8267e06205acf9fa19d3ad66764f4edbf0957bd997d15d3198ec11c8815daf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/utils_test.py_GetFunctionTestMixin.test_get_with_nested_list_": {"doc_hash": "46850f6363d6b7c2a844636a382a28baa4f6618b2708c10785e5091f0f5eae6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/conf.py__coding_utf_8___html_show_sphinx_True": {"doc_hash": "8433e6375eefa768ae2f054ad84f8ef22fd949145fb97286594a8c88e6af5d3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/conf.py_htmlhelp_basename__Options_for_sphinx_e": {"doc_hash": "997b1f74b3b178998c0dae642cbba0181ed37d144274c44e139a90988ff79dcb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/conf.py_intersphinx_mapping_": {"doc_hash": "8f1d56a232afae03c7bcd7ea977f96d8319c3866ab9bbb26991a983529ce5c5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/ext/dask_config_sphinx_ext.py_requests_setup.return._": {"doc_hash": "eb97949ddf9a050a8d1bcb0defc6351a0ff1f44e0953c7845b49e65a54abe608"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/ext/dask_config_sphinx_ext.py_dask_config_to_html_": {"doc_hash": "509e958cf13c4e0d1583b525a6a9b2f6cfd6fa7df243693ee65cb497e0de8dae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_from_time_import_time_trivial.return.d_x_height_1_i_": {"doc_hash": "76b23249fe21d35fae6224423520b62e96bd3a9d7e3a214366e727c967517c60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_crosstalk_crosstalk.return.d_x_height_1_i_": {"doc_hash": "1468b1dd75757d53aee5f40159e7bc1115c563e58a6b550bdad1121d4539b390"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_dense_": {"doc_hash": "9a49bd1c401fee7228ad28c95dfb7779b9c8793d0f41a7962891fc96001fbc5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/setup.py__usr_bin_env_python_": {"doc_hash": "369edf40169ec3d8ef54838a4dfe257121d7b1a0907856fb05e3cc833eed5561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py__Version_0_16_get_root.return.root": {"doc_hash": "6037919622d97781b7d59e2bfc6c232020081792e1bc8d43b3547fcb6339e15b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_config_from_root_get_config_from_root.return.cfg": {"doc_hash": "f94a68557f2fa0e531bce6e838f5874c06260f952089627ebf62e00848d1793f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_NotThisMethod_register_vcs_handler.return.decorate": {"doc_hash": "73daca7e59adb07412c31abb19c5afdd81cda94159e7b1d969a036c64e8e4be5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_run_command_run_command.return.stdout": {"doc_hash": "2bc574b43d1a6ce36eba13eb9658c3774bc0bcc2a8ae8e6d55a7a8dd557d0802"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_get_keywords_git_get_keywords.return.keywords": {"doc_hash": "2d5fa57e285364d55ac036c1052c8631ef01643581f769c18cb1ad2b1ac05f52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_versions_from_keywords_git_versions_from_keywords.return._version_0_unknown_": {"doc_hash": "a463566e2a9177fa93b410343901fab1ca2bd40e8f2b9fcd85457e0cfefed307"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces": {"doc_hash": "f1e6ef95c42f54a2b585f9ba794b72144071f5992ec8a611aebe089457b2ee48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_vcs_install_do_vcs_install.run_command_GITS_add_": {"doc_hash": "83a3c9611a29a0a87630fe19289e9ccc134b95409d55a48807b517015a093642"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_versions_from_parentdir_versions_from_parentdir.return._version_dirname_len_p": {"doc_hash": "019abc54e0c5d0037fdc73017eb449f4f36b174fcd53f2ddec66612636e3488b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_SHORT_VERSION_PY_versions_from_file.return.json_loads_mo_group_1_": {"doc_hash": "160cb5f3677da881f0431dd1430b370bd03338314effaa5a2d1a3a962b6b88bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_write_to_version_file_plus_or_dot.return._": {"doc_hash": "2606d956a2836928821f54af5066ae269853eb928d94e338d6e665ef5fc27c5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_render_pep440_pre.return.rendered": {"doc_hash": "62f8dd7acee0867457d7b07d3e6edcf3260a2a189611ef33381ac724528d4433"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_post_render_pep440_post.return.rendered": {"doc_hash": "118807a5c2a97d74d8fe5f796e9018ac18aadcc9b3182b6181ecd25e8dcbd0d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_old_render_pep440_old.return.rendered": {"doc_hash": "6c6b4eb402371d591eeb0abb50ada6698ebe88b10543f867cefca40fd086f508"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_render_git_describe.return.rendered": {"doc_hash": "a3d9b39392875e0334af8c64b46fe88c38f8d51c8b168839e4ae228db30b0daf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_long_render_git_describe_long.return.rendered": {"doc_hash": "cf56b90f4c7b7ac99479cdeafeebaf306a0ab42713bb536dffdfe85f0a8b1c00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_VersioneerBadRootError._The_project_root_direc": {"doc_hash": "2b30b66ceb0b36870dcb6210c247df913c36eacc6b4774a674a3d9084ef0138f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_versions_get_versions.return._version_0_unknown_": {"doc_hash": "93f7404067172b3e768cee6e5436263a375ba8d50909b3d9109e889374995ce8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_version_get_cmdclass.from_distutils_core_impor": {"doc_hash": "b46b8ebb3921cc678793c9ac073ce2ccfa012b4f230b5a81c900c42f0a97cf9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_version_get_cmdclass.cmd_version.run.if_vers_error_.print_error_s_vers": {"doc_hash": "690b93737766ad4fb1256933abef4a8b7507e8aa3ff75a426d910969a64d4b3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_version_cmd_ver_get_cmdclass.if_setuptools_in_sys_mo.else_.from_distutils_command_bu": {"doc_hash": "d2515232f0cacf396d1c894d38fa2cf264319056056cc5e8fd23bfc1b8d8028d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_build_py_get_cmdclass.cmd_build_py.run.if_cfg_versionfile_build_.write_to_version_file_tar": {"doc_hash": "a3e61fb1c123a544a0866cae1590acbd50ccfa6687b2bde1c15463c1eb266a0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_build_py_cmd_bu_get_cmdclass.None_3.else_.from_distutils_command_sd": {"doc_hash": "b1065450584f405e4c58ab87b443417917886b3a0bb0edbf1ef2bdf1b52de9f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_sdist_get_cmdclass.return.cmds": {"doc_hash": "8282207f276c680678f0dbfda07ca1696ba9602de8b75e07d62c92859164fa4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_CONFIG_ERROR_INIT_PY_SNIPPET._": {"doc_hash": "aadd871f92dd45b60bf6a6dfe7fc15fa89a744ae887e426fcf312b1aa2557082"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_setup_do_setup.return.0": {"doc_hash": "0a326019dfc6edd9496f7fd3ba1b5d5ce90eb86e158880be5cc484b65f2e547b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_scan_setup_py_": {"doc_hash": "03a81199bd59df0696753ac46016a408d4cad2f45a8a321da47cfe1b9f0f87c3"}}, "docstore/data": {"/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/conftest.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/conftest.py_pytest_", "embedding": null, "metadata": {"file_path": "conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["imports", "pytest_addoption", "pytest_runtest_setup"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\n# The doctests in these files fail due to either:\n# - Non-required dependencies not being installed\n# - Imported doctests due to pulling the docstrings from other packages\n# (e.g. `numpy`). No need to run these doctests.\ncollect_ignore = [\n \"dask/bytes/hdfs3.py\",\n \"dask/bytes/pyarrow.py\",\n \"dask/bytes/s3.py\",\n \"dask/array/ghost.py\",\n \"dask/array/fft.py\",\n \"dask/dataframe/io/io.py\",\n \"dask/dataframe/io/parquet/arrow.py\",\n \"dask/dot.py\",\n]\n\n\ndef pytest_addoption(parser):\n parser.addoption(\"--runslow\", action=\"store_true\", help=\"run slow tests\")\n\n\ndef pytest_runtest_setup(item):\n if \"slow\" in item.keywords and not item.config.getoption(\"--runslow\"):\n pytest.skip(\"need --runslow option to run\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/__init__.py__", "embedding": null, "metadata": {"file_path": "dask/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports"], "tokens": 102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from . import config, datasets\nfrom .core import istask\nfrom .local import get_sync as get\n\ntry:\n from .delayed import delayed\nexcept ImportError:\n pass\ntry:\n from .base import visualize, compute, persist, optimize, is_dask_collection\nexcept ImportError:\n pass\n\nfrom ._version import get_versions\n\nversions = get_versions()\n__version__ = versions[\"version\"]\n__git_revision__ = versions[\"full-revisionid\"]\ndel get_versions, versions", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py__This_file_helps_to_comp_register_vcs_handler.return.decorate": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py__This_file_helps_to_comp_register_vcs_handler.return.decorate", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 67, "span_ids": ["VersioneerConfig", "impl", "NotThisMethod", "get_keywords", "register_vcs_handler", "docstring", "get_config"], "tokens": 482}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# This file helps to compute a version number in source trees obtained from\n# git-archive tarball (such as those provided by githubs download-from-tag\n# feature). Distribution tarballs (built by setup.py sdist) and build\n# directories (produced by setup.py build) will contain a much shorter file\n# that just contains the computed version number.\n\n# This file is released into the public domain. Generated by\n# versioneer-0.16 (https://github.com/warner/python-versioneer)\n\n\"\"\"Git implementation of _version.py.\"\"\"\n\nimport errno\nimport os\nimport re\nimport subprocess\nimport sys\n\n\ndef get_keywords():\n \"\"\"Get the keywords needed to look up the version information.\"\"\"\n # these strings will be replaced by git during git-archive.\n # setup.py/versioneer.py will grep for the variable names, so they must\n # each be defined on a line of their own. _version.py will just call\n # get_keywords().\n git_refnames = \"$Format:%d$\"\n git_full = \"$Format:%H$\"\n keywords = {\"refnames\": git_refnames, \"full\": git_full}\n return keywords\n\n\nclass VersioneerConfig:\n \"\"\"Container for Versioneer configuration parameters.\"\"\"\n\n\ndef get_config():\n \"\"\"Create, populate and return the VersioneerConfig() object.\"\"\"\n # these strings are filled in when 'setup.py versioneer' creates\n # _version.py\n cfg = VersioneerConfig()\n cfg.VCS = \"git\"\n cfg.style = \"pep440\"\n cfg.tag_prefix = \"\"\n cfg.parentdir_prefix = \"dask-\"\n cfg.versionfile_source = \"dask/_version.py\"\n cfg.verbose = False\n return cfg\n\n\nclass NotThisMethod(Exception):\n \"\"\"Exception raised if a method is not valid for the current scenario.\"\"\"\n\n\nLONG_VERSION_PY = {}\nHANDLERS = {}\n\n\ndef register_vcs_handler(vcs, method): # decorator\n \"\"\"Decorator to mark a method as the handler for a particular VCS.\"\"\"\n\n def decorate(f):\n \"\"\"Store f in HANDLERS[vcs][method].\"\"\"\n if vcs not in HANDLERS:\n HANDLERS[vcs] = {}\n HANDLERS[vcs][method] = f\n return f\n\n return decorate", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_run_command_run_command.return.stdout": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_run_command_run_command.return.stdout", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 102, "span_ids": ["run_command"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):\n \"\"\"Call the given command(s).\"\"\"\n assert isinstance(commands, list)\n p = None\n for c in commands:\n try:\n dispcmd = str([c] + args)\n # remember shell=False, so use git.cmd on windows, not just git\n p = subprocess.Popen(\n [c] + args,\n cwd=cwd,\n stdout=subprocess.PIPE,\n stderr=(subprocess.PIPE if hide_stderr else None),\n )\n break\n except EnvironmentError:\n e = sys.exc_info()[1]\n if e.errno == errno.ENOENT:\n continue\n if verbose:\n print(\"unable to run %s\" % dispcmd)\n print(e)\n return None\n else:\n if verbose:\n print(\"unable to find command, tried %s\" % (commands,))\n return None\n stdout = p.communicate()[0].strip().decode()\n if p.returncode != 0:\n if verbose:\n print(\"unable to run %s (error)\" % dispcmd)\n return None\n return stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_versions_from_parentdir_versions_from_parentdir.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_versions_from_parentdir_versions_from_parentdir.return._", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 124, "span_ids": ["versions_from_parentdir"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def versions_from_parentdir(parentdir_prefix, root, verbose):\n \"\"\"Try to determine the version from the parent directory name.\n\n Source tarballs conventionally unpack into a directory that includes\n both the project name and a version string.\n \"\"\"\n dirname = os.path.basename(root)\n if not dirname.startswith(parentdir_prefix):\n if verbose:\n print(\n \"guessing rootdir is '%s', but '%s' doesn't start with \"\n \"prefix '%s'\" % (root, dirname, parentdir_prefix)\n )\n raise NotThisMethod(\"rootdir doesn't start with parentdir_prefix\")\n return {\n \"version\": dirname[len(parentdir_prefix) :],\n \"full-revisionid\": None,\n \"dirty\": False,\n \"error\": None,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_get_keywords_git_get_keywords.return.keywords": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_get_keywords_git_get_keywords.return.keywords", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 127, "end_line": 149, "span_ids": ["git_get_keywords"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"get_keywords\")\ndef git_get_keywords(versionfile_abs):\n \"\"\"Extract version information from the given file.\"\"\"\n # the code embedded in _version.py can just fetch the value of these\n # keywords. When used from setup.py, we don't want to import _version.py,\n # so we do it with a regexp instead. This function is not used from\n # _version.py.\n keywords = {}\n try:\n f = open(versionfile_abs, \"r\")\n for line in f.readlines():\n if line.strip().startswith(\"git_refnames =\"):\n mo = re.search(r'=\\s*\"(.*)\"', line)\n if mo:\n keywords[\"refnames\"] = mo.group(1)\n if line.strip().startswith(\"git_full =\"):\n mo = re.search(r'=\\s*\"(.*)\"', line)\n if mo:\n keywords[\"full\"] = mo.group(1)\n f.close()\n except EnvironmentError:\n pass\n return keywords", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_versions_from_keywords_git_versions_from_keywords.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_versions_from_keywords_git_versions_from_keywords.return._", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 152, "end_line": 200, "span_ids": ["git_versions_from_keywords"], "tokens": 567}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"keywords\")\ndef git_versions_from_keywords(keywords, tag_prefix, verbose):\n \"\"\"Get version information from git keywords.\"\"\"\n if not keywords:\n raise NotThisMethod(\"no keywords at all, weird\")\n refnames = keywords[\"refnames\"].strip()\n if refnames.startswith(\"$Format\"):\n if verbose:\n print(\"keywords are unexpanded, not using\")\n raise NotThisMethod(\"unexpanded keywords, not a git-archive tarball\")\n refs = set([r.strip() for r in refnames.strip(\"()\").split(\",\")])\n # starting in git-1.8.3, tags are listed as \"tag: foo-1.0\" instead of\n # just \"foo-1.0\". If we see a \"tag: \" prefix, prefer those.\n TAG = \"tag: \"\n tags = set([r[len(TAG) :] for r in refs if r.startswith(TAG)])\n if not tags:\n # Either we're using git < 1.8.3, or there really are no tags. We use\n # a heuristic: assume all version tags have a digit. The old git %d\n # expansion behaves like git log --decorate=short and strips out the\n # refs/heads/ and refs/tags/ prefixes that would let us distinguish\n # between branches and tags. By ignoring refnames without digits, we\n # filter out many common branch names like \"release\" and\n # \"stabilization\", as well as \"HEAD\" and \"master\".\n tags = set([r for r in refs if re.search(r\"\\d\", r)])\n if verbose:\n print(\"discarding '%s', no digits\" % \",\".join(refs - tags))\n if verbose:\n print(\"likely tags: %s\" % \",\".join(sorted(tags)))\n for ref in sorted(tags):\n # sorting will prefer e.g. \"2.0\" over \"2.0rc1\"\n if ref.startswith(tag_prefix):\n r = ref[len(tag_prefix) :]\n if verbose:\n print(\"picking %s\" % r)\n return {\n \"version\": r,\n \"full-revisionid\": keywords[\"full\"].strip(),\n \"dirty\": False,\n \"error\": None,\n }\n # no suitable tags, so version is \"0+unknown\", but full hex is still there\n if verbose:\n print(\"no suitable tags, using unknown + full revision id\")\n return {\n \"version\": \"0+unknown\",\n \"full-revisionid\": keywords[\"full\"].strip(),\n \"dirty\": False,\n \"error\": \"no suitable tags\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 293, "span_ids": ["git_pieces_from_vcs"], "tokens": 787}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"pieces_from_vcs\")\ndef git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):\n \"\"\"Get version from 'git describe' in the root of the source tree.\n\n This only gets called if the git-archive 'subst' keywords were *not*\n expanded, and _version.py hasn't already been rewritten with a short\n version string, meaning we're inside a checked out source tree.\n \"\"\"\n if not os.path.exists(os.path.join(root, \".git\")):\n if verbose:\n print(\"no .git in %s\" % root)\n raise NotThisMethod(\"no .git directory\")\n\n GITS = [\"git\"]\n if sys.platform == \"win32\":\n GITS = [\"git.cmd\", \"git.exe\"]\n # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]\n # if there isn't one, this yields HEX[-dirty] (no NUM)\n describe_out = run_command(\n GITS,\n [\n \"describe\",\n \"--tags\",\n \"--dirty\",\n \"--always\",\n \"--long\",\n \"--match\",\n \"%s*\" % tag_prefix,\n ],\n cwd=root,\n )\n # --long was added in git-1.5.5\n if describe_out is None:\n raise NotThisMethod(\"'git describe' failed\")\n describe_out = describe_out.strip()\n full_out = run_command(GITS, [\"rev-parse\", \"HEAD\"], cwd=root)\n if full_out is None:\n raise NotThisMethod(\"'git rev-parse' failed\")\n full_out = full_out.strip()\n\n pieces = {}\n pieces[\"long\"] = full_out\n pieces[\"short\"] = full_out[:7] # maybe improved later\n pieces[\"error\"] = None\n\n # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]\n # TAG might have hyphens.\n git_describe = describe_out\n\n # look for -dirty suffix\n dirty = git_describe.endswith(\"-dirty\")\n pieces[\"dirty\"] = dirty\n if dirty:\n git_describe = git_describe[: git_describe.rindex(\"-dirty\")]\n\n # now we have TAG-NUM-gHEX or HEX\n\n if \"-\" in git_describe:\n # TAG-NUM-gHEX\n mo = re.search(r\"^(.+)-(\\d+)-g([0-9a-f]+)$\", git_describe)\n if not mo:\n # unparseable. Maybe git-describe is misbehaving?\n pieces[\"error\"] = \"unable to parse git-describe output: '%s'\" % describe_out\n return pieces\n\n # tag\n full_tag = mo.group(1)\n if not full_tag.startswith(tag_prefix):\n if verbose:\n fmt = \"tag '%s' doesn't start with prefix '%s'\"\n print(fmt % (full_tag, tag_prefix))\n pieces[\"error\"] = \"tag '%s' doesn't start with prefix '%s'\" % (\n full_tag,\n tag_prefix,\n )\n return pieces\n pieces[\"closest-tag\"] = full_tag[len(tag_prefix) :]\n\n # distance: number of commits since tag\n pieces[\"distance\"] = int(mo.group(2))\n\n # commit: short hex revision ID\n pieces[\"short\"] = mo.group(3)\n\n else:\n # HEX: no tags\n pieces[\"closest-tag\"] = None\n count_out = run_command(GITS, [\"rev-list\", \"HEAD\", \"--count\"], cwd=root)\n pieces[\"distance\"] = int(count_out) # total number of commits\n\n return pieces", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_plus_or_dot_render_pep440.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_plus_or_dot_render_pep440.return.rendered", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 296, "end_line": 324, "span_ids": ["plus_or_dot", "render_pep440"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def plus_or_dot(pieces):\n \"\"\"Return a + if we don't already have one, else return a .\"\"\"\n if \"+\" in pieces.get(\"closest-tag\", \"\"):\n return \".\"\n return \"+\"\n\n\ndef render_pep440(pieces):\n \"\"\"Build up version string, with post-release \"local version identifier\".\n\n Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you\n get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty\n\n Exceptions:\n 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += plus_or_dot(pieces)\n rendered += \"%d.g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n if pieces[\"dirty\"]:\n rendered += \".dirty\"\n else:\n # exception #1\n rendered = \"0+untagged.%d.g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n if pieces[\"dirty\"]:\n rendered += \".dirty\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_pre_render_pep440_post.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_pre_render_pep440_post.return.rendered", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 327, "end_line": 367, "span_ids": ["render_pep440_post", "render_pep440_pre"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_pep440_pre(pieces):\n \"\"\"TAG[.post.devDISTANCE] -- No -dirty.\n\n Exceptions:\n 1: no tags. 0.post.devDISTANCE\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"]:\n rendered += \".post.dev%d\" % pieces[\"distance\"]\n else:\n # exception #1\n rendered = \"0.post.dev%d\" % pieces[\"distance\"]\n return rendered\n\n\ndef render_pep440_post(pieces):\n \"\"\"TAG[.postDISTANCE[.dev0]+gHEX] .\n\n The \".dev0\" means dirty. Note that .dev0 sorts backwards\n (a dirty tree will appear \"older\" than the corresponding clean one),\n but you shouldn't be releasing software with -dirty anyways.\n\n Exceptions:\n 1: no tags. 0.postDISTANCE[.dev0]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += \".post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n rendered += plus_or_dot(pieces)\n rendered += \"g%s\" % pieces[\"short\"]\n else:\n # exception #1\n rendered = \"0.post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n rendered += \"+g%s\" % pieces[\"short\"]\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_old_render_pep440_old.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_pep440_old_render_pep440_old.return.rendered", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 370, "end_line": 389, "span_ids": ["render_pep440_old"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_pep440_old(pieces):\n \"\"\"TAG[.postDISTANCE[.dev0]] .\n\n The \".dev0\" means dirty.\n\n Eexceptions:\n 1: no tags. 0.postDISTANCE[.dev0]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += \".post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n else:\n # exception #1\n rendered = \"0.post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_render_git_describe.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_render_git_describe.return.rendered", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 392, "end_line": 409, "span_ids": ["render_git_describe"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_git_describe(pieces):\n \"\"\"TAG[-DISTANCE-gHEX][-dirty].\n\n Like 'git describe --tags --dirty --always'.\n\n Exceptions:\n 1: no tags. HEX[-dirty] (note: no 'g' prefix)\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"]:\n rendered += \"-%d-g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n else:\n # exception #1\n rendered = pieces[\"short\"]\n if pieces[\"dirty\"]:\n rendered += \"-dirty\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_long_render_git_describe_long.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_git_describe_long_render_git_describe_long.return.rendered", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 412, "end_line": 429, "span_ids": ["render_git_describe_long"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_git_describe_long(pieces):\n \"\"\"TAG-DISTANCE-gHEX[-dirty].\n\n Like 'git describe --tags --dirty --always -long'.\n The distance/hash is unconditional.\n\n Exceptions:\n 1: no tags. HEX[-dirty] (note: no 'g' prefix)\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n rendered += \"-%d-g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n else:\n # exception #1\n rendered = pieces[\"short\"]\n if pieces[\"dirty\"]:\n rendered += \"-dirty\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_render.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_render_render.return._", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 432, "end_line": 465, "span_ids": ["render"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render(pieces, style):\n \"\"\"Render the given version pieces into the requested style.\"\"\"\n if pieces[\"error\"]:\n return {\n \"version\": \"unknown\",\n \"full-revisionid\": pieces.get(\"long\"),\n \"dirty\": None,\n \"error\": pieces[\"error\"],\n }\n\n if not style or style == \"default\":\n style = \"pep440\" # the default\n\n if style == \"pep440\":\n rendered = render_pep440(pieces)\n elif style == \"pep440-pre\":\n rendered = render_pep440_pre(pieces)\n elif style == \"pep440-post\":\n rendered = render_pep440_post(pieces)\n elif style == \"pep440-old\":\n rendered = render_pep440_old(pieces)\n elif style == \"git-describe\":\n rendered = render_git_describe(pieces)\n elif style == \"git-describe-long\":\n rendered = render_git_describe_long(pieces)\n else:\n raise ValueError(\"unknown style '%s'\" % style)\n\n return {\n \"version\": rendered,\n \"full-revisionid\": pieces[\"long\"],\n \"dirty\": pieces[\"dirty\"],\n \"error\": None,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_get_versions_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/_version.py_get_versions_", "embedding": null, "metadata": {"file_path": "dask/_version.py", "file_name": "_version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 468, "end_line": 516, "span_ids": ["get_versions"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_versions():\n \"\"\"Get version information or return default if unable to do so.\"\"\"\n # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have\n # __file__, we can work backwards from there to the root. Some\n # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which\n # case we can only use expanded keywords.\n\n cfg = get_config()\n verbose = cfg.verbose\n\n try:\n return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, verbose)\n except NotThisMethod:\n pass\n\n try:\n root = os.path.realpath(__file__)\n # versionfile_source is the relative path from the top of the source\n # tree (where the .git directory might live) to this file. Invert\n # this to find the root from __file__.\n for i in cfg.versionfile_source.split(\"/\"):\n root = os.path.dirname(root)\n except NameError:\n return {\n \"version\": \"0+unknown\",\n \"full-revisionid\": None,\n \"dirty\": None,\n \"error\": \"unable to find root of source tree\",\n }\n\n try:\n pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)\n return render(pieces, cfg.style)\n except NotThisMethod:\n pass\n\n try:\n if cfg.parentdir_prefix:\n return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)\n except NotThisMethod:\n pass\n\n return {\n \"version\": \"0+unknown\",\n \"full-revisionid\": None,\n \"dirty\": None,\n \"error\": \"unable to compute version\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/__init__.py_try__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/__init__.py_try__", "embedding": null, "metadata": {"file_path": "dask/array/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 252, "span_ids": ["impl"], "tokens": 1143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "try:\n from .blockwise import blockwise, atop\n from .core import (\n Array,\n block,\n concatenate,\n stack,\n from_array,\n store,\n map_blocks,\n to_hdf5,\n to_npy_stack,\n from_npy_stack,\n from_delayed,\n asarray,\n asanyarray,\n PerformanceWarning,\n broadcast_arrays,\n broadcast_to,\n from_zarr,\n to_zarr,\n unify_chunks,\n )\n from .tiledb_io import from_tiledb, to_tiledb\n from .numpy_compat import rollaxis, moveaxis\n from .chunk_types import register_chunk_type\n from .routines import (\n take,\n choose,\n argwhere,\n where,\n coarsen,\n insert,\n shape,\n union1d,\n ravel,\n roll,\n unique,\n squeeze,\n ptp,\n diff,\n ediff1d,\n gradient,\n bincount,\n digitize,\n histogram,\n cov,\n array,\n dstack,\n vstack,\n hstack,\n compress,\n extract,\n round,\n count_nonzero,\n flatnonzero,\n nonzero,\n unravel_index,\n around,\n isin,\n isnull,\n notnull,\n isclose,\n allclose,\n corrcoef,\n swapaxes,\n tensordot,\n transpose,\n dot,\n vdot,\n matmul,\n outer,\n apply_along_axis,\n apply_over_axes,\n result_type,\n atleast_1d,\n atleast_2d,\n atleast_3d,\n piecewise,\n flip,\n flipud,\n fliplr,\n einsum,\n average,\n )\n from .reshape import reshape\n from .ufunc import (\n add,\n subtract,\n multiply,\n divide,\n logaddexp,\n logaddexp2,\n true_divide,\n floor_divide,\n negative,\n power,\n remainder,\n mod,\n conj,\n exp,\n exp2,\n log,\n log2,\n log10,\n log1p,\n expm1,\n sqrt,\n square,\n cbrt,\n reciprocal,\n sin,\n cos,\n tan,\n arcsin,\n arccos,\n arctan,\n arctan2,\n hypot,\n sinh,\n cosh,\n tanh,\n arcsinh,\n arccosh,\n arctanh,\n deg2rad,\n rad2deg,\n greater,\n greater_equal,\n less,\n less_equal,\n not_equal,\n equal,\n maximum,\n bitwise_and,\n bitwise_or,\n bitwise_xor,\n bitwise_not,\n invert,\n minimum,\n logical_and,\n logical_or,\n logical_xor,\n logical_not,\n fmax,\n fmin,\n isreal,\n iscomplex,\n isfinite,\n isinf,\n isneginf,\n isposinf,\n isnan,\n signbit,\n copysign,\n nextafter,\n spacing,\n ldexp,\n fmod,\n floor,\n ceil,\n trunc,\n degrees,\n radians,\n rint,\n fix,\n angle,\n real,\n imag,\n clip,\n fabs,\n sign,\n absolute,\n i0,\n sinc,\n nan_to_num,\n frexp,\n modf,\n divide,\n frompyfunc,\n float_power,\n divmod,\n )\n from .reductions import (\n sum,\n prod,\n mean,\n std,\n var,\n any,\n all,\n min,\n max,\n median,\n moment,\n trace,\n argmin,\n argmax,\n nansum,\n nanmean,\n nanmedian,\n nanstd,\n nanvar,\n nanmin,\n nanmax,\n nanargmin,\n nanargmax,\n cumsum,\n cumprod,\n topk,\n argtopk,\n nanprod,\n nancumprod,\n nancumsum,\n reduction,\n )\n from .percentile import percentile\n from . import ma\n from . import random, linalg, overlap, fft, backends\n from .overlap import map_overlap\n from .wrap import ones, zeros, empty, full\n from .creation import ones_like, zeros_like, empty_like, full_like\n from .rechunk import rechunk\n from ..base import compute\n from .optimization import optimize\n from .creation import (\n arange,\n linspace,\n meshgrid,\n indices,\n diag,\n eye,\n triu,\n tril,\n fromfunction,\n tile,\n repeat,\n pad,\n diagonal,\n )\n from .gufunc import apply_gufunc, gufunc, as_gufunc\n from .utils import assert_eq\n\nexcept ImportError as e:\n msg = (\n \"Dask array requirements are not installed.\\n\\n\"\n \"Please either conda or pip install as follows:\\n\\n\"\n \" conda install dask # either conda install\\n\"\n ' python -m pip install \"dask[array]\" --upgrade # or python -m pip install'\n )\n raise ImportError(str(e) + \"\\n\\n\" + msg) from e", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_tensordot_lookup_register_cupy._cupy_einsum.return.cupy_einsum_args_kwar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_tensordot_lookup_register_cupy._cupy_einsum.return.cupy_einsum_args_kwar", "embedding": null, "metadata": {"file_path": "dask/array/backends.py", "file_name": "backends.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 17, "span_ids": ["imports", "register_cupy"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .core import tensordot_lookup, concatenate_lookup, einsum_lookup\n\n\n@tensordot_lookup.register_lazy(\"cupy\")\n@concatenate_lookup.register_lazy(\"cupy\")\ndef register_cupy():\n import cupy\n\n concatenate_lookup.register(cupy.ndarray, cupy.concatenate)\n tensordot_lookup.register(cupy.ndarray, cupy.tensordot)\n\n @einsum_lookup.register(cupy.ndarray)\n def _cupy_einsum(*args, **kwargs):\n # NB: cupy does not accept `order` or `casting` kwargs - ignore\n kwargs.pop(\"casting\", None)\n kwargs.pop(\"order\", None)\n return cupy.einsum(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_cupyx_register_cupyx.concatenate_lookup_regist": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_cupyx_register_cupyx.concatenate_lookup_regist", "embedding": null, "metadata": {"file_path": "dask/array/backends.py", "file_name": "backends.py", "file_type": "text/x-python", "category": "implementation", "start_line": 20, "end_line": 45, "span_ids": ["register_cupyx"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@concatenate_lookup.register_lazy(\"cupyx\")\ndef register_cupyx():\n\n from cupyx.scipy.sparse import spmatrix\n\n try:\n from cupyx.scipy.sparse import hstack\n from cupyx.scipy.sparse import vstack\n except ImportError as e:\n raise ImportError(\n \"Stacking of sparse arrays requires at least CuPy version 8.0.0\"\n ) from e\n\n def _concat_cupy_sparse(L, axis=0):\n if axis == 0:\n return vstack(L)\n elif axis == 1:\n return hstack(L)\n else:\n msg = (\n \"Can only concatenate cupy sparse matrices for axis in \"\n \"{0, 1}. Got %s\" % axis\n )\n raise ValueError(msg)\n\n concatenate_lookup.register(spmatrix, _concat_cupy_sparse)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_sparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/backends.py_register_sparse_", "embedding": null, "metadata": {"file_path": "dask/array/backends.py", "file_name": "backends.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 74, "span_ids": ["register_scipy_sparse", "register_sparse"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@tensordot_lookup.register_lazy(\"sparse\")\n@concatenate_lookup.register_lazy(\"sparse\")\ndef register_sparse():\n import sparse\n\n concatenate_lookup.register(sparse.COO, sparse.concatenate)\n tensordot_lookup.register(sparse.COO, sparse.tensordot)\n\n\n@concatenate_lookup.register_lazy(\"scipy\")\ndef register_scipy_sparse():\n import scipy.sparse\n\n def _concatenate(L, axis=0):\n if axis == 0:\n return scipy.sparse.vstack(L)\n elif axis == 1:\n return scipy.sparse.hstack(L)\n else:\n msg = (\n \"Can only concatenate scipy sparse matrices for axis in \"\n \"{0, 1}. Got %s\" % axis\n )\n raise ValueError(msg)\n\n concatenate_lookup.register(scipy.sparse.spmatrix, _concatenate)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_numbers_blockwise._Tensor_operation_Gene": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_numbers_blockwise._Tensor_operation_Gene", "embedding": null, "metadata": {"file_path": "dask/array/blockwise.py", "file_name": "blockwise.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 124, "span_ids": ["imports", "blockwise"], "tokens": 1155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numbers\nimport warnings\n\nimport tlz as toolz\n\nfrom .. import base, utils\nfrom ..delayed import unpack_collections\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..blockwise import blockwise as core_blockwise\n\n\ndef blockwise(\n func,\n out_ind,\n *args,\n name=None,\n token=None,\n dtype=None,\n adjust_chunks=None,\n new_axes=None,\n align_arrays=True,\n concatenate=None,\n meta=None,\n **kwargs\n):\n \"\"\"Tensor operation: Generalized inner and outer products\n\n A broad class of blocked algorithms and patterns can be specified with a\n concise multi-index notation. The ``blockwise`` function applies an in-memory\n function across multiple blocks of multiple inputs in a variety of ways.\n Many dask.array operations are special cases of blockwise including\n elementwise, broadcasting, reductions, tensordot, and transpose.\n\n Parameters\n ----------\n func : callable\n Function to apply to individual tuples of blocks\n out_ind : iterable\n Block pattern of the output, something like 'ijk' or (1, 2, 3)\n *args : sequence of Array, index pairs\n Sequence like (x, 'ij', y, 'jk', z, 'i')\n **kwargs : dict\n Extra keyword arguments to pass to function\n dtype : np.dtype\n Datatype of resulting array.\n concatenate : bool, keyword only\n If true concatenate arrays along dummy indices, else provide lists\n adjust_chunks : dict\n Dictionary mapping index to function to be applied to chunk sizes\n new_axes : dict, keyword only\n New indexes and their dimension lengths\n\n Examples\n --------\n 2D embarrassingly parallel operation from two arrays, x, and y.\n\n >>> z = blockwise(operator.add, 'ij', x, 'ij', y, 'ij', dtype='f8') # z = x + y # doctest: +SKIP\n\n Outer product multiplying x by y, two 1-d vectors\n\n >>> z = blockwise(operator.mul, 'ij', x, 'i', y, 'j', dtype='f8') # doctest: +SKIP\n\n z = x.T\n\n >>> z = blockwise(np.transpose, 'ji', x, 'ij', dtype=x.dtype) # doctest: +SKIP\n\n The transpose case above is illustrative because it does same transposition\n both on each in-memory block by calling ``np.transpose`` and on the order\n of the blocks themselves, by switching the order of the index ``ij -> ji``.\n\n We can compose these same patterns with more variables and more complex\n in-memory functions\n\n z = X + Y.T\n\n >>> z = blockwise(lambda x, y: x + y.T, 'ij', x, 'ij', y, 'ji', dtype='f8') # doctest: +SKIP\n\n Any index, like ``i`` missing from the output index is interpreted as a\n contraction (note that this differs from Einstein convention; repeated\n indices do not imply contraction.) In the case of a contraction the passed\n function should expect an iterable of blocks on any array that holds that\n index. To receive arrays concatenated along contracted dimensions instead\n pass ``concatenate=True``.\n\n Inner product multiplying x by y, two 1-d vectors\n\n >>> def sequence_dot(x_blocks, y_blocks):\n ... result = 0\n ... for x, y in zip(x_blocks, y_blocks):\n ... result += x.dot(y)\n ... return result\n\n >>> z = blockwise(sequence_dot, '', x, 'i', y, 'i', dtype='f8') # doctest: +SKIP\n\n Add new single-chunk dimensions with the ``new_axes=`` keyword, including\n the length of the new dimension. New dimensions will always be in a single\n chunk.\n\n >>> def f(x):\n ... return x[:, None] * np.ones((1, 5))\n\n >>> z = blockwise(f, 'az', x, 'a', new_axes={'z': 5}, dtype=x.dtype) # doctest: +SKIP\n\n New dimensions can also be multi-chunk by specifying a tuple of chunk\n sizes. This has limited utility as is (because the chunks are all the\n same), but the resulting graph can be modified to achieve more useful\n results (see ``da.map_blocks``).\n\n >>> z = blockwise(f, 'az', x, 'a', new_axes={'z': (5, 5)}, dtype=x.dtype) # doctest: +SKIP\n\n If the applied function changes the size of each chunk you can specify this\n with a ``adjust_chunks={...}`` dictionary holding a function for each index\n that modifies the dimension size in that index.\n\n >>> def double(x):\n ... return np.concatenate([x, x])\n\n >>> y = blockwise(double, 'ij', x, 'ij',\n ... adjust_chunks={'i': lambda n: 2 * n}, dtype=x.dtype) # doctest: +SKIP\n\n Include literals by indexing with None\n\n >>> y = blockwise(add, 'ij', x, 'ij', 1234, None, dtype=x.dtype) # doctest: +SKIP\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.out_blockwise.chunks._chunkss_i_for_i_in_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.out_blockwise.chunks._chunkss_i_for_i_in_out_", "embedding": null, "metadata": {"file_path": "dask/array/blockwise.py", "file_name": "blockwise.py", "file_type": "text/x-python", "category": "implementation", "start_line": 125, "end_line": 223, "span_ids": ["blockwise"], "tokens": 747}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def blockwise(\n func,\n out_ind,\n *args,\n name=None,\n token=None,\n dtype=None,\n adjust_chunks=None,\n new_axes=None,\n align_arrays=True,\n concatenate=None,\n meta=None,\n **kwargs\n):\n out = name\n new_axes = new_axes or {}\n\n # Input Validation\n if len(set(out_ind)) != len(out_ind):\n raise ValueError(\n \"Repeated elements not allowed in output index\",\n [k for k, v in toolz.frequencies(out_ind).items() if v > 1],\n )\n new = (\n set(out_ind)\n - {a for arg in args[1::2] if arg is not None for a in arg}\n - set(new_axes or ())\n )\n if new:\n raise ValueError(\"Unknown dimension\", new)\n\n from .core import Array, unify_chunks, normalize_arg\n\n if align_arrays:\n chunkss, arrays = unify_chunks(*args)\n else:\n arginds = [(a, i) for (a, i) in toolz.partition(2, args) if i is not None]\n chunkss = {}\n # For each dimension, use the input chunking that has the most blocks;\n # this will ensure that broadcasting works as expected, and in\n # particular the number of blocks should be correct if the inputs are\n # consistent.\n for arg, ind in arginds:\n for c, i in zip(arg.chunks, ind):\n if i not in chunkss or len(c) > len(chunkss[i]):\n chunkss[i] = c\n arrays = args[::2]\n\n for k, v in new_axes.items():\n if not isinstance(v, tuple):\n v = (v,)\n chunkss[k] = v\n\n arginds = zip(arrays, args[1::2])\n numblocks = {}\n\n dependencies = []\n arrays = []\n\n # Normalize arguments\n argindsstr = []\n\n for arg, ind in arginds:\n if ind is None:\n arg = normalize_arg(arg)\n arg, collections = unpack_collections(arg)\n dependencies.extend(collections)\n else:\n if (\n hasattr(arg, \"ndim\")\n and hasattr(ind, \"__len__\")\n and arg.ndim != len(ind)\n ):\n raise ValueError(\n \"Index string %s does not match array dimension %d\"\n % (ind, arg.ndim)\n )\n numblocks[arg.name] = arg.numblocks\n arrays.append(arg)\n arg = arg.name\n argindsstr.extend((arg, ind))\n\n # Normalize keyword arguments\n kwargs2 = {}\n for k, v in kwargs.items():\n v = normalize_arg(v)\n v, collections = unpack_collections(v)\n dependencies.extend(collections)\n kwargs2[k] = v\n\n # Finish up the name\n if not out:\n out = \"%s-%s\" % (\n token or utils.funcname(func).strip(\"_\"),\n base.tokenize(func, out_ind, argindsstr, dtype, **kwargs),\n )\n\n graph = core_blockwise(\n func,\n out,\n out_ind,\n *argindsstr,\n numblocks=numblocks,\n dependencies=dependencies,\n new_axes=new_axes,\n concatenate=concatenate,\n **kwargs2\n )\n graph = HighLevelGraph.from_collections(\n out, graph, dependencies=arrays + dependencies\n )\n\n chunks = [chunkss[i] for i in out_ind]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.if_adjust_chunks__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/blockwise.py_blockwise.if_adjust_chunks__", "embedding": null, "metadata": {"file_path": "dask/array/blockwise.py", "file_name": "blockwise.py", "file_type": "text/x-python", "category": "implementation", "start_line": 224, "end_line": 260, "span_ids": ["blockwise", "atop"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def blockwise(\n func,\n out_ind,\n *args,\n name=None,\n token=None,\n dtype=None,\n adjust_chunks=None,\n new_axes=None,\n align_arrays=True,\n concatenate=None,\n meta=None,\n **kwargs\n):\n # ... other code\n if adjust_chunks:\n for i, ind in enumerate(out_ind):\n if ind in adjust_chunks:\n if callable(adjust_chunks[ind]):\n chunks[i] = tuple(map(adjust_chunks[ind], chunks[i]))\n elif isinstance(adjust_chunks[ind], numbers.Integral):\n chunks[i] = tuple(adjust_chunks[ind] for _ in chunks[i])\n elif isinstance(adjust_chunks[ind], (tuple, list)):\n if len(adjust_chunks[ind]) != len(chunks[i]):\n raise ValueError(\n \"Dimension {0} has {1} blocks, \"\n \"adjust_chunks specified with \"\n \"{2} blocks\".format(\n i, len(chunks[i]), len(adjust_chunks[ind])\n )\n )\n chunks[i] = tuple(adjust_chunks[ind])\n else:\n raise NotImplementedError(\n \"adjust_chunks values must be callable, int, or tuple\"\n )\n chunks = tuple(chunks)\n\n if meta is None:\n from .utils import compute_meta\n\n meta = compute_meta(func, dtype, *args[::2], **kwargs)\n if meta is not None:\n return Array(graph, out, chunks, meta=meta)\n else:\n return Array(graph, out, chunks, dtype=dtype)\n\n\ndef atop(*args, **kwargs):\n warnings.warn(\"The da.atop function has moved to da.blockwise\")\n return blockwise(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__A_set_of_NumPy_functi_keepdims_wrapper.return.keepdims_wrapped_callable": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__A_set_of_NumPy_functi_keepdims_wrapper.return.keepdims_wrapped_callable", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 51, "span_ids": ["keepdims_wrapper", "docstring"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\" A set of NumPy functions to apply per chunk \"\"\"\nfrom collections.abc import Container, Iterable, Sequence\nfrom functools import wraps\n\nfrom tlz import concat\nimport numpy as np\nfrom . import numpy_compat as npcompat\n\nfrom ..core import flatten\nfrom ..utils import ignoring\n\nfrom numbers import Integral\n\ntry:\n from numpy import take_along_axis\nexcept ImportError: # pragma: no cover\n take_along_axis = npcompat.take_along_axis\n\n\ndef keepdims_wrapper(a_callable):\n \"\"\"\n A wrapper for functions that don't provide keepdims to ensure that they do.\n \"\"\"\n\n @wraps(a_callable)\n def keepdims_wrapped_callable(x, axis=None, keepdims=None, *args, **kwargs):\n r = a_callable(x, axis=axis, *args, **kwargs)\n\n if not keepdims:\n return r\n\n axes = axis\n\n if axes is None:\n axes = range(x.ndim)\n\n if not isinstance(axes, (Container, Iterable, Sequence)):\n axes = [axes]\n\n r_slice = tuple()\n for each_axis in range(x.ndim):\n if each_axis in axes:\n r_slice += (None,)\n else:\n r_slice += (slice(None),)\n\n r = r[r_slice]\n\n return r\n\n return keepdims_wrapped_callable", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__Wrap_NumPy_functions_to_None_2.nanstd.np_nanstd": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py__Wrap_NumPy_functions_to_None_2.nanstd.np_nanstd", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 86, "span_ids": ["impl:6", "keepdims_wrapper"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Wrap NumPy functions to ensure they provide keepdims.\nsum = np.sum\nprod = np.prod\nmin = np.min\nmax = np.max\nargmin = keepdims_wrapper(np.argmin)\nnanargmin = keepdims_wrapper(np.nanargmin)\nargmax = keepdims_wrapper(np.argmax)\nnanargmax = keepdims_wrapper(np.nanargmax)\nany = np.any\nall = np.all\nnansum = np.nansum\nnanprod = np.nanprod\n\nnancumprod = np.nancumprod\nnancumsum = np.nancumsum\n\nnanmin = np.nanmin\nnanmax = np.nanmax\nmean = np.mean\n\nwith ignoring(AttributeError):\n nanmean = np.nanmean\n\nvar = np.var\n\nwith ignoring(AttributeError):\n nanvar = np.nanvar\n\nstd = np.std\n\nwith ignoring(AttributeError):\n nanstd = np.nanstd", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_coarsen_coarsen.return.reduction_x_reshape_newsh": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_coarsen_coarsen.return.reduction_x_reshape_newsh", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 143, "span_ids": ["coarsen"], "tokens": 549}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def coarsen(reduction, x, axes, trim_excess=False, **kwargs):\n \"\"\"Coarsen array by applying reduction to fixed size neighborhoods\n\n Parameters\n ----------\n reduction: function\n Function like np.sum, np.mean, etc...\n x: np.ndarray\n Array to be coarsened\n axes: dict\n Mapping of axis to coarsening factor\n\n Examples\n --------\n >>> x = np.array([1, 2, 3, 4, 5, 6])\n >>> coarsen(np.sum, x, {0: 2})\n array([ 3, 7, 11])\n >>> coarsen(np.max, x, {0: 3})\n array([3, 6])\n\n Provide dictionary of scale per dimension\n\n >>> x = np.arange(24).reshape((4, 6))\n >>> x\n array([[ 0, 1, 2, 3, 4, 5],\n [ 6, 7, 8, 9, 10, 11],\n [12, 13, 14, 15, 16, 17],\n [18, 19, 20, 21, 22, 23]])\n\n >>> coarsen(np.min, x, {0: 2, 1: 3})\n array([[ 0, 3],\n [12, 15]])\n\n You must avoid excess elements explicitly\n\n >>> x = np.array([1, 2, 3, 4, 5, 6, 7, 8])\n >>> coarsen(np.min, x, {0: 3}, trim_excess=True)\n array([1, 4])\n \"\"\"\n # Insert singleton dimensions if they don't exist already\n for i in range(x.ndim):\n if i not in axes:\n axes[i] = 1\n\n if trim_excess:\n ind = tuple(\n slice(0, -(d % axes[i])) if d % axes[i] else slice(None, None)\n for i, d in enumerate(x.shape)\n )\n x = x[ind]\n\n # (10, 10) -> (5, 2, 5, 2)\n newshape = tuple(concat([(x.shape[i] // axes[i], axes[i]) for i in range(x.ndim)]))\n\n return reduction(x.reshape(newshape), axis=tuple(range(1, x.ndim * 2, 2)), **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_trim_trim.return.x_tuple_slice_ax_ax_if_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_trim_trim.return.x_tuple_slice_ax_ax_if_", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 146, "end_line": 165, "span_ids": ["trim"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def trim(x, axes=None):\n \"\"\"Trim boundaries off of array\n\n >>> x = np.arange(24).reshape((4, 6))\n >>> trim(x, axes={0: 0, 1: 1})\n array([[ 1, 2, 3, 4],\n [ 7, 8, 9, 10],\n [13, 14, 15, 16],\n [19, 20, 21, 22]])\n\n >>> trim(x, axes={0: 1, 1: 1})\n array([[ 7, 8, 9, 10],\n [13, 14, 15, 16]])\n \"\"\"\n if isinstance(axes, Integral):\n axes = [axes] * x.ndim\n if isinstance(axes, dict):\n axes = [axes.get(i, 0) for i in range(x.ndim)]\n\n return x[tuple(slice(ax, -ax if ax else None) for ax in axes)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_topk.return.a_tuple_k_slice_if_i_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_topk.return.a_tuple_k_slice_if_i_a", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 183, "span_ids": ["topk"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def topk(a, k, axis, keepdims):\n \"\"\"Chunk and combine function of topk\n\n Extract the k largest elements from a on the given axis.\n If k is negative, extract the -k smallest elements instead.\n Note that, unlike in the parent function, the returned elements\n are not sorted internally.\n \"\"\"\n assert keepdims is True\n axis = axis[0]\n if abs(k) >= a.shape[axis]:\n return a\n\n a = np.partition(a, -k, axis=axis)\n k_slice = slice(-k, None) if k > 0 else slice(-k)\n return a[tuple(k_slice if i == axis else slice(None) for i in range(a.ndim))]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_aggregate_argtopk_preprocess.return.a_idx": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_topk_aggregate_argtopk_preprocess.return.a_idx", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 186, "end_line": 209, "span_ids": ["argtopk_preprocess", "topk_aggregate"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def topk_aggregate(a, k, axis, keepdims):\n \"\"\"Final aggregation function of topk\n\n Invoke topk one final time and then sort the results internally.\n \"\"\"\n assert keepdims is True\n a = topk(a, k, axis, keepdims)\n axis = axis[0]\n a = np.sort(a, axis=axis)\n if k < 0:\n return a\n return a[\n tuple(\n slice(None, None, -1) if i == axis else slice(None) for i in range(a.ndim)\n )\n ]\n\n\ndef argtopk_preprocess(a, idx):\n \"\"\"Preparatory step for argtopk\n\n Put data together with its original indices in a tuple.\n \"\"\"\n return a, idx", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_argtopk.return.take_along_axis_a_idx2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_argtopk.return.take_along_axis_a_idx2_", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 212, "end_line": 238, "span_ids": ["argtopk"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def argtopk(a_plus_idx, k, axis, keepdims):\n \"\"\"Chunk and combine function of argtopk\n\n Extract the indices of the k largest elements from a on the given axis.\n If k is negative, extract the indices of the -k smallest elements instead.\n Note that, unlike in the parent function, the returned elements\n are not sorted internally.\n \"\"\"\n assert keepdims is True\n axis = axis[0]\n\n if isinstance(a_plus_idx, list):\n a_plus_idx = list(flatten(a_plus_idx))\n a = np.concatenate([ai for ai, _ in a_plus_idx], axis)\n idx = np.concatenate(\n [np.broadcast_to(idxi, ai.shape) for ai, idxi in a_plus_idx], axis\n )\n else:\n a, idx = a_plus_idx\n\n if abs(k) >= a.shape[axis]:\n return a_plus_idx\n\n idx2 = np.argpartition(a, -k, axis=axis)\n k_slice = slice(-k, None) if k > 0 else slice(-k)\n idx2 = idx2[tuple(k_slice if i == axis else slice(None) for i in range(a.ndim))]\n return take_along_axis(a, idx2, axis), take_along_axis(idx, idx2, axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_aggregate_argtopk_aggregate.return.idx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_argtopk_aggregate_argtopk_aggregate.return.idx_", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 259, "span_ids": ["argtopk_aggregate"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def argtopk_aggregate(a_plus_idx, k, axis, keepdims):\n \"\"\"Final aggregation function of argtopk\n\n Invoke argtopk one final time, sort the results internally, drop the data\n and return the index only.\n \"\"\"\n assert keepdims is True\n a, idx = argtopk(a_plus_idx, k, axis, keepdims)\n axis = axis[0]\n\n idx2 = np.argsort(a, axis=axis)\n idx = take_along_axis(idx, idx2, axis)\n if k < 0:\n return idx\n return idx[\n tuple(\n slice(None, None, -1) if i == axis else slice(None) for i in range(idx.ndim)\n )\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_arange_view.if_order_C_.else_.return.x_T_view_dtype_T": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_arange_view.if_order_C_.else_.return.x_T_view_dtype_T", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 262, "end_line": 277, "span_ids": ["view", "astype", "arange"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def arange(start, stop, step, length, dtype):\n res = np.arange(start, stop, step, dtype)\n return res[:-1] if len(res) > length else res\n\n\ndef astype(x, astype_dtype=None, **kwargs):\n return x.astype(astype_dtype, **kwargs)\n\n\ndef view(x, dtype, order=\"C\"):\n if order == \"C\":\n x = np.ascontiguousarray(x)\n return x.view(dtype)\n else:\n x = np.asfortranarray(x)\n return x.T.view(dtype).T", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_idx_if_i_axis_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_idx_if_i_axis_", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 280, "end_line": 319, "span_ids": ["slice_with_int_dask_array"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_int_dask_array(x, idx, offset, x_size, axis):\n \"\"\"Chunk function of `slice_with_int_dask_array_on_axis`.\n Slice one chunk of x by one chunk of idx.\n\n Parameters\n ----------\n x: ndarray, any dtype, any shape\n i-th chunk of x\n idx: ndarray, ndim=1, dtype=any integer\n j-th chunk of idx (cartesian product with the chunks of x)\n offset: ndarray, shape=(1, ), dtype=int64\n Index of the first element along axis of the current chunk of x\n x_size: int\n Total size of the x da.Array along axis\n axis: int\n normalized axis to take elements from (0 <= axis < x.ndim)\n\n Returns\n -------\n x sliced along axis, using only the elements of idx that fall inside the\n current chunk.\n \"\"\"\n # Needed when idx is unsigned\n idx = idx.astype(np.int64)\n\n # Normalize negative indices\n idx = np.where(idx < 0, idx + x_size, idx)\n\n # A chunk of the offset dask Array is a numpy array with shape (1, ).\n # It indicates the index of the first element along axis of the current\n # chunk of x.\n idx = idx - offset\n\n # Drop elements of idx that do not fall inside the current chunk of x\n idx_filter = (idx >= 0) & (idx < x.shape[axis])\n idx = idx[idx_filter]\n\n # np.take does not support slice indices\n # return np.take(x, idx, axis)\n return x[tuple(idx if i == axis else slice(None) for i in range(x.ndim))]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_aggregate_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk.py_slice_with_int_dask_array_aggregate_", "embedding": null, "metadata": {"file_path": "dask/array/chunk.py", "file_name": "chunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 322, "end_line": 376, "span_ids": ["slice_with_int_dask_array_aggregate"], "tokens": 492}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_int_dask_array_aggregate(idx, chunk_outputs, x_chunks, axis):\n \"\"\"Final aggregation function of `slice_with_int_dask_array_on_axis`.\n Aggregate all chunks of x by one chunk of idx, reordering the output of\n `slice_with_int_dask_array`.\n\n Note that there is no combine function, as a recursive aggregation (e.g.\n with split_every) would not give any benefit.\n\n Parameters\n ----------\n idx: ndarray, ndim=1, dtype=any integer\n j-th chunk of idx\n chunk_outputs: ndarray\n concatenation along axis of the outputs of `slice_with_int_dask_array`\n for all chunks of x and the j-th chunk of idx\n x_chunks: tuple\n dask chunks of the x da.Array along axis, e.g. ``(3, 3, 2)``\n axis: int\n normalized axis to take elements from (0 <= axis < x.ndim)\n\n Returns\n -------\n Selection from all chunks of x for the j-th chunk of idx, in the correct\n order\n \"\"\"\n # Needed when idx is unsigned\n idx = idx.astype(np.int64)\n\n # Normalize negative indices\n idx = np.where(idx < 0, idx + sum(x_chunks), idx)\n\n x_chunk_offset = 0\n chunk_output_offset = 0\n\n # Assemble the final index that picks from the output of the previous\n # kernel by adding together one layer per chunk of x\n # FIXME: this could probably be reimplemented with a faster search-based\n # algorithm\n idx_final = np.zeros_like(idx)\n for x_chunk in x_chunks:\n idx_filter = (idx >= x_chunk_offset) & (idx < x_chunk_offset + x_chunk)\n idx_cum = np.cumsum(idx_filter)\n idx_final += np.where(idx_filter, idx_cum - 1 + chunk_output_offset, 0)\n x_chunk_offset += x_chunk\n if idx_cum.size > 0:\n chunk_output_offset += idx_cum[-1]\n\n # np.take does not support slice indices\n # return np.take(chunk_outputs, idx_final, axis)\n return chunk_outputs[\n tuple(\n idx_final if i == axis else slice(None) for i in range(chunk_outputs.ndim)\n )\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_from_numbers_import_Numbe_register_chunk_type._HANDLED_CHUNK_TYPES_appe": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_from_numbers_import_Numbe_register_chunk_type._HANDLED_CHUNK_TYPES_appe", "embedding": null, "metadata": {"file_path": "dask/array/chunk_types.py", "file_name": "chunk_types.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 107, "span_ids": ["imports", "register_chunk_type"], "tokens": 1016}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from numbers import Number\n\nimport numpy as np\n\n\n# Start list of valid chunk types, to be added to with guarded imports\n_HANDLED_CHUNK_TYPES = [np.ndarray, np.ma.MaskedArray]\n\n\ndef register_chunk_type(type):\n \"\"\"Register the given type as a valid chunk and downcast array type\n\n Parameters\n ----------\n type : type\n Duck array type to be registered as a type Dask can safely wrap as a chunk and\n to which Dask does not defer in arithmetic operations and NumPy\n functions/ufuncs.\n\n Notes\n -----\n A :py:class:`dask.array.Array` can contain any sufficiently \"NumPy-like\" array in\n its chunks. These are also referred to as \"duck arrays\" since they match the most\n important parts of NumPy's array API, and so, behave the same way when relying on\n duck typing.\n\n However, for multiple duck array types to interoperate properly, they need to\n properly defer to each other in arithmetic operations and NumPy functions/ufuncs\n according to a well-defined type casting hierarchy (\n `see NEP 13`_\n ). In an effort to maintain this hierarchy, Dask defers to all other duck array\n types except those in its internal registry. By default, this registry contains\n\n * :py:class:`numpy.ndarray`\n * :py:class:`numpy.ma.MaskedArray`\n * :py:class:`cupy.ndarray`\n * :py:class:`sparse.SparseArray`\n * :py:class:`scipy.sparse.spmatrix`\n\n This function exists to append any other types to this registry. If a type is not\n in this registry, and yet is a downcast type (it comes below\n :py:class:`dask.array.Array` in the type casting hierarchy), a ``TypeError`` will\n be raised due to all operand types returning ``NotImplemented``.\n\n Examples\n --------\n Using a mock ``FlaggedArray`` class as an example chunk type unknown to Dask with\n minimal duck array API:\n\n >>> import numpy.lib.mixins\n >>> class FlaggedArray(numpy.lib.mixins.NDArrayOperatorsMixin):\n ... def __init__(self, a, flag=False):\n ... self.a = a\n ... self.flag = flag\n ... def __repr__(self):\n ... return f\"Flag: {self.flag}, Array: \" + repr(self.a)\n ... def __array__(self):\n ... return np.asarray(self.a)\n ... def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):\n ... if method == '__call__':\n ... downcast_inputs = []\n ... flag = False\n ... for input in inputs:\n ... if isinstance(input, self.__class__):\n ... flag = flag or input.flag\n ... downcast_inputs.append(input.a)\n ... elif isinstance(input, np.ndarray):\n ... downcast_inputs.append(input)\n ... else:\n ... return NotImplemented\n ... return self.__class__(ufunc(*downcast_inputs, **kwargs), flag)\n ... else:\n ... return NotImplemented\n ... @property\n ... def shape(self):\n ... return self.a.shape\n ... @property\n ... def ndim(self):\n ... return self.a.ndim\n ... @property\n ... def dtype(self):\n ... return self.a.dtype\n ... def __getitem__(self, key):\n ... return type(self)(self.a[key], self.flag)\n ... def __setitem__(self, key, value):\n ... self.a[key] = value\n\n Before registering ``FlaggedArray``, both types will attempt to defer to the\n other:\n\n >>> import dask.array as da\n >>> da.ones(5) - FlaggedArray(np.ones(5), True)\n Traceback (most recent call last):\n ...\n TypeError: operand type(s) all returned NotImplemented ...\n\n However, once registered, Dask will be able to handle operations with this new\n type:\n\n >>> da.register_chunk_type(FlaggedArray)\n >>> x = da.ones(5) - FlaggedArray(np.ones(5), True)\n >>> x\n dask.array\n >>> x.compute()\n Flag: True, Array: array([0., 0., 0., 0., 0.])\n \"\"\"\n _HANDLED_CHUNK_TYPES.append(type)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_try__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/chunk_types.py_try__", "embedding": null, "metadata": {"file_path": "dask/array/chunk_types.py", "file_name": "chunk_types.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 156, "span_ids": ["is_valid_array_chunk", "impl:3", "is_valid_chunk_type"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "try:\n import cupy\n\n register_chunk_type(cupy.ndarray)\nexcept ImportError:\n pass\n\ntry:\n from cupyx.scipy.sparse import spmatrix\n\n register_chunk_type(spmatrix)\nexcept ImportError:\n pass\n\ntry:\n import sparse\n\n register_chunk_type(sparse.SparseArray)\nexcept ImportError:\n pass\n\ntry:\n import scipy.sparse\n\n register_chunk_type(scipy.sparse.spmatrix)\nexcept ImportError:\n pass\n\n\ndef is_valid_chunk_type(type):\n \"\"\" Check if given type is a valid chunk and downcast array type\"\"\"\n try:\n return type in _HANDLED_CHUNK_TYPES or issubclass(\n type, tuple(_HANDLED_CHUNK_TYPES)\n )\n except TypeError:\n return False\n\n\ndef is_valid_array_chunk(array):\n \"\"\" Check if given array is of a valid type to operate with\"\"\"\n return (\n array is None\n or isinstance(array, Number)\n or isinstance(array, tuple(_HANDLED_CHUNK_TYPES))\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_math_PerformanceWarning._A_warning_given_when_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_math_PerformanceWarning._A_warning_given_when_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 84, "span_ids": ["imports", "PerformanceWarning"], "tokens": 554}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import math\nimport operator\nimport os\nimport pickle\nimport re\nimport sys\nimport traceback\nimport uuid\nimport warnings\nfrom bisect import bisect\nfrom collections.abc import Iterable, Iterator, Mapping\nfrom functools import partial, wraps, reduce\nfrom itertools import product, zip_longest\nfrom numbers import Number, Integral\nfrom operator import add, getitem, mul\nfrom threading import Lock\n\nfrom tlz import partition, concat, first, groupby, accumulate, frequencies\nfrom tlz.curried import pluck\nimport numpy as np\n\nfrom . import chunk\nfrom .. import config, compute\nfrom ..base import (\n DaskMethodsMixin,\n tokenize,\n dont_optimize,\n compute_as_if_collection,\n persist,\n is_dask_collection,\n)\nfrom ..blockwise import broadcast_dimensions\nfrom ..context import globalmethod\nfrom ..utils import (\n ndeepmap,\n ignoring,\n concrete,\n derived_from,\n is_integer,\n IndexCallable,\n funcname,\n SerializableLock,\n Dispatch,\n factors,\n parse_bytes,\n has_keyword,\n M,\n ndimlist,\n format_bytes,\n typename,\n)\nfrom ..core import quote\nfrom ..delayed import delayed, Delayed\nfrom .. import threaded, core\nfrom ..sizeof import sizeof\nfrom ..highlevelgraph import HighLevelGraph\nfrom .numpy_compat import _Recurser, _make_sliced_dtype\nfrom .slicing import slice_array, replace_ellipsis, cached_cumsum\nfrom .blockwise import blockwise\nfrom .chunk_types import is_valid_array_chunk, is_valid_chunk_type\n\n\nconfig.update_defaults({\"array\": {\"chunk-size\": \"128MiB\", \"rechunk-threshold\": 4}})\n\n\nconcatenate_lookup = Dispatch(\"concatenate\")\ntensordot_lookup = Dispatch(\"tensordot\")\neinsum_lookup = Dispatch(\"einsum\")\nconcatenate_lookup.register((object, np.ndarray), np.concatenate)\ntensordot_lookup.register((object, np.ndarray), np.tensordot)\neinsum_lookup.register((object, np.ndarray), np.einsum)\n\nunknown_chunk_message = (\n \"\\n\\n\"\n \"A possible solution: \"\n \"https://docs.dask.org/en/latest/array-chunks.html#unknown-chunks\\n\"\n \"Summary: to compute chunks sizes, use\\n\\n\"\n \" x.compute_chunk_sizes() # for Dask Array `x`\\n\"\n \" ddf.to_dask_array(lengths=True) # for Dask DataFrame `ddf`\"\n)\n\n\nclass PerformanceWarning(Warning):\n \"\"\" A warning given when bad chunking may cause poor performance \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_getter_nofancy.return.getter_a_b_asarray_asar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_getter_nofancy.return.getter_a_b_asarray_asar", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 115, "span_ids": ["getter", "getter_nofancy"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getter(a, b, asarray=True, lock=None):\n if isinstance(b, tuple) and any(x is None for x in b):\n b2 = tuple(x for x in b if x is not None)\n b3 = tuple(\n None if x is None else slice(None, None)\n for x in b\n if not isinstance(x, Integral)\n )\n return getter(a, b2, asarray=asarray, lock=lock)[b3]\n\n if lock:\n lock.acquire()\n try:\n c = a[b]\n if asarray:\n c = np.asarray(c)\n finally:\n if lock:\n lock.release()\n return c\n\n\ndef getter_nofancy(a, b, asarray=True, lock=None):\n \"\"\"A simple wrapper around ``getter``.\n\n Used to indicate to the optimization passes that the backend doesn't\n support fancy indexing.\n \"\"\"\n return getter(a, b, asarray=asarray, lock=lock)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_inline_getter_inline.return.getter_a_b_asarray_asar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getter_inline_getter_inline.return.getter_a_b_asarray_asar", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 137, "span_ids": ["getter_inline"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getter_inline(a, b, asarray=True, lock=None):\n \"\"\"A getter function that optimizations feel comfortable inlining\n\n Slicing operations with this function may be inlined into a graph, such as\n in the following rewrite\n\n **Before**\n\n >>> a = x[:10] # doctest: +SKIP\n >>> b = a + 1 # doctest: +SKIP\n >>> c = a * 2 # doctest: +SKIP\n\n **After**\n\n >>> b = x[:10] + 1 # doctest: +SKIP\n >>> c = x[:10] * 2 # doctest: +SKIP\n\n This inlining can be relevant to operations when running off of disk.\n \"\"\"\n return getter(a, b, asarray=asarray, lock=lock)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_optimize_implements.return.decorator": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_optimize_implements.return.decorator", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 167, "span_ids": ["implements", "impl:13"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .optimization import optimize, fuse_slice\n\n\n# __array_function__ dict for mapping aliases and mismatching names\n_HANDLED_FUNCTIONS = {}\n\n\ndef implements(*numpy_functions):\n \"\"\"Register an __array_function__ implementation for dask.array.Array\n\n Register that a function implements the API of a NumPy function (or several\n NumPy functions in case of aliases) which is handled with\n ``__array_function__``.\n\n Parameters\n ----------\n \\\\*numpy_functions : callables\n One or more NumPy functions that are handled by ``__array_function__``\n and will be mapped by `implements` to a `dask.array` function.\n \"\"\"\n\n def decorator(dask_func):\n for numpy_function in numpy_functions:\n _HANDLED_FUNCTIONS[numpy_function] = dask_func\n\n return dask_func\n\n return decorator", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_check_if_handled_given_other_check_if_handled_given_other.return.wrapper": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_check_if_handled_given_other_check_if_handled_given_other.return.wrapper", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 188, "span_ids": ["check_if_handled_given_other"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_if_handled_given_other(f):\n \"\"\"Check if method is handled by Dask given type of other\n\n Ensures proper deferral to upcast types in dunder operations without\n assuming unknown types are automatically downcast types.\n \"\"\"\n\n @wraps(f)\n def wrapper(self, other):\n if (\n is_valid_array_chunk(other)\n or isinstance(other, (self.__class__, list, tuple, np.generic))\n or \"dask.dataframe.core.Scalar\" in str(other.__class__)\n ):\n return f(self, other)\n else:\n return NotImplemented\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_slices_from_chunks_slices_from_chunks.return.list_product_slices_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_slices_from_chunks_slices_from_chunks.return.list_product_slices_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 207, "span_ids": ["slices_from_chunks"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slices_from_chunks(chunks):\n \"\"\"Translate chunks tuple to a set of slices in product order\n\n >>> slices_from_chunks(((2, 2), (3, 3, 3))) # doctest: +NORMALIZE_WHITESPACE\n [(slice(0, 2, None), slice(0, 3, None)),\n (slice(0, 2, None), slice(3, 6, None)),\n (slice(0, 2, None), slice(6, 9, None)),\n (slice(2, 4, None), slice(0, 3, None)),\n (slice(2, 4, None), slice(3, 6, None)),\n (slice(2, 4, None), slice(6, 9, None))]\n \"\"\"\n cumdims = [cached_cumsum(bds, initial_zero=True) for bds in chunks]\n slices = [\n [slice(s, s + dim) for s, dim in zip(starts, shapes)]\n for starts, shapes in zip(cumdims, chunks)\n ]\n return list(product(*slices))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getem_getem.return.dict_zip_keys_values_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_getem_getem.return.dict_zip_keys_values_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 210, "end_line": 249, "span_ids": ["getem"], "tokens": 503}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getem(\n arr,\n chunks,\n getitem=getter,\n shape=None,\n out_name=None,\n lock=False,\n asarray=True,\n dtype=None,\n):\n \"\"\"Dask getting various chunks from an array-like\n\n >>> getem('X', chunks=(2, 3), shape=(4, 6)) # doctest: +SKIP\n {('X', 0, 0): (getter, 'X', (slice(0, 2), slice(0, 3))),\n ('X', 1, 0): (getter, 'X', (slice(2, 4), slice(0, 3))),\n ('X', 1, 1): (getter, 'X', (slice(2, 4), slice(3, 6))),\n ('X', 0, 1): (getter, 'X', (slice(0, 2), slice(3, 6)))}\n\n >>> getem('X', chunks=((2, 2), (3, 3))) # doctest: +SKIP\n {('X', 0, 0): (getter, 'X', (slice(0, 2), slice(0, 3))),\n ('X', 1, 0): (getter, 'X', (slice(2, 4), slice(0, 3))),\n ('X', 1, 1): (getter, 'X', (slice(2, 4), slice(3, 6))),\n ('X', 0, 1): (getter, 'X', (slice(0, 2), slice(3, 6)))}\n \"\"\"\n out_name = out_name or arr\n chunks = normalize_chunks(chunks, shape, dtype=dtype)\n keys = product([out_name], *(range(len(bds)) for bds in chunks))\n slices = slices_from_chunks(chunks)\n\n if (\n has_keyword(getitem, \"asarray\")\n and has_keyword(getitem, \"lock\")\n and (not asarray or lock)\n ):\n values = [(getitem, arr, x, asarray, lock) for x in slices]\n else:\n # Common case, drop extra parameters\n values = [(getitem, arr, x) for x in slices]\n\n return dict(zip(keys, values))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_dotmany_dotmany.return.sum_map_partial_np_dot_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_dotmany_dotmany.return.sum_map_partial_np_dot_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 252, "end_line": 271, "span_ids": ["dotmany"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dotmany(A, B, leftfunc=None, rightfunc=None, **kwargs):\n \"\"\"Dot product of many aligned chunks\n\n >>> x = np.array([[1, 2], [1, 2]])\n >>> y = np.array([[10, 20], [10, 20]])\n >>> dotmany([x, x, x], [y, y, y])\n array([[ 90, 180],\n [ 90, 180]])\n\n Optionally pass in functions to apply to the left and right chunks\n\n >>> dotmany([x, x, x], [y, y, y], rightfunc=np.transpose)\n array([[150, 150],\n [150, 150]])\n \"\"\"\n if leftfunc:\n A = map(leftfunc, A)\n if rightfunc:\n B = map(rightfunc, B)\n return sum(map(partial(np.dot, **kwargs), A, B))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__concatenate2__concatenate2.return.concatenate_arrays_axis_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__concatenate2__concatenate2.return.concatenate_arrays_axis_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 274, "end_line": 324, "span_ids": ["_concatenate2"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _concatenate2(arrays, axes=[]):\n \"\"\"Recursively Concatenate nested lists of arrays along axes\n\n Each entry in axes corresponds to each level of the nested list. The\n length of axes should correspond to the level of nesting of arrays.\n If axes is an empty list or tuple, return arrays, or arrays[0] if\n arrays is a list.\n\n >>> x = np.array([[1, 2], [3, 4]])\n >>> _concatenate2([x, x], axes=[0])\n array([[1, 2],\n [3, 4],\n [1, 2],\n [3, 4]])\n\n >>> _concatenate2([x, x], axes=[1])\n array([[1, 2, 1, 2],\n [3, 4, 3, 4]])\n\n >>> _concatenate2([[x, x], [x, x]], axes=[0, 1])\n array([[1, 2, 1, 2],\n [3, 4, 3, 4],\n [1, 2, 1, 2],\n [3, 4, 3, 4]])\n\n Supports Iterators\n >>> _concatenate2(iter([x, x]), axes=[1])\n array([[1, 2, 1, 2],\n [3, 4, 3, 4]])\n\n Special Case\n >>> _concatenate2([x, x], axes=())\n array([[1, 2],\n [3, 4]])\n \"\"\"\n if axes == ():\n if isinstance(arrays, list):\n return arrays[0]\n else:\n return arrays\n\n if isinstance(arrays, Iterator):\n arrays = list(arrays)\n if not isinstance(arrays, (list, tuple)):\n return arrays\n if len(axes) > 1:\n arrays = [_concatenate2(a, axes=axes[1:]) for a in arrays]\n concatenate = concatenate_lookup.dispatch(\n type(max(arrays, key=lambda x: getattr(x, \"__array_priority__\", 0)))\n )\n return concatenate(arrays, axis=axes[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_apply_infer_dtype_apply_infer_dtype.return.o_dtype_if_nout_is_None_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_apply_infer_dtype_apply_infer_dtype.return.o_dtype_if_nout_is_None_e", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 327, "end_line": 391, "span_ids": ["apply_infer_dtype"], "tokens": 485}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_infer_dtype(func, args, kwargs, funcname, suggest_dtype=\"dtype\", nout=None):\n \"\"\"\n Tries to infer output dtype of ``func`` for a small set of input arguments.\n\n Parameters\n ----------\n func: Callable\n Function for which output dtype is to be determined\n\n args: List of array like\n Arguments to the function, which would usually be used. Only attributes\n ``ndim`` and ``dtype`` are used.\n\n kwargs: dict\n Additional ``kwargs`` to the ``func``\n\n funcname: String\n Name of calling function to improve potential error messages\n\n suggest_dtype: None/False or String\n If not ``None`` adds suggestion to potential error message to specify a dtype\n via the specified kwarg. Defaults to ``'dtype'``.\n\n nout: None or Int\n ``None`` if function returns single output, integer if many.\n Deafults to ``None``.\n\n Returns\n -------\n : dtype or List of dtype\n One or many dtypes (depending on ``nout``)\n \"\"\"\n args = [\n np.ones((1,) * x.ndim, dtype=x.dtype) if isinstance(x, Array) else x\n for x in args\n ]\n try:\n with np.errstate(all=\"ignore\"):\n o = func(*args, **kwargs)\n except Exception as e:\n exc_type, exc_value, exc_traceback = sys.exc_info()\n tb = \"\".join(traceback.format_tb(exc_traceback))\n suggest = (\n (\n \"Please specify the dtype explicitly using the \"\n \"`{dtype}` kwarg.\\n\\n\".format(dtype=suggest_dtype)\n )\n if suggest_dtype\n else \"\"\n )\n msg = (\n \"`dtype` inference failed in `{0}`.\\n\\n\"\n \"{1}\"\n \"Original error is below:\\n\"\n \"------------------------\\n\"\n \"{2}\\n\\n\"\n \"Traceback:\\n\"\n \"---------\\n\"\n \"{3}\"\n ).format(funcname, suggest, repr(e), tb)\n else:\n msg = None\n if msg is not None:\n raise ValueError(msg)\n return o.dtype if nout is None else tuple(e.dtype for e in o)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_arg__pass_extra_kwargs.return.func_args_len_keys_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_arg__pass_extra_kwargs.return.func_args_len_keys_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 394, "end_line": 424, "span_ids": ["normalize_arg", "_pass_extra_kwargs"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_arg(x):\n \"\"\"Normalize user provided arguments to blockwise or map_blocks\n\n We do a few things:\n\n 1. If they are string literals that might collide with blockwise_token then we\n quote them\n 2. IF they are large (as defined by sizeof) then we put them into the\n graph on their own by using dask.delayed\n \"\"\"\n if is_dask_collection(x):\n return x\n elif isinstance(x, str) and re.match(r\"_\\d+\", x):\n return delayed(x)\n elif isinstance(x, list) and len(x) >= 10:\n return delayed(x)\n elif sizeof(x) > 1e6:\n return delayed(x)\n else:\n return x\n\n\ndef _pass_extra_kwargs(func, keys, *args, **kwargs):\n \"\"\"Helper for :func:`map_blocks` to pass `block_info` or `block_id`.\n\n For each element of `keys`, a corresponding element of args is changed\n to a keyword argument with that key, before all arguments re passed on\n to `func`.\n \"\"\"\n kwargs.update(zip(keys, args))\n return func(*args[len(keys) :], **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks_map_blocks._Map_a_function_across_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks_map_blocks._Map_a_function_across_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 427, "end_line": 584, "span_ids": ["map_blocks"], "tokens": 1474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_blocks(\n func,\n *args,\n name=None,\n token=None,\n dtype=None,\n chunks=None,\n drop_axis=[],\n new_axis=None,\n meta=None,\n **kwargs,\n):\n \"\"\"Map a function across all blocks of a dask array.\n\n Parameters\n ----------\n func : callable\n Function to apply to every block in the array.\n args : dask arrays or other objects\n dtype : np.dtype, optional\n The ``dtype`` of the output array. It is recommended to provide this.\n If not provided, will be inferred by applying the function to a small\n set of fake data.\n chunks : tuple, optional\n Chunk shape of resulting blocks if the function does not preserve\n shape. If not provided, the resulting array is assumed to have the same\n block structure as the first input array.\n drop_axis : number or iterable, optional\n Dimensions lost by the function.\n new_axis : number or iterable, optional\n New dimensions created by the function. Note that these are applied\n after ``drop_axis`` (if present).\n token : string, optional\n The key prefix to use for the output array. If not provided, will be\n determined from the function name.\n name : string, optional\n The key name to use for the output array. Note that this fully\n specifies the output key name, and must be unique. If not provided,\n will be determined by a hash of the arguments.\n **kwargs :\n Other keyword arguments to pass to function. Values must be constants\n (not dask.arrays)\n\n See Also\n --------\n dask.array.blockwise : Generalized operation with control over block alignment.\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = da.arange(6, chunks=3)\n\n >>> x.map_blocks(lambda x: x * 2).compute()\n array([ 0, 2, 4, 6, 8, 10])\n\n The ``da.map_blocks`` function can also accept multiple arrays.\n\n >>> d = da.arange(5, chunks=2)\n >>> e = da.arange(5, chunks=2)\n\n >>> f = map_blocks(lambda a, b: a + b**2, d, e)\n >>> f.compute()\n array([ 0, 2, 6, 12, 20])\n\n If the function changes shape of the blocks then you must provide chunks\n explicitly.\n\n >>> y = x.map_blocks(lambda x: x[::2], chunks=((2, 2),))\n\n You have a bit of freedom in specifying chunks. If all of the output chunk\n sizes are the same, you can provide just that chunk size as a single tuple.\n\n >>> a = da.arange(18, chunks=(6,))\n >>> b = a.map_blocks(lambda x: x[:3], chunks=(3,))\n\n If the function changes the dimension of the blocks you must specify the\n created or destroyed dimensions.\n\n >>> b = a.map_blocks(lambda x: x[None, :, None], chunks=(1, 6, 1),\n ... new_axis=[0, 2])\n\n If ``chunks`` is specified but ``new_axis`` is not, then it is inferred to\n add the necessary number of axes on the left.\n\n Map_blocks aligns blocks by block positions without regard to shape. In the\n following example we have two arrays with the same number of blocks but\n with different shape and chunk sizes.\n\n >>> x = da.arange(1000, chunks=(100,))\n >>> y = da.arange(100, chunks=(10,))\n\n The relevant attribute to match is numblocks.\n\n >>> x.numblocks\n (10,)\n >>> y.numblocks\n (10,)\n\n If these match (up to broadcasting rules) then we can map arbitrary\n functions across blocks\n\n >>> def func(a, b):\n ... return np.array([a.max(), b.max()])\n\n >>> da.map_blocks(func, x, y, chunks=(2,), dtype='i8')\n dask.array\n\n >>> _.compute()\n array([ 99, 9, 199, 19, 299, 29, 399, 39, 499, 49, 599, 59, 699,\n 69, 799, 79, 899, 89, 999, 99])\n\n Your block function get information about where it is in the array by\n accepting a special ``block_info`` keyword argument.\n\n >>> def func(block, block_info=None):\n ... pass\n\n This will receive the following information:\n\n >>> block_info # doctest: +SKIP\n {0: {'shape': (1000,),\n 'num-chunks': (10,),\n 'chunk-location': (4,),\n 'array-location': [(400, 500)]},\n None: {'shape': (1000,),\n 'num-chunks': (10,),\n 'chunk-location': (4,),\n 'array-location': [(400, 500)],\n 'chunk-shape': (100,),\n 'dtype': dtype('float64')}}\n\n For each argument and keyword arguments that are dask arrays (the positions\n of which are the first index), you will receive the shape of the full\n array, the number of chunks of the full array in each dimension, the chunk\n location (for example the fourth chunk over in the first dimension), and\n the array location (for example the slice corresponding to ``40:50``). The\n same information is provided for the output, with the key ``None``, plus\n the shape and dtype that should be returned.\n\n These features can be combined to synthesize an array from scratch, for\n example:\n\n >>> def func(block_info=None):\n ... loc = block_info[None]['array-location'][0]\n ... return np.arange(loc[0], loc[1])\n\n >>> da.map_blocks(func, chunks=((4, 4),), dtype=np.float_)\n dask.array\n\n >>> _.compute()\n array([0, 1, 2, 3, 4, 5, 6, 7])\n\n You may specify the key name prefix of the resulting task in the graph with\n the optional ``token`` keyword argument.\n\n >>> x.map_blocks(lambda x: x + 1, name='increment') # doctest: +SKIP\n dask.array\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_not_callable_func__map_blocks.if_has_keyword_func_blo.extra_names_append_block": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_not_callable_func__map_blocks.if_has_keyword_func_blo.extra_names_append_block", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 585, "end_line": 679, "span_ids": ["map_blocks"], "tokens": 815}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_blocks(\n func,\n *args,\n name=None,\n token=None,\n dtype=None,\n chunks=None,\n drop_axis=[],\n new_axis=None,\n meta=None,\n **kwargs,\n):\n if not callable(func):\n msg = (\n \"First argument must be callable function, not %s\\n\"\n \"Usage: da.map_blocks(function, x)\\n\"\n \" or: da.map_blocks(function, x, y, z)\"\n )\n raise TypeError(msg % type(func).__name__)\n if token:\n warnings.warn(\"The token= keyword to map_blocks has been moved to name=\")\n name = token\n\n name = \"%s-%s\" % (name or funcname(func), tokenize(func, *args, **kwargs))\n new_axes = {}\n\n if isinstance(drop_axis, Number):\n drop_axis = [drop_axis]\n if isinstance(new_axis, Number):\n new_axis = [new_axis] # TODO: handle new_axis\n\n arrs = [a for a in args if isinstance(a, Array)]\n\n argpairs = [\n (a, tuple(range(a.ndim))[::-1]) if isinstance(a, Array) else (a, None)\n for a in args\n ]\n if arrs:\n out_ind = tuple(range(max(a.ndim for a in arrs)))[::-1]\n else:\n out_ind = ()\n\n original_kwargs = kwargs\n\n if dtype is None and meta is None:\n dtype = apply_infer_dtype(func, args, original_kwargs, \"map_blocks\")\n\n if drop_axis:\n out_ind = tuple(x for i, x in enumerate(out_ind) if i not in drop_axis)\n if new_axis is None and chunks is not None and len(out_ind) < len(chunks):\n new_axis = range(len(chunks) - len(out_ind))\n if new_axis:\n # new_axis = [x + len(drop_axis) for x in new_axis]\n out_ind = list(out_ind)\n for ax in sorted(new_axis):\n n = len(out_ind) + len(drop_axis)\n out_ind.insert(ax, n)\n if chunks is not None:\n new_axes[n] = chunks[ax]\n else:\n new_axes[n] = 1\n out_ind = tuple(out_ind)\n if max(new_axis) > max(out_ind):\n raise ValueError(\"New_axis values do not fill in all dimensions\")\n\n if chunks is not None:\n if len(chunks) != len(out_ind):\n raise ValueError(\n \"Provided chunks have {0} dims, expected {1} \"\n \"dims.\".format(len(chunks), len(out_ind))\n )\n adjust_chunks = dict(zip(out_ind, chunks))\n else:\n adjust_chunks = None\n\n out = blockwise(\n func,\n out_ind,\n *concat(argpairs),\n name=name,\n new_axes=new_axes,\n dtype=dtype,\n concatenate=True,\n align_arrays=False,\n adjust_chunks=adjust_chunks,\n meta=meta,\n **kwargs,\n )\n\n extra_argpairs = []\n extra_names = []\n # If func has block_id as an argument, construct an array of block IDs and\n # prepare to inject it.\n if has_keyword(func, \"block_id\"):\n block_id_name = \"block-id-\" + out.name\n block_id_dsk = {\n (block_id_name,) + block_id: block_id\n for block_id in product(*(range(len(c)) for c in out.chunks))\n }\n block_id_array = Array(\n block_id_dsk,\n block_id_name,\n chunks=tuple((1,) * len(c) for c in out.chunks),\n dtype=np.object_,\n )\n extra_argpairs.append((block_id_array, out_ind))\n extra_names.append(\"block_id\")\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks._If_func_has_block_info__map_blocks.None_11.extra_names_append_block": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks._If_func_has_block_info__map_blocks.None_11.extra_names_append_block", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 681, "end_line": 757, "span_ids": ["map_blocks"], "tokens": 717}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_blocks(\n func,\n *args,\n name=None,\n token=None,\n dtype=None,\n chunks=None,\n drop_axis=[],\n new_axis=None,\n meta=None,\n **kwargs,\n):\n\n # If func has block_info as an argument, construct an array of block info\n # objects and prepare to inject it.\n if has_keyword(func, \"block_info\"):\n starts = {}\n num_chunks = {}\n shapes = {}\n\n for i, (arg, in_ind) in enumerate(argpairs):\n if in_ind is not None:\n shapes[i] = arg.shape\n if drop_axis:\n # We concatenate along dropped axes, so we need to treat them\n # as if there is only a single chunk.\n starts[i] = [\n (\n cached_cumsum(arg.chunks[j], initial_zero=True)\n if ind in out_ind\n else [0, arg.shape[j]]\n )\n for j, ind in enumerate(in_ind)\n ]\n num_chunks[i] = tuple(len(s) - 1 for s in starts[i])\n else:\n starts[i] = [\n cached_cumsum(c, initial_zero=True) for c in arg.chunks\n ]\n num_chunks[i] = arg.numblocks\n out_starts = [cached_cumsum(c, initial_zero=True) for c in out.chunks]\n\n block_info_name = \"block-info-\" + out.name\n block_info_dsk = {}\n for block_id in product(*(range(len(c)) for c in out.chunks)):\n # Get position of chunk, indexed by axis labels\n location = {out_ind[i]: loc for i, loc in enumerate(block_id)}\n info = {}\n for i, shape in shapes.items():\n # Compute chunk key in the array, taking broadcasting into\n # account. We don't directly know which dimensions are\n # broadcast, but any dimension with only one chunk can be\n # treated as broadcast.\n arr_k = tuple(\n location.get(ind, 0) if num_chunks[i][j] > 1 else 0\n for j, ind in enumerate(argpairs[i][1])\n )\n info[i] = {\n \"shape\": shape,\n \"num-chunks\": num_chunks[i],\n \"array-location\": [\n (starts[i][ij][j], starts[i][ij][j + 1])\n for ij, j in enumerate(arr_k)\n ],\n \"chunk-location\": arr_k,\n }\n\n info[None] = {\n \"shape\": out.shape,\n \"num-chunks\": out.numblocks,\n \"array-location\": [\n (out_starts[ij][j], out_starts[ij][j + 1])\n for ij, j in enumerate(block_id)\n ],\n \"chunk-location\": block_id,\n \"chunk-shape\": tuple(\n out.chunks[ij][j] for ij, j in enumerate(block_id)\n ),\n \"dtype\": dtype,\n }\n block_info_dsk[(block_info_name,) + block_id] = info\n\n block_info = Array(\n block_info_dsk,\n block_info_name,\n chunks=tuple((1,) * len(c) for c in out.chunks),\n dtype=np.object_,\n )\n extra_argpairs.append((block_info, out_ind))\n extra_names.append(\"block_info\")\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_extra_argpairs__map_blocks.return.out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_map_blocks.if_extra_argpairs__map_blocks.return.out", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 759, "end_line": 782, "span_ids": ["map_blocks"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_blocks(\n func,\n *args,\n name=None,\n token=None,\n dtype=None,\n chunks=None,\n drop_axis=[],\n new_axis=None,\n meta=None,\n **kwargs,\n):\n # ... other code\n\n if extra_argpairs:\n # Rewrite the Blockwise layer. It would be nice to find a way to\n # avoid doing it twice, but it's currently needed to determine\n # out.chunks from the first pass. Since it constructs a Blockwise\n # rather than an expanded graph, it shouldn't be too expensive.\n out = blockwise(\n _pass_extra_kwargs,\n out_ind,\n func,\n None,\n tuple(extra_names),\n None,\n *concat(extra_argpairs),\n *concat(argpairs),\n name=out.name,\n dtype=out.dtype,\n concatenate=True,\n align_arrays=False,\n adjust_chunks=dict(zip(out_ind, out.chunks)),\n meta=meta,\n **kwargs,\n )\n\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_chunks_broadcast_chunks.return.tuple_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_chunks_broadcast_chunks.return.tuple_result_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 785, "end_line": 826, "span_ids": ["broadcast_chunks"], "tokens": 422}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def broadcast_chunks(*chunkss):\n \"\"\"Construct a chunks tuple that broadcasts many chunks tuples\n\n >>> a = ((5, 5),)\n >>> b = ((5, 5),)\n >>> broadcast_chunks(a, b)\n ((5, 5),)\n\n >>> a = ((10, 10, 10), (5, 5),)\n >>> b = ((5, 5),)\n >>> broadcast_chunks(a, b)\n ((10, 10, 10), (5, 5))\n\n >>> a = ((10, 10, 10), (5, 5),)\n >>> b = ((1,), (5, 5),)\n >>> broadcast_chunks(a, b)\n ((10, 10, 10), (5, 5))\n\n >>> a = ((10, 10, 10), (5, 5),)\n >>> b = ((3, 3,), (5, 5),)\n >>> broadcast_chunks(a, b)\n Traceback (most recent call last):\n ...\n ValueError: Chunks do not align: [(10, 10, 10), (3, 3)]\n \"\"\"\n if not chunkss:\n return ()\n elif len(chunkss) == 1:\n return chunkss[0]\n n = max(map(len, chunkss))\n chunkss2 = [((1,),) * (n - len(c)) + c for c in chunkss]\n result = []\n for i in range(n):\n step1 = [c[i] for c in chunkss2]\n if all(c == (1,) for c in step1):\n step2 = step1\n else:\n step2 = [c for c in step1 if c != (1,)]\n if len(set(step2)) != 1:\n raise ValueError(\"Chunks do not align: %s\" % str(step2))\n result.append(step2[0])\n return tuple(result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store_store.sources_dsk_1.Array___dask_optimize___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store_store.sources_dsk_1.Array___dask_optimize___", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 829, "end_line": 915, "span_ids": ["store"], "tokens": 768}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def store(\n sources,\n targets,\n lock=True,\n regions=None,\n compute=True,\n return_stored=False,\n **kwargs,\n):\n \"\"\"Store dask arrays in array-like objects, overwrite data in target\n\n This stores dask arrays into object that supports numpy-style setitem\n indexing. It stores values chunk by chunk so that it does not have to\n fill up memory. For best performance you can align the block size of\n the storage target with the block size of your array.\n\n If your data fits in memory then you may prefer calling\n ``np.array(myarray)`` instead.\n\n Parameters\n ----------\n\n sources: Array or iterable of Arrays\n targets: array-like or Delayed or iterable of array-likes and/or Delayeds\n These should support setitem syntax ``target[10:20] = ...``\n lock: boolean or threading.Lock, optional\n Whether or not to lock the data stores while storing.\n Pass True (lock each file individually), False (don't lock) or a\n particular ``threading.Lock`` object to be shared among all writes.\n regions: tuple of slices or list of tuples of slices\n Each ``region`` tuple in ``regions`` should be such that\n ``target[region].shape = source.shape``\n for the corresponding source and target in sources and targets,\n respectively. If this is a tuple, the contents will be assumed to be\n slices, so do not provide a tuple of tuples.\n compute: boolean, optional\n If true compute immediately, return ``dask.delayed.Delayed`` otherwise\n return_stored: boolean, optional\n Optionally return the stored result (default False).\n\n Examples\n --------\n >>> x = ... # doctest: +SKIP\n\n >>> import h5py # doctest: +SKIP\n >>> f = h5py.File('myfile.hdf5', mode='a') # doctest: +SKIP\n >>> dset = f.create_dataset('/data', shape=x.shape,\n ... chunks=x.chunks,\n ... dtype='f8') # doctest: +SKIP\n\n >>> store(x, dset) # doctest: +SKIP\n\n Alternatively store many arrays at the same time\n\n >>> store([x, y, z], [dset1, dset2, dset3]) # doctest: +SKIP\n \"\"\"\n\n if isinstance(sources, Array):\n sources = [sources]\n targets = [targets]\n\n if any(not isinstance(s, Array) for s in sources):\n raise ValueError(\"All sources must be dask array objects\")\n\n if len(sources) != len(targets):\n raise ValueError(\n \"Different number of sources [%d] and targets [%d]\"\n % (len(sources), len(targets))\n )\n\n if isinstance(regions, tuple) or regions is None:\n regions = [regions]\n\n if len(sources) > 1 and len(regions) == 1:\n regions *= len(sources)\n\n if len(sources) != len(regions):\n raise ValueError(\n \"Different number of sources [%d] and targets [%d] than regions [%d]\"\n % (len(sources), len(targets), len(regions))\n )\n\n # Optimize all sources together\n sources_dsk = HighLevelGraph.merge(*[e.__dask_graph__() for e in sources])\n sources_dsk = Array.__dask_optimize__(\n sources_dsk, list(core.flatten([e.__dask_keys__() for e in sources]))\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store.sources2_store.if_return_stored_.else_.if_compute_.else_.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_store.sources2_store.if_return_stored_.else_.if_compute_.else_.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 916, "end_line": 971, "span_ids": ["store"], "tokens": 536}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def store(\n sources,\n targets,\n lock=True,\n regions=None,\n compute=True,\n return_stored=False,\n **kwargs,\n):\n # ... other code\n sources2 = [Array(sources_dsk, e.name, e.chunks, meta=e) for e in sources]\n\n # Optimize all targets together\n targets2 = []\n targets_keys = []\n targets_dsk = []\n for e in targets:\n if isinstance(e, Delayed):\n targets2.append(e.key)\n targets_keys.extend(e.__dask_keys__())\n targets_dsk.append(e.__dask_graph__())\n elif is_dask_collection(e):\n raise TypeError(\"Targets must be either Delayed objects or array-likes\")\n else:\n targets2.append(e)\n\n targets_dsk = HighLevelGraph.merge(*targets_dsk)\n targets_dsk = Delayed.__dask_optimize__(targets_dsk, targets_keys)\n\n load_stored = return_stored and not compute\n toks = [str(uuid.uuid1()) for _ in range(len(sources))]\n store_dsk = HighLevelGraph.merge(\n *[\n insert_to_ooc(s, t, lock, r, return_stored, load_stored, tok)\n for s, t, r, tok in zip(sources2, targets2, regions, toks)\n ]\n )\n store_keys = list(store_dsk.keys())\n\n store_dsk = HighLevelGraph.merge(store_dsk, targets_dsk, sources_dsk)\n\n if return_stored:\n load_store_dsk = store_dsk\n if compute:\n store_dlyds = [Delayed(k, store_dsk) for k in store_keys]\n store_dlyds = persist(*store_dlyds, **kwargs)\n store_dsk_2 = HighLevelGraph.merge(*[e.dask for e in store_dlyds])\n\n load_store_dsk = retrieve_from_ooc(store_keys, store_dsk, store_dsk_2)\n\n result = tuple(\n Array(load_store_dsk, \"load-store-%s\" % t, s.chunks, meta=s)\n for s, t in zip(sources, toks)\n )\n\n return result\n else:\n name = \"store-\" + str(uuid.uuid1())\n dsk = HighLevelGraph.merge({name: store_keys}, store_dsk)\n result = Delayed(name, dsk)\n\n if compute:\n result.compute(**kwargs)\n return None\n else:\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_blockdims_from_blockshape_blockdims_from_blockshape.return.tuple_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_blockdims_from_blockshape_blockdims_from_blockshape.return.tuple_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 974, "end_line": 1000, "span_ids": ["blockdims_from_blockshape"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def blockdims_from_blockshape(shape, chunks):\n \"\"\"\n\n >>> blockdims_from_blockshape((10, 10), (4, 3))\n ((4, 4, 2), (3, 3, 3, 1))\n >>> blockdims_from_blockshape((10, 0), (4, 0))\n ((4, 4, 2), (0,))\n \"\"\"\n if chunks is None:\n raise TypeError(\"Must supply chunks= keyword argument\")\n if shape is None:\n raise TypeError(\"Must supply shape= keyword argument\")\n if np.isnan(sum(shape)) or np.isnan(sum(chunks)):\n raise ValueError(\n \"Array chunk sizes are unknown. shape: %s, chunks: %s%s\"\n % (shape, chunks, unknown_chunk_message)\n )\n if not all(map(is_integer, chunks)):\n raise ValueError(\"chunks can only contain integers.\")\n if not all(map(is_integer, shape)):\n raise ValueError(\"shape can only contain integers.\")\n shape = tuple(map(int, shape))\n chunks = tuple(map(int, chunks))\n return tuple(\n ((bd,) * (d // bd) + ((d % bd,) if d % bd else ()) if d else (0,))\n for d, bd in zip(shape, chunks)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_finalize_CHUNKS_NONE_ERROR_MESSAGE._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_finalize_CHUNKS_NONE_ERROR_MESSAGE._", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1003, "end_line": 1021, "span_ids": ["finalize", "impl:17"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def finalize(results):\n if not results:\n return concatenate3(results)\n results2 = results\n while isinstance(results2, (tuple, list)):\n if len(results2) > 1:\n return concatenate3(results)\n else:\n results2 = results2[0]\n return unpack_singleton(results)\n\n\nCHUNKS_NONE_ERROR_MESSAGE = \"\"\"\nYou must specify a chunks= keyword argument.\nThis specifies the chunksize of your array blocks.\n\nSee the following documentation page for details:\n https://docs.dask.org/en/latest/array-creation.html#chunks\n\"\"\".strip()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array_Array.__slots__._dask__name__cached": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array_Array.__slots__._dask__name__cached", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1024, "end_line": 1053, "span_ids": ["Array"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n \"\"\"Parallel Dask Array\n\n A parallel nd-array comprised of many numpy arrays arranged in a grid.\n\n This constructor is for advanced uses only. For normal use see the\n ``da.from_array`` function.\n\n Parameters\n ----------\n dask : dict\n Task dependency graph\n name : string\n Name of array in dask\n shape : tuple of ints\n Shape of the entire array\n chunks: iterable of tuples\n block sizes along each dimension\n dtype : str or dtype\n Typecode or data-type for the new Dask Array\n meta : empty ndarray\n empty ndarray created with same NumPy backend, ndim and dtype as the\n Dask Array being created (overrides dtype)\n\n See Also\n --------\n dask.array.from_array\n \"\"\"\n\n __slots__ = \"dask\", \"_name\", \"_cached_keys\", \"_chunks\", \"_meta\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__new___Array.__new__.return.self": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__new___Array.__new__.return.self", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1055, "end_line": 1084, "span_ids": ["Array.__new__"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __new__(cls, dask, name, chunks, dtype=None, meta=None, shape=None):\n self = super(Array, cls).__new__(cls)\n assert isinstance(dask, Mapping)\n if not isinstance(dask, HighLevelGraph):\n dask = HighLevelGraph.from_collections(name, dask, dependencies=())\n self.dask = dask\n self.name = str(name)\n meta = meta_from_array(meta, dtype=dtype)\n\n if (\n isinstance(chunks, str)\n or isinstance(chunks, tuple)\n and chunks\n and any(isinstance(c, str) for c in chunks)\n ):\n dt = meta.dtype\n else:\n dt = None\n self._chunks = normalize_chunks(chunks, shape, dtype=dt)\n if self._chunks is None:\n raise ValueError(CHUNKS_NONE_ERROR_MESSAGE)\n\n self._meta = meta_from_array(meta, ndim=self.ndim, dtype=dtype)\n\n for plugin in config.get(\"array_plugins\", ()):\n result = plugin(self)\n if result is not None:\n self = result\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__reduce___Array.__dask_keys__.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__reduce___Array.__dask_keys__.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1086, "end_line": 1112, "span_ids": ["Array.__dask_layers__", "Array.__dask_keys__", "Array.__reduce__", "Array.__dask_graph__"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __reduce__(self):\n return (Array, (self.dask, self.name, self.chunks, self.dtype))\n\n def __dask_graph__(self):\n return self.dask\n\n def __dask_layers__(self):\n return (self.name,)\n\n def __dask_keys__(self):\n if self._cached_keys is not None:\n return self._cached_keys\n\n name, chunks, numblocks = self.name, self.chunks, self.numblocks\n\n def keys(*args):\n if not chunks:\n return [(name,)]\n ind = len(args)\n if ind + 1 == len(numblocks):\n result = [(name,) + args + (i,) for i in range(numblocks[ind])]\n else:\n result = [keys(*(args + (i,))) for i in range(numblocks[ind])]\n return result\n\n self._cached_keys = result = keys()\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__dask_tokenize___Array.npartitions.return.reduce_mul_self_numblock": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__dask_tokenize___Array.npartitions.return.reduce_mul_self_numblock", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1114, "end_line": 1134, "span_ids": ["Array.numblocks", "Array.__dask_tokenize__", "Array:5", "Array.__dask_postpersist__", "Array.__dask_postcompute__", "Array.npartitions"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __dask_tokenize__(self):\n return self.name\n\n __dask_optimize__ = globalmethod(\n optimize, key=\"array_optimize\", falsey=dont_optimize\n )\n __dask_scheduler__ = staticmethod(threaded.get)\n\n def __dask_postcompute__(self):\n return finalize, ()\n\n def __dask_postpersist__(self):\n return Array, (self.name, self.chunks, self.dtype, self._meta)\n\n @property\n def numblocks(self):\n return tuple(map(len, self.chunks))\n\n @property\n def npartitions(self):\n return reduce(mul, self.numblocks, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.compute_chunk_sizes_Array.compute_chunk_sizes.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.compute_chunk_sizes_Array.compute_chunk_sizes.return.x", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1136, "end_line": 1183, "span_ids": ["Array.compute_chunk_sizes"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def compute_chunk_sizes(self):\n \"\"\"\n Compute the chunk sizes for a Dask array. This is especially useful\n when the chunk sizes are unknown (e.g., when indexing one Dask array\n with another).\n\n Notes\n -----\n This function modifies the Dask array in-place.\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> x = da.from_array([-2, -1, 0, 1, 2], chunks=2)\n >>> x.chunks\n ((2, 2, 1),)\n >>> y = x[x <= 0]\n >>> y.chunks\n ((nan, nan, nan),)\n >>> y.compute_chunk_sizes() # in-place computation\n dask.array\n >>> y.chunks\n ((2, 1, 0),)\n\n \"\"\"\n x = self\n chunk_shapes = x.map_blocks(\n _get_chunk_shape,\n dtype=int,\n chunks=tuple(len(c) * (1,) for c in x.chunks) + ((x.ndim,),),\n new_axis=x.ndim,\n )\n\n c = []\n for i in range(x.ndim):\n s = x.ndim * [0] + [i]\n s[i] = slice(None)\n s = tuple(s)\n\n c.append(tuple(chunk_shapes[s]))\n\n # `map_blocks` assigns numpy dtypes\n # cast chunk dimensions back to python int before returning\n x._chunks = tuple(\n [tuple([int(chunk) for chunk in chunks]) for chunks in compute(tuple(c))[0]]\n )\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.shape_Array.__len__.return.sum_self_chunks_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.shape_Array.__len__.return.sum_self_chunks_0_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1185, "end_line": 1215, "span_ids": ["Array._get_chunks", "Array:9", "Array._set_chunks", "Array.dtype", "Array.chunksize", "Array.__len__", "Array.shape"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def shape(self):\n return tuple(cached_cumsum(c, initial_zero=True)[-1] for c in self.chunks)\n\n @property\n def chunksize(self):\n return tuple(max(c) for c in self.chunks)\n\n @property\n def dtype(self):\n return self._meta.dtype\n\n def _get_chunks(self):\n return self._chunks\n\n def _set_chunks(self, chunks):\n msg = (\n \"Can not set chunks directly\\n\\n\"\n \"Please use the rechunk method instead:\\n\"\n \" x.rechunk({})\\n\\n\"\n \"If trying to avoid unknown chunks, use\\n\"\n \" x.compute_chunk_sizes()\"\n )\n raise TypeError(msg.format(chunks))\n\n chunks = property(_get_chunks, _set_chunks, \"chunks property\")\n\n def __len__(self):\n if not self.chunks:\n raise TypeError(\"len() of unsized object\")\n return sum(self.chunks[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_ufunc___Array.__array_ufunc__.if_method___call___.else_.return.NotImplemented": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_ufunc___Array.__array_ufunc__.if_method___call___.else_.return.NotImplemented", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1217, "end_line": 1255, "span_ids": ["Array.__array_ufunc__"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __array_ufunc__(self, numpy_ufunc, method, *inputs, **kwargs):\n out = kwargs.get(\"out\", ())\n for x in inputs + out:\n # Verify all arrays are properly handled by Dask\n if not isinstance(x, Array) and not is_valid_array_chunk(x):\n return NotImplemented\n\n if method == \"__call__\":\n if numpy_ufunc is np.matmul:\n from .routines import matmul\n\n # special case until apply_gufunc handles optional dimensions\n return matmul(*inputs, **kwargs)\n if numpy_ufunc.signature is not None:\n from .gufunc import apply_gufunc\n\n return apply_gufunc(\n numpy_ufunc, numpy_ufunc.signature, *inputs, **kwargs\n )\n if numpy_ufunc.nout > 1:\n from . import ufunc\n\n try:\n da_ufunc = getattr(ufunc, numpy_ufunc.__name__)\n except AttributeError:\n return NotImplemented\n return da_ufunc(*inputs, **kwargs)\n else:\n return elemwise(numpy_ufunc, *inputs, **kwargs)\n elif method == \"outer\":\n from . import ufunc\n\n try:\n da_ufunc = getattr(ufunc, numpy_ufunc.__name__)\n except AttributeError:\n return NotImplemented\n return da_ufunc.outer(*inputs, **kwargs)\n else:\n return NotImplemented", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__repr___Array._repr_html_.return._n_join_both_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__repr___Array._repr_html_.return._n_join_both_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1257, "end_line": 1294, "span_ids": ["Array._repr_html_", "Array.__repr__"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __repr__(self):\n \"\"\"\n\n >>> import dask.array as da\n >>> da.ones((10, 10), chunks=(5, 5), dtype='i4')\n dask.array<..., shape=(10, 10), dtype=int32, chunksize=(5, 5), chunktype=numpy.ndarray>\n \"\"\"\n chunksize = str(self.chunksize)\n name = self.name.rsplit(\"-\", 1)[0]\n return \"dask.array<%s, shape=%s, dtype=%s, chunksize=%s, chunktype=%s.%s>\" % (\n name,\n self.shape,\n self.dtype,\n chunksize,\n type(self._meta).__module__.split(\".\")[0],\n type(self._meta).__name__,\n )\n\n def _repr_html_(self):\n table = self._repr_html_table()\n try:\n grid = self.to_svg(size=config.get(\"array.svg.size\", 120))\n except NotImplementedError:\n grid = \"\"\n\n both = [\n \"\",\n \"\",\n \"\",\n table,\n \" | \",\n \"\",\n grid,\n \" | \",\n \"
\",\n \"
\",\n ]\n return \"\\n\".join(both)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._repr_html_table_Array._repr_html_table.return._n_join_table_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._repr_html_table_Array._repr_html_table.return._n_join_table_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1296, "end_line": 1330, "span_ids": ["Array._repr_html_table"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def _repr_html_table(self):\n if \"sparse\" in typename(type(self._meta)):\n nbytes = None\n cbytes = None\n elif not math.isnan(self.nbytes):\n nbytes = format_bytes(self.nbytes)\n cbytes = format_bytes(np.prod(self.chunksize) * self.dtype.itemsize)\n else:\n nbytes = \"unknown\"\n cbytes = \"unknown\"\n\n table = [\n \"\",\n \" \",\n \" | Array | Chunk |
\",\n \" \",\n \" \",\n \" Bytes | %s | %s |
\"\n % (nbytes, cbytes)\n if nbytes is not None\n else \"\",\n \" Shape | %s | %s |
\"\n % (str(self.shape), str(self.chunksize)),\n \" Count | %d Tasks | %d Chunks |
\"\n % (len(self.__dask_graph__()), self.npartitions),\n \" Type | %s | %s.%s |
\"\n % (\n self.dtype,\n type(self._meta).__module__.split(\".\")[0],\n type(self._meta).__name__,\n ),\n \" \",\n \"
\",\n ]\n return \"\\n\".join(table)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.ndim_Array.__array__.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.ndim_Array.__array__.return.x", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1332, "end_line": 1369, "span_ids": ["Array.name_26", "Array.ndim", "Array.__array__", "Array.size", "Array.name", "Array.itemsize", "Array:11", "Array.nbytes"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def ndim(self):\n return len(self.shape)\n\n @property\n def size(self):\n \"\"\" Number of elements in array \"\"\"\n return reduce(mul, self.shape, 1)\n\n @property\n def nbytes(self):\n \"\"\" Number of bytes in array \"\"\"\n return self.size * self.dtype.itemsize\n\n @property\n def itemsize(self):\n \"\"\" Length of one array element in bytes \"\"\"\n return self.dtype.itemsize\n\n @property\n def name(self):\n return self._name\n\n @name.setter\n def name(self, val):\n self._name = val\n # Clear the key cache when the name is reset\n self._cached_keys = None\n\n __array_priority__ = 11 # higher than numpy.ndarray and numpy.matrix\n\n def __array__(self, dtype=None, **kwargs):\n x = self.compute()\n if dtype and x.dtype != dtype:\n x = x.astype(dtype)\n if not isinstance(x, np.ndarray):\n x = np.array(x)\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function___Array.__array_function__.handle_nonmatching_names.return._HANDLED_FUNCTIONS_func_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function___Array.__array_function__.handle_nonmatching_names.return._HANDLED_FUNCTIONS_func_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1371, "end_line": 1392, "span_ids": ["Array.__array_function__"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __array_function__(self, func, types, args, kwargs):\n import dask.array as module\n\n def handle_nonmatching_names(func, args, kwargs):\n if func not in _HANDLED_FUNCTIONS:\n warnings.warn(\n \"The `{}` function is not implemented by Dask array. \"\n \"You may want to use the da.map_blocks function \"\n \"or something similar to silence this warning. \"\n \"Your code may stop working in a future release.\".format(\n func.__module__ + \".\" + func.__name__\n ),\n FutureWarning,\n )\n # Need to convert to array object (e.g. numpy.ndarray or\n # cupy.ndarray) as needed, so we can call the NumPy function\n # again and it gets the chance to dispatch to the right\n # implementation.\n args, kwargs = compute(args, kwargs)\n return func(*args, **kwargs)\n\n return _HANDLED_FUNCTIONS[func](*args, **kwargs)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function__._First_verify_that_all__Array.__array_function__.return.da_func_args_kwargs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__array_function__._First_verify_that_all__Array.__array_function__.return.da_func_args_kwargs_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1394, "end_line": 1413, "span_ids": ["Array.__array_function__"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __array_function__(self, func, types, args, kwargs):\n\n # First, verify that all types are handled by Dask. Otherwise, return NotImplemented.\n if not all(type is Array or is_valid_chunk_type(type) for type in types):\n return NotImplemented\n\n # Now try to find a matching function name. If that doesn't work, we may\n # be dealing with an alias or a function that's simply not in the Dask API.\n # Handle aliases via the _HANDLED_FUNCTIONS dict mapping, and warn otherwise.\n for submodule in func.__module__.split(\".\")[1:]:\n try:\n module = getattr(module, submodule)\n except AttributeError:\n return handle_nonmatching_names(func, args, kwargs)\n\n if not hasattr(module, func.__name__):\n return handle_nonmatching_names(func, args, kwargs)\n\n da_func = getattr(module, func.__name__)\n if da_func is func:\n return handle_nonmatching_names(func, args, kwargs)\n return da_func(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._elemwise_Array.to_svg.return.svg_self_chunks_size_siz": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._elemwise_Array.to_svg.return.svg_self_chunks_size_siz", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1415, "end_line": 1447, "span_ids": ["Array.to_svg", "Array.store", "Array._elemwise"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def _elemwise(self):\n return elemwise\n\n @wraps(store)\n def store(self, target, **kwargs):\n r = store([self], [target], **kwargs)\n\n if kwargs.get(\"return_stored\", False):\n r = r[0]\n\n return r\n\n def to_svg(self, size=500):\n \"\"\"Convert chunks from Dask Array into an SVG Image\n\n Parameters\n ----------\n chunks: tuple\n size: int\n Rough size of the image\n\n Examples\n --------\n >>> x.to_svg(size=500) # doctest: +SKIP\n\n Returns\n -------\n text: An svg string depicting the array as a grid of chunks\n \"\"\"\n from .svg import svg\n\n return svg(self.chunks, size=size)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_hdf5_Array.to_hdf5.return.to_hdf5_filename_datapat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_hdf5_Array.to_hdf5.return.to_hdf5_filename_datapat", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1449, "end_line": 1463, "span_ids": ["Array.to_hdf5"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def to_hdf5(self, filename, datapath, **kwargs):\n \"\"\"Store array in HDF5 file\n\n >>> x.to_hdf5('myfile.hdf5', '/x') # doctest: +SKIP\n\n Optionally provide arguments as though to ``h5py.File.create_dataset``\n\n >>> x.to_hdf5('myfile.hdf5', '/x', compression='lzf', shuffle=True) # doctest: +SKIP\n\n See Also\n --------\n da.store\n h5py.File.create_dataset\n \"\"\"\n return to_hdf5(filename, datapath, self, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_dask_dataframe_Array.to_dask_dataframe.return.from_dask_array_self_col": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_dask_dataframe_Array.to_dask_dataframe.return.from_dask_array_self_col", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1465, "end_line": 1494, "span_ids": ["Array.to_dask_dataframe"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def to_dask_dataframe(self, columns=None, index=None, meta=None):\n \"\"\"Convert dask Array to dask Dataframe\n\n Parameters\n ----------\n columns: list or string\n list of column names if DataFrame, single string if Series\n index : dask.dataframe.Index, optional\n An optional *dask* Index to use for the output Series or DataFrame.\n\n The default output index depends on whether the array has any unknown\n chunks. If there are any unknown chunks, the output has ``None``\n for all the divisions (one per chunk). If all the chunks are known,\n a default index with known divsions is created.\n\n Specifying ``index`` can be useful if you're conforming a Dask Array\n to an existing dask Series or DataFrame, and you would like the\n indices to match.\n meta : object, optional\n An optional `meta` parameter can be passed for dask\n to specify the concrete dataframe type to use for partitions of\n the Dask dataframe. By default, pandas DataFrame is used.\n\n See Also\n --------\n dask.dataframe.from_dask_array\n \"\"\"\n from ..dataframe import from_dask_array\n\n return from_dask_array(self, columns=columns, index=index, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__bool___Array.__complex__.return.self__scalarfunc_complex_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__bool___Array.__complex__.return.self__scalarfunc_complex_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1496, "end_line": 1522, "span_ids": ["Array.__int__", "Array._scalarfunc", "Array.__float__", "Array:13", "Array.__complex__", "Array.__bool__", "Array:15"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __bool__(self):\n if self.size > 1:\n raise ValueError(\n \"The truth value of a {0} is ambiguous. \"\n \"Use a.any() or a.all().\".format(self.__class__.__name__)\n )\n else:\n return bool(self.compute())\n\n __nonzero__ = __bool__ # python 2\n\n def _scalarfunc(self, cast_type):\n if self.size > 1:\n raise TypeError(\"Only length-1 arrays can be converted to Python scalars\")\n else:\n return cast_type(self.compute())\n\n def __int__(self):\n return self._scalarfunc(int)\n\n __long__ = __int__ # python 2\n\n def __float__(self):\n return self._scalarfunc(float)\n\n def __complex__(self):\n return self._scalarfunc(complex)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__setitem___Array.__setitem__.if_isinstance_key_Array_.else_.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__setitem___Array.__setitem__.if_isinstance_key_Array_.else_.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1524, "end_line": 1539, "span_ids": ["Array.__setitem__"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __setitem__(self, key, value):\n from .routines import where\n\n if isinstance(key, Array):\n if isinstance(value, Array) and value.ndim > 1:\n raise ValueError(\"boolean index array should have 1 dimension\")\n y = where(key, value, self)\n self._meta = y._meta\n self.dask = y.dask\n self.name = y.name\n self._chunks = y.chunks\n return self\n else:\n raise NotImplementedError(\n \"Item assignment with %s not supported\" % type(key)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__getitem___Array.__getitem__.return.Array_graph_out_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__getitem___Array.__getitem__.return.Array_graph_out_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1541, "end_line": 1592, "span_ids": ["Array.__getitem__"], "tokens": 459}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __getitem__(self, index):\n # Field access, e.g. x['a'] or x[['a', 'b']]\n if isinstance(index, str) or (\n isinstance(index, list) and index and all(isinstance(i, str) for i in index)\n ):\n if isinstance(index, str):\n dt = self.dtype[index]\n else:\n dt = _make_sliced_dtype(self.dtype, index)\n\n if dt.shape:\n new_axis = list(range(self.ndim, self.ndim + len(dt.shape)))\n chunks = self.chunks + tuple((i,) for i in dt.shape)\n return self.map_blocks(\n getitem, index, dtype=dt.base, chunks=chunks, new_axis=new_axis\n )\n else:\n return self.map_blocks(getitem, index, dtype=dt)\n\n if not isinstance(index, tuple):\n index = (index,)\n\n from .slicing import (\n normalize_index,\n slice_with_int_dask_array,\n slice_with_bool_dask_array,\n )\n\n index2 = normalize_index(index, self.shape)\n dependencies = {self.name}\n for i in index2:\n if isinstance(i, Array):\n dependencies.add(i.name)\n\n if any(isinstance(i, Array) and i.dtype.kind in \"iu\" for i in index2):\n self, index2 = slice_with_int_dask_array(self, index2)\n if any(isinstance(i, Array) and i.dtype == bool for i in index2):\n self, index2 = slice_with_bool_dask_array(self, index2)\n\n if all(isinstance(i, slice) and i == slice(None) for i in index2):\n return self\n\n out = \"getitem-\" + tokenize(self, index2)\n dsk, chunks = slice_array(out, self.name, self.chunks, index2, self.itemsize)\n\n graph = HighLevelGraph.from_collections(out, dsk, dependencies=[self])\n\n meta = meta_from_array(self._meta, ndim=len(chunks))\n if np.isscalar(meta):\n meta = np.array(meta)\n\n return Array(graph, out, chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._vindex_Array._vindex.return._vindex_self_key_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._vindex_Array._vindex.return._vindex_self_key_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1594, "end_line": 1612, "span_ids": ["Array._vindex"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def _vindex(self, key):\n if not isinstance(key, tuple):\n key = (key,)\n if any(k is None for k in key):\n raise IndexError(\n \"vindex does not support indexing with None (np.newaxis), \"\n \"got {}\".format(key)\n )\n if all(isinstance(k, slice) for k in key):\n if all(\n k.indices(d) == slice(0, d).indices(d) for k, d in zip(key, self.shape)\n ):\n return self\n raise IndexError(\n \"vindex requires at least one non-slice to vectorize over \"\n \"when the slices are not over the entire array (i.e, x[:]). \"\n \"Use normal slicing instead when only using slices. Got: {}\".format(key)\n )\n return _vindex(self, *key)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.vindex_Array.vindex.return.IndexCallable_self__vinde": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.vindex_Array.vindex.return.IndexCallable_self__vinde", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1614, "end_line": 1635, "span_ids": ["Array.vindex"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def vindex(self):\n \"\"\"Vectorized indexing with broadcasting.\n\n This is equivalent to numpy's advanced indexing, using arrays that are\n broadcast against each other. This allows for pointwise indexing:\n\n >>> x = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])\n >>> x = from_array(x, chunks=2)\n >>> x.vindex[[0, 1, 2], [0, 1, 2]].compute()\n array([1, 5, 9])\n\n Mixed basic/advanced indexing with slices/arrays is also supported. The\n order of dimensions in the result follows those proposed for\n `ndarray.vindex `_:\n the subspace spanned by arrays is followed by all slices.\n\n Note: ``vindex`` provides more general functionality than standard\n indexing, but it also has fewer optimizations and can be significantly\n slower.\n \"\"\"\n return IndexCallable(self._vindex)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._blocks_Array._blocks.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array._blocks_Array._blocks.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1637, "end_line": 1662, "span_ids": ["Array._blocks"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def _blocks(self, index):\n from .slicing import normalize_index\n\n if not isinstance(index, tuple):\n index = (index,)\n if sum(isinstance(ind, (np.ndarray, list)) for ind in index) > 1:\n raise ValueError(\"Can only slice with a single list\")\n if any(ind is None for ind in index):\n raise ValueError(\"Slicing with np.newaxis or None is not supported\")\n index = normalize_index(index, self.numblocks)\n index = tuple(slice(k, k + 1) if isinstance(k, Number) else k for k in index)\n\n name = \"blocks-\" + tokenize(self, index)\n\n new_keys = np.array(self.__dask_keys__(), dtype=object)[index]\n\n chunks = tuple(\n tuple(np.array(c)[i].tolist()) for c, i in zip(self.chunks, index)\n )\n\n keys = product(*(range(len(c)) for c in chunks))\n\n layer = {(name,) + key: tuple(new_keys[key].tolist()) for key in keys}\n\n graph = HighLevelGraph.from_collections(name, layer, dependencies=[self])\n return Array(graph, name, chunks, meta=self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.blocks_Array.blocks.return.IndexCallable_self__block": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.blocks_Array.blocks.return.IndexCallable_self__block", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1664, "end_line": 1696, "span_ids": ["Array.blocks"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def blocks(self):\n \"\"\"Slice an array by blocks\n\n This allows blockwise slicing of a Dask array. You can perform normal\n Numpy-style slicing but now rather than slice elements of the array you\n slice along blocks so, for example, ``x.blocks[0, ::2]`` produces a new\n dask array with every other block in the first row of blocks.\n\n You can index blocks in any way that could index a numpy array of shape\n equal to the number of blocks in each dimension, (available as\n array.numblocks). The dimension of the output array will be the same\n as the dimension of this array, even if integer indices are passed.\n This does not support slicing with ``np.newaxis`` or multiple lists.\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = da.arange(10, chunks=2)\n >>> x.blocks[0].compute()\n array([0, 1])\n >>> x.blocks[:3].compute()\n array([0, 1, 2, 3, 4, 5])\n >>> x.blocks[::2].compute()\n array([0, 1, 4, 5, 8, 9])\n >>> x.blocks[[-1, 0]].compute()\n array([8, 9, 0, 1])\n\n Returns\n -------\n A Dask array\n \"\"\"\n return IndexCallable(self._blocks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.partitions_Array.partitions.return.self_blocks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.partitions_Array.partitions.return.self_blocks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1698, "end_line": 1735, "span_ids": ["Array.partitions"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @property\n def partitions(self):\n \"\"\"Slice an array by partitions. Alias of dask array .blocks attribute.\n\n This alias allows you to write agnostic code that works with both\n dask arrays and dask dataframes.\n\n This allows blockwise slicing of a Dask array. You can perform normal\n Numpy-style slicing but now rather than slice elements of the array you\n slice along blocks so, for example, ``x.blocks[0, ::2]`` produces a new\n dask array with every other block in the first row of blocks.\n\n You can index blocks in any way that could index a numpy array of shape\n equal to the number of blocks in each dimension, (available as\n array.numblocks). The dimension of the output array will be the same\n as the dimension of this array, even if integer indices are passed.\n This does not support slicing with ``np.newaxis`` or multiple lists.\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = da.arange(10, chunks=2)\n >>> x.partitions[0].compute()\n array([0, 1])\n >>> x.partitions[:3].compute()\n array([0, 1, 2, 3, 4, 5])\n >>> x.partitions[::2].compute()\n array([0, 1, 4, 5, 8, 9])\n >>> x.partitions[[-1, 0]].compute()\n array([8, 9, 0, 1])\n >>> all(x.partitions[:].compute() == x.blocks[:].compute())\n True\n\n Returns\n -------\n A Dask array\n \"\"\"\n return self.blocks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.dot_Array.argtopk.return.argtopk_self_k_axis_axi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.dot_Array.argtopk.return.argtopk_self_k_axis_axi", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1737, "end_line": 1801, "span_ids": ["Array.T", "Array.argtopk", "Array.dot", "Array.choose", "Array.reshape", "Array.A", "Array.topk", "Array.transpose", "Array.ravel", "Array:17"], "tokens": 439}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @derived_from(np.ndarray)\n def dot(self, other):\n from .routines import tensordot\n\n return tensordot(self, other, axes=((self.ndim - 1,), (other.ndim - 2,)))\n\n @property\n def A(self):\n return self\n\n @property\n def T(self):\n return self.transpose()\n\n @derived_from(np.ndarray)\n def transpose(self, *axes):\n from .routines import transpose\n\n if not axes:\n axes = None\n elif len(axes) == 1 and isinstance(axes[0], Iterable):\n axes = axes[0]\n if (axes == tuple(range(self.ndim))) or (axes == tuple(range(-self.ndim, 0))):\n # no transpose necessary\n return self\n else:\n return transpose(self, axes=axes)\n\n @derived_from(np.ndarray)\n def ravel(self):\n from .routines import ravel\n\n return ravel(self)\n\n flatten = ravel\n\n @derived_from(np.ndarray)\n def choose(self, choices):\n from .routines import choose\n\n return choose(self, choices)\n\n @derived_from(np.ndarray)\n def reshape(self, *shape):\n from .reshape import reshape\n\n if len(shape) == 1 and not isinstance(shape[0], Number):\n shape = shape[0]\n return reshape(self, shape)\n\n def topk(self, k, axis=-1, split_every=None):\n \"\"\"The top k elements of an array.\n\n See ``da.topk`` for docstring\"\"\"\n from .reductions import topk\n\n return topk(self, k, axis=axis, split_every=split_every)\n\n def argtopk(self, k, axis=-1, split_every=None):\n \"\"\"The indices of the top k elements of an array.\n\n See ``da.argtopk`` for docstring\"\"\"\n from .reductions import argtopk\n\n return argtopk(self, k, axis=axis, split_every=split_every)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.astype_Array.astype.return.self_map_blocks_chunk_ast": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.astype_Array.astype.return.self_map_blocks_chunk_ast", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1803, "end_line": 1843, "span_ids": ["Array.astype"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def astype(self, dtype, **kwargs):\n \"\"\"Copy of the array, cast to a specified type.\n\n Parameters\n ----------\n dtype : str or dtype\n Typecode or data-type to which the array is cast.\n casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional\n Controls what kind of data casting may occur. Defaults to 'unsafe'\n for backwards compatibility.\n\n * 'no' means the data types should not be cast at all.\n * 'equiv' means only byte-order changes are allowed.\n * 'safe' means only casts which can preserve values are allowed.\n * 'same_kind' means only safe casts or casts within a kind,\n like float64 to float32, are allowed.\n * 'unsafe' means any data conversions may be done.\n copy : bool, optional\n By default, astype always returns a newly allocated array. If this\n is set to False and the `dtype` requirement is satisfied, the input\n array is returned instead of a copy.\n \"\"\"\n # Scalars don't take `casting` or `copy` kwargs - as such we only pass\n # them to `map_blocks` if specified by user (different than defaults).\n extra = set(kwargs) - {\"casting\", \"copy\"}\n if extra:\n raise TypeError(\n \"astype does not take the following keyword \"\n \"arguments: {0!s}\".format(list(extra))\n )\n casting = kwargs.get(\"casting\", \"unsafe\")\n dtype = np.dtype(dtype)\n if self.dtype == dtype:\n return self\n elif not np.can_cast(self.dtype, dtype, casting=casting):\n raise TypeError(\n \"Cannot cast array from {0!r} to {1!r}\"\n \" according to the rule \"\n \"{2!r}\".format(self.dtype, dtype, casting)\n )\n return self.map_blocks(chunk.astype, dtype=dtype, astype_dtype=dtype, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__abs___Array.__sub__.return.elemwise_operator_sub_se": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__abs___Array.__sub__.return.elemwise_operator_sub_se", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1845, "end_line": 1955, "span_ids": ["Array.__ne__", "Array.__invert__", "Array.__rand__", "Array.__rmod__", "Array.__radd__", "Array.__lshift__", "Array.__rpow__", "Array.__ror__", "Array.__rdiv__", "Array.__le__", "Array.__mod__", "Array.__eq__", "Array.__div__", "Array.__rlshift__", "Array.__sub__", "Array.__mul__", "Array.__add__", "Array.__and__", "Array.__neg__", "Array.__ge__", "Array.__lt__", "Array.__gt__", "Array.__pos__", "Array.__rshift__", "Array.__rmul__", "Array.__rrshift__", "Array.__pow__", "Array.__abs__", "Array.__or__"], "tokens": 805}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def __abs__(self):\n return elemwise(operator.abs, self)\n\n @check_if_handled_given_other\n def __add__(self, other):\n return elemwise(operator.add, self, other)\n\n @check_if_handled_given_other\n def __radd__(self, other):\n return elemwise(operator.add, other, self)\n\n @check_if_handled_given_other\n def __and__(self, other):\n return elemwise(operator.and_, self, other)\n\n @check_if_handled_given_other\n def __rand__(self, other):\n return elemwise(operator.and_, other, self)\n\n @check_if_handled_given_other\n def __div__(self, other):\n return elemwise(operator.div, self, other)\n\n @check_if_handled_given_other\n def __rdiv__(self, other):\n return elemwise(operator.div, other, self)\n\n @check_if_handled_given_other\n def __eq__(self, other):\n return elemwise(operator.eq, self, other)\n\n @check_if_handled_given_other\n def __gt__(self, other):\n return elemwise(operator.gt, self, other)\n\n @check_if_handled_given_other\n def __ge__(self, other):\n return elemwise(operator.ge, self, other)\n\n def __invert__(self):\n return elemwise(operator.invert, self)\n\n @check_if_handled_given_other\n def __lshift__(self, other):\n return elemwise(operator.lshift, self, other)\n\n @check_if_handled_given_other\n def __rlshift__(self, other):\n return elemwise(operator.lshift, other, self)\n\n @check_if_handled_given_other\n def __lt__(self, other):\n return elemwise(operator.lt, self, other)\n\n @check_if_handled_given_other\n def __le__(self, other):\n return elemwise(operator.le, self, other)\n\n @check_if_handled_given_other\n def __mod__(self, other):\n return elemwise(operator.mod, self, other)\n\n @check_if_handled_given_other\n def __rmod__(self, other):\n return elemwise(operator.mod, other, self)\n\n @check_if_handled_given_other\n def __mul__(self, other):\n return elemwise(operator.mul, self, other)\n\n @check_if_handled_given_other\n def __rmul__(self, other):\n return elemwise(operator.mul, other, self)\n\n @check_if_handled_given_other\n def __ne__(self, other):\n return elemwise(operator.ne, self, other)\n\n def __neg__(self):\n return elemwise(operator.neg, self)\n\n @check_if_handled_given_other\n def __or__(self, other):\n return elemwise(operator.or_, self, other)\n\n def __pos__(self):\n return self\n\n @check_if_handled_given_other\n def __ror__(self, other):\n return elemwise(operator.or_, other, self)\n\n @check_if_handled_given_other\n def __pow__(self, other):\n return elemwise(operator.pow, self, other)\n\n @check_if_handled_given_other\n def __rpow__(self, other):\n return elemwise(operator.pow, other, self)\n\n @check_if_handled_given_other\n def __rshift__(self, other):\n return elemwise(operator.rshift, self, other)\n\n @check_if_handled_given_other\n def __rrshift__(self, other):\n return elemwise(operator.rshift, other, self)\n\n @check_if_handled_given_other\n def __sub__(self, other):\n return elemwise(operator.sub, self, other)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__rsub___Array.sum.return.sum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.__rsub___Array.sum.return.sum_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1957, "end_line": 2056, "span_ids": ["Array.__rxor__", "Array.argmin", "Array.__matmul__", "Array.__rdivmod__", "Array.all", "Array.argmax", "Array.sum", "Array.__rfloordiv__", "Array.__truediv__", "Array.__floordiv__", "Array.__xor__", "Array.any", "Array.__rtruediv__", "Array.min", "Array.__divmod__", "Array.__rsub__", "Array.max", "Array.__rmatmul__"], "tokens": 795}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @check_if_handled_given_other\n def __rsub__(self, other):\n return elemwise(operator.sub, other, self)\n\n @check_if_handled_given_other\n def __truediv__(self, other):\n return elemwise(operator.truediv, self, other)\n\n @check_if_handled_given_other\n def __rtruediv__(self, other):\n return elemwise(operator.truediv, other, self)\n\n @check_if_handled_given_other\n def __floordiv__(self, other):\n return elemwise(operator.floordiv, self, other)\n\n @check_if_handled_given_other\n def __rfloordiv__(self, other):\n return elemwise(operator.floordiv, other, self)\n\n @check_if_handled_given_other\n def __xor__(self, other):\n return elemwise(operator.xor, self, other)\n\n @check_if_handled_given_other\n def __rxor__(self, other):\n return elemwise(operator.xor, other, self)\n\n @check_if_handled_given_other\n def __matmul__(self, other):\n from .routines import matmul\n\n return matmul(self, other)\n\n @check_if_handled_given_other\n def __rmatmul__(self, other):\n from .routines import matmul\n\n return matmul(other, self)\n\n @check_if_handled_given_other\n def __divmod__(self, other):\n from .ufunc import divmod\n\n return divmod(self, other)\n\n @check_if_handled_given_other\n def __rdivmod__(self, other):\n from .ufunc import divmod\n\n return divmod(other, self)\n\n @derived_from(np.ndarray)\n def any(self, axis=None, keepdims=False, split_every=None, out=None):\n from .reductions import any\n\n return any(self, axis=axis, keepdims=keepdims, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def all(self, axis=None, keepdims=False, split_every=None, out=None):\n from .reductions import all\n\n return all(self, axis=axis, keepdims=keepdims, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def min(self, axis=None, keepdims=False, split_every=None, out=None):\n from .reductions import min\n\n return min(self, axis=axis, keepdims=keepdims, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def max(self, axis=None, keepdims=False, split_every=None, out=None):\n from .reductions import max\n\n return max(self, axis=axis, keepdims=keepdims, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def argmin(self, axis=None, split_every=None, out=None):\n from .reductions import argmin\n\n return argmin(self, axis=axis, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def argmax(self, axis=None, split_every=None, out=None):\n from .reductions import argmax\n\n return argmax(self, axis=axis, split_every=split_every, out=out)\n\n @derived_from(np.ndarray)\n def sum(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n from .reductions import sum\n\n return sum(\n self,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.trace_Array.var.return.var_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.trace_Array.var.return.var_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2058, "end_line": 2120, "span_ids": ["Array.std", "Array.trace", "Array.var", "Array.mean", "Array.prod"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @derived_from(np.ndarray)\n def trace(self, offset=0, axis1=0, axis2=1, dtype=None):\n from .reductions import trace\n\n return trace(self, offset=offset, axis1=axis1, axis2=axis2, dtype=dtype)\n\n @derived_from(np.ndarray)\n def prod(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n from .reductions import prod\n\n return prod(\n self,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n split_every=split_every,\n out=out,\n )\n\n @derived_from(np.ndarray)\n def mean(self, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n from .reductions import mean\n\n return mean(\n self,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n split_every=split_every,\n out=out,\n )\n\n @derived_from(np.ndarray)\n def std(\n self, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None\n ):\n from .reductions import std\n\n return std(\n self,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n ddof=ddof,\n split_every=split_every,\n out=out,\n )\n\n @derived_from(np.ndarray)\n def var(\n self, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None\n ):\n from .reductions import var\n\n return var(\n self,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n ddof=ddof,\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.moment_Array.map_blocks.return.map_blocks_func_self_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.moment_Array.map_blocks.return.map_blocks_func_self_a", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2122, "end_line": 2181, "span_ids": ["Array.moment", "Array.map_blocks"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def moment(\n self,\n order,\n axis=None,\n dtype=None,\n keepdims=False,\n ddof=0,\n split_every=None,\n out=None,\n ):\n \"\"\"Calculate the nth centralized moment.\n\n Parameters\n ----------\n order : int\n Order of the moment that is returned, must be >= 2.\n axis : int, optional\n Axis along which the central moment is computed. The default is to\n compute the moment of the flattened array.\n dtype : data-type, optional\n Type to use in computing the moment. For arrays of integer type the\n default is float64; for arrays of float types it is the same as the\n array type.\n keepdims : bool, optional\n If this is set to True, the axes which are reduced are left in the\n result as dimensions with size one. With this option, the result\n will broadcast correctly against the original array.\n ddof : int, optional\n \"Delta Degrees of Freedom\": the divisor used in the calculation is\n N - ddof, where N represents the number of elements. By default\n ddof is zero.\n\n Returns\n -------\n moment : ndarray\n\n References\n ----------\n .. [1] Pebay, Philippe (2008), \"Formulas for Robust, One-Pass Parallel\n Computation of Covariances and Arbitrary-Order Statistical Moments\",\n Technical Report SAND2008-6212, Sandia National Laboratories.\n\n \"\"\"\n\n from .reductions import moment\n\n return moment(\n self,\n order,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n ddof=ddof,\n split_every=split_every,\n out=out,\n )\n\n @wraps(map_blocks)\n def map_blocks(self, func, *args, **kwargs):\n return map_blocks(func, self, *args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.map_overlap_Array.map_overlap.return.map_overlap_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.map_overlap_Array.map_overlap.return.map_overlap_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2183, "end_line": 2240, "span_ids": ["Array.map_overlap"], "tokens": 636}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def map_overlap(self, func, depth, boundary=None, trim=True, **kwargs):\n \"\"\"Map a function over blocks of the array with some overlap\n\n We share neighboring zones between blocks of the array, then map a\n function, then trim away the neighboring strips.\n\n Parameters\n ----------\n func: function\n The function to apply to each extended block\n depth: int, tuple, or dict\n The number of elements that each block should share with its neighbors\n If a tuple or dict then this can be different per axis\n boundary: str, tuple, dict\n How to handle the boundaries.\n Values include 'reflect', 'periodic', 'nearest', 'none',\n or any constant value like 0 or np.nan\n trim: bool\n Whether or not to trim ``depth`` elements from each block after\n calling the map function.\n Set this to False if your mapping function already does this for you\n **kwargs:\n Other keyword arguments valid in ``map_blocks``\n\n Examples\n --------\n >>> x = np.array([1, 1, 2, 3, 3, 3, 2, 1, 1])\n >>> x = from_array(x, chunks=5)\n >>> def derivative(x):\n ... return x - np.roll(x, 1)\n\n >>> y = x.map_overlap(derivative, depth=1, boundary=0)\n >>> y.compute()\n array([ 1, 0, 1, 1, 0, 0, -1, -1, 0])\n\n >>> import dask.array as da\n >>> x = np.arange(16).reshape((4, 4))\n >>> d = da.from_array(x, chunks=(2, 2))\n >>> d.map_overlap(lambda x: x + x.size, depth=1).compute()\n array([[16, 17, 18, 19],\n [20, 21, 22, 23],\n [24, 25, 26, 27],\n [28, 29, 30, 31]])\n\n >>> func = lambda x: x + x.size\n >>> depth = {0: 1, 1: 1}\n >>> boundary = {0: 'reflect', 1: 'none'}\n >>> d.map_overlap(func, depth, boundary).compute() # doctest: +NORMALIZE_WHITESPACE\n array([[12, 13, 14, 15],\n [16, 17, 18, 19],\n [20, 21, 22, 23],\n [24, 25, 26, 27]])\n \"\"\"\n from .overlap import map_overlap\n\n return map_overlap(\n func, self, depth=depth, boundary=boundary, trim=trim, **kwargs\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.cumsum_Array.clip.return.clip_self_min_max_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.cumsum_Array.clip.return.clip_self_min_max_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2242, "end_line": 2287, "span_ids": ["Array.conj", "Array.squeeze", "Array.real", "Array.cumsum", "Array.cumprod", "Array.rechunk", "Array.clip", "Array.imag"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @derived_from(np.ndarray)\n def cumsum(self, axis, dtype=None, out=None):\n from .reductions import cumsum\n\n return cumsum(self, axis, dtype, out=out)\n\n @derived_from(np.ndarray)\n def cumprod(self, axis, dtype=None, out=None):\n from .reductions import cumprod\n\n return cumprod(self, axis, dtype, out=out)\n\n @derived_from(np.ndarray)\n def squeeze(self, axis=None):\n from .routines import squeeze\n\n return squeeze(self, axis)\n\n def rechunk(self, chunks=\"auto\", threshold=None, block_size_limit=None):\n \"\"\" See da.rechunk for docstring \"\"\"\n from . import rechunk # avoid circular import\n\n return rechunk(self, chunks, threshold, block_size_limit)\n\n @property\n def real(self):\n from .ufunc import real\n\n return real(self)\n\n @property\n def imag(self):\n from .ufunc import imag\n\n return imag(self)\n\n def conj(self):\n from .ufunc import conj\n\n return conj(self)\n\n @derived_from(np.ndarray)\n def clip(self, min=None, max=None):\n from .ufunc import clip\n\n return clip(self, min, max)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.view_Array.view.return.self_map_blocks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.view_Array.view.return.self_map_blocks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2289, "end_line": 2330, "span_ids": ["Array.view"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def view(self, dtype=None, order=\"C\"):\n \"\"\"Get a view of the array as a new data type\n\n Parameters\n ----------\n dtype:\n The dtype by which to view the array.\n The default, None, results in the view having the same data-type\n as the original array.\n order: string\n 'C' or 'F' (Fortran) ordering\n\n This reinterprets the bytes of the array under a new dtype. If that\n dtype does not have the same size as the original array then the shape\n will change.\n\n Beware that both numpy and dask.array can behave oddly when taking\n shape-changing views of arrays under Fortran ordering. Under some\n versions of NumPy this function will fail when taking shape-changing\n views of Fortran ordered arrays if the first dimension has chunks of\n size one.\n \"\"\"\n if dtype is None:\n dtype = self.dtype\n else:\n dtype = np.dtype(dtype)\n mult = self.dtype.itemsize / dtype.itemsize\n\n if order == \"C\":\n chunks = self.chunks[:-1] + (\n tuple(ensure_int(c * mult) for c in self.chunks[-1]),\n )\n elif order == \"F\":\n chunks = (\n tuple(ensure_int(c * mult) for c in self.chunks[0]),\n ) + self.chunks[1:]\n else:\n raise ValueError(\"Order must be one of 'C' or 'F'\")\n\n return self.map_blocks(\n chunk.view, dtype, order=order, dtype=dtype, chunks=chunks\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.swapaxes_Array.__deepcopy__.return.c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.swapaxes_Array.__deepcopy__.return.c", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2332, "end_line": 2356, "span_ids": ["Array.swapaxes", "Array.copy", "Array.__deepcopy__", "Array.round"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @derived_from(np.ndarray)\n def swapaxes(self, axis1, axis2):\n from .routines import swapaxes\n\n return swapaxes(self, axis1, axis2)\n\n @derived_from(np.ndarray)\n def round(self, decimals=0):\n from .routines import round\n\n return round(self, decimals=decimals)\n\n def copy(self):\n \"\"\"\n Copy array. This is a no-op for dask.arrays, which are immutable\n \"\"\"\n if self.npartitions == 1:\n return self.map_blocks(M.copy)\n else:\n return Array(self.dask, self.name, self.chunks, meta=self)\n\n def __deepcopy__(self, memo):\n c = self.copy()\n memo[id(self)] = c\n return c", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_delayed_Array.to_delayed.return.np_array_L_dtype_object_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.to_delayed_Array.to_delayed.return.np_array_L_dtype_object_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2358, "end_line": 2378, "span_ids": ["Array.to_delayed"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n def to_delayed(self, optimize_graph=True):\n \"\"\"Convert into an array of ``dask.delayed`` objects, one per chunk.\n\n Parameters\n ----------\n optimize_graph : bool, optional\n If True [default], the graph is optimized before converting into\n ``dask.delayed`` objects.\n\n See Also\n --------\n dask.array.from_delayed\n \"\"\"\n keys = self.__dask_keys__()\n graph = self.__dask_graph__()\n if optimize_graph:\n graph = self.__dask_optimize__(graph, keys) # TODO, don't collape graph\n name = \"delayed-\" + self.name\n graph = HighLevelGraph.from_collections(name, graph, dependencies=())\n L = ndeepmap(self.ndim, lambda k: Delayed(k, graph), keys)\n return np.array(L, dtype=object)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.repeat_ensure_int.return.i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_Array.repeat_ensure_int.return.i", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2380, "end_line": 2417, "span_ids": ["ensure_int", "Array.to_zarr", "Array.to_tiledb", "Array.repeat", "Array.nonzero"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Array(DaskMethodsMixin):\n\n @derived_from(np.ndarray)\n def repeat(self, repeats, axis=None):\n from .creation import repeat\n\n return repeat(self, repeats, axis=axis)\n\n @derived_from(np.ndarray)\n def nonzero(self):\n from .routines import nonzero\n\n return nonzero(self)\n\n def to_zarr(self, *args, **kwargs):\n \"\"\"Save array to the zarr storage format\n\n See https://zarr.readthedocs.io for details about the format.\n\n See function ``to_zarr()`` for parameters.\n \"\"\"\n return to_zarr(self, *args, **kwargs)\n\n def to_tiledb(self, uri, *args, **kwargs):\n \"\"\"Save array to the TileDB storage manager\n\n See function ``to_tiledb()`` for argument documentation.\n\n See https://docs.tiledb.io for details about the format and engine.\n \"\"\"\n from .tiledb_io import to_tiledb\n\n return to_tiledb(self, uri, *args, **kwargs)\n\n\ndef ensure_int(f):\n i = int(f)\n if i != f:\n raise ValueError(\"Could not coerce %f to integer\" % f)\n return i", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks_normalize_chunks.if_isinstance_chunks_lis.chunks.tuple_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks_normalize_chunks.if_isinstance_chunks_lis.chunks.tuple_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2420, "end_line": 2499, "span_ids": ["normalize_chunks"], "tokens": 745}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_chunks(chunks, shape=None, limit=None, dtype=None, previous_chunks=None):\n \"\"\"Normalize chunks to tuple of tuples\n\n This takes in a variety of input types and information and produces a full\n tuple-of-tuples result for chunks, suitable to be passed to Array or\n rechunk or any other operation that creates a Dask array.\n\n Parameters\n ----------\n chunks: tuple, int, dict, or string\n The chunks to be normalized. See examples below for more details\n shape: Tuple[int]\n The shape of the array\n limit: int (optional)\n The maximum block size to target in bytes,\n if freedom is given to choose\n dtype: np.dtype\n previous_chunks: Tuple[Tuple[int]] optional\n Chunks from a previous array that we should use for inspiration when\n rechunking auto dimensions. If not provided but auto-chunking exists\n then auto-dimensions will prefer square-like chunk shapes.\n\n Examples\n --------\n Specify uniform chunk sizes\n\n >>> normalize_chunks((2, 2), shape=(5, 6))\n ((2, 2, 1), (2, 2, 2))\n\n Also passes through fully explicit tuple-of-tuples\n\n >>> normalize_chunks(((2, 2, 1), (2, 2, 2)), shape=(5, 6))\n ((2, 2, 1), (2, 2, 2))\n\n Cleans up lists to tuples\n\n >>> normalize_chunks([[2, 2], [3, 3]])\n ((2, 2), (3, 3))\n\n Expands integer inputs 10 -> (10, 10)\n\n >>> normalize_chunks(10, shape=(30, 5))\n ((10, 10, 10), (5,))\n\n Expands dict inputs\n\n >>> normalize_chunks({0: 2, 1: 3}, shape=(6, 6))\n ((2, 2, 2), (3, 3))\n\n The values -1 and None get mapped to full size\n\n >>> normalize_chunks((5, -1), shape=(10, 10))\n ((5, 5), (10,))\n\n Use the value \"auto\" to automatically determine chunk sizes along certain\n dimensions. This uses the ``limit=`` and ``dtype=`` keywords to\n determine how large to make the chunks. The term \"auto\" can be used\n anywhere an integer can be used. See array chunking documentation for more\n information.\n\n >>> normalize_chunks((\"auto\",), shape=(20,), limit=5, dtype='uint8')\n ((5, 5, 5, 5),)\n\n You can also use byte sizes (see ``dask.utils.parse_bytes``) in place of\n \"auto\" to ask for a particular size\n\n >>> normalize_chunks(\"1kiB\", shape=(2000,), dtype='float32')\n ((250, 250, 250, 250, 250, 250, 250, 250),)\n\n Respects null dimensions\n\n >>> normalize_chunks((), shape=(0, 0))\n ((0,), (0,))\n \"\"\"\n if dtype and not isinstance(dtype, np.dtype):\n dtype = np.dtype(dtype)\n if chunks is None:\n raise ValueError(CHUNKS_NONE_ERROR_MESSAGE)\n if isinstance(chunks, list):\n chunks = tuple(chunks)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks.if_isinstance_chunks_Nu_normalize_chunks.return.tuple_tuple_int_x_if_not": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_normalize_chunks.if_isinstance_chunks_Nu_normalize_chunks.return.tuple_tuple_int_x_if_not", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2500, "end_line": 2578, "span_ids": ["normalize_chunks"], "tokens": 721}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_chunks(chunks, shape=None, limit=None, dtype=None, previous_chunks=None):\n # ... other code\n if isinstance(chunks, (Number, str)):\n chunks = (chunks,) * len(shape)\n if isinstance(chunks, dict):\n chunks = tuple(chunks.get(i, None) for i in range(len(shape)))\n if isinstance(chunks, np.ndarray):\n chunks = chunks.tolist()\n if not chunks and shape and all(s == 0 for s in shape):\n chunks = ((0,),) * len(shape)\n\n if (\n shape\n and len(shape) == 1\n and len(chunks) > 1\n and all(isinstance(c, (Number, str)) for c in chunks)\n ):\n chunks = (chunks,)\n\n if shape and len(chunks) != len(shape):\n raise ValueError(\n \"Chunks and shape must be of the same length/dimension. \"\n \"Got chunks=%s, shape=%s\" % (chunks, shape)\n )\n if -1 in chunks or None in chunks:\n chunks = tuple(s if c == -1 or c is None else c for c, s in zip(chunks, shape))\n\n # If specifying chunk size in bytes, use that value to set the limit.\n # Verify there is only one consistent value of limit or chunk-bytes used.\n for c in chunks:\n if isinstance(c, str) and c != \"auto\":\n parsed = parse_bytes(c)\n if limit is None:\n limit = parsed\n elif parsed != limit:\n raise ValueError(\n \"Only one consistent value of limit or chunk is allowed.\"\n \"Used %s != %s\" % (parsed, limit)\n )\n # Substitute byte limits with 'auto' now that limit is set.\n chunks = tuple(\"auto\" if isinstance(c, str) and c != \"auto\" else c for c in chunks)\n\n if any(c == \"auto\" for c in chunks):\n chunks = auto_chunks(chunks, shape, limit, dtype, previous_chunks)\n\n if shape is not None:\n chunks = tuple(c if c not in {None, -1} else s for c, s in zip(chunks, shape))\n\n if chunks and shape is not None:\n chunks = sum(\n (\n blockdims_from_blockshape((s,), (c,))\n if not isinstance(c, (tuple, list))\n else (c,)\n for s, c in zip(shape, chunks)\n ),\n (),\n )\n for c in chunks:\n if not c:\n raise ValueError(\n \"Empty tuples are not allowed in chunks. Express \"\n \"zero length dimensions with 0(s) in chunks\"\n )\n\n if shape is not None:\n if len(chunks) != len(shape):\n raise ValueError(\n \"Input array has %d dimensions but the supplied \"\n \"chunks has only %d dimensions\" % (len(shape), len(chunks))\n )\n if not all(\n c == s or (math.isnan(c) or math.isnan(s))\n for c, s in zip(map(sum, chunks), shape)\n ):\n raise ValueError(\n \"Chunks do not add up to shape. \"\n \"Got chunks=%s, shape=%s\" % (chunks, shape)\n )\n\n return tuple(tuple(int(x) if not math.isnan(x) else x for x in c) for c in chunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__compute_multiplier_auto_chunks.largest_block.np_prod_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__compute_multiplier_auto_chunks.largest_block.np_prod_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2581, "end_line": 2658, "span_ids": ["_compute_multiplier", "auto_chunks"], "tokens": 580}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _compute_multiplier(limit: int, dtype, largest_block: int, result):\n \"\"\"\n Utility function for auto_chunk, to fin how much larger or smaller the ideal\n chunk size is relative to what we have now.\n \"\"\"\n return (\n limit\n / dtype.itemsize\n / largest_block\n / np.prod(list(r if r != 0 else 1 for r in result.values()))\n )\n\n\ndef auto_chunks(chunks, shape, limit, dtype, previous_chunks=None):\n \"\"\"Determine automatic chunks\n\n This takes in a chunks value that contains ``\"auto\"`` values in certain\n dimensions and replaces those values with concrete dimension sizes that try\n to get chunks to be of a certain size in bytes, provided by the ``limit=``\n keyword. If multiple dimensions are marked as ``\"auto\"`` then they will\n all respond to meet the desired byte limit, trying to respect the aspect\n ratio of their dimensions in ``previous_chunks=``, if given.\n\n Parameters\n ----------\n chunks: Tuple\n A tuple of either dimensions or tuples of explicit chunk dimensions\n Some entries should be \"auto\"\n shape: Tuple[int]\n limit: int, str\n The maximum allowable size of a chunk in bytes\n previous_chunks: Tuple[Tuple[int]]\n\n See also\n --------\n normalize_chunks: for full docstring and parameters\n \"\"\"\n if previous_chunks is not None:\n previous_chunks = tuple(\n c if isinstance(c, tuple) else (c,) for c in previous_chunks\n )\n chunks = list(chunks)\n\n autos = {i for i, c in enumerate(chunks) if c == \"auto\"}\n if not autos:\n return tuple(chunks)\n\n if limit is None:\n limit = config.get(\"array.chunk-size\")\n if isinstance(limit, str):\n limit = parse_bytes(limit)\n\n if dtype is None:\n raise TypeError(\"DType must be known for auto-chunking\")\n\n if dtype.hasobject:\n raise NotImplementedError(\n \"Can not use auto rechunking with object dtype. \"\n \"We are unable to estimate the size in bytes of object data\"\n )\n\n for x in tuple(chunks) + tuple(shape):\n if (\n isinstance(x, Number)\n and np.isnan(x)\n or isinstance(x, tuple)\n and np.isnan(x).any()\n ):\n raise ValueError(\n \"Can not perform automatic rechunking with unknown \"\n \"(nan) chunk sizes.%s\" % unknown_chunk_message\n )\n\n limit = max(1, limit)\n\n largest_block = np.prod(\n [cs if isinstance(cs, Number) else max(cs) for cs in chunks if cs != \"auto\"]\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_auto_chunks.if_previous_chunks__auto_chunks.if_previous_chunks_.else_.return.tuple_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_auto_chunks.if_previous_chunks__auto_chunks.if_previous_chunks_.else_.return.tuple_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2660, "end_line": 2716, "span_ids": ["auto_chunks"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def auto_chunks(chunks, shape, limit, dtype, previous_chunks=None):\n # ... other code\n\n if previous_chunks:\n # Base ideal ratio on the median chunk size of the previous chunks\n result = {a: np.median(previous_chunks[a]) for a in autos}\n\n ideal_shape = []\n for i, s in enumerate(shape):\n chunk_frequencies = frequencies(previous_chunks[i])\n mode, count = max(chunk_frequencies.items(), key=lambda kv: kv[1])\n if mode > 1 and count >= len(previous_chunks[i]) / 2:\n ideal_shape.append(mode)\n else:\n ideal_shape.append(s)\n\n # How much larger or smaller the ideal chunk size is relative to what we have now\n multiplier = _compute_multiplier(limit, dtype, largest_block, result)\n\n last_multiplier = 0\n last_autos = set()\n while (\n multiplier != last_multiplier or autos != last_autos\n ): # while things change\n last_multiplier = multiplier # record previous values\n last_autos = set(autos) # record previous values\n\n # Expand or contract each of the dimensions appropriately\n for a in sorted(autos):\n if ideal_shape[a] == 0:\n result[a] = 0\n continue\n proposed = result[a] * multiplier ** (1 / len(autos))\n if proposed > shape[a]: # we've hit the shape boundary\n autos.remove(a)\n largest_block *= shape[a]\n chunks[a] = shape[a]\n del result[a]\n else:\n result[a] = round_to(proposed, ideal_shape[a])\n\n # recompute how much multiplier we have left, repeat\n multiplier = _compute_multiplier(limit, dtype, largest_block, result)\n\n for k, v in result.items():\n chunks[k] = v\n return tuple(chunks)\n\n else:\n size = (limit / dtype.itemsize / largest_block) ** (1 / len(autos))\n small = [i for i in autos if shape[i] < size]\n if small:\n for i in small:\n chunks[i] = (shape[i],)\n return auto_chunks(chunks, shape, limit, dtype)\n\n for i in autos:\n chunks[i] = round_to(size, shape[i])\n\n return tuple(chunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_round_to__get_chunk_shape.return.s_len_s_None_sli": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_round_to__get_chunk_shape.return.s_len_s_None_sli", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2719, "end_line": 2743, "span_ids": ["round_to", "_get_chunk_shape"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def round_to(c, s):\n \"\"\"Return a chunk dimension that is close to an even multiple or factor\n\n We want values for c that are nicely aligned with s.\n\n If c is smaller than s then we want the largest factor of s that is less than the\n desired chunk size, but not less than half, which is too much. If no such\n factor exists then we just go with the original chunk size and accept an\n uneven chunk at the end.\n\n If c is larger than s then we want the largest multiple of s that is still\n smaller than c.\n \"\"\"\n if c <= s:\n try:\n return max(f for f in factors(s) if c / 2 <= f <= c)\n except ValueError: # no matching factors within factor of two\n return max(1, int(c))\n else:\n return c // s * s\n\n\ndef _get_chunk_shape(a):\n s = np.asarray(a.shape, dtype=int)\n return s[len(s) * (None,) + (slice(None),)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array_from_array._Create_dask_array_from": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array_from_array._Create_dask_array_from", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2746, "end_line": 2841, "span_ids": ["from_array"], "tokens": 962}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_array(\n x,\n chunks=\"auto\",\n name=None,\n lock=False,\n asarray=None,\n fancy=True,\n getitem=None,\n meta=None,\n):\n \"\"\"Create dask array from something that looks like an array\n\n Input must have a ``.shape``, ``.ndim``, ``.dtype`` and support numpy-style slicing.\n\n Parameters\n ----------\n x : array_like\n chunks : int, tuple\n How to chunk the array. Must be one of the following forms:\n\n - A blocksize like 1000.\n - A blockshape like (1000, 1000).\n - Explicit sizes of all blocks along all dimensions like\n ((1000, 1000, 500), (400, 400)).\n - A size in bytes, like \"100 MiB\" which will choose a uniform\n block-like shape\n - The word \"auto\" which acts like the above, but uses a configuration\n value ``array.chunk-size`` for the chunk size\n\n -1 or None as a blocksize indicate the size of the corresponding\n dimension.\n name : str, optional\n The key name to use for the array. Defaults to a hash of ``x``.\n By default, hash uses python's standard sha1. This behaviour can be\n changed by installing cityhash, xxhash or murmurhash. If installed,\n a large-factor speedup can be obtained in the tokenisation step.\n Use ``name=False`` to generate a random name instead of hashing (fast)\n\n .. note::\n\n Because this ``name`` is used as the key in task graphs, you should\n ensure that it uniquely identifies the data contained within. If\n you'd like to provide a descriptive name that is still unique, combine\n the descriptive name with :func:`dask.base.tokenize` of the\n ``array_like``. See :ref:`graphs` for more.\n\n lock : bool or Lock, optional\n If ``x`` doesn't support concurrent reads then provide a lock here, or\n pass in True to have dask.array create one for you.\n asarray : bool, optional\n If True then call np.asarray on chunks to convert them to numpy arrays.\n If False then chunks are passed through unchanged.\n If None (default) then we use True if the ``__array_function__`` method\n is undefined.\n fancy : bool, optional\n If ``x`` doesn't support fancy indexing (e.g. indexing with lists or\n arrays) then set to False. Default is True.\n meta : Array-like, optional\n The metadata for the resulting dask array. This is the kind of array\n that will result from slicing the input array.\n Defaults to the input array.\n\n Examples\n --------\n\n >>> x = h5py.File('...')['/data/path'] # doctest: +SKIP\n >>> a = da.from_array(x, chunks=(1000, 1000)) # doctest: +SKIP\n\n If your underlying datastore does not support concurrent reads then include\n the ``lock=True`` keyword argument or ``lock=mylock`` if you want multiple\n arrays to coordinate around the same lock.\n\n >>> a = da.from_array(x, chunks=(1000, 1000), lock=True) # doctest: +SKIP\n\n If your underlying datastore has a ``.chunks`` attribute (as h5py and zarr\n datasets do) then a multiple of that chunk shape will be used if you\n do not provide a chunk shape.\n\n >>> a = da.from_array(x, chunks='auto') # doctest: +SKIP\n >>> a = da.from_array(x, chunks='100 MiB') # doctest: +SKIP\n >>> a = da.from_array(x) # doctest: +SKIP\n\n If providing a name, ensure that it is unique\n\n >>> import dask.base\n >>> token = dask.base.tokenize(x) # doctest: +SKIP\n >>> a = da.from_array('myarray-' + token) # doctest: +SKIP\n\n Numpy ndarrays are eagerly sliced and then embedded in the graph.\n\n >>> import dask.array\n >>> a = dask.array.from_array(np.array([[1, 2], [3, 4]]), chunks=(1,1))\n >>> a.dask[a.name, 0, 0][0]\n array([1])\n\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array.if_isinstance_x_Array__from_array.return.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_array.if_isinstance_x_Array__from_array.return.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2842, "end_line": 2918, "span_ids": ["from_array"], "tokens": 659}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_array(\n x,\n chunks=\"auto\",\n name=None,\n lock=False,\n asarray=None,\n fancy=True,\n getitem=None,\n meta=None,\n):\n if isinstance(x, Array):\n raise ValueError(\n \"Array is already a dask array. Use 'asarray' or \" \"'rechunk' instead.\"\n )\n elif is_dask_collection(x):\n warnings.warn(\n \"Passing an object to dask.array.from_array which is already a \"\n \"Dask collection. This can lead to unexpected behavior.\"\n )\n\n if isinstance(x, (list, tuple, memoryview) + np.ScalarType):\n x = np.array(x)\n\n if asarray is None:\n asarray = not hasattr(x, \"__array_function__\")\n\n previous_chunks = getattr(x, \"chunks\", None)\n\n chunks = normalize_chunks(\n chunks, x.shape, dtype=x.dtype, previous_chunks=previous_chunks\n )\n\n if name in (None, True):\n token = tokenize(x, chunks)\n original_name = \"array-original-\" + token\n name = name or \"array-\" + token\n elif name is False:\n original_name = name = \"array-\" + str(uuid.uuid1())\n else:\n original_name = name\n\n if lock is True:\n lock = SerializableLock()\n\n is_ndarray = type(x) is np.ndarray\n is_single_block = all(len(c) == 1 for c in chunks)\n # Always use the getter for h5py etc. Not using isinstance(x, np.ndarray)\n # because np.matrix is a subclass of np.ndarray.\n if is_ndarray and not is_single_block and not lock:\n # eagerly slice numpy arrays to prevent memory blowup\n # GH5367, GH5601\n slices = slices_from_chunks(chunks)\n keys = product([name], *(range(len(bds)) for bds in chunks))\n values = [x[slc] for slc in slices]\n dsk = dict(zip(keys, values))\n\n elif is_ndarray and is_single_block:\n # No slicing needed\n dsk = {(name,) + (0,) * x.ndim: x}\n else:\n if getitem is None:\n if fancy:\n getitem = getter\n else:\n getitem = getter_nofancy\n\n dsk = getem(\n original_name,\n chunks,\n getitem=getitem,\n shape=x.shape,\n out_name=name,\n lock=lock,\n asarray=asarray,\n dtype=x.dtype,\n )\n dsk[original_name] = x\n\n # Workaround for TileDB, its indexing is 1-based,\n # and doesn't seems to support 0-length slicing\n if x.__class__.__module__.split(\".\")[0] == \"tiledb\" and hasattr(x, \"_ctx_\"):\n return Array(dsk, name, chunks, dtype=x.dtype)\n\n if meta is None:\n meta = x\n\n return Array(dsk, name, chunks, meta=meta, dtype=getattr(x, \"dtype\", None))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_zarr_from_zarr.return.from_array_z_chunks_nam": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_zarr_from_zarr.return.from_array_z_chunks_nam", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2921, "end_line": 2964, "span_ids": ["from_zarr"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_zarr(\n url, component=None, storage_options=None, chunks=None, name=None, **kwargs\n):\n \"\"\"Load array from the zarr storage format\n\n See https://zarr.readthedocs.io for details about the format.\n\n Parameters\n ----------\n url: Zarr Array or str or MutableMapping\n Location of the data. A URL can include a protocol specifier like s3://\n for remote data. Can also be any MutableMapping instance, which should\n be serializable if used in multiple processes.\n component: str or None\n If the location is a zarr group rather than an array, this is the\n subcomponent that should be loaded, something like ``'foo/bar'``.\n storage_options: dict\n Any additional parameters for the storage backend (ignored for local\n paths)\n chunks: tuple of ints or tuples of ints\n Passed to ``da.from_array``, allows setting the chunks on\n initialisation, if the chunking scheme in the on-disc dataset is not\n optimal for the calculations to follow.\n name : str, optional\n An optional keyname for the array. Defaults to hashing the input\n kwargs: passed to ``zarr.Array``.\n \"\"\"\n import zarr\n\n storage_options = storage_options or {}\n if isinstance(url, zarr.Array):\n z = url\n elif isinstance(url, str):\n from ..bytes.core import get_mapper\n\n mapper = get_mapper(url, **storage_options)\n z = zarr.Array(mapper, read_only=True, path=component, **kwargs)\n else:\n mapper = url\n z = zarr.Array(mapper, read_only=True, path=component, **kwargs)\n chunks = chunks if chunks is not None else z.chunks\n if name is None:\n name = \"from-zarr-\" + tokenize(z, component, storage_options, chunks, **kwargs)\n return from_array(z, chunks, name=name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_zarr_to_zarr.return.arr_store_z_lock_False_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_zarr_to_zarr.return.arr_store_z_lock_False_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2967, "end_line": 3066, "span_ids": ["to_zarr"], "tokens": 752}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def to_zarr(\n arr,\n url,\n component=None,\n storage_options=None,\n overwrite=False,\n compute=True,\n return_stored=False,\n **kwargs,\n):\n \"\"\"Save array to the zarr storage format\n\n See https://zarr.readthedocs.io for details about the format.\n\n Parameters\n ----------\n arr: dask.array\n Data to store\n url: Zarr Array or str or MutableMapping\n Location of the data. A URL can include a protocol specifier like s3://\n for remote data. Can also be any MutableMapping instance, which should\n be serializable if used in multiple processes.\n component: str or None\n If the location is a zarr group rather than an array, this is the\n subcomponent that should be created/over-written.\n storage_options: dict\n Any additional parameters for the storage backend (ignored for local\n paths)\n overwrite: bool\n If given array already exists, overwrite=False will cause an error,\n where overwrite=True will replace the existing data. Note that this\n check is done at computation time, not during graph creation.\n compute, return_stored: see ``store()``\n kwargs: passed to the ``zarr.create()`` function, e.g., compression options\n\n Raises\n ------\n ValueError\n If ``arr`` has unknown chunk sizes, which is not supported by Zarr.\n\n See Also\n --------\n dask.array.Array.compute_chunk_sizes\n\n \"\"\"\n import zarr\n\n if np.isnan(arr.shape).any():\n raise ValueError(\n \"Saving a dask array with unknown chunk sizes is not \"\n \"currently supported by Zarr.%s\" % unknown_chunk_message\n )\n\n if isinstance(url, zarr.Array):\n z = url\n if isinstance(z.store, (dict, zarr.DictStore)) and \"distributed\" in config.get(\n \"scheduler\", \"\"\n ):\n raise RuntimeError(\n \"Cannot store into in memory Zarr Array using \"\n \"the Distributed Scheduler.\"\n )\n arr = arr.rechunk(z.chunks)\n return arr.store(z, lock=False, compute=compute, return_stored=return_stored)\n\n if not _check_regular_chunks(arr.chunks):\n raise ValueError(\n \"Attempt to save array to zarr with irregular \"\n \"chunking, please call `arr.rechunk(...)` first.\"\n )\n\n storage_options = storage_options or {}\n\n if isinstance(url, str):\n from ..bytes.core import get_mapper\n\n mapper = get_mapper(url, **storage_options)\n else:\n # assume the object passed is already a mapper\n mapper = url\n\n chunks = [c[0] for c in arr.chunks]\n\n # The zarr.create function has the side-effect of immediately\n # creating metadata on disk. This may not be desired,\n # particularly if compute=False. The caller may be creating many\n # arrays on a slow filesystem, with the desire that any I/O be\n # sharded across workers (not done serially on the originating\n # machine). Or the caller may decide later to not to do this\n # computation, and so nothing should be written to disk.\n z = delayed(zarr.create)(\n shape=arr.shape,\n chunks=chunks,\n dtype=arr.dtype,\n store=mapper,\n path=component,\n overwrite=overwrite,\n **kwargs,\n )\n return arr.store(z, lock=False, compute=compute, return_stored=return_stored)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__check_regular_chunks__check_regular_chunks.return.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__check_regular_chunks__check_regular_chunks.return.True", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3069, "end_line": 3106, "span_ids": ["_check_regular_chunks"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _check_regular_chunks(chunkset):\n \"\"\"Check if the chunks are regular\n\n \"Regular\" in this context means that along every axis, the chunks all\n have the same size, except the last one, which may be smaller\n\n Parameters\n ----------\n chunkset: tuple of tuples of ints\n From the ``.chunks`` attribute of an ``Array``\n\n Returns\n -------\n True if chunkset passes, else False\n\n Examples\n --------\n >>> import dask.array as da\n >>> arr = da.zeros(10, chunks=(5, ))\n >>> _check_regular_chunks(arr.chunks)\n True\n\n >>> arr = da.zeros(10, chunks=((3, 3, 3, 1), ))\n >>> _check_regular_chunks(arr.chunks)\n True\n\n >>> arr = da.zeros(10, chunks=((3, 1, 3, 3), ))\n >>> _check_regular_chunks(arr.chunks)\n False\n \"\"\"\n for chunks in chunkset:\n if len(chunks) == 1:\n continue\n if len(set(chunks[:-1])) > 1:\n return False\n if chunks[-1] > chunks[0]:\n return False\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_delayed_from_delayed.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_delayed_from_delayed.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3109, "end_line": 3139, "span_ids": ["from_delayed"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_delayed(value, shape, dtype=None, meta=None, name=None):\n \"\"\"Create a dask array from a dask delayed value\n\n This routine is useful for constructing dask arrays in an ad-hoc fashion\n using dask delayed, particularly when combined with stack and concatenate.\n\n The dask array will consist of a single chunk.\n\n Examples\n --------\n >>> import dask\n >>> import dask.array as da\n >>> value = dask.delayed(np.ones)(5)\n >>> array = da.from_delayed(value, (5,), dtype=float)\n >>> array\n dask.array\n >>> array.compute()\n array([1., 1., 1., 1., 1.])\n \"\"\"\n from ..delayed import delayed, Delayed\n\n if not isinstance(value, Delayed) and hasattr(value, \"key\"):\n value = delayed(value)\n\n name = name or \"from-value-\" + tokenize(value, shape, dtype, meta)\n dsk = {(name,) + (0,) * len(shape): value.key}\n chunks = tuple((d,) for d in shape)\n # TODO: value._key may not be the name of the layer in value.dask\n # This should be fixed after we build full expression graphs\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[value])\n return Array(graph, name, chunks, dtype=dtype, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_func_from_func.return.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_func_from_func.return.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3142, "end_line": 3167, "span_ids": ["from_func"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_func(func, shape, dtype=None, name=None, args=(), kwargs={}):\n \"\"\"Create dask array in a single block by calling a function\n\n Calling the provided function with func(*args, **kwargs) should return a\n NumPy array of the indicated shape and dtype.\n\n Examples\n --------\n\n >>> a = from_func(np.arange, (3,), dtype='i8', args=(3,))\n >>> a.compute()\n array([0, 1, 2])\n\n This works particularly well when coupled with dask.array functions like\n concatenate and stack:\n\n >>> arrays = [from_func(np.array, (), dtype='i8', args=(n,)) for n in range(5)]\n >>> stack(arrays).compute()\n array([0, 1, 2, 3, 4])\n \"\"\"\n name = name or \"from_func-\" + tokenize(func, shape, dtype, args, kwargs)\n if args or kwargs:\n func = partial(func, *args, **kwargs)\n dsk = {(name,) + (0,) * len(shape): (func,)}\n chunks = tuple((i,) for i in shape)\n return Array(dsk, name, chunks, dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_common_blockdim_common_blockdim.return.tuple_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_common_blockdim_common_blockdim.return.tuple_out_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3170, "end_line": 3235, "span_ids": ["common_blockdim"], "tokens": 607}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def common_blockdim(blockdims):\n \"\"\"Find the common block dimensions from the list of block dimensions\n\n Currently only implements the simplest possible heuristic: the common\n block-dimension is the only one that does not span fully span a dimension.\n This is a conservative choice that allows us to avoid potentially very\n expensive rechunking.\n\n Assumes that each element of the input block dimensions has all the same\n sum (i.e., that they correspond to dimensions of the same size).\n\n Examples\n --------\n >>> common_blockdim([(3,), (2, 1)])\n (2, 1)\n >>> common_blockdim([(1, 2), (2, 1)])\n (1, 1, 1)\n >>> common_blockdim([(2, 2), (3, 1)]) # doctest: +SKIP\n Traceback (most recent call last):\n ...\n ValueError: Chunks do not align\n \"\"\"\n if not any(blockdims):\n return ()\n non_trivial_dims = set([d for d in blockdims if len(d) > 1])\n if len(non_trivial_dims) == 1:\n return first(non_trivial_dims)\n if len(non_trivial_dims) == 0:\n return max(blockdims, key=first)\n\n if np.isnan(sum(map(sum, blockdims))):\n raise ValueError(\n \"Arrays chunk sizes (%s) are unknown.\\n\\n\"\n \"A possible solution:\\n\"\n \" x.compute_chunk_sizes()\" % blockdims\n )\n\n if len(set(map(sum, non_trivial_dims))) > 1:\n raise ValueError(\"Chunks do not add up to same value\", blockdims)\n\n # We have multiple non-trivial chunks on this axis\n # e.g. (5, 2) and (4, 3)\n\n # We create a single chunk tuple with the same total length\n # that evenly divides both, e.g. (4, 1, 2)\n\n # To accomplish this we walk down all chunk tuples together, finding the\n # smallest element, adding it to the output, and subtracting it from all\n # other elements and remove the element itself. We stop once we have\n # burned through all of the chunk tuples.\n # For efficiency's sake we reverse the lists so that we can pop off the end\n rchunks = [list(ntd)[::-1] for ntd in non_trivial_dims]\n total = sum(first(non_trivial_dims))\n i = 0\n\n out = []\n while i < total:\n m = min(c[-1] for c in rchunks)\n out.append(m)\n for c in rchunks:\n c[-1] -= m\n if c[-1] == 0:\n c.pop()\n i += m\n\n return tuple(out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks_unify_chunks.arrays._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks_unify_chunks.arrays._", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3238, "end_line": 3318, "span_ids": ["unify_chunks"], "tokens": 706}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unify_chunks(*args, **kwargs):\n \"\"\"\n Unify chunks across a sequence of arrays\n\n This utility function is used within other common operations like\n ``map_blocks`` and ``blockwise``. It is not commonly used by end-users\n directly.\n\n Parameters\n ----------\n *args: sequence of Array, index pairs\n Sequence like (x, 'ij', y, 'jk', z, 'i')\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = da.ones(10, chunks=((5, 2, 3),))\n >>> y = da.ones(10, chunks=((2, 3, 5),))\n >>> chunkss, arrays = unify_chunks(x, 'i', y, 'i')\n >>> chunkss\n {'i': (2, 3, 2, 3)}\n\n >>> x = da.ones((100, 10), chunks=(20, 5))\n >>> y = da.ones((10, 100), chunks=(4, 50))\n >>> chunkss, arrays = unify_chunks(x, 'ij', y, 'jk', 'constant', None)\n >>> chunkss # doctest: +SKIP\n {'k': (50, 50), 'i': (20, 20, 20, 20, 20), 'j': (4, 1, 3, 2)}\n\n >>> unify_chunks(0, None)\n ({}, [0])\n\n Returns\n -------\n chunkss : dict\n Map like {index: chunks}.\n arrays : list\n List of rechunked arrays.\n\n See Also\n --------\n common_blockdim\n \"\"\"\n if not args:\n return {}, []\n\n arginds = [\n (asanyarray(a) if ind is not None else a, ind) for a, ind in partition(2, args)\n ] # [x, ij, y, jk]\n args = list(concat(arginds)) # [(x, ij), (y, jk)]\n warn = kwargs.get(\"warn\", True)\n\n arrays, inds = zip(*arginds)\n if all(ind is None for ind in inds):\n return {}, list(arrays)\n if all(ind == inds[0] for ind in inds) and all(\n a.chunks == arrays[0].chunks for a in arrays\n ):\n return dict(zip(inds[0], arrays[0].chunks)), arrays\n\n nameinds = []\n blockdim_dict = dict()\n max_parts = 0\n for a, ind in arginds:\n if ind is not None:\n nameinds.append((a.name, ind))\n blockdim_dict[a.name] = a.chunks\n max_parts = max(max_parts, a.npartitions)\n else:\n nameinds.append((a, ind))\n\n chunkss = broadcast_dimensions(nameinds, blockdim_dict, consolidate=common_blockdim)\n nparts = np.prod(list(map(len, chunkss.values())))\n\n if warn and nparts and nparts >= max_parts * 10:\n warnings.warn(\n \"Increasing number of chunks by factor of %d\" % (nparts / max_parts),\n PerformanceWarning,\n stacklevel=3,\n )\n\n arrays = []\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks.for_a_i_in_arginds__unpack_singleton.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_unify_chunks.for_a_i_in_arginds__unpack_singleton.return.x", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3319, "end_line": 3351, "span_ids": ["unify_chunks", "unpack_singleton"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unify_chunks(*args, **kwargs):\n # ... other code\n for a, i in arginds:\n if i is None:\n arrays.append(a)\n else:\n chunks = tuple(\n chunkss[j]\n if a.shape[n] > 1\n else a.shape[n]\n if not np.isnan(sum(chunkss[j]))\n else None\n for n, j in enumerate(i)\n )\n if chunks != a.chunks and all(a.chunks):\n arrays.append(a.rechunk(chunks))\n else:\n arrays.append(a)\n return chunkss, arrays\n\n\ndef unpack_singleton(x):\n \"\"\"\n\n >>> unpack_singleton([[[[1]]]])\n 1\n >>> unpack_singleton(np.array(np.datetime64('2000-01-01')))\n array('2000-01-01', dtype='datetime64[D]')\n \"\"\"\n while isinstance(x, (list, tuple)):\n try:\n x = x[0]\n except (IndexError, TypeError, KeyError):\n break\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block_block._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block_block._", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3354, "end_line": 3441, "span_ids": ["block"], "tokens": 772}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def block(arrays, allow_unknown_chunksizes=False):\n \"\"\"\n Assemble an nd-array from nested lists of blocks.\n\n Blocks in the innermost lists are concatenated along the last\n dimension (-1), then these are concatenated along the second-last\n dimension (-2), and so on until the outermost list is reached\n\n Blocks can be of any dimension, but will not be broadcasted using the normal\n rules. Instead, leading axes of size 1 are inserted, to make ``block.ndim``\n the same for all blocks. This is primarily useful for working with scalars,\n and means that code like ``block([v, 1])`` is valid, where\n ``v.ndim == 1``.\n\n When the nested list is two levels deep, this allows block matrices to be\n constructed from their components.\n\n Parameters\n ----------\n arrays : nested list of array_like or scalars (but not tuples)\n If passed a single ndarray or scalar (a nested list of depth 0), this\n is returned unmodified (and not copied).\n\n Elements shapes must match along the appropriate axes (without\n broadcasting), but leading 1s will be prepended to the shape as\n necessary to make the dimensions match.\n\n allow_unknown_chunksizes: bool\n Allow unknown chunksizes, such as come from converting from dask\n dataframes. Dask.array is unable to verify that chunks line up. If\n data comes from differently aligned sources then this can cause\n unexpected results.\n\n Returns\n -------\n block_array : ndarray\n The array assembled from the given blocks.\n\n The dimensionality of the output is equal to the greatest of:\n * the dimensionality of all the inputs\n * the depth to which the input list is nested\n\n Raises\n ------\n ValueError\n * If list depths are mismatched - for instance, ``[[a, b], c]`` is\n illegal, and should be spelt ``[[a, b], [c]]``\n * If lists are empty - for instance, ``[[a, b], []]``\n\n See Also\n --------\n concatenate : Join a sequence of arrays together.\n stack : Stack arrays in sequence along a new dimension.\n hstack : Stack arrays in sequence horizontally (column wise).\n vstack : Stack arrays in sequence vertically (row wise).\n dstack : Stack arrays in sequence depth wise (along third dimension).\n vsplit : Split array into a list of multiple sub-arrays vertically.\n\n Notes\n -----\n\n When called with only scalars, ``block`` is equivalent to an ndarray\n call. So ``block([[1, 2], [3, 4]])`` is equivalent to\n ``array([[1, 2], [3, 4]])``.\n\n This function does not enforce that the blocks lie on a fixed grid.\n ``block([[a, b], [c, d]])`` is not restricted to arrays of the form::\n\n AAAbb\n AAAbb\n cccDD\n\n But is also allowed to produce, for some ``a, b, c, d``::\n\n AAAbb\n AAAbb\n cDDDD\n\n Since concatenation happens along the last axis first, `block` is _not_\n capable of producing the following directly::\n\n AAAbb\n cccbb\n cccDD\n\n Matlab's \"square bracket stacking\", ``[A, B, ...; p, q, ...]``, is\n equivalent to ``block([[A, B, ...], [p, q, ...]])``.\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block._This_was_copied_almost__block.return.rec_map_reduce_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_block._This_was_copied_almost__block.return.rec_map_reduce_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3443, "end_line": 3521, "span_ids": ["block"], "tokens": 633}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def block(arrays, allow_unknown_chunksizes=False):\n\n # This was copied almost verbatim from numpy.core.shape_base.block\n\n def atleast_nd(x, ndim):\n x = asanyarray(x)\n diff = max(ndim - x.ndim, 0)\n if diff == 0:\n return x\n else:\n return x[(None,) * diff + (Ellipsis,)]\n\n def format_index(index):\n return \"arrays\" + \"\".join(\"[{}]\".format(i) for i in index)\n\n rec = _Recurser(recurse_if=lambda x: type(x) is list)\n\n # ensure that the lists are all matched in depth\n list_ndim = None\n any_empty = False\n for index, value, entering in rec.walk(arrays):\n if type(value) is tuple:\n # not strictly necessary, but saves us from:\n # - more than one way to do things - no point treating tuples like\n # lists\n # - horribly confusing behaviour that results when tuples are\n # treated like ndarray\n raise TypeError(\n \"{} is a tuple. \"\n \"Only lists can be used to arrange blocks, and np.block does \"\n \"not allow implicit conversion from tuple to ndarray.\".format(\n format_index(index)\n )\n )\n if not entering:\n curr_depth = len(index)\n elif len(value) == 0:\n curr_depth = len(index) + 1\n any_empty = True\n else:\n continue\n\n if list_ndim is not None and list_ndim != curr_depth:\n raise ValueError(\n \"List depths are mismatched. First element was at depth {}, \"\n \"but there is an element at depth {} ({})\".format(\n list_ndim, curr_depth, format_index(index)\n )\n )\n list_ndim = curr_depth\n\n # do this here so we catch depth mismatches first\n if any_empty:\n raise ValueError(\"Lists cannot be empty\")\n\n # convert all the arrays to ndarrays\n arrays = rec.map_reduce(arrays, f_map=asanyarray, f_reduce=list)\n\n # determine the maximum dimension of the elements\n elem_ndim = rec.map_reduce(arrays, f_map=lambda xi: xi.ndim, f_reduce=max)\n ndim = max(list_ndim, elem_ndim)\n\n # first axis to concatenate along\n first_axis = ndim - list_ndim\n\n # Make all the elements the same dimension\n arrays = rec.map_reduce(\n arrays, f_map=lambda xi: atleast_nd(xi, ndim), f_reduce=list\n )\n\n # concatenate innermost lists on the right, outermost on the left\n return rec.map_reduce(\n arrays,\n f_reduce=lambda xs, axis: concatenate(\n list(xs), axis=axis, allow_unknown_chunksizes=allow_unknown_chunksizes\n ),\n f_kwargs=lambda axis: dict(axis=(axis + 1)),\n axis=first_axis,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_concatenate.inds._list_range_ndim_for_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_concatenate.inds._list_range_ndim_for_i_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3524, "end_line": 3627, "span_ids": ["concatenate"], "tokens": 794}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def concatenate(seq, axis=0, allow_unknown_chunksizes=False):\n \"\"\"\n Concatenate arrays along an existing axis\n\n Given a sequence of dask Arrays form a new dask Array by stacking them\n along an existing dimension (axis=0 by default)\n\n Parameters\n ----------\n seq: list of dask.arrays\n axis: int\n Dimension along which to align all of the arrays\n allow_unknown_chunksizes: bool\n Allow unknown chunksizes, such as come from converting from dask\n dataframes. Dask.array is unable to verify that chunks line up. If\n data comes from differently aligned sources then this can cause\n unexpected results.\n\n Examples\n --------\n\n Create slices\n\n >>> import dask.array as da\n >>> import numpy as np\n\n >>> data = [from_array(np.ones((4, 4)), chunks=(2, 2))\n ... for i in range(3)]\n\n >>> x = da.concatenate(data, axis=0)\n >>> x.shape\n (12, 4)\n\n >>> da.concatenate(data, axis=1).shape\n (4, 12)\n\n Result is a new dask Array\n\n See Also\n --------\n stack\n \"\"\"\n from . import wrap\n\n seq = [asarray(a) for a in seq]\n\n if not seq:\n raise ValueError(\"Need array(s) to concatenate\")\n\n seq_metas = [meta_from_array(s) for s in seq]\n _concatenate = concatenate_lookup.dispatch(\n type(max(seq_metas, key=lambda x: getattr(x, \"__array_priority__\", 0)))\n )\n meta = _concatenate(seq_metas, axis=axis)\n\n # Promote types to match meta\n seq = [a.astype(meta.dtype) for a in seq]\n\n # Find output array shape\n ndim = len(seq[0].shape)\n shape = tuple(\n sum((a.shape[i] for a in seq)) if i == axis else seq[0].shape[i]\n for i in range(ndim)\n )\n\n # Drop empty arrays\n seq2 = [a for a in seq if a.size]\n if not seq2:\n seq2 = seq\n\n if axis < 0:\n axis = ndim + axis\n if axis >= ndim:\n msg = (\n \"Axis must be less than than number of dimensions\"\n \"\\nData has %d dimensions, but got axis=%d\"\n )\n raise ValueError(msg % (ndim, axis))\n\n n = len(seq2)\n if n == 0:\n try:\n return wrap.empty_like(meta, shape=shape, chunks=shape, dtype=meta.dtype)\n except TypeError:\n return wrap.empty(shape, chunks=shape, dtype=meta.dtype)\n elif n == 1:\n return seq2[0]\n\n if not allow_unknown_chunksizes and not all(\n i == axis or all(x.shape[i] == seq2[0].shape[i] for x in seq2)\n for i in range(ndim)\n ):\n if any(map(np.isnan, seq2[0].shape)):\n raise ValueError(\n \"Tried to concatenate arrays with unknown\"\n \" shape %s.\\n\\nTwo solutions:\\n\"\n \" 1. Force concatenation pass\"\n \" allow_unknown_chunksizes=True.\\n\"\n \" 2. Compute shapes with \"\n \"[x.compute_chunk_sizes() for x in seq]\" % str(seq2[0].shape)\n )\n raise ValueError(\"Shapes do not align: %s\", [x.shape for x in seq2])\n\n inds = [list(range(ndim)) for i in range(n)]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate.for_i_ind_in_enumerate_i_concatenate.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate.for_i_ind_in_enumerate_i_concatenate.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3628, "end_line": 3660, "span_ids": ["concatenate"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def concatenate(seq, axis=0, allow_unknown_chunksizes=False):\n # ... other code\n for i, ind in enumerate(inds):\n ind[axis] = -(i + 1)\n\n uc_args = list(concat(zip(seq2, inds)))\n _, seq2 = unify_chunks(*uc_args, warn=False)\n\n bds = [a.chunks for a in seq2]\n\n chunks = (\n seq2[0].chunks[:axis]\n + (sum([bd[axis] for bd in bds], ()),)\n + seq2[0].chunks[axis + 1 :]\n )\n\n cum_dims = [0] + list(accumulate(add, [len(a.chunks[axis]) for a in seq2]))\n\n names = [a.name for a in seq2]\n\n name = \"concatenate-\" + tokenize(names, axis)\n keys = list(product([name], *[range(len(bd)) for bd in chunks]))\n\n values = [\n (names[bisect(cum_dims, key[axis + 1]) - 1],)\n + key[1 : axis + 1]\n + (key[axis + 1] - cum_dims[bisect(cum_dims, key[axis + 1]) - 1],)\n + key[axis + 2 :]\n for key in keys\n ]\n\n dsk = dict(zip(keys, values))\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=seq2)\n\n return Array(graph, name, chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_load_store_chunk_load_chunk.return.load_store_chunk_None_ou": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_load_store_chunk_load_chunk.return.load_store_chunk_None_ou", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3663, "end_line": 3714, "span_ids": ["load_chunk", "load_store_chunk", "store_chunk"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def load_store_chunk(x, out, index, lock, return_stored, load_stored):\n \"\"\"\n A function inserted in a Dask graph for storing a chunk.\n\n Parameters\n ----------\n x: array-like\n An array (potentially a NumPy one)\n out: array-like\n Where to store results too.\n index: slice-like\n Where to store result from ``x`` in ``out``.\n lock: Lock-like or False\n Lock to use before writing to ``out``.\n return_stored: bool\n Whether to return ``out``.\n load_stored: bool\n Whether to return the array stored in ``out``.\n Ignored if ``return_stored`` is not ``True``.\n\n Examples\n --------\n\n >>> a = np.ones((5, 6))\n >>> b = np.empty(a.shape)\n >>> load_store_chunk(a, b, (slice(None), slice(None)), False, False, False)\n \"\"\"\n\n result = None\n if return_stored and not load_stored:\n result = out\n\n if lock:\n lock.acquire()\n try:\n if x is not None:\n out[index] = np.asanyarray(x)\n if return_stored and load_stored:\n result = out[index]\n finally:\n if lock:\n lock.release()\n\n return result\n\n\ndef store_chunk(x, out, index, lock, return_stored):\n return load_store_chunk(x, out, index, lock, return_stored, False)\n\n\ndef load_chunk(out, index, lock):\n return load_store_chunk(None, out, index, lock, True, True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_insert_to_ooc_insert_to_ooc.return.dsk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_insert_to_ooc_insert_to_ooc.return.dsk", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3717, "end_line": 3773, "span_ids": ["insert_to_ooc"], "tokens": 481}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def insert_to_ooc(\n arr, out, lock=True, region=None, return_stored=False, load_stored=False, tok=None\n):\n \"\"\"\n Creates a Dask graph for storing chunks from ``arr`` in ``out``.\n\n Parameters\n ----------\n arr: da.Array\n A dask array\n out: array-like\n Where to store results too.\n lock: Lock-like or bool, optional\n Whether to lock or with what (default is ``True``,\n which means a ``threading.Lock`` instance).\n region: slice-like, optional\n Where in ``out`` to store ``arr``'s results\n (default is ``None``, meaning all of ``out``).\n return_stored: bool, optional\n Whether to return ``out``\n (default is ``False``, meaning ``None`` is returned).\n load_stored: bool, optional\n Whether to handling loading from ``out`` at the same time.\n Ignored if ``return_stored`` is not ``True``.\n (default is ``False``, meaning defer to ``return_stored``).\n tok: str, optional\n Token to use when naming keys\n\n Examples\n --------\n >>> import dask.array as da\n >>> d = da.ones((5, 6), chunks=(2, 3))\n >>> a = np.empty(d.shape)\n >>> insert_to_ooc(d, a) # doctest: +SKIP\n \"\"\"\n\n if lock is True:\n lock = Lock()\n\n slices = slices_from_chunks(arr.chunks)\n if region:\n slices = [fuse_slice(region, slc) for slc in slices]\n\n name = \"store-%s\" % (tok or str(uuid.uuid1()))\n func = store_chunk\n args = ()\n if return_stored and load_stored:\n name = \"load-%s\" % name\n func = load_store_chunk\n args = args + (load_stored,)\n\n dsk = {\n (name,) + t[1:]: (func, t, out, slc, lock, return_stored) + args\n for t, slc in zip(core.flatten(arr.__dask_keys__()), slices)\n }\n\n return dsk", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_retrieve_from_ooc_retrieve_from_ooc.return.load_dsk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_retrieve_from_ooc_retrieve_from_ooc.return.load_dsk", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3776, "end_line": 3806, "span_ids": ["retrieve_from_ooc"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def retrieve_from_ooc(keys, dsk_pre, dsk_post=None):\n \"\"\"\n Creates a Dask graph for loading stored ``keys`` from ``dsk``.\n\n Parameters\n ----------\n keys: Sequence\n A sequence containing Dask graph keys to load\n dsk_pre: Mapping\n A Dask graph corresponding to a Dask Array before computation\n dsk_post: Mapping, optional\n A Dask graph corresponding to a Dask Array after computation\n\n Examples\n --------\n >>> import dask.array as da\n >>> d = da.ones((5, 6), chunks=(2, 3))\n >>> a = np.empty(d.shape)\n >>> g = insert_to_ooc(d, a)\n >>> retrieve_from_ooc(g.keys(), g) # doctest: +SKIP\n \"\"\"\n\n if not dsk_post:\n dsk_post = {k: k for k in keys}\n\n load_dsk = {\n (\"load-\" + k[0],) + k[1:]: (load_chunk, dsk_post[k]) + dsk_pre[k][3:-1]\n for k in keys\n }\n\n return load_dsk", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asarray_asarray.return.from_array_a_getitem_get": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asarray_asarray.return.from_array_a_getitem_get", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3809, "end_line": 3844, "span_ids": ["asarray"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def asarray(a, **kwargs):\n \"\"\"Convert the input to a dask array.\n\n Parameters\n ----------\n a : array-like\n Input data, in any form that can be converted to a dask array.\n\n Returns\n -------\n out : dask array\n Dask array interpretation of a.\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> x = np.arange(3)\n >>> da.asarray(x)\n dask.array\n\n >>> y = [[1, 2, 3], [4, 5, 6]]\n >>> da.asarray(y)\n dask.array\n \"\"\"\n if isinstance(a, Array):\n return a\n elif hasattr(a, \"to_dask_array\"):\n return a.to_dask_array()\n elif type(a).__module__.startswith(\"xarray.\") and hasattr(a, \"data\"):\n return asarray(a.data)\n elif isinstance(a, (list, tuple)) and any(isinstance(i, Array) for i in a):\n return stack(a)\n elif not isinstance(getattr(a, \"shape\", None), Iterable):\n a = np.asarray(a)\n return from_array(a, getitem=getter_inline, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asanyarray_asanyarray.return.from_array_a_chunks_a_sh": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_asanyarray_asanyarray.return.from_array_a_chunks_a_sh", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3847, "end_line": 3884, "span_ids": ["asanyarray"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def asanyarray(a):\n \"\"\"Convert the input to a dask array.\n\n Subclasses of ``np.ndarray`` will be passed through as chunks unchanged.\n\n Parameters\n ----------\n a : array-like\n Input data, in any form that can be converted to a dask array.\n\n Returns\n -------\n out : dask array\n Dask array interpretation of a.\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> x = np.arange(3)\n >>> da.asanyarray(x)\n dask.array\n\n >>> y = [[1, 2, 3], [4, 5, 6]]\n >>> da.asanyarray(y)\n dask.array\n \"\"\"\n if isinstance(a, Array):\n return a\n elif hasattr(a, \"to_dask_array\"):\n return a.to_dask_array()\n elif type(a).__module__.startswith(\"xarray.\") and hasattr(a, \"data\"):\n return asanyarray(a.data)\n elif isinstance(a, (list, tuple)) and any(isinstance(i, Array) for i in a):\n return stack(a)\n elif not isinstance(getattr(a, \"shape\", None), Iterable):\n a = np.asanyarray(a)\n return from_array(a, chunks=a.shape, getitem=getter_inline, asarray=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_is_scalar_for_elemwise_is_scalar_for_elemwise.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_is_scalar_for_elemwise_is_scalar_for_elemwise.return._", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3887, "end_line": 3919, "span_ids": ["is_scalar_for_elemwise"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_scalar_for_elemwise(arg):\n \"\"\"\n\n >>> is_scalar_for_elemwise(42)\n True\n >>> is_scalar_for_elemwise('foo')\n True\n >>> is_scalar_for_elemwise(True)\n True\n >>> is_scalar_for_elemwise(np.array(42))\n True\n >>> is_scalar_for_elemwise([1, 2, 3])\n True\n >>> is_scalar_for_elemwise(np.array([1, 2, 3]))\n False\n >>> is_scalar_for_elemwise(from_array(np.array(0), chunks=()))\n False\n >>> is_scalar_for_elemwise(np.dtype('i4'))\n True\n \"\"\"\n # the second half of shape_condition is essentially just to ensure that\n # dask series / frame are treated as scalars in elemwise.\n maybe_shape = getattr(arg, \"shape\", None)\n shape_condition = not isinstance(maybe_shape, Iterable) or any(\n is_dask_collection(x) for x in maybe_shape\n )\n\n return (\n np.isscalar(arg)\n or shape_condition\n or isinstance(arg, np.dtype)\n or (isinstance(arg, np.ndarray) and arg.ndim == 0)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_shapes_broadcast_shapes.return.tuple_reversed_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_shapes_broadcast_shapes.return.tuple_reversed_out_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3922, "end_line": 3954, "span_ids": ["broadcast_shapes"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def broadcast_shapes(*shapes):\n \"\"\"\n Determines output shape from broadcasting arrays.\n\n Parameters\n ----------\n shapes : tuples\n The shapes of the arguments.\n\n Returns\n -------\n output_shape : tuple\n\n Raises\n ------\n ValueError\n If the input shapes cannot be successfully broadcast together.\n \"\"\"\n if len(shapes) == 1:\n return shapes[0]\n out = []\n for sizes in zip_longest(*map(reversed, shapes), fillvalue=-1):\n if np.isnan(sizes).any():\n dim = np.nan\n else:\n dim = 0 if 0 in sizes else np.max(sizes)\n if any(i not in [-1, 0, 1, dim] and not np.isnan(i) for i in sizes):\n raise ValueError(\n \"operands could not be broadcast together with \"\n \"shapes {0}\".format(\" \".join(map(str, shapes)))\n )\n out.append(dim)\n return tuple(reversed(out))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_elemwise_elemwise.return.handle_out_out_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_elemwise_elemwise.return.handle_out_out_result_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 3957, "end_line": 4037, "span_ids": ["elemwise"], "tokens": 682}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def elemwise(op, *args, **kwargs):\n \"\"\"Apply elementwise function across arguments\n\n Respects broadcasting rules\n\n Examples\n --------\n >>> elemwise(add, x, y) # doctest: +SKIP\n >>> elemwise(sin, x) # doctest: +SKIP\n\n See Also\n --------\n blockwise\n \"\"\"\n out = kwargs.pop(\"out\", None)\n if not set([\"name\", \"dtype\"]).issuperset(kwargs):\n msg = \"%s does not take the following keyword arguments %s\"\n raise TypeError(\n msg % (op.__name__, str(sorted(set(kwargs) - set([\"name\", \"dtype\"]))))\n )\n\n args = [np.asarray(a) if isinstance(a, (list, tuple)) else a for a in args]\n\n shapes = []\n for arg in args:\n shape = getattr(arg, \"shape\", ())\n if any(is_dask_collection(x) for x in shape):\n # Want to exclude Delayed shapes and dd.Scalar\n shape = ()\n shapes.append(shape)\n\n shapes = [s if isinstance(s, Iterable) else () for s in shapes]\n out_ndim = len(\n broadcast_shapes(*shapes)\n ) # Raises ValueError if dimensions mismatch\n expr_inds = tuple(range(out_ndim))[::-1]\n\n need_enforce_dtype = False\n if \"dtype\" in kwargs:\n dt = kwargs[\"dtype\"]\n else:\n # We follow NumPy's rules for dtype promotion, which special cases\n # scalars and 0d ndarrays (which it considers equivalent) by using\n # their values to compute the result dtype:\n # https://github.com/numpy/numpy/issues/6240\n # We don't inspect the values of 0d dask arrays, because these could\n # hold potentially very expensive calculations. Instead, we treat\n # them just like other arrays, and if necessary cast the result of op\n # to match.\n vals = [\n np.empty((1,) * max(1, a.ndim), dtype=a.dtype)\n if not is_scalar_for_elemwise(a)\n else a\n for a in args\n ]\n try:\n dt = apply_infer_dtype(op, vals, {}, \"elemwise\", suggest_dtype=False)\n except Exception:\n return NotImplemented\n need_enforce_dtype = any(\n not is_scalar_for_elemwise(a) and a.ndim == 0 for a in args\n )\n\n name = kwargs.get(\"name\", None) or \"%s-%s\" % (funcname(op), tokenize(op, dt, *args))\n\n blockwise_kwargs = dict(dtype=dt, name=name, token=funcname(op).strip(\"_\"))\n if need_enforce_dtype:\n blockwise_kwargs[\"enforce_dtype\"] = dt\n blockwise_kwargs[\"enforce_dtype_function\"] = op\n op = _enforce_dtype\n result = blockwise(\n op,\n expr_inds,\n *concat(\n (a, tuple(range(a.ndim)[::-1]) if not is_scalar_for_elemwise(a) else None)\n for a in args\n ),\n **blockwise_kwargs,\n )\n\n return handle_out(out, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_handle_out_handle_out.if_isinstance_out_Array_.else_.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_handle_out_handle_out.if_isinstance_out_Array_.else_.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4040, "end_line": 4070, "span_ids": ["handle_out"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def handle_out(out, result):\n \"\"\"Handle out parameters\n\n If out is a dask.array then this overwrites the contents of that array with\n the result\n \"\"\"\n if isinstance(out, tuple):\n if len(out) == 1:\n out = out[0]\n elif len(out) > 1:\n raise NotImplementedError(\"The out parameter is not fully supported\")\n else:\n out = None\n if isinstance(out, Array):\n if out.shape != result.shape:\n raise ValueError(\n \"Mismatched shapes between result and out parameter. \"\n \"out=%s, result=%s\" % (str(out.shape), str(result.shape))\n )\n out._chunks = result.chunks\n out.dask = result.dask\n out._meta = result._meta\n out.name = result.name\n elif out is not None:\n msg = (\n \"The out parameter is not fully supported.\"\n \" Received type %s, expected Dask Array\" % type(out).__name__\n )\n raise NotImplementedError(msg)\n else:\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__enforce_dtype__enforce_dtype.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__enforce_dtype__enforce_dtype.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4073, "end_line": 4112, "span_ids": ["_enforce_dtype"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _enforce_dtype(*args, **kwargs):\n \"\"\"Calls a function and converts its result to the given dtype.\n\n The parameters have deliberately been given unwieldy names to avoid\n clashes with keyword arguments consumed by blockwise\n\n A dtype of `object` is treated as a special case and not enforced,\n because it is used as a dummy value in some places when the result will\n not be a block in an Array.\n\n Parameters\n ----------\n enforce_dtype : dtype\n Result dtype\n enforce_dtype_function : callable\n The wrapped function, which will be passed the remaining arguments\n \"\"\"\n dtype = kwargs.pop(\"enforce_dtype\")\n function = kwargs.pop(\"enforce_dtype_function\")\n\n result = function(*args, **kwargs)\n if hasattr(result, \"dtype\") and dtype != result.dtype and dtype != object:\n if not np.can_cast(result, dtype, casting=\"same_kind\"):\n raise ValueError(\n \"Inferred dtype from function %r was %r \"\n \"but got %r, which can't be cast using \"\n \"casting='same_kind'\"\n % (funcname(function), str(dtype), str(result.dtype))\n )\n if np.isscalar(result):\n # scalar astype method doesn't take the keyword arguments, so\n # have to convert via 0-dimensional array and back.\n result = result.astype(dtype)\n else:\n try:\n result = result.astype(dtype, copy=False)\n except TypeError:\n # Missing copy kwarg\n result = result.astype(dtype)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_to_broadcast_to.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_to_broadcast_to.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4115, "end_line": 4181, "span_ids": ["broadcast_to"], "tokens": 598}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def broadcast_to(x, shape, chunks=None):\n \"\"\"Broadcast an array to a new shape.\n\n Parameters\n ----------\n x : array_like\n The array to broadcast.\n shape : tuple\n The shape of the desired array.\n chunks : tuple, optional\n If provided, then the result will use these chunks instead of the same\n chunks as the source array. Setting chunks explicitly as part of\n broadcast_to is more efficient than rechunking afterwards. Chunks are\n only allowed to differ from the original shape along dimensions that\n are new on the result or have size 1 the input array.\n\n Returns\n -------\n broadcast : dask array\n\n See Also\n --------\n :func:`numpy.broadcast_to`\n \"\"\"\n x = asarray(x)\n shape = tuple(shape)\n\n if x.shape == shape and (chunks is None or chunks == x.chunks):\n return x\n\n ndim_new = len(shape) - x.ndim\n if ndim_new < 0 or any(\n new != old for new, old in zip(shape[ndim_new:], x.shape) if old != 1\n ):\n raise ValueError(\"cannot broadcast shape %s to shape %s\" % (x.shape, shape))\n\n if chunks is None:\n chunks = tuple((s,) for s in shape[:ndim_new]) + tuple(\n bd if old > 1 else (new,)\n for bd, old, new in zip(x.chunks, x.shape, shape[ndim_new:])\n )\n else:\n chunks = normalize_chunks(\n chunks, shape, dtype=x.dtype, previous_chunks=x.chunks\n )\n for old_bd, new_bd in zip(x.chunks, chunks[ndim_new:]):\n if old_bd != new_bd and old_bd != (1,):\n raise ValueError(\n \"cannot broadcast chunks %s to chunks %s: \"\n \"new chunks must either be along a new \"\n \"dimension or a dimension of size 1\" % (x.chunks, chunks)\n )\n\n name = \"broadcast_to-\" + tokenize(x, shape, chunks)\n dsk = {}\n\n enumerated_chunks = product(*(enumerate(bds) for bds in chunks))\n for new_index, chunk_shape in (zip(*ec) for ec in enumerated_chunks):\n old_index = tuple(\n 0 if bd == (1,) else i for bd, i in zip(x.chunks, new_index[ndim_new:])\n )\n old_key = (x.name,) + old_index\n new_key = (name,) + new_index\n dsk[new_key] = (np.broadcast_to, old_key, quote(chunk_shape))\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n return Array(graph, name, chunks, dtype=x.dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_arrays_broadcast_arrays.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_broadcast_arrays_broadcast_arrays.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4184, "end_line": 4204, "span_ids": ["broadcast_arrays"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef broadcast_arrays(*args, **kwargs):\n subok = bool(kwargs.pop(\"subok\", False))\n\n to_array = asanyarray if subok else asarray\n args = tuple(to_array(e) for e in args)\n\n if kwargs:\n raise TypeError(\"unsupported keyword argument(s) provided\")\n\n # Unify uneven chunking\n inds = [list(reversed(range(x.ndim))) for x in args]\n uc_args = concat(zip(args, inds))\n _, args = unify_chunks(*uc_args, warn=False)\n\n shape = broadcast_shapes(*(e.shape for e in args))\n chunks = broadcast_chunks(*(e.chunks for e in args))\n\n result = [broadcast_to(e, shape=shape, chunks=chunks) for e in args]\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_offset_func_offset_func.return._offset": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_offset_func_offset_func.return._offset", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4207, "end_line": 4225, "span_ids": ["offset_func"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def offset_func(func, offset, *args):\n \"\"\"Offsets inputs by offset\n\n >>> double = lambda x: x * 2\n >>> f = offset_func(double, (10,))\n >>> f(1)\n 22\n >>> f(300)\n 620\n \"\"\"\n\n def _offset(*args):\n args2 = list(map(add, args, offset))\n return func(*args2)\n\n with ignoring(Exception):\n _offset.__name__ = \"offset_\" + func.__name__\n\n return _offset", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_chunks_from_arrays_chunks_from_arrays.return.tuple_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_chunks_from_arrays_chunks_from_arrays.return.tuple_result_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4228, "end_line": 4261, "span_ids": ["chunks_from_arrays"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def chunks_from_arrays(arrays):\n \"\"\"Chunks tuple from nested list of arrays\n\n >>> x = np.array([1, 2])\n >>> chunks_from_arrays([x, x])\n ((2, 2),)\n\n >>> x = np.array([[1, 2]])\n >>> chunks_from_arrays([[x], [x]])\n ((1, 1), (2,))\n\n >>> x = np.array([[1, 2]])\n >>> chunks_from_arrays([[x, x]])\n ((1,), (2, 2))\n\n >>> chunks_from_arrays([1, 1])\n ((1, 1),)\n \"\"\"\n if not arrays:\n return ()\n result = []\n dim = 0\n\n def shape(x):\n try:\n return x.shape\n except AttributeError:\n return (1,)\n\n while isinstance(arrays, (list, tuple)):\n result.append(tuple([shape(deepfirst(a))[dim] for a in arrays]))\n arrays = arrays[0]\n dim += 1\n return tuple(result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_deepfirst_reshapelist.if_len_shape_1_.else_.return._reshapelist_shape_1_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_deepfirst_reshapelist.if_len_shape_1_.else_.return._reshapelist_shape_1_p", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4264, "end_line": 4294, "span_ids": ["reshapelist", "shapelist", "deepfirst"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def deepfirst(seq):\n \"\"\"First element in a nested list\n\n >>> deepfirst([[[1, 2], [3, 4]], [5, 6], [7, 8]])\n 1\n \"\"\"\n if not isinstance(seq, (list, tuple)):\n return seq\n else:\n return deepfirst(seq[0])\n\n\ndef shapelist(a):\n \"\"\" Get the shape of nested list \"\"\"\n if type(a) is list:\n return tuple([len(a)] + list(shapelist(a[0])))\n else:\n return ()\n\n\ndef reshapelist(shape, seq):\n \"\"\"Reshape iterator to nested shape\n\n >>> reshapelist((2, 3), range(6))\n [[0, 1, 2], [3, 4, 5]]\n \"\"\"\n if len(shape) == 1:\n return list(seq)\n else:\n n = int(len(seq) / shape[0])\n return [reshapelist(shape[1:], part) for part in partition(n, seq)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_transposelist_transposelist.return.reshapelist_newshape_res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_transposelist_transposelist.return.reshapelist_newshape_res", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4297, "end_line": 4320, "span_ids": ["transposelist"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def transposelist(arrays, axes, extradims=0):\n \"\"\"Permute axes of nested list\n\n >>> transposelist([[1,1,1],[1,1,1]], [2,1])\n [[[1, 1], [1, 1], [1, 1]]]\n\n >>> transposelist([[1,1,1],[1,1,1]], [2,1], extradims=1)\n [[[[1], [1]], [[1], [1]], [[1], [1]]]]\n \"\"\"\n if len(axes) != ndimlist(arrays):\n raise ValueError(\"Length of axes should equal depth of nested arrays\")\n if extradims < 0:\n raise ValueError(\"`newdims` should be positive\")\n if len(axes) > len(set(axes)):\n raise ValueError(\"`axes` should be unique\")\n\n ndim = max(axes) + 1\n shape = shapelist(arrays)\n newshape = [\n shape[axes.index(i)] if i in axes else 1 for i in range(ndim + extradims)\n ]\n\n result = list(core.flatten(arrays))\n return reshapelist(newshape, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack_stack.keys.list_product_name_ra": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack_stack.keys.list_product_name_ra", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4323, "end_line": 4415, "span_ids": ["stack"], "tokens": 765}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stack(seq, axis=0, allow_unknown_chunksizes=False):\n \"\"\"\n Stack arrays along a new axis\n\n Given a sequence of dask arrays, form a new dask array by stacking them\n along a new dimension (axis=0 by default)\n\n Parameters\n ----------\n seq: list of dask.arrays\n axis: int\n Dimension along which to align all of the arrays\n allow_unknown_chunksizes: bool\n Allow unknown chunksizes, such as come from converting from dask\n dataframes. Dask.array is unable to verify that chunks line up. If\n data comes from differently aligned sources then this can cause\n unexpected results.\n\n Examples\n --------\n\n Create slices\n\n >>> import dask.array as da\n >>> import numpy as np\n\n >>> data = [from_array(np.ones((4, 4)), chunks=(2, 2))\n ... for i in range(3)]\n\n >>> x = da.stack(data, axis=0)\n >>> x.shape\n (3, 4, 4)\n\n >>> da.stack(data, axis=1).shape\n (4, 3, 4)\n\n >>> da.stack(data, axis=-1).shape\n (4, 4, 3)\n\n Result is a new dask Array\n\n See Also\n --------\n concatenate\n \"\"\"\n from . import wrap\n\n seq = [asarray(a) for a in seq]\n\n if not seq:\n raise ValueError(\"Need array(s) to stack\")\n if not allow_unknown_chunksizes and not all(x.shape == seq[0].shape for x in seq):\n idx = first(i for i in enumerate(seq) if i[1].shape != seq[0].shape)\n raise ValueError(\n \"Stacked arrays must have the same shape. \"\n \"The first array had shape {0}, while array \"\n \"{1} has shape {2}.\".format(seq[0].shape, idx[0] + 1, idx[1].shape)\n )\n\n meta = np.stack([meta_from_array(a) for a in seq], axis=axis)\n seq = [x.astype(meta.dtype) for x in seq]\n\n ndim = meta.ndim - 1\n if axis < 0:\n axis = ndim + axis + 1\n shape = tuple(\n len(seq)\n if i == axis\n else (seq[0].shape[i] if i < axis else seq[0].shape[i - 1])\n for i in range(meta.ndim)\n )\n\n seq2 = [a for a in seq if a.size]\n if not seq2:\n seq2 = seq\n\n n = len(seq2)\n if n == 0:\n try:\n return wrap.empty_like(meta, shape=shape, chunks=shape, dtype=meta.dtype)\n except TypeError:\n return wrap.empty(shape, chunks=shape, dtype=meta.dtype)\n\n ind = list(range(ndim))\n uc_args = list(concat((x, ind) for x in seq2))\n _, seq2 = unify_chunks(*uc_args)\n\n assert len(set(a.chunks for a in seq2)) == 1 # same chunks\n chunks = seq2[0].chunks[:axis] + ((1,) * n,) + seq2[0].chunks[axis:]\n\n names = [a.name for a in seq2]\n name = \"stack-\" + tokenize(names, axis)\n keys = list(product([name], *[range(len(bd)) for bd in chunks]))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack.inputs_stack.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_stack.inputs_stack.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4417, "end_line": 4434, "span_ids": ["stack"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stack(seq, axis=0, allow_unknown_chunksizes=False):\n # ... other code\n\n inputs = [\n (names[key[axis + 1]],) + key[1 : axis + 1] + key[axis + 2 :] for key in keys\n ]\n values = [\n (\n getitem,\n inp,\n (slice(None, None, None),) * axis\n + (None,)\n + (slice(None, None, None),) * (ndim - axis),\n )\n for inp in inputs\n ]\n\n layer = dict(zip(keys, values))\n graph = HighLevelGraph.from_collections(name, layer, dependencies=seq2)\n\n return Array(graph, name, chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate3_concatenate3.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate3_concatenate3.return.result", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4437, "end_line": 4504, "span_ids": ["concatenate3"], "tokens": 543}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def concatenate3(arrays):\n \"\"\"Recursive np.concatenate\n\n Input should be a nested list of numpy arrays arranged in the order they\n should appear in the array itself. Each array should have the same number\n of dimensions as the desired output and the nesting of the lists.\n\n >>> x = np.array([[1, 2]])\n >>> concatenate3([[x, x, x], [x, x, x]])\n array([[1, 2, 1, 2, 1, 2],\n [1, 2, 1, 2, 1, 2]])\n\n >>> concatenate3([[x, x], [x, x], [x, x]])\n array([[1, 2, 1, 2],\n [1, 2, 1, 2],\n [1, 2, 1, 2]])\n \"\"\"\n from .utils import IS_NEP18_ACTIVE\n\n # We need this as __array_function__ may not exist on older NumPy versions.\n # And to reduce verbosity.\n NDARRAY_ARRAY_FUNCTION = getattr(np.ndarray, \"__array_function__\", None)\n\n arrays = concrete(arrays)\n if not arrays:\n return np.empty(0)\n\n advanced = max(\n core.flatten(arrays, container=(list, tuple)),\n key=lambda x: getattr(x, \"__array_priority__\", 0),\n )\n\n if IS_NEP18_ACTIVE and not all(\n NDARRAY_ARRAY_FUNCTION\n is getattr(arr, \"__array_function__\", NDARRAY_ARRAY_FUNCTION)\n for arr in arrays\n ):\n try:\n x = unpack_singleton(arrays)\n return _concatenate2(arrays, axes=tuple(range(x.ndim)))\n except TypeError:\n pass\n\n if concatenate_lookup.dispatch(type(advanced)) is not np.concatenate:\n x = unpack_singleton(arrays)\n return _concatenate2(arrays, axes=list(range(x.ndim)))\n\n ndim = ndimlist(arrays)\n if not ndim:\n return arrays\n chunks = chunks_from_arrays(arrays)\n shape = tuple(map(sum, chunks))\n\n def dtype(x):\n try:\n return x.dtype\n except AttributeError:\n return type(x)\n\n result = np.empty(shape=shape, dtype=dtype(deepfirst(arrays)))\n\n for (idx, arr) in zip(slices_from_chunks(chunks), core.flatten(arrays)):\n if hasattr(arr, \"ndim\"):\n while arr.ndim < ndim:\n arr = arr[None, ...]\n result[idx] = arr\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_axes_to_hdf5.with_h5py_File_filename_.store_list_data_values_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_concatenate_axes_to_hdf5.with_h5py_File_filename_.store_list_data_values_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4507, "end_line": 4563, "span_ids": ["concatenate_axes", "to_hdf5"], "tokens": 491}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def concatenate_axes(arrays, axes):\n \"\"\" Recursively call np.concatenate along axes \"\"\"\n if len(axes) != ndimlist(arrays):\n raise ValueError(\"Length of axes should equal depth of nested arrays\")\n\n extradims = max(0, deepfirst(arrays).ndim - (max(axes) + 1))\n return concatenate3(transposelist(arrays, axes, extradims=extradims))\n\n\ndef to_hdf5(filename, *args, **kwargs):\n \"\"\"Store arrays in HDF5 file\n\n This saves several dask arrays into several datapaths in an HDF5 file.\n It creates the necessary datasets and handles clean file opening/closing.\n\n >>> da.to_hdf5('myfile.hdf5', '/x', x) # doctest: +SKIP\n\n or\n\n >>> da.to_hdf5('myfile.hdf5', {'/x': x, '/y': y}) # doctest: +SKIP\n\n Optionally provide arguments as though to ``h5py.File.create_dataset``\n\n >>> da.to_hdf5('myfile.hdf5', '/x', x, compression='lzf', shuffle=True) # doctest: +SKIP\n\n This can also be used as a method on a single Array\n\n >>> x.to_hdf5('myfile.hdf5', '/x') # doctest: +SKIP\n\n See Also\n --------\n da.store\n h5py.File.create_dataset\n \"\"\"\n if len(args) == 1 and isinstance(args[0], dict):\n data = args[0]\n elif len(args) == 2 and isinstance(args[0], str) and isinstance(args[1], Array):\n data = {args[0]: args[1]}\n else:\n raise ValueError(\"Please provide {'/data/path': array} dictionary\")\n\n chunks = kwargs.pop(\"chunks\", True)\n\n import h5py\n\n with h5py.File(filename, mode=\"a\") as f:\n dsets = [\n f.require_dataset(\n dp,\n shape=x.shape,\n dtype=x.dtype,\n chunks=tuple([c[0] for c in x.chunks]) if chunks is True else chunks,\n **kwargs,\n )\n for dp, x in data.items()\n ]\n store(list(data.values()), dsets)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_interleave_none_keyname.return._name_i_tuple_k_for_k": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_interleave_none_keyname.return._name_i_tuple_k_for_k", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4566, "end_line": 4592, "span_ids": ["interleave_none", "keyname"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def interleave_none(a, b):\n \"\"\"\n\n >>> interleave_none([0, None, 2, None], [1, 3])\n (0, 1, 2, 3)\n \"\"\"\n result = []\n i = j = 0\n n = len(a) + len(b)\n while i + j < n:\n if a[i] is not None:\n result.append(a[i])\n i += 1\n else:\n result.append(b[j])\n i += 1\n j += 1\n return tuple(result)\n\n\ndef keyname(name, i, okey):\n \"\"\"\n\n >>> keyname('x', 3, [None, None, 0, 2])\n ('x', 3, 0, 2)\n \"\"\"\n return (name, i) + tuple(k for k in okey if k is not None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex__vindex.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex__vindex.return.x", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4595, "end_line": 4649, "span_ids": ["_vindex"], "tokens": 570}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _vindex(x, *indexes):\n \"\"\"Point wise indexing with broadcasting.\n\n >>> x = np.arange(56).reshape((7, 8))\n >>> x\n array([[ 0, 1, 2, 3, 4, 5, 6, 7],\n [ 8, 9, 10, 11, 12, 13, 14, 15],\n [16, 17, 18, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 45, 46, 47],\n [48, 49, 50, 51, 52, 53, 54, 55]])\n\n >>> d = from_array(x, chunks=(3, 4))\n >>> result = _vindex(d, [0, 1, 6, 0], [0, 1, 0, 7])\n >>> result.compute()\n array([ 0, 9, 48, 7])\n \"\"\"\n indexes = replace_ellipsis(x.ndim, indexes)\n\n nonfancy_indexes = []\n reduced_indexes = []\n for i, ind in enumerate(indexes):\n if isinstance(ind, Number):\n nonfancy_indexes.append(ind)\n elif isinstance(ind, slice):\n nonfancy_indexes.append(ind)\n reduced_indexes.append(slice(None))\n else:\n nonfancy_indexes.append(slice(None))\n reduced_indexes.append(ind)\n\n nonfancy_indexes = tuple(nonfancy_indexes)\n reduced_indexes = tuple(reduced_indexes)\n\n x = x[nonfancy_indexes]\n\n array_indexes = {}\n for i, (ind, size) in enumerate(zip(reduced_indexes, x.shape)):\n if not isinstance(ind, slice):\n ind = np.array(ind, copy=True)\n if ind.dtype.kind == \"b\":\n raise IndexError(\"vindex does not support indexing with boolean arrays\")\n if ((ind >= size) | (ind < -size)).any():\n raise IndexError(\n \"vindex key has entries out of bounds for \"\n \"indexing along axis %s of size %s: %r\" % (i, size, ind)\n )\n ind %= size\n array_indexes[i] = ind\n\n if array_indexes:\n x = _vindex_array(x, array_indexes)\n\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_array__vindex_array.return.result_1d_reshape_broadca": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_array__vindex_array.return.result_1d_reshape_broadca", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4652, "end_line": 4747, "span_ids": ["_vindex_array"], "tokens": 854}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _vindex_array(x, dict_indexes):\n \"\"\"Point wise indexing with only NumPy Arrays.\"\"\"\n\n try:\n broadcast_indexes = np.broadcast_arrays(*dict_indexes.values())\n except ValueError as e:\n # note: error message exactly matches numpy\n shapes_str = \" \".join(str(a.shape) for a in dict_indexes.values())\n raise IndexError(\n \"shape mismatch: indexing arrays could not be \"\n \"broadcast together with shapes \" + shapes_str\n ) from e\n broadcast_shape = broadcast_indexes[0].shape\n\n lookup = dict(zip(dict_indexes, broadcast_indexes))\n flat_indexes = [\n lookup[i].ravel().tolist() if i in lookup else None for i in range(x.ndim)\n ]\n flat_indexes.extend([None] * (x.ndim - len(flat_indexes)))\n\n flat_indexes = [\n list(index) if index is not None else index for index in flat_indexes\n ]\n bounds = [list(accumulate(add, (0,) + c)) for c in x.chunks]\n bounds2 = [b for i, b in zip(flat_indexes, bounds) if i is not None]\n axis = _get_axis(flat_indexes)\n token = tokenize(x, flat_indexes)\n out_name = \"vindex-merge-\" + token\n\n points = list()\n for i, idx in enumerate(zip(*[i for i in flat_indexes if i is not None])):\n block_idx = [\n np.searchsorted(b, ind, \"right\") - 1 for b, ind in zip(bounds2, idx)\n ]\n inblock_idx = [\n ind - bounds2[k][j] for k, (ind, j) in enumerate(zip(idx, block_idx))\n ]\n points.append((i, tuple(block_idx), tuple(inblock_idx)))\n\n chunks = [c for i, c in zip(flat_indexes, x.chunks) if i is None]\n chunks.insert(0, (len(points),) if points else (0,))\n chunks = tuple(chunks)\n\n if points:\n per_block = groupby(1, points)\n per_block = dict((k, v) for k, v in per_block.items() if v)\n\n other_blocks = list(\n product(\n *[\n list(range(len(c))) if i is None else [None]\n for i, c in zip(flat_indexes, x.chunks)\n ]\n )\n )\n\n full_slices = [slice(None, None) if i is None else None for i in flat_indexes]\n\n name = \"vindex-slice-\" + token\n vindex_merge_name = \"vindex-merge-\" + token\n dsk = {}\n for okey in other_blocks:\n for i, key in enumerate(per_block):\n dsk[keyname(name, i, okey)] = (\n _vindex_transpose,\n (\n _vindex_slice,\n (x.name,) + interleave_none(okey, key),\n interleave_none(\n full_slices, list(zip(*pluck(2, per_block[key])))\n ),\n ),\n axis,\n )\n dsk[keyname(vindex_merge_name, 0, okey)] = (\n _vindex_merge,\n [list(pluck(0, per_block[key])) for key in per_block],\n [keyname(name, i, okey) for i in range(len(per_block))],\n )\n\n result_1d = Array(\n HighLevelGraph.from_collections(out_name, dsk, dependencies=[x]),\n out_name,\n chunks,\n x.dtype,\n )\n return result_1d.reshape(broadcast_shape + result_1d.shape[1:])\n\n # output has a zero dimension, just create a new zero-shape array with the\n # same dtype\n from .wrap import empty\n\n result_1d = empty(\n tuple(map(sum, chunks)), chunks=chunks, dtype=x.dtype, name=out_name\n )\n return result_1d.reshape(broadcast_shape + result_1d.shape[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__get_axis__vindex_transpose.return.block_transpose_axes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__get_axis__vindex_transpose.return.block_transpose_axes_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4750, "end_line": 4779, "span_ids": ["_get_axis", "_vindex_slice", "_vindex_transpose"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_axis(indexes):\n \"\"\"Get axis along which point-wise slicing results lie\n\n This is mostly a hack because I can't figure out NumPy's rule on this and\n can't be bothered to go reading.\n\n >>> _get_axis([[1, 2], None, [1, 2], None])\n 0\n >>> _get_axis([None, [1, 2], [1, 2], None])\n 1\n >>> _get_axis([None, None, [1, 2], [1, 2]])\n 2\n \"\"\"\n ndim = len(indexes)\n indexes = [slice(None, None) if i is None else [0] for i in indexes]\n x = np.empty((2,) * ndim)\n x2 = x[tuple(indexes)]\n return x2.shape.index(1)\n\n\ndef _vindex_slice(block, points):\n \"\"\" Pull out point-wise slices from block \"\"\"\n points = [p if isinstance(p, slice) else list(p) for p in points]\n return block[tuple(points)]\n\n\ndef _vindex_transpose(block, axis):\n \"\"\" Rotate block so that points are on the first dimension \"\"\"\n axes = [axis] + list(range(axis)) + list(range(axis + 1, block.ndim))\n return block.transpose(axes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_merge__vindex_merge.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py__vindex_merge__vindex_merge.return.x", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4782, "end_line": 4812, "span_ids": ["_vindex_merge"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _vindex_merge(locations, values):\n \"\"\"\n\n >>> locations = [0], [2, 1]\n >>> values = [np.array([[1, 2, 3]]),\n ... np.array([[10, 20, 30], [40, 50, 60]])]\n\n >>> _vindex_merge(locations, values)\n array([[ 1, 2, 3],\n [40, 50, 60],\n [10, 20, 30]])\n \"\"\"\n locations = list(map(list, locations))\n values = list(values)\n\n n = sum(map(len, locations))\n\n shape = list(values[0].shape)\n shape[0] = n\n shape = tuple(shape)\n\n dtype = values[0].dtype\n\n x = np.empty(shape, dtype=dtype)\n\n ind = [slice(None, None) for i in range(x.ndim)]\n for loc, val in zip(locations, values):\n ind[0] = loc\n x[tuple(ind)] = val\n\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_npy_stack_to_npy_stack.compute_as_if_collection_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_to_npy_stack_to_npy_stack.compute_as_if_collection_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4815, "end_line": 4864, "span_ids": ["to_npy_stack"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def to_npy_stack(dirname, x, axis=0):\n \"\"\"Write dask array to a stack of .npy files\n\n This partitions the dask.array along one axis and stores each block along\n that axis as a single .npy file in the specified directory\n\n Examples\n --------\n >>> x = da.ones((5, 10, 10), chunks=(2, 4, 4)) # doctest: +SKIP\n >>> da.to_npy_stack('data/', x, axis=0) # doctest: +SKIP\n\n The ``.npy`` files store numpy arrays for ``x[0:2], x[2:4], and x[4:5]``\n respectively, as is specified by the chunk size along the zeroth axis::\n\n $ tree data/\n data/\n |-- 0.npy\n |-- 1.npy\n |-- 2.npy\n |-- info\n\n The ``info`` file stores the dtype, chunks, and axis information of the array.\n You can load these stacks with the ``da.from_npy_stack`` function.\n\n >>> y = da.from_npy_stack('data/') # doctest: +SKIP\n\n See Also\n --------\n from_npy_stack\n \"\"\"\n\n chunks = tuple((c if i == axis else (sum(c),)) for i, c in enumerate(x.chunks))\n xx = x.rechunk(chunks)\n\n if not os.path.exists(dirname):\n os.mkdir(dirname)\n\n meta = {\"chunks\": chunks, \"dtype\": x.dtype, \"axis\": axis}\n\n with open(os.path.join(dirname, \"info\"), \"wb\") as f:\n pickle.dump(meta, f)\n\n name = \"to-npy-stack-\" + str(uuid.uuid1())\n dsk = {\n (name, i): (np.save, os.path.join(dirname, \"%d.npy\" % i), key)\n for i, key in enumerate(core.flatten(xx.__dask_keys__()))\n }\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[xx])\n compute_as_if_collection(Array, graph, list(dsk))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_npy_stack_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/core.py_from_npy_stack_", "embedding": null, "metadata": {"file_path": "dask/array/core.py", "file_name": "core.py", "file_type": "text/x-python", "category": "implementation", "start_line": 4867, "end_line": 4898, "span_ids": ["from_npy_stack", "impl:19"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def from_npy_stack(dirname, mmap_mode=\"r\"):\n \"\"\"Load dask array from stack of npy files\n\n See ``da.to_npy_stack`` for docstring\n\n Parameters\n ----------\n dirname: string\n Directory of .npy files\n mmap_mode: (None or 'r')\n Read data in memory map mode\n \"\"\"\n with open(os.path.join(dirname, \"info\"), \"rb\") as f:\n info = pickle.load(f)\n\n dtype = info[\"dtype\"]\n chunks = info[\"chunks\"]\n axis = info[\"axis\"]\n\n name = \"from-npy-stack-%s\" % dirname\n keys = list(product([name], *[range(len(c)) for c in chunks]))\n values = [\n (np.load, os.path.join(dirname, \"%d.npy\" % i), mmap_mode)\n for i in range(len(chunks[axis]))\n ]\n dsk = dict(zip(keys, values))\n\n return Array(dsk, name, chunks, dtype)\n\n\nfrom .utils import meta_from_array", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_from_collections_abc_impo_AxisError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_from_collections_abc_impo_AxisError", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["imports"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections.abc import Sequence\nfrom functools import partial, reduce\nfrom itertools import product\nfrom operator import add, getitem\nfrom numbers import Integral, Number\n\nimport numpy as np\nfrom tlz import accumulate, sliding_window\n\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..base import tokenize\nfrom ..utils import derived_from\nfrom . import chunk\nfrom .core import (\n Array,\n asarray,\n normalize_chunks,\n stack,\n concatenate,\n block,\n broadcast_to,\n broadcast_arrays,\n cached_cumsum,\n)\nfrom .ufunc import rint\nfrom .wrap import empty, ones, zeros, full\nfrom .utils import AxisError, meta_from_array, zeros_like_safe", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_empty_like_empty_like.return.empty_shape_dtype_dtype": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_empty_like_empty_like.return.empty_shape_dtype_dtype", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 76, "span_ids": ["empty_like"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def empty_like(a, dtype=None, order=\"C\", chunks=None, name=None, shape=None):\n \"\"\"\n Return a new array with the same shape and type as a given array.\n\n Parameters\n ----------\n a : array_like\n The shape and data-type of `a` define these same attributes of the\n returned array.\n dtype : data-type, optional\n Overrides the data type of the result.\n order : {'C', 'F'}, optional\n Whether to store multidimensional data in C- or Fortran-contiguous\n (row- or column-wise) order in memory.\n chunks : sequence of ints\n The number of samples on each block. Note that the last block will have\n fewer samples if ``len(array) % chunks != 0``.\n name : str, optional\n An optional keyname for the array. Defaults to hashing the input\n keyword arguments.\n shape : int or sequence of ints, optional.\n Overrides the shape of the result.\n\n Returns\n -------\n out : ndarray\n Array of uninitialized (arbitrary) data with the same\n shape and type as `a`.\n\n See Also\n --------\n ones_like : Return an array of ones with shape and type of input.\n zeros_like : Return an array of zeros with shape and type of input.\n empty : Return a new uninitialized array.\n ones : Return a new array setting values to one.\n zeros : Return a new array setting values to zero.\n\n Notes\n -----\n This function does *not* initialize the returned array; to do that use\n `zeros_like` or `ones_like` instead. It may be marginally faster than\n the functions that do set the array values.\n \"\"\"\n\n a = asarray(a, name=False)\n shape, chunks = _get_like_function_shapes_chunks(a, chunks, shape)\n return empty(shape, dtype=(dtype or a.dtype), order=order, chunks=chunks, name=name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_ones_like_ones_like.return.ones_shape_dtype_dtype_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_ones_like_ones_like.return.ones_shape_dtype_dtype_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 118, "span_ids": ["ones_like"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ones_like(a, dtype=None, order=\"C\", chunks=None, name=None, shape=None):\n \"\"\"\n Return an array of ones with the same shape and type as a given array.\n\n Parameters\n ----------\n a : array_like\n The shape and data-type of `a` define these same attributes of\n the returned array.\n dtype : data-type, optional\n Overrides the data type of the result.\n order : {'C', 'F'}, optional\n Whether to store multidimensional data in C- or Fortran-contiguous\n (row- or column-wise) order in memory.\n chunks : sequence of ints\n The number of samples on each block. Note that the last block will have\n fewer samples if ``len(array) % chunks != 0``.\n name : str, optional\n An optional keyname for the array. Defaults to hashing the input\n keyword arguments.\n shape : int or sequence of ints, optional.\n Overrides the shape of the result.\n\n Returns\n -------\n out : ndarray\n Array of ones with the same shape and type as `a`.\n\n See Also\n --------\n zeros_like : Return an array of zeros with shape and type of input.\n empty_like : Return an empty array with shape and type of input.\n zeros : Return a new array setting values to zero.\n ones : Return a new array setting values to one.\n empty : Return a new uninitialized array.\n \"\"\"\n\n a = asarray(a, name=False)\n shape, chunks = _get_like_function_shapes_chunks(a, chunks, shape)\n return ones(shape, dtype=(dtype or a.dtype), order=order, chunks=chunks, name=name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_zeros_like_zeros_like.return.zeros_shape_dtype_dtype": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_zeros_like_zeros_like.return.zeros_shape_dtype_dtype", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 160, "span_ids": ["zeros_like"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def zeros_like(a, dtype=None, order=\"C\", chunks=None, name=None, shape=None):\n \"\"\"\n Return an array of zeros with the same shape and type as a given array.\n\n Parameters\n ----------\n a : array_like\n The shape and data-type of `a` define these same attributes of\n the returned array.\n dtype : data-type, optional\n Overrides the data type of the result.\n order : {'C', 'F'}, optional\n Whether to store multidimensional data in C- or Fortran-contiguous\n (row- or column-wise) order in memory.\n chunks : sequence of ints\n The number of samples on each block. Note that the last block will have\n fewer samples if ``len(array) % chunks != 0``.\n name : str, optional\n An optional keyname for the array. Defaults to hashing the input\n keyword arguments.\n shape : int or sequence of ints, optional.\n Overrides the shape of the result.\n\n Returns\n -------\n out : ndarray\n Array of zeros with the same shape and type as `a`.\n\n See Also\n --------\n ones_like : Return an array of ones with shape and type of input.\n empty_like : Return an empty array with shape and type of input.\n zeros : Return a new array setting values to zero.\n ones : Return a new array setting values to one.\n empty : Return a new uninitialized array.\n \"\"\"\n\n a = asarray(a, name=False)\n shape, chunks = _get_like_function_shapes_chunks(a, chunks, shape)\n return zeros(shape, dtype=(dtype or a.dtype), order=order, chunks=chunks, name=name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_full_like__get_like_function_shapes_chunks.return.shape_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_full_like__get_like_function_shapes_chunks.return.shape_chunks", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 163, "end_line": 227, "span_ids": ["_get_like_function_shapes_chunks", "full_like"], "tokens": 485}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def full_like(a, fill_value, order=\"C\", dtype=None, chunks=None, name=None, shape=None):\n \"\"\"\n Return a full array with the same shape and type as a given array.\n\n Parameters\n ----------\n a : array_like\n The shape and data-type of `a` define these same attributes of\n the returned array.\n fill_value : scalar\n Fill value.\n dtype : data-type, optional\n Overrides the data type of the result.\n order : {'C', 'F'}, optional\n Whether to store multidimensional data in C- or Fortran-contiguous\n (row- or column-wise) order in memory.\n chunks : sequence of ints\n The number of samples on each block. Note that the last block will have\n fewer samples if ``len(array) % chunks != 0``.\n name : str, optional\n An optional keyname for the array. Defaults to hashing the input\n keyword arguments.\n shape : int or sequence of ints, optional.\n Overrides the shape of the result.\n\n Returns\n -------\n out : ndarray\n Array of `fill_value` with the same shape and type as `a`.\n\n See Also\n --------\n zeros_like : Return an array of zeros with shape and type of input.\n ones_like : Return an array of ones with shape and type of input.\n empty_like : Return an empty array with shape and type of input.\n zeros : Return a new array setting values to zero.\n ones : Return a new array setting values to one.\n empty : Return a new uninitialized array.\n full : Fill a new array.\n \"\"\"\n\n a = asarray(a, name=False)\n shape, chunks = _get_like_function_shapes_chunks(a, chunks, shape)\n return full(\n shape,\n fill_value,\n dtype=(dtype or a.dtype),\n order=order,\n chunks=chunks,\n name=name,\n )\n\n\ndef _get_like_function_shapes_chunks(a, chunks, shape):\n \"\"\"\n Helper function for finding shapes and chunks for *_like()\n array creation functions.\n \"\"\"\n if shape is None:\n shape = a.shape\n if chunks is None:\n chunks = a.chunks\n elif chunks is None:\n chunks = \"auto\"\n return shape, chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linspace_linspace.if_retstep_.else_.return.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linspace_linspace.if_retstep_.else_.return.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 301, "span_ids": ["linspace"], "tokens": 511}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def linspace(\n start, stop, num=50, endpoint=True, retstep=False, chunks=\"auto\", dtype=None\n):\n \"\"\"\n Return `num` evenly spaced values over the closed interval [`start`,\n `stop`].\n\n Parameters\n ----------\n start : scalar\n The starting value of the sequence.\n stop : scalar\n The last value of the sequence.\n num : int, optional\n Number of samples to include in the returned dask array, including the\n endpoints. Default is 50.\n endpoint : bool, optional\n If True, ``stop`` is the last sample. Otherwise, it is not included.\n Default is True.\n retstep : bool, optional\n If True, return (samples, step), where step is the spacing between\n samples. Default is False.\n chunks : int\n The number of samples on each block. Note that the last block will have\n fewer samples if `num % blocksize != 0`\n dtype : dtype, optional\n The type of the output array.\n\n Returns\n -------\n samples : dask array\n step : float, optional\n Only returned if ``retstep`` is True. Size of spacing between samples.\n\n\n See Also\n --------\n dask.array.arange\n \"\"\"\n num = int(num)\n\n if dtype is None:\n dtype = np.linspace(0, 1, 1).dtype\n\n chunks = normalize_chunks(chunks, (num,), dtype=dtype)\n\n range_ = stop - start\n\n div = (num - 1) if endpoint else num\n step = float(range_) / div\n\n name = \"linspace-\" + tokenize((start, stop, num, endpoint, chunks, dtype))\n\n dsk = {}\n blockstart = start\n\n for i, bs in enumerate(chunks[0]):\n bs_space = bs - 1 if endpoint else bs\n blockstop = blockstart + (bs_space * step)\n task = (\n partial(np.linspace, endpoint=endpoint, dtype=dtype),\n blockstart,\n blockstop,\n bs,\n )\n blockstart = blockstart + (step * bs)\n dsk[(name, i)] = task\n\n if retstep:\n return Array(dsk, name, chunks, dtype=dtype), step\n else:\n return Array(dsk, name, chunks, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_arange_arange.return.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_arange_arange.return.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 304, "end_line": 379, "span_ids": ["arange"], "tokens": 597}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def arange(*args, **kwargs):\n \"\"\"\n Return evenly spaced values from `start` to `stop` with step size `step`.\n\n The values are half-open [start, stop), so including start and excluding\n stop. This is basically the same as python's range function but for dask\n arrays.\n\n When using a non-integer step, such as 0.1, the results will often not be\n consistent. It is better to use linspace for these cases.\n\n Parameters\n ----------\n start : int, optional\n The starting value of the sequence. The default is 0.\n stop : int\n The end of the interval, this value is excluded from the interval.\n step : int, optional\n The spacing between the values. The default is 1 when not specified.\n The last value of the sequence.\n chunks : int\n The number of samples on each block. Note that the last block will have\n fewer samples if ``len(array) % chunks != 0``.\n dtype : numpy.dtype\n Output dtype. Omit to infer it from start, stop, step\n\n Returns\n -------\n samples : dask array\n\n See Also\n --------\n dask.array.linspace\n \"\"\"\n if len(args) == 1:\n start = 0\n stop = args[0]\n step = 1\n elif len(args) == 2:\n start = args[0]\n stop = args[1]\n step = 1\n elif len(args) == 3:\n start, stop, step = args\n else:\n raise TypeError(\n \"\"\"\n arange takes 3 positional arguments: arange([start], stop, [step])\n \"\"\"\n )\n\n chunks = kwargs.pop(\"chunks\", \"auto\")\n\n num = int(max(np.ceil((stop - start) / step), 0))\n\n dtype = kwargs.pop(\"dtype\", None)\n if dtype is None:\n dtype = np.arange(start, stop, step * num if num else step).dtype\n\n chunks = normalize_chunks(chunks, (num,), dtype=dtype)\n\n if kwargs:\n raise TypeError(\"Unexpected keyword argument(s): %s\" % \",\".join(kwargs.keys()))\n\n name = \"arange-\" + tokenize((start, stop, step, chunks, dtype))\n dsk = {}\n elem_count = 0\n\n for i, bs in enumerate(chunks[0]):\n blockstart = start + (elem_count * step)\n blockstop = start + ((elem_count + bs) * step)\n task = (chunk.arange, blockstart, blockstop, step, bs, dtype)\n dsk[(name, i)] = task\n elem_count += bs\n\n return Array(dsk, name, chunks, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_meshgrid_meshgrid.return.grid": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_meshgrid_meshgrid.return.grid", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 418, "span_ids": ["meshgrid"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef meshgrid(*xi, **kwargs):\n indexing = kwargs.pop(\"indexing\", \"xy\")\n sparse = bool(kwargs.pop(\"sparse\", False))\n\n if \"copy\" in kwargs:\n raise NotImplementedError(\"`copy` not supported\")\n\n if kwargs:\n raise TypeError(\"unsupported keyword argument(s) provided\")\n\n if indexing not in (\"ij\", \"xy\"):\n raise ValueError(\"`indexing` must be `'ij'` or `'xy'`\")\n\n xi = [asarray(e) for e in xi]\n xi = [e.flatten() for e in xi]\n\n if indexing == \"xy\" and len(xi) > 1:\n xi[0], xi[1] = xi[1], xi[0]\n\n grid = []\n for i in range(len(xi)):\n s = len(xi) * [None]\n s[i] = slice(None)\n s = tuple(s)\n\n r = xi[i][s]\n\n grid.append(r)\n\n if not sparse:\n grid = broadcast_arrays(*grid)\n\n if indexing == \"xy\" and len(xi) > 1:\n grid[0], grid[1] = grid[1], grid[0]\n\n return grid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_indices_indices.return.grid": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_indices_indices.return.grid", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 421, "end_line": 472, "span_ids": ["indices"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def indices(dimensions, dtype=int, chunks=\"auto\"):\n \"\"\"\n Implements NumPy's ``indices`` for Dask Arrays.\n\n Generates a grid of indices covering the dimensions provided.\n\n The final array has the shape ``(len(dimensions), *dimensions)``. The\n chunks are used to specify the chunking for axis 1 up to\n ``len(dimensions)``. The 0th axis always has chunks of length 1.\n\n Parameters\n ----------\n dimensions : sequence of ints\n The shape of the index grid.\n dtype : dtype, optional\n Type to use for the array. Default is ``int``.\n chunks : sequence of ints, str\n The size of each block. Must be one of the following forms:\n\n - A blocksize like (500, 1000)\n - A size in bytes, like \"100 MiB\" which will choose a uniform\n block-like shape\n - The word \"auto\" which acts like the above, but uses a configuration\n value ``array.chunk-size`` for the chunk size\n\n Note that the last block will have fewer samples if ``len(array) % chunks != 0``.\n\n Returns\n -------\n grid : dask array\n \"\"\"\n dimensions = tuple(dimensions)\n dtype = np.dtype(dtype)\n chunks = normalize_chunks(chunks, shape=dimensions, dtype=dtype)\n\n if len(dimensions) != len(chunks):\n raise ValueError(\"Need same number of chunks as dimensions.\")\n\n xi = []\n for i in range(len(dimensions)):\n xi.append(arange(dimensions[i], dtype=dtype, chunks=(chunks[i],)))\n\n grid = []\n if np.prod(dimensions):\n grid = meshgrid(*xi, indexing=\"ij\")\n\n if grid:\n grid = stack(grid)\n else:\n grid = empty((len(dimensions),) + dimensions, dtype=dtype, chunks=(1,) + chunks)\n\n return grid", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_eye_eye.return.Array_eye_name_eye_shap": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_eye_eye.return.Array_eye_name_eye_shap", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 475, "end_line": 537, "span_ids": ["eye"], "tokens": 571}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def eye(N, chunks=\"auto\", M=None, k=0, dtype=float):\n \"\"\"\n Return a 2-D Array with ones on the diagonal and zeros elsewhere.\n\n Parameters\n ----------\n N : int\n Number of rows in the output.\n chunks : int, str\n How to chunk the array. Must be one of the following forms:\n\n - A blocksize like 1000.\n - A size in bytes, like \"100 MiB\" which will choose a uniform\n block-like shape\n - The word \"auto\" which acts like the above, but uses a configuration\n value ``array.chunk-size`` for the chunk size\n M : int, optional\n Number of columns in the output. If None, defaults to `N`.\n k : int, optional\n Index of the diagonal: 0 (the default) refers to the main diagonal,\n a positive value refers to an upper diagonal, and a negative value\n to a lower diagonal.\n dtype : data-type, optional\n Data-type of the returned array.\n\n Returns\n -------\n I : Array of shape (N,M)\n An array where all elements are equal to zero, except for the `k`-th\n diagonal, whose values are equal to one.\n \"\"\"\n eye = {}\n if M is None:\n M = N\n\n if not isinstance(chunks, (int, str)):\n raise ValueError(\"chunks must be an int or string\")\n elif isinstance(chunks, str):\n chunks = normalize_chunks(chunks, shape=(N, M), dtype=dtype)\n chunks = chunks[0][0]\n token = tokenize(N, chunks, M, k, dtype)\n name_eye = \"eye-\" + token\n\n vchunks = [chunks] * (N // chunks)\n if N % chunks != 0:\n vchunks.append(N % chunks)\n hchunks = [chunks] * (M // chunks)\n if M % chunks != 0:\n hchunks.append(M % chunks)\n\n for i, vchunk in enumerate(vchunks):\n for j, hchunk in enumerate(hchunks):\n if (j - i - 1) * chunks <= k <= (j - i + 1) * chunks:\n eye[name_eye, i, j] = (\n np.eye,\n vchunk,\n hchunk,\n k - (j - i) * chunks,\n dtype,\n )\n else:\n eye[name_eye, i, j] = (np.zeros, (vchunk, hchunk), dtype)\n return Array(eye, name_eye, shape=(N, M), chunks=(chunks, chunks), dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diag_diag.return.Array_graph_name_chunk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diag_diag.return.Array_graph_name_chunk", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 540, "end_line": 586, "span_ids": ["diag"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef diag(v):\n name = \"diag-\" + tokenize(v)\n\n meta = meta_from_array(v, 2 if v.ndim == 1 else 1)\n\n if isinstance(v, np.ndarray) or (\n hasattr(v, \"__array_function__\") and not isinstance(v, Array)\n ):\n if v.ndim == 1:\n chunks = ((v.shape[0],), (v.shape[0],))\n dsk = {(name, 0, 0): (np.diag, v)}\n elif v.ndim == 2:\n chunks = ((min(v.shape),),)\n dsk = {(name, 0): (np.diag, v)}\n else:\n raise ValueError(\"Array must be 1d or 2d only\")\n return Array(dsk, name, chunks, meta=meta)\n if not isinstance(v, Array):\n raise TypeError(\n \"v must be a dask array or numpy array, got {0}\".format(type(v))\n )\n if v.ndim != 1:\n if v.chunks[0] == v.chunks[1]:\n dsk = {\n (name, i): (np.diag, row[i]) for i, row in enumerate(v.__dask_keys__())\n }\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[v])\n return Array(graph, name, (v.chunks[0],), meta=meta)\n else:\n raise NotImplementedError(\n \"Extracting diagonals from non-square chunked arrays\"\n )\n chunks_1d = v.chunks[0]\n blocks = v.__dask_keys__()\n dsk = {}\n for i, m in enumerate(chunks_1d):\n for j, n in enumerate(chunks_1d):\n key = (name, i, j)\n if i == j:\n dsk[key] = (np.diag, blocks[i])\n else:\n dsk[key] = (np.zeros, (m, n))\n dsk[key] = (partial(zeros_like_safe, shape=(m, n)), meta)\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[v])\n return Array(graph, name, (chunks_1d, chunks_1d), meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diagonal_diagonal.return.Array_graph_name_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_diagonal_diagonal.return.Array_graph_name_shape_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 589, "end_line": 654, "span_ids": ["diagonal"], "tokens": 724}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef diagonal(a, offset=0, axis1=0, axis2=1):\n name = \"diagonal-\" + tokenize(a, offset, axis1, axis2)\n\n if a.ndim < 2:\n # NumPy uses `diag` as we do here.\n raise ValueError(\"diag requires an array of at least two dimensions\")\n\n def _axis_fmt(axis, name, ndim):\n if axis < 0:\n t = ndim + axis\n if t < 0:\n msg = \"{}: axis {} is out of bounds for array of dimension {}\"\n raise AxisError(msg.format(name, axis, ndim))\n axis = t\n return axis\n\n axis1 = _axis_fmt(axis1, \"axis1\", a.ndim)\n axis2 = _axis_fmt(axis2, \"axis2\", a.ndim)\n\n if axis1 == axis2:\n raise ValueError(\"axis1 and axis2 cannot be the same\")\n\n a = asarray(a)\n\n if axis1 > axis2:\n axis1, axis2 = axis2, axis1\n offset = -offset\n\n def _diag_len(dim1, dim2, offset):\n return max(0, min(min(dim1, dim2), dim1 + offset, dim2 - offset))\n\n diag_chunks = []\n chunk_offsets = []\n cum1 = cached_cumsum(a.chunks[axis1], initial_zero=True)[:-1]\n cum2 = cached_cumsum(a.chunks[axis2], initial_zero=True)[:-1]\n for co1, c1 in zip(cum1, a.chunks[axis1]):\n chunk_offsets.append([])\n for co2, c2 in zip(cum2, a.chunks[axis2]):\n k = offset + co1 - co2\n diag_chunks.append(_diag_len(c1, c2, k))\n chunk_offsets[-1].append(k)\n\n dsk = {}\n idx_set = set(range(a.ndim)) - set([axis1, axis2])\n n1 = len(a.chunks[axis1])\n n2 = len(a.chunks[axis2])\n for idx in product(*(range(len(a.chunks[i])) for i in idx_set)):\n for i, (i1, i2) in enumerate(product(range(n1), range(n2))):\n tsk = reduce(getitem, idx[:axis1], a.__dask_keys__())[i1]\n tsk = reduce(getitem, idx[axis1 : axis2 - 1], tsk)[i2]\n tsk = reduce(getitem, idx[axis2 - 1 :], tsk)\n k = chunk_offsets[i1][i2]\n dsk[(name,) + idx + (i,)] = (np.diagonal, tsk, k, axis1, axis2)\n\n left_shape = tuple(a.shape[i] for i in idx_set)\n right_shape = (_diag_len(a.shape[axis1], a.shape[axis2], offset),)\n shape = left_shape + right_shape\n\n left_chunks = tuple(a.chunks[i] for i in idx_set)\n right_shape = (tuple(diag_chunks),)\n chunks = left_chunks + right_shape\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[a])\n meta = meta_from_array(a, len(shape))\n return Array(graph, name, shape=shape, chunks=chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_triu_triu.return.Array_graph_name_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_triu_triu.return.Array_graph_name_shape_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 657, "end_line": 712, "span_ids": ["triu"], "tokens": 511}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def triu(m, k=0):\n \"\"\"\n Upper triangle of an array with elements below the `k`-th diagonal zeroed.\n\n Parameters\n ----------\n m : array_like, shape (M, N)\n Input array.\n k : int, optional\n Diagonal below which to zero elements. `k = 0` (the default) is the\n main diagonal, `k < 0` is below it and `k > 0` is above.\n\n Returns\n -------\n triu : ndarray, shape (M, N)\n Upper triangle of `m`, of same shape and data-type as `m`.\n\n See Also\n --------\n tril : lower triangle of an array\n \"\"\"\n if m.ndim != 2:\n raise ValueError(\"input must be 2 dimensional\")\n if m.chunks[0][0] != m.chunks[1][0]:\n msg = (\n \"chunks must be a square. \"\n \"Use .rechunk method to change the size of chunks.\"\n )\n raise NotImplementedError(msg)\n\n rdim = len(m.chunks[0])\n hdim = len(m.chunks[1])\n chunk = m.chunks[0][0]\n\n token = tokenize(m, k)\n name = \"triu-\" + token\n\n triu_is_empty = True\n dsk = {}\n for i in range(rdim):\n for j in range(hdim):\n if chunk * (j - i + 1) < k:\n dsk[(name, i, j)] = (\n partial(zeros_like_safe, shape=(m.chunks[0][i], m.chunks[1][j])),\n m._meta,\n )\n elif chunk * (j - i - 1) < k <= chunk * (j - i + 1):\n dsk[(name, i, j)] = (np.triu, (m.name, i, j), k - (chunk * (j - i)))\n triu_is_empty = False\n else:\n dsk[(name, i, j)] = (m.name, i, j)\n triu_is_empty = False\n graph = HighLevelGraph.from_collections(\n name, dsk, dependencies=[] if triu_is_empty else [m]\n )\n return Array(graph, name, shape=m.shape, chunks=m.chunks, meta=m)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tril_tril.return.Array_graph_name_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tril_tril.return.Array_graph_name_shape_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 715, "end_line": 770, "span_ids": ["tril"], "tokens": 520}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tril(m, k=0):\n \"\"\"\n Lower triangle of an array with elements above the `k`-th diagonal zeroed.\n\n Parameters\n ----------\n m : array_like, shape (M, M)\n Input array.\n k : int, optional\n Diagonal above which to zero elements. `k = 0` (the default) is the\n main diagonal, `k < 0` is below it and `k > 0` is above.\n\n Returns\n -------\n tril : ndarray, shape (M, M)\n Lower triangle of `m`, of same shape and data-type as `m`.\n\n See Also\n --------\n triu : upper triangle of an array\n \"\"\"\n if m.ndim != 2:\n raise ValueError(\"input must be 2 dimensional\")\n if not len(set(m.chunks[0] + m.chunks[1])) == 1:\n msg = (\n \"All chunks must be a square matrix to perform lu decomposition. \"\n \"Use .rechunk method to change the size of chunks.\"\n )\n raise ValueError(msg)\n\n rdim = len(m.chunks[0])\n hdim = len(m.chunks[1])\n chunk = m.chunks[0][0]\n\n token = tokenize(m, k)\n name = \"tril-\" + token\n\n tril_is_empty = True\n dsk = {}\n for i in range(rdim):\n for j in range(hdim):\n if chunk * (j - i + 1) < k:\n dsk[(name, i, j)] = (m.name, i, j)\n tril_is_empty = False\n elif chunk * (j - i - 1) < k <= chunk * (j - i + 1):\n dsk[(name, i, j)] = (np.tril, (m.name, i, j), k - (chunk * (j - i)))\n tril_is_empty = False\n else:\n dsk[(name, i, j)] = (\n partial(zeros_like_safe, shape=(m.chunks[0][i], m.chunks[1][j])),\n m._meta,\n )\n graph = HighLevelGraph.from_collections(\n name, dsk, dependencies=[] if tril_is_empty else [m]\n )\n return Array(graph, name, shape=m.shape, chunks=m.chunks, meta=m)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py__np_fromfunction_fromfunction.return.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py__np_fromfunction_fromfunction.return.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 773, "end_line": 803, "span_ids": ["_np_fromfunction", "fromfunction"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _np_fromfunction(func, shape, dtype, offset, func_kwargs):\n def offset_func(*args, **kwargs):\n args2 = list(map(add, args, offset))\n return func(*args2, **kwargs)\n\n return np.fromfunction(offset_func, shape, dtype=dtype, **func_kwargs)\n\n\n@derived_from(np)\ndef fromfunction(func, chunks=\"auto\", shape=None, dtype=None, **kwargs):\n chunks = normalize_chunks(chunks, shape, dtype=dtype)\n name = \"fromfunction-\" + tokenize(func, chunks, shape, dtype, kwargs)\n keys = product([name], *(range(len(bd)) for bd in chunks))\n\n def accumulate_gen(chunks):\n for bd in chunks:\n yield accumulate(add, (0,) + bd[:-1])\n\n aggdims = accumulate_gen(chunks)\n offsets = product(*aggdims)\n shapes = product(*chunks)\n dtype = dtype or float\n\n values = [\n (_np_fromfunction, func, shp, dtype, offset, kwargs)\n for offset, shp in zip(offsets, shapes)\n ]\n\n dsk = dict(zip(keys, values))\n\n return Array(dsk, name, chunks, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_repeat_repeat.return.concatenate_out_axis_axi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_repeat_repeat.return.concatenate_out_axis_axi", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 806, "end_line": 853, "span_ids": ["repeat"], "tokens": 401}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef repeat(a, repeats, axis=None):\n if axis is None:\n if a.ndim == 1:\n axis = 0\n else:\n raise NotImplementedError(\"Must supply an integer axis value\")\n\n if not isinstance(repeats, Integral):\n raise NotImplementedError(\"Only integer valued repeats supported\")\n\n if -a.ndim <= axis < 0:\n axis += a.ndim\n elif not 0 <= axis <= a.ndim - 1:\n raise ValueError(\"axis(=%d) out of bounds\" % axis)\n\n if repeats == 0:\n return a[tuple(slice(None) if d != axis else slice(0) for d in range(a.ndim))]\n elif repeats == 1:\n return a\n\n cchunks = cached_cumsum(a.chunks[axis], initial_zero=True)\n slices = []\n for c_start, c_stop in sliding_window(2, cchunks):\n ls = np.linspace(c_start, c_stop, repeats).round(0)\n for ls_start, ls_stop in sliding_window(2, ls):\n if ls_start != ls_stop:\n slices.append(slice(ls_start, ls_stop))\n\n all_slice = slice(None, None, None)\n slices = [\n (all_slice,) * axis + (s,) + (all_slice,) * (a.ndim - axis - 1) for s in slices\n ]\n\n slabs = [a[slc] for slc in slices]\n\n out = []\n for slab in slabs:\n chunks = list(slab.chunks)\n assert len(chunks[axis]) == 1\n chunks[axis] = (chunks[axis][0] * repeats,)\n chunks = tuple(chunks)\n result = slab.map_blocks(\n np.repeat, repeats, axis=axis, chunks=chunks, dtype=slab.dtype\n )\n out.append(result)\n\n return concatenate(out, axis=axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tile_tile.return.empty_shape_shape_out_dt": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_tile_tile.return.empty_shape_shape_out_dt", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 856, "end_line": 879, "span_ids": ["tile"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef tile(A, reps):\n try:\n tup = tuple(reps)\n except TypeError:\n tup = (reps,)\n if any(i < 0 for i in tup):\n raise ValueError(\"Negative `reps` are not allowed.\")\n c = asarray(A)\n\n if all(tup):\n for nrep in tup[::-1]:\n c = nrep * [c]\n return block(c)\n\n d = len(tup)\n if d < c.ndim:\n tup = (1,) * (c.ndim - d) + tup\n if c.ndim < d:\n shape = (1,) * (d - c.ndim) + c.shape\n else:\n shape = c.shape\n shape_out = tuple(s * t for s, t in zip(shape, tup))\n return empty(shape=shape_out, dtype=c.dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_expand_pad_value_expand_pad_value.return.pad_value": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_expand_pad_value_expand_pad_value.return.pad_value", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 882, "end_line": 916, "span_ids": ["expand_pad_value"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def expand_pad_value(array, pad_value):\n if isinstance(pad_value, Number):\n pad_value = array.ndim * ((pad_value, pad_value),)\n elif (\n isinstance(pad_value, Sequence)\n and all(isinstance(pw, Number) for pw in pad_value)\n and len(pad_value) == 1\n ):\n pad_value = array.ndim * ((pad_value[0], pad_value[0]),)\n elif (\n isinstance(pad_value, Sequence)\n and len(pad_value) == 2\n and all(isinstance(pw, Number) for pw in pad_value)\n ):\n pad_value = array.ndim * (tuple(pad_value),)\n elif (\n isinstance(pad_value, Sequence)\n and len(pad_value) == array.ndim\n and all(isinstance(pw, Sequence) for pw in pad_value)\n and all((len(pw) == 2) for pw in pad_value)\n and all(all(isinstance(w, Number) for w in pw) for pw in pad_value)\n ):\n pad_value = tuple(tuple(pw) for pw in pad_value)\n elif (\n isinstance(pad_value, Sequence)\n and len(pad_value) == 1\n and isinstance(pad_value[0], Sequence)\n and len(pad_value[0]) == 2\n and all(isinstance(pw, Number) for pw in pad_value[0])\n ):\n pad_value = array.ndim * (tuple(pad_value[0]),)\n else:\n raise TypeError(\"`pad_value` must be composed of integral typed values.\")\n\n return pad_value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_get_pad_shapes_chunks_get_pad_shapes_chunks.return.pad_shapes_pad_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_get_pad_shapes_chunks_get_pad_shapes_chunks.return.pad_shapes_pad_chunks", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 919, "end_line": 935, "span_ids": ["get_pad_shapes_chunks"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_pad_shapes_chunks(array, pad_width, axes):\n \"\"\"\n Helper function for finding shapes and chunks of end pads.\n \"\"\"\n\n pad_shapes = [list(array.shape), list(array.shape)]\n pad_chunks = [list(array.chunks), list(array.chunks)]\n\n for d in axes:\n for i in range(2):\n pad_shapes[i][d] = pad_width[d][i]\n pad_chunks[i][d] = (pad_width[d][i],)\n\n pad_shapes = [tuple(s) for s in pad_shapes]\n pad_chunks = [tuple(c) for c in pad_chunks]\n\n return pad_shapes, pad_chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linear_ramp_chunk_linear_ramp_chunk.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_linear_ramp_chunk_linear_ramp_chunk.return.result", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 938, "end_line": 959, "span_ids": ["linear_ramp_chunk"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def linear_ramp_chunk(start, stop, num, dim, step):\n \"\"\"\n Helper function to find the linear ramp for a chunk.\n \"\"\"\n\n num1 = num + 1\n\n shape = list(start.shape)\n shape[dim] = num\n shape = tuple(shape)\n\n dtype = np.dtype(start.dtype)\n\n result = np.empty(shape, dtype=dtype)\n for i in np.ndindex(start.shape):\n j = list(i)\n j[dim] = slice(None)\n j = tuple(j)\n\n result[j] = np.linspace(start[i], stop, num1, dtype=dtype)[1:][::step]\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_edge_pad_edge.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_edge_pad_edge.return.result", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 962, "end_line": 1022, "span_ids": ["pad_edge"], "tokens": 473}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pad_edge(array, pad_width, mode, **kwargs):\n \"\"\"\n Helper function for padding edges.\n\n Handles the cases where the only the values on the edge are needed.\n \"\"\"\n\n kwargs = {k: expand_pad_value(array, v) for k, v in kwargs.items()}\n\n result = array\n for d in range(array.ndim):\n pad_shapes, pad_chunks = get_pad_shapes_chunks(result, pad_width, (d,))\n pad_arrays = [result, result]\n\n if mode == \"constant\":\n constant_values = kwargs[\"constant_values\"][d]\n constant_values = [asarray(c).astype(result.dtype) for c in constant_values]\n\n pad_arrays = [\n broadcast_to(v, s, c)\n for v, s, c in zip(constant_values, pad_shapes, pad_chunks)\n ]\n elif mode in [\"edge\", \"linear_ramp\"]:\n pad_slices = [result.ndim * [slice(None)], result.ndim * [slice(None)]]\n pad_slices[0][d] = slice(None, 1, None)\n pad_slices[1][d] = slice(-1, None, None)\n pad_slices = [tuple(sl) for sl in pad_slices]\n\n pad_arrays = [result[sl] for sl in pad_slices]\n\n if mode == \"edge\":\n pad_arrays = [\n broadcast_to(a, s, c)\n for a, s, c in zip(pad_arrays, pad_shapes, pad_chunks)\n ]\n elif mode == \"linear_ramp\":\n end_values = kwargs[\"end_values\"][d]\n\n pad_arrays = [\n a.map_blocks(\n linear_ramp_chunk,\n ev,\n pw,\n chunks=c,\n dtype=result.dtype,\n dim=d,\n step=(2 * i - 1),\n )\n for i, (a, ev, pw, c) in enumerate(\n zip(pad_arrays, end_values, pad_width[d], pad_chunks)\n )\n ]\n elif mode == \"empty\":\n pad_arrays = [\n empty(s, dtype=array.dtype, chunks=c)\n for s, c in zip(pad_shapes, pad_chunks)\n ]\n\n result = concatenate([pad_arrays[0], result, pad_arrays[1]], axis=d)\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_reuse_pad_reuse.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_reuse_pad_reuse.return.result", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1025, "end_line": 1079, "span_ids": ["pad_reuse"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pad_reuse(array, pad_width, mode, **kwargs):\n \"\"\"\n Helper function for padding boundaries with values in the array.\n\n Handles the cases where the padding is constructed from values in\n the array. Namely by reflecting them or tiling them to create periodic\n boundary constraints.\n \"\"\"\n\n if mode in {\"reflect\", \"symmetric\"}:\n reflect_type = kwargs.get(\"reflect\", \"even\")\n if reflect_type == \"odd\":\n raise NotImplementedError(\"`pad` does not support `reflect_type` of `odd`.\")\n if reflect_type != \"even\":\n raise ValueError(\n \"unsupported value for reflect_type, must be one of (`even`, `odd`)\"\n )\n\n result = np.empty(array.ndim * (3,), dtype=object)\n for idx in np.ndindex(result.shape):\n select = []\n orient = []\n for i, s, pw in zip(idx, array.shape, pad_width):\n if mode == \"wrap\":\n pw = pw[::-1]\n\n if i < 1:\n if mode == \"reflect\":\n select.append(slice(1, pw[0] + 1, None))\n else:\n select.append(slice(None, pw[0], None))\n elif i > 1:\n if mode == \"reflect\":\n select.append(slice(s - pw[1] - 1, s - 1, None))\n else:\n select.append(slice(s - pw[1], None, None))\n else:\n select.append(slice(None))\n\n if i != 1 and mode in [\"reflect\", \"symmetric\"]:\n orient.append(slice(None, None, -1))\n else:\n orient.append(slice(None))\n\n select = tuple(select)\n orient = tuple(orient)\n\n if mode == \"wrap\":\n idx = tuple(2 - i for i in idx)\n\n result[idx] = array[select][orient]\n\n result = block(result.tolist())\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_stats_pad_stats.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_stats_pad_stats.return.result", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1082, "end_line": 1145, "span_ids": ["pad_stats"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pad_stats(array, pad_width, mode, stat_length):\n \"\"\"\n Helper function for padding boundaries with statistics from the array.\n\n In cases where the padding requires computations of statistics from part\n or all of the array, this function helps compute those statistics as\n requested and then adds those statistics onto the boundaries of the array.\n \"\"\"\n\n if mode == \"median\":\n raise NotImplementedError(\"`pad` does not support `mode` of `median`.\")\n\n stat_length = expand_pad_value(array, stat_length)\n\n result = np.empty(array.ndim * (3,), dtype=object)\n for idx in np.ndindex(result.shape):\n axes = []\n select = []\n pad_shape = []\n pad_chunks = []\n for d, (i, s, c, w, l) in enumerate(\n zip(idx, array.shape, array.chunks, pad_width, stat_length)\n ):\n if i < 1:\n axes.append(d)\n select.append(slice(None, l[0], None))\n pad_shape.append(w[0])\n pad_chunks.append(w[0])\n elif i > 1:\n axes.append(d)\n select.append(slice(s - l[1], None, None))\n pad_shape.append(w[1])\n pad_chunks.append(w[1])\n else:\n select.append(slice(None))\n pad_shape.append(s)\n pad_chunks.append(c)\n\n axes = tuple(axes)\n select = tuple(select)\n pad_shape = tuple(pad_shape)\n pad_chunks = tuple(pad_chunks)\n\n result_idx = array[select]\n if axes:\n if mode == \"maximum\":\n result_idx = result_idx.max(axis=axes, keepdims=True)\n elif mode == \"mean\":\n result_idx = result_idx.mean(axis=axes, keepdims=True)\n elif mode == \"minimum\":\n result_idx = result_idx.min(axis=axes, keepdims=True)\n\n result_idx = broadcast_to(result_idx, pad_shape, chunks=pad_chunks)\n\n if mode == \"mean\":\n if np.issubdtype(array.dtype, np.integer):\n result_idx = rint(result_idx)\n result_idx = result_idx.astype(array.dtype)\n\n result[idx] = result_idx\n\n result = block(result.tolist())\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_wrapped_pad_func_pad_udf.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_wrapped_pad_func_pad_udf.return.result", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1148, "end_line": 1187, "span_ids": ["pad_udf", "wrapped_pad_func"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def wrapped_pad_func(array, pad_func, iaxis_pad_width, iaxis, pad_func_kwargs):\n result = np.empty_like(array)\n for i in np.ndindex(array.shape[:iaxis] + array.shape[iaxis + 1 :]):\n i = i[:iaxis] + (slice(None),) + i[iaxis:]\n result[i] = pad_func(array[i], iaxis_pad_width, iaxis, pad_func_kwargs)\n\n return result\n\n\ndef pad_udf(array, pad_width, mode, **kwargs):\n \"\"\"\n Helper function for padding boundaries with a user defined function.\n\n In cases where the padding requires a custom user defined function be\n applied to the array, this function assists in the prepping and\n application of this function to the Dask Array to construct the desired\n boundaries.\n \"\"\"\n\n result = pad_edge(array, pad_width, \"constant\", constant_values=0)\n\n chunks = result.chunks\n for d in range(result.ndim):\n result = result.rechunk(\n chunks[:d] + (result.shape[d : d + 1],) + chunks[d + 1 :]\n )\n\n result = result.map_blocks(\n wrapped_pad_func,\n name=\"pad\",\n dtype=result.dtype,\n pad_func=mode,\n iaxis_pad_width=pad_width[d],\n iaxis=d,\n pad_func_kwargs=kwargs,\n )\n\n result = result.rechunk(chunks)\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/creation.py_pad_", "embedding": null, "metadata": {"file_path": "dask/array/creation.py", "file_name": "creation.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1190, "end_line": 1239, "span_ids": ["pad"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef pad(array, pad_width, mode=\"constant\", **kwargs):\n array = asarray(array)\n\n pad_width = expand_pad_value(array, pad_width)\n\n if callable(mode):\n return pad_udf(array, pad_width, mode, **kwargs)\n\n # Make sure that no unsupported keywords were passed for the current mode\n allowed_kwargs = {\n \"empty\": [],\n \"edge\": [],\n \"wrap\": [],\n \"constant\": [\"constant_values\"],\n \"linear_ramp\": [\"end_values\"],\n \"maximum\": [\"stat_length\"],\n \"mean\": [\"stat_length\"],\n \"median\": [\"stat_length\"],\n \"minimum\": [\"stat_length\"],\n \"reflect\": [\"reflect_type\"],\n \"symmetric\": [\"reflect_type\"],\n }\n try:\n unsupported_kwargs = set(kwargs) - set(allowed_kwargs[mode])\n except KeyError as e:\n raise ValueError(\"mode '{}' is not supported\".format(mode)) from e\n if unsupported_kwargs:\n raise ValueError(\n \"unsupported keyword arguments for mode '{}': {}\".format(\n mode, unsupported_kwargs\n )\n )\n\n if mode in {\"maximum\", \"mean\", \"median\", \"minimum\"}:\n stat_length = kwargs.get(\"stat_length\", tuple((n, n) for n in array.shape))\n return pad_stats(array, pad_width, mode, stat_length)\n elif mode == \"constant\":\n kwargs.setdefault(\"constant_values\", 0)\n return pad_edge(array, pad_width, mode, **kwargs)\n elif mode == \"linear_ramp\":\n kwargs.setdefault(\"end_values\", 0)\n return pad_edge(array, pad_width, mode, **kwargs)\n elif mode in {\"edge\", \"empty\"}:\n return pad_edge(array, pad_width, mode)\n elif mode in [\"reflect\", \"symmetric\", \"wrap\"]:\n return pad_reuse(array, pad_width, mode, **kwargs)\n\n assert False, \"unreachable\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_np_chunk_einsum.return.chunk_reshape_chunk_shape": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_np_chunk_einsum.return.chunk_reshape_chunk_shape", "embedding": null, "metadata": {"file_path": "dask/array/einsumfuncs.py", "file_name": "einsumfuncs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports", "chunk_einsum"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nfrom numpy.compat import basestring\n\nfrom .core import blockwise, asarray, einsum_lookup\nfrom ..utils import derived_from\n\neinsum_symbols = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\neinsum_symbols_set = set(einsum_symbols)\n\n\ndef chunk_einsum(*operands, **kwargs):\n subscripts = kwargs.pop(\"subscripts\")\n ncontract_inds = kwargs.pop(\"ncontract_inds\")\n dtype = kwargs.pop(\"kernel_dtype\")\n einsum = einsum_lookup.dispatch(type(operands[0]))\n chunk = einsum(subscripts, *operands, dtype=dtype, **kwargs)\n\n # Avoid concatenate=True in blockwise by adding 1's\n # for the contracted dimensions\n return chunk.reshape(chunk.shape + (1,) * ncontract_inds)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py__This_function_duplicate_parse_einsum_input._Parse_ellipses": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py__This_function_duplicate_parse_einsum_input._Parse_ellipses", "embedding": null, "metadata": {"file_path": "dask/array/einsumfuncs.py", "file_name": "einsumfuncs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 109, "span_ids": ["chunk_einsum", "parse_einsum_input"], "tokens": 690}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# This function duplicates numpy's _parse_einsum_input() function\ndef parse_einsum_input(operands):\n \"\"\"\n A reproduction of numpy's _parse_einsum_input()\n which in itself is a reproduction of\n c side einsum parsing in python.\n\n Returns\n -------\n input_strings : str\n Parsed input strings\n output_string : str\n Parsed output string\n operands : list of array_like\n The operands to use in the numpy contraction\n Examples\n --------\n The operand list is simplified to reduce printing:\n >> a = np.random.rand(4, 4)\n >> b = np.random.rand(4, 4, 4)\n >> __parse_einsum_input(('...a,...a->...', a, b))\n ('za,xza', 'xz', [a, b])\n >> __parse_einsum_input((a, [Ellipsis, 0], b, [Ellipsis, 0]))\n ('za,xza', 'xz', [a, b])\n \"\"\"\n\n if len(operands) == 0:\n raise ValueError(\"No input operands\")\n\n if isinstance(operands[0], basestring):\n subscripts = operands[0].replace(\" \", \"\")\n operands = [asarray(o) for o in operands[1:]]\n\n # Ensure all characters are valid\n for s in subscripts:\n if s in \".,->\":\n continue\n if s not in einsum_symbols_set:\n raise ValueError(\"Character %s is not a valid symbol.\" % s)\n\n else:\n tmp_operands = list(operands)\n operand_list = []\n subscript_list = []\n for p in range(len(operands) // 2):\n operand_list.append(tmp_operands.pop(0))\n subscript_list.append(tmp_operands.pop(0))\n\n output_list = tmp_operands[-1] if len(tmp_operands) else None\n operands = [asarray(v) for v in operand_list]\n subscripts = \"\"\n last = len(subscript_list) - 1\n for num, sub in enumerate(subscript_list):\n for s in sub:\n if s is Ellipsis:\n subscripts += \"...\"\n elif isinstance(s, int):\n subscripts += einsum_symbols[s]\n else:\n raise TypeError(\n \"For this input type lists must contain \"\n \"either int or Ellipsis\"\n )\n if num != last:\n subscripts += \",\"\n\n if output_list is not None:\n subscripts += \"->\"\n for s in output_list:\n if s is Ellipsis:\n subscripts += \"...\"\n elif isinstance(s, int):\n subscripts += einsum_symbols[s]\n else:\n raise TypeError(\n \"For this input type lists must contain \"\n \"either int or Ellipsis\"\n )\n # Check for proper \"->\"\n if (\"-\" in subscripts) or (\">\" in subscripts):\n invalid = (subscripts.count(\"-\") > 1) or (subscripts.count(\">\") > 1)\n if invalid or (subscripts.count(\"->\") != 1):\n raise ValueError(\"Subscripts can only contain one '->'.\")\n\n # Parse ellipses\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_parse_einsum_input.if_in_subscripts__parse_einsum_input.return._input_subscripts_output": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_parse_einsum_input.if_in_subscripts__parse_einsum_input.return._input_subscripts_output", "embedding": null, "metadata": {"file_path": "dask/array/einsumfuncs.py", "file_name": "einsumfuncs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 193, "span_ids": ["parse_einsum_input"], "tokens": 710}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_einsum_input(operands):\n # ... other code\n if \".\" in subscripts:\n used = subscripts.replace(\".\", \"\").replace(\",\", \"\").replace(\"->\", \"\")\n unused = list(einsum_symbols_set - set(used))\n ellipse_inds = \"\".join(unused)\n longest = 0\n\n if \"->\" in subscripts:\n input_tmp, output_sub = subscripts.split(\"->\")\n split_subscripts = input_tmp.split(\",\")\n out_sub = True\n else:\n split_subscripts = subscripts.split(\",\")\n out_sub = False\n\n for num, sub in enumerate(split_subscripts):\n if \".\" in sub:\n if (sub.count(\".\") != 3) or (sub.count(\"...\") != 1):\n raise ValueError(\"Invalid Ellipses.\")\n\n # Take into account numerical values\n if operands[num].shape == ():\n ellipse_count = 0\n else:\n ellipse_count = max(operands[num].ndim, 1)\n ellipse_count -= len(sub) - 3\n\n if ellipse_count > longest:\n longest = ellipse_count\n\n if ellipse_count < 0:\n raise ValueError(\"Ellipses lengths do not match.\")\n elif ellipse_count == 0:\n split_subscripts[num] = sub.replace(\"...\", \"\")\n else:\n rep_inds = ellipse_inds[-ellipse_count:]\n split_subscripts[num] = sub.replace(\"...\", rep_inds)\n\n subscripts = \",\".join(split_subscripts)\n if longest == 0:\n out_ellipse = \"\"\n else:\n out_ellipse = ellipse_inds[-longest:]\n\n if out_sub:\n subscripts += \"->\" + output_sub.replace(\"...\", out_ellipse)\n else:\n # Special care for outputless ellipses\n output_subscript = \"\"\n tmp_subscripts = subscripts.replace(\",\", \"\")\n for s in sorted(set(tmp_subscripts)):\n if s not in einsum_symbols_set:\n raise ValueError(\"Character %s is not a valid symbol.\" % s)\n if tmp_subscripts.count(s) == 1:\n output_subscript += s\n normal_inds = \"\".join(sorted(set(output_subscript) - set(out_ellipse)))\n\n subscripts += \"->\" + out_ellipse + normal_inds\n\n # Build output string if does not exist\n if \"->\" in subscripts:\n input_subscripts, output_subscript = subscripts.split(\"->\")\n else:\n input_subscripts = subscripts\n # Build output subscripts\n tmp_subscripts = subscripts.replace(\",\", \"\")\n output_subscript = \"\"\n for s in sorted(set(tmp_subscripts)):\n if s not in einsum_symbols_set:\n raise ValueError(\"Character %s is not a valid symbol.\" % s)\n if tmp_subscripts.count(s) == 1:\n output_subscript += s\n\n # Make sure output subscripts are in the input\n for char in output_subscript:\n if char not in input_subscripts:\n raise ValueError(\"Output character %s did not appear in the input\" % char)\n\n # Make sure number operands is equivalent to the number of terms\n if len(input_subscripts.split(\",\")) != len(operands):\n raise ValueError(\n \"Number of einsum subscripts must be equal to the number of operands.\"\n )\n\n return (input_subscripts, output_subscript, operands)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_einsum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/einsumfuncs.py_einsum_", "embedding": null, "metadata": {"file_path": "dask/array/einsumfuncs.py", "file_name": "einsumfuncs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 196, "end_line": 252, "span_ids": ["einsum"], "tokens": 439}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef einsum(*operands, **kwargs):\n dtype = kwargs.pop(\"dtype\", None)\n optimize = kwargs.pop(\"optimize\", False)\n split_every = kwargs.pop(\"split_every\", None)\n\n einsum_dtype = dtype\n\n inputs, outputs, ops = parse_einsum_input(operands)\n subscripts = \"->\".join((inputs, outputs))\n\n # Infer the output dtype from operands\n if dtype is None:\n dtype = np.result_type(*[o.dtype for o in ops])\n\n if optimize is not False:\n # Avoid computation of dask arrays within np.einsum_path\n # by passing in small numpy arrays broadcasted\n # up to the right shape\n fake_ops = [np.broadcast_to(o.dtype.type(0), shape=o.shape) for o in ops]\n optimize, _ = np.einsum_path(subscripts, *fake_ops, optimize=optimize)\n\n inputs = [tuple(i) for i in inputs.split(\",\")]\n\n # Set of all indices\n all_inds = set(a for i in inputs for a in i)\n\n # Which indices are contracted?\n contract_inds = all_inds - set(outputs)\n ncontract_inds = len(contract_inds)\n\n # Introduce the contracted indices into the blockwise product\n # so that we get numpy arrays, not lists\n result = blockwise(\n chunk_einsum,\n tuple(outputs) + tuple(contract_inds),\n *(a for ap in zip(ops, inputs) for a in ap),\n # blockwise parameters\n adjust_chunks={ind: 1 for ind in contract_inds},\n dtype=dtype,\n # np.einsum parameters\n subscripts=subscripts,\n kernel_dtype=einsum_dtype,\n ncontract_inds=ncontract_inds,\n optimize=optimize,\n **kwargs\n )\n\n # Now reduce over any extra contraction dimensions\n if ncontract_inds > 0:\n size = len(outputs)\n return result.sum(\n axis=list(range(size, size + ncontract_inds)), split_every=split_every\n )\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_inspect__hfft_out_chunks.return.chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_inspect__hfft_out_chunks.return.chunks", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 80, "span_ids": ["_hfft_out_chunks", "imports", "_rfft_out_chunks", "_irfft_out_chunks", "_fft_out_chunks"], "tokens": 529}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nfrom collections.abc import Sequence\n\nimport numpy as np\n\ntry:\n import scipy\n import scipy.fftpack\nexcept ImportError:\n scipy = None\n\nfrom .core import concatenate as _concatenate\nfrom .creation import arange as _arange\nfrom ..utils import derived_from\n\n\nchunk_error = (\n \"Dask array only supports taking an FFT along an axis that \\n\"\n \"has a single chunk. An FFT operation was tried on axis %s \\n\"\n \"which has chunks %s. To change the array's chunks use \"\n \"dask.Array.rechunk.\"\n)\n\nfft_preamble = \"\"\"\n Wrapping of %s\n\n The axis along which the FFT is applied must have only one chunk. To change\n the array's chunking use dask.Array.rechunk.\n\n The %s docstring follows below:\n\n \"\"\"\n\n\ndef _fft_out_chunks(a, s, axes):\n \"\"\" For computing the output chunks of [i]fft*\"\"\"\n if s is None:\n return a.chunks\n chunks = list(a.chunks)\n for i, axis in enumerate(axes):\n chunks[axis] = (s[i],)\n return chunks\n\n\ndef _rfft_out_chunks(a, s, axes):\n \"\"\" For computing the output chunks of rfft*\"\"\"\n if s is None:\n s = [a.chunks[axis][0] for axis in axes]\n s = list(s)\n s[-1] = s[-1] // 2 + 1\n chunks = list(a.chunks)\n for i, axis in enumerate(axes):\n chunks[axis] = (s[i],)\n return chunks\n\n\ndef _irfft_out_chunks(a, s, axes):\n \"\"\" For computing the output chunks of irfft*\"\"\"\n if s is None:\n s = [a.chunks[axis][0] for axis in axes]\n s[-1] = 2 * (s[-1] - 1)\n chunks = list(a.chunks)\n for i, axis in enumerate(axes):\n chunks[axis] = (s[i],)\n return chunks\n\n\ndef _hfft_out_chunks(a, s, axes):\n assert len(axes) == 1\n\n axis = axes[0]\n\n if s is None:\n s = [2 * (a.chunks[axis][0] - 1)]\n\n n = s[0]\n\n chunks = list(a.chunks)\n chunks[axis] = (n,)\n return chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__ihfft_out_chunks__out_chunk_fns._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__ihfft_out_chunks__out_chunk_fns._", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 111, "span_ids": ["impl:11", "_ihfft_out_chunks"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _ihfft_out_chunks(a, s, axes):\n assert len(axes) == 1\n\n axis = axes[0]\n\n if s is None:\n s = [a.chunks[axis][0]]\n else:\n assert len(s) == 1\n\n n = s[0]\n\n chunks = list(a.chunks)\n if n % 2 == 0:\n m = (n // 2) + 1\n else:\n m = (n + 1) // 2\n chunks[axis] = (m,)\n return chunks\n\n\n_out_chunk_fns = {\n \"fft\": _fft_out_chunks,\n \"ifft\": _fft_out_chunks,\n \"rfft\": _rfft_out_chunks,\n \"irfft\": _irfft_out_chunks,\n \"hfft\": _hfft_out_chunks,\n \"ihfft\": _ihfft_out_chunks,\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap_fft_wrap.try_.except_KeyError_.raise_ValueError_Given_u": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap_fft_wrap.try_.except_KeyError_.raise_ValueError_Given_u", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 154, "span_ids": ["fft_wrap"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fft_wrap(fft_func, kind=None, dtype=None):\n \"\"\"Wrap 1D, 2D, and ND real and complex FFT functions\n\n Takes a function that behaves like ``numpy.fft`` functions and\n a specified kind to match it to that are named after the functions\n in the ``numpy.fft`` API.\n\n Supported kinds include:\n\n * fft\n * fft2\n * fftn\n * ifft\n * ifft2\n * ifftn\n * rfft\n * rfft2\n * rfftn\n * irfft\n * irfft2\n * irfftn\n * hfft\n * ihfft\n\n Examples\n --------\n >>> parallel_fft = fft_wrap(np.fft.fft)\n >>> parallel_ifft = fft_wrap(np.fft.ifft)\n \"\"\"\n if scipy is not None:\n if fft_func is scipy.fftpack.rfft:\n raise ValueError(\"SciPy's `rfft` doesn't match the NumPy API.\")\n elif fft_func is scipy.fftpack.irfft:\n raise ValueError(\"SciPy's `irfft` doesn't match the NumPy API.\")\n\n if kind is None:\n kind = fft_func.__name__\n try:\n out_chunk_fn = _out_chunk_fns[kind.rstrip(\"2n\")]\n except KeyError:\n raise ValueError(\"Given unknown `kind` %s.\" % kind)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.func_fft_wrap.func.return.a_map_blocks_fft_func_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.func_fft_wrap.func.return.a_map_blocks_fft_func_a", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 191, "span_ids": ["fft_wrap"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fft_wrap(fft_func, kind=None, dtype=None):\n # ... other code\n\n def func(a, s=None, axes=None):\n if axes is None:\n if kind.endswith(\"2\"):\n axes = (-2, -1)\n elif kind.endswith(\"n\"):\n if s is None:\n axes = tuple(range(a.ndim))\n else:\n axes = tuple(range(len(s)))\n else:\n axes = (-1,)\n else:\n if len(set(axes)) < len(axes):\n raise ValueError(\"Duplicate axes not allowed.\")\n\n _dtype = dtype\n if _dtype is None:\n sample = np.ones(a.ndim * (8,), dtype=a.dtype)\n try:\n _dtype = fft_func(sample, axes=axes).dtype\n except TypeError:\n _dtype = fft_func(sample).dtype\n\n for each_axis in axes:\n if len(a.chunks[each_axis]) != 1:\n raise ValueError(chunk_error % (each_axis, a.chunks[each_axis]))\n\n chunks = out_chunk_fn(a, s, axes)\n\n args = (s, axes)\n if kind.endswith(\"fft\"):\n axis = None if axes is None else axes[0]\n n = None if s is None else s[0]\n args = (n, axis)\n\n return a.map_blocks(fft_func, *args, dtype=_dtype, chunks=chunks)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.if_kind_endswith_fft__fft_wrap.return.func": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_wrap.if_kind_endswith_fft__fft_wrap.return.func", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 193, "end_line": 214, "span_ids": ["fft_wrap"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fft_wrap(fft_func, kind=None, dtype=None):\n # ... other code\n\n if kind.endswith(\"fft\"):\n _func = func\n\n def func(a, n=None, axis=None):\n s = None\n if n is not None:\n s = (n,)\n\n axes = None\n if axis is not None:\n axes = (axis,)\n\n return _func(a, s, axes)\n\n func_mod = inspect.getmodule(fft_func)\n func_name = fft_func.__name__\n func_fullname = func_mod.__name__ + \".\" + func_name\n if fft_func.__doc__ is not None:\n func.__doc__ = fft_preamble % (2 * (func_fullname,))\n func.__doc__ += fft_func.__doc__\n func.__name__ = func_name\n return func", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_rfftfreq.return.r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py_fft_rfftfreq.return.r", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 217, "end_line": 258, "span_ids": ["fftfreq", "impl:13", "rfftfreq", "_fftfreq_block"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "fft = fft_wrap(np.fft.fft)\nfft2 = fft_wrap(np.fft.fft2)\nfftn = fft_wrap(np.fft.fftn)\nifft = fft_wrap(np.fft.ifft)\nifft2 = fft_wrap(np.fft.ifft2)\nifftn = fft_wrap(np.fft.ifftn)\nrfft = fft_wrap(np.fft.rfft)\nrfft2 = fft_wrap(np.fft.rfft2)\nrfftn = fft_wrap(np.fft.rfftn)\nirfft = fft_wrap(np.fft.irfft)\nirfft2 = fft_wrap(np.fft.irfft2)\nirfftn = fft_wrap(np.fft.irfftn)\nhfft = fft_wrap(np.fft.hfft)\nihfft = fft_wrap(np.fft.ihfft)\n\n\ndef _fftfreq_block(i, n, d):\n r = i.copy()\n r[i >= (n + 1) // 2] -= n\n r /= n * d\n return r\n\n\n@derived_from(np.fft)\ndef fftfreq(n, d=1.0, chunks=\"auto\"):\n n = int(n)\n d = float(d)\n\n r = _arange(n, dtype=float, chunks=chunks)\n\n return r.map_blocks(_fftfreq_block, dtype=float, n=n, d=d)\n\n\n@derived_from(np.fft)\ndef rfftfreq(n, d=1.0, chunks=\"auto\"):\n n = int(n)\n d = float(d)\n\n r = _arange(n // 2 + 1, dtype=float, chunks=chunks)\n r /= n * d\n\n return r", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__fftshift_helper_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/fft.py__fftshift_helper_", "embedding": null, "metadata": {"file_path": "dask/array/fft.py", "file_name": "fft.py", "file_type": "text/x-python", "category": "implementation", "start_line": 261, "end_line": 296, "span_ids": ["ifftshift", "_fftshift_helper", "fftshift"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _fftshift_helper(x, axes=None, inverse=False):\n if axes is None:\n axes = list(range(x.ndim))\n elif not isinstance(axes, Sequence):\n axes = (axes,)\n\n y = x\n for i in axes:\n n = y.shape[i]\n n_2 = (n + int(inverse is False)) // 2\n\n l = y.ndim * [slice(None)]\n l[i] = slice(None, n_2)\n l = tuple(l)\n\n r = y.ndim * [slice(None)]\n r[i] = slice(n_2, None)\n r = tuple(r)\n\n y = _concatenate([y[r], y[l]], axis=i)\n\n if len(x.chunks[i]) == 1:\n y = y.rechunk({i: x.chunks[i]})\n\n return y\n\n\n@derived_from(np.fft)\ndef fftshift(x, axes=None):\n return _fftshift_helper(x, axes=axes, inverse=False)\n\n\n@derived_from(np.fft)\ndef ifftshift(x, axes=None):\n return _fftshift_helper(x, axes=axes, inverse=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_np__SIGNATURE._0_1_format__IN": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_np__SIGNATURE._0_1_format__IN", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport re\n\nfrom tlz import concat, merge, unique\n\nfrom .core import Array, asarray, blockwise, getitem, apply_infer_dtype\nfrom .utils import meta_from_array\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..core import flatten\n\n\n# Modified version of `numpy.lib.function_base._parse_gufunc_signature`\n# Modifications:\n# - Allow for zero input arguments\n# See https://docs.scipy.org/doc/numpy/reference/c-api/generalized-ufuncs.html\n_DIMENSION_NAME = r\"\\w+\"\n_CORE_DIMENSION_LIST = \"(?:{0:}(?:,{0:})*,?)?\".format(_DIMENSION_NAME)\n_ARGUMENT = r\"\\({}\\)\".format(_CORE_DIMENSION_LIST)\n_INPUT_ARGUMENTS = \"(?:{0:}(?:,{0:})*,?)?\".format(_ARGUMENT)\n_OUTPUT_ARGUMENTS = \"{0:}(?:,{0:})*\".format(\n _ARGUMENT\n) # Use `'{0:}(?:,{0:})*,?'` if gufunc-\n# signature should be allowed for length 1 tuple returns\n_SIGNATURE = \"^{0:}->{1:}$\".format(_INPUT_ARGUMENTS, _OUTPUT_ARGUMENTS)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__parse_gufunc_signature__parse_gufunc_signature.return.ins_outs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__parse_gufunc_signature__parse_gufunc_signature.return.ins_outs", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 55, "span_ids": ["_parse_gufunc_signature"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_gufunc_signature(signature):\n \"\"\"\n Parse string signatures for a generalized universal function.\n\n Arguments\n ---------\n signature : string\n Generalized universal function signature, e.g., ``(m,n),(n,p)->(m,p)``\n for ``np.matmul``.\n\n Returns\n -------\n Tuple of input and output core dimensions parsed from the signature, each\n of the form List[Tuple[str, ...]], except for one output. For one output\n core dimension is not a list, but of the form Tuple[str, ...]\n \"\"\"\n signature = signature.replace(\" \", \"\")\n if not re.match(_SIGNATURE, signature):\n raise ValueError(\"Not a valid gufunc signature: {}\".format(signature))\n in_txt, out_txt = signature.split(\"->\")\n ins = [\n tuple(re.findall(_DIMENSION_NAME, arg)) for arg in re.findall(_ARGUMENT, in_txt)\n ]\n outs = [\n tuple(re.findall(_DIMENSION_NAME, arg))\n for arg in re.findall(_ARGUMENT, out_txt)\n ]\n outs = outs[0] if ((len(outs) == 1) and (out_txt[-1] != \",\")) else outs\n return ins, outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes__validate_normalize_axes._Assert_we_have_as_many_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes__validate_normalize_axes._Assert_we_have_as_many_", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 143, "span_ids": ["_validate_normalize_axes"], "tokens": 784}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _validate_normalize_axes(axes, axis, keepdims, input_coredimss, output_coredimss):\n \"\"\"\n Validates logic of `axes`/`axis`/`keepdims` arguments and normalize them.\n Refer to [1]_ for details\n\n Arguments\n ---------\n axes: List of tuples\n axis: int\n keepdims: bool\n input_coredimss: List of Tuple of dims\n output_coredimss: List of Tuple of dims\n\n Returns\n -------\n input_axes: List of tuple of int\n output_axes: List of tuple of int\n\n References\n ----------\n .. [1] https://docs.scipy.org/doc/numpy/reference/ufuncs.html#optional-keyword-arguments\n \"\"\"\n nin = len(input_coredimss)\n nout = 1 if not isinstance(output_coredimss, list) else len(output_coredimss)\n\n if axes is not None and axis is not None:\n raise ValueError(\n \"Only one of `axis` or `axes` keyword arguments should be given\"\n )\n if axes and not isinstance(axes, list):\n raise ValueError(\"`axes` has to be of type list\")\n\n output_coredimss = output_coredimss if nout > 1 else [output_coredimss]\n filtered_core_dims = list(filter(len, input_coredimss))\n nr_outputs_with_coredims = len([True for x in output_coredimss if len(x) > 0])\n\n if keepdims:\n if nr_outputs_with_coredims > 0:\n raise ValueError(\"`keepdims` can only be used for scalar outputs\")\n output_coredimss = len(output_coredimss) * [filtered_core_dims[0]]\n\n core_dims = input_coredimss + output_coredimss\n if axis is not None:\n if not isinstance(axis, int):\n raise ValueError(\"`axis` argument has to be an integer value\")\n if filtered_core_dims:\n cd0 = filtered_core_dims[0]\n if len(cd0) != 1:\n raise ValueError(\n \"`axis` can be used only, if one core dimension is present\"\n )\n for cd in filtered_core_dims:\n if cd0 != cd:\n raise ValueError(\n \"To use `axis`, all core dimensions have to be equal\"\n )\n\n # Expand dafaults or axis\n if axes is None:\n if axis is not None:\n axes = [(axis,) if cd else tuple() for cd in core_dims]\n else:\n axes = [tuple(range(-len(icd), 0)) for icd in core_dims]\n elif not isinstance(axes, list):\n raise ValueError(\"`axes` argument has to be a list\")\n axes = [(a,) if isinstance(a, int) else a for a in axes]\n\n if (\n (nr_outputs_with_coredims == 0)\n and (nin != len(axes))\n and (nin + nout != len(axes))\n ) or ((nr_outputs_with_coredims > 0) and (nin + nout != len(axes))):\n raise ValueError(\n \"The number of `axes` entries is not equal the number of input and output arguments\"\n )\n\n # Treat outputs\n output_axes = axes[nin:]\n output_axes = (\n output_axes\n if output_axes\n else [tuple(range(-len(ocd), 0)) for ocd in output_coredimss]\n )\n input_axes = axes[:nin]\n\n # Assert we have as many axes as output core dimensions\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes.for_idx_iax_icd_in_en__validate_normalize_axes.return.input_axes_output_axes": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py__validate_normalize_axes.for_idx_iax_icd_in_en__validate_normalize_axes.return.input_axes_output_axes", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 172, "span_ids": ["_validate_normalize_axes"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _validate_normalize_axes(axes, axis, keepdims, input_coredimss, output_coredimss):\n # ... other code\n for idx, (iax, icd) in enumerate(zip(input_axes, input_coredimss)):\n if len(iax) != len(icd):\n raise ValueError(\n \"The number of `axes` entries for argument #{} is not equal \"\n \"the number of respective input core dimensions in signature\".format(\n idx\n )\n )\n if not keepdims:\n for idx, (oax, ocd) in enumerate(zip(output_axes, output_coredimss)):\n if len(oax) != len(ocd):\n raise ValueError(\n \"The number of `axes` entries for argument #{} is not equal \"\n \"the number of respective output core dimensions in signature\".format(\n idx\n )\n )\n else:\n if input_coredimss:\n icd0 = input_coredimss[0]\n for icd in input_coredimss:\n if icd0 != icd:\n raise ValueError(\n \"To use `keepdims`, all core dimensions have to be equal\"\n )\n iax0 = input_axes[0]\n output_axes = [iax0 for _ in output_coredimss]\n\n return input_axes, output_axes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc_apply_gufunc._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc_apply_gufunc._", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 175, "end_line": 277, "span_ids": ["apply_gufunc"], "tokens": 1259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_gufunc(func, signature, *args, **kwargs):\n \"\"\"\n Apply a generalized ufunc or similar python function to arrays.\n\n ``signature`` determines if the function consumes or produces core\n dimensions. The remaining dimensions in given input arrays (``*args``)\n are considered loop dimensions and are required to broadcast\n naturally against each other.\n\n In other terms, this function is like ``np.vectorize``, but for\n the blocks of dask arrays. If the function itself shall also\n be vectorized use ``vectorize=True`` for convenience.\n\n Parameters\n ----------\n func : callable\n Function to call like ``func(*args, **kwargs)`` on input arrays\n (``*args``) that returns an array or tuple of arrays. If multiple\n arguments with non-matching dimensions are supplied, this function is\n expected to vectorize (broadcast) over axes of positional arguments in\n the style of NumPy universal functions [1]_ (if this is not the case,\n set ``vectorize=True``). If this function returns multiple outputs,\n ``output_core_dims`` has to be set as well.\n signature: string\n Specifies what core dimensions are consumed and produced by ``func``.\n According to the specification of numpy.gufunc signature [2]_\n *args : numeric\n Input arrays or scalars to the callable function.\n axes: List of tuples, optional, keyword only\n A list of tuples with indices of axes a generalized ufunc should operate on.\n For instance, for a signature of ``\"(i,j),(j,k)->(i,k)\"`` appropriate for\n matrix multiplication, the base elements are two-dimensional matrices\n and these are taken to be stored in the two last axes of each argument. The\n corresponding axes keyword would be ``[(-2, -1), (-2, -1), (-2, -1)]``.\n For simplicity, for generalized ufuncs that operate on 1-dimensional arrays\n (vectors), a single integer is accepted instead of a single-element tuple,\n and for generalized ufuncs for which all outputs are scalars, the output\n tuples can be omitted.\n axis: int, optional, keyword only\n A single axis over which a generalized ufunc should operate. This is a short-cut\n for ufuncs that operate over a single, shared core dimension, equivalent to passing\n in axes with entries of (axis,) for each single-core-dimension argument and ``()`` for\n all others. For instance, for a signature ``\"(i),(i)->()\"``, it is equivalent to passing\n in ``axes=[(axis,), (axis,), ()]``.\n keepdims: bool, optional, keyword only\n If this is set to True, axes which are reduced over will be left in the result as\n a dimension with size one, so that the result will broadcast correctly against the\n inputs. This option can only be used for generalized ufuncs that operate on inputs\n that all have the same number of core dimensions and with outputs that have no core\n dimensions , i.e., with signatures like ``\"(i),(i)->()\"`` or ``\"(m,m)->()\"``.\n If used, the location of the dimensions in the output can be controlled with axes\n and axis.\n output_dtypes : Optional, dtype or list of dtypes, keyword only\n Valid numpy dtype specification or list thereof.\n If not given, a call of ``func`` with a small set of data\n is performed in order to try to automatically determine the\n output dtypes.\n output_sizes : dict, optional, keyword only\n Optional mapping from dimension names to sizes for outputs. Only used if\n new core dimensions (not found on inputs) appear on outputs.\n vectorize: bool, keyword only\n If set to ``True``, ``np.vectorize`` is applied to ``func`` for\n convenience. Defaults to ``False``.\n allow_rechunk: Optional, bool, keyword only\n Allows rechunking, otherwise chunk sizes need to match and core\n dimensions are to consist only of one chunk.\n Warning: enabling this can increase memory usage significantly.\n Defaults to ``False``.\n meta: Optional, tuple, keyword only\n tuple of empty ndarrays describing the shape and dtype of the output of the gufunc.\n Defaults to ``None``.\n **kwargs : dict\n Extra keyword arguments to pass to `func`\n\n Returns\n -------\n Single dask.array.Array or tuple of dask.array.Array\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> def stats(x):\n ... return np.mean(x, axis=-1), np.std(x, axis=-1)\n >>> a = da.random.normal(size=(10,20,30), chunks=(5, 10, 30))\n >>> mean, std = da.apply_gufunc(stats, \"(i)->(),()\", a)\n >>> mean.compute().shape\n (10, 20)\n\n\n >>> def outer_product(x, y):\n ... return np.einsum(\"i,j->ij\", x, y)\n >>> a = da.random.normal(size=( 20,30), chunks=(10, 30))\n >>> b = da.random.normal(size=(10, 1,40), chunks=(5, 1, 40))\n >>> c = da.apply_gufunc(outer_product, \"(i),(j)->(i,j)\", a, b, vectorize=True)\n >>> c.compute().shape\n (10, 20, 30, 40)\n\n References\n ----------\n .. [1] https://docs.scipy.org/doc/numpy/reference/ufuncs.html\n .. [2] https://docs.scipy.org/doc/numpy/reference/c-api/generalized-ufuncs.html\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.axes_apply_gufunc.max_loopdims.max_num_loopdims_if_num_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.axes_apply_gufunc.max_loopdims.max_num_loopdims_if_num_", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 278, "end_line": 363, "span_ids": ["apply_gufunc"], "tokens": 803}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_gufunc(func, signature, *args, **kwargs):\n axes = kwargs.pop(\"axes\", None)\n axis = kwargs.pop(\"axis\", None)\n keepdims = kwargs.pop(\"keepdims\", False)\n output_dtypes = kwargs.pop(\"output_dtypes\", None)\n output_sizes = kwargs.pop(\"output_sizes\", None)\n vectorize = kwargs.pop(\"vectorize\", None)\n allow_rechunk = kwargs.pop(\"allow_rechunk\", False)\n meta = kwargs.pop(\"meta\", None)\n\n # Input processing:\n ## Signature\n if not isinstance(signature, str):\n raise TypeError(\"`signature` has to be of type string\")\n input_coredimss, output_coredimss = _parse_gufunc_signature(signature)\n\n ## Determine nout: nout = None for functions of one direct return; nout = int for return tuples\n nout = None if not isinstance(output_coredimss, list) else len(output_coredimss)\n\n ## Determine and handle output_dtypes\n if output_dtypes is None:\n if vectorize:\n tempfunc = np.vectorize(func, signature=signature)\n else:\n tempfunc = func\n output_dtypes = apply_infer_dtype(\n tempfunc, args, kwargs, \"apply_gufunc\", \"output_dtypes\", nout\n )\n\n if isinstance(output_dtypes, (tuple, list)):\n if nout is None:\n if len(output_dtypes) > 1:\n raise ValueError(\n (\n \"Must specify single dtype or list of one dtype \"\n \"for `output_dtypes` for function with one output\"\n )\n )\n otypes = output_dtypes\n output_dtypes = output_dtypes[0]\n else:\n otypes = output_dtypes\n else:\n if nout is not None:\n raise ValueError(\n \"Must specify tuple of dtypes for `output_dtypes` for function with multiple outputs\"\n )\n otypes = [output_dtypes]\n\n ## Vectorize function, if required\n if vectorize:\n func = np.vectorize(func, signature=signature, otypes=otypes)\n\n ## Miscellaneous\n if output_sizes is None:\n output_sizes = {}\n\n ## Axes\n input_axes, output_axes = _validate_normalize_axes(\n axes, axis, keepdims, input_coredimss, output_coredimss\n )\n\n # Main code:\n ## Cast all input arrays to dask\n args = [asarray(a) for a in args]\n\n if len(input_coredimss) != len(args):\n ValueError(\n \"According to `signature`, `func` requires %d arguments, but %s given\"\n % (len(input_coredimss), len(args))\n )\n\n ## Axes: transpose input arguments\n transposed_args = []\n for arg, iax, input_coredims in zip(args, input_axes, input_coredimss):\n shape = arg.shape\n iax = tuple(a if a < 0 else a - len(shape) for a in iax)\n tidc = tuple(i for i in range(-len(shape) + 0, 0) if i not in iax) + iax\n transposed_arg = arg.transpose(tidc)\n transposed_args.append(transposed_arg)\n args = transposed_args\n\n ## Assess input args for loop dims\n input_shapes = [a.shape for a in args]\n input_chunkss = [a.chunks for a in args]\n num_loopdims = [len(s) - len(cd) for s, cd in zip(input_shapes, input_coredimss)]\n max_loopdims = max(num_loopdims) if num_loopdims else None\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.core_input_shapes_apply_gufunc._Modifying_blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.core_input_shapes_apply_gufunc._Modifying_blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 364, "end_line": 423, "span_ids": ["apply_gufunc"], "tokens": 646}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_gufunc(func, signature, *args, **kwargs):\n # ... other code\n core_input_shapes = [\n dict(zip(icd, s[n:]))\n for s, n, icd in zip(input_shapes, num_loopdims, input_coredimss)\n ]\n core_shapes = merge(*core_input_shapes)\n core_shapes.update(output_sizes)\n\n loop_input_dimss = [\n tuple(\"__loopdim%d__\" % d for d in range(max_loopdims - n, max_loopdims))\n for n in num_loopdims\n ]\n input_dimss = [l + c for l, c in zip(loop_input_dimss, input_coredimss)]\n\n loop_output_dims = max(loop_input_dimss, key=len) if loop_input_dimss else tuple()\n\n ## Assess input args for same size and chunk sizes\n ### Collect sizes and chunksizes of all dims in all arrays\n dimsizess = {}\n chunksizess = {}\n for dims, shape, chunksizes in zip(input_dimss, input_shapes, input_chunkss):\n for dim, size, chunksize in zip(dims, shape, chunksizes):\n dimsizes = dimsizess.get(dim, [])\n dimsizes.append(size)\n dimsizess[dim] = dimsizes\n chunksizes_ = chunksizess.get(dim, [])\n chunksizes_.append(chunksize)\n chunksizess[dim] = chunksizes_\n ### Assert correct partitioning, for case:\n for dim, sizes in dimsizess.items():\n #### Check that the arrays have same length for same dimensions or dimension `1`\n if set(sizes).union({1}) != {1, max(sizes)}:\n raise ValueError(\n \"Dimension `'{}'` with different lengths in arrays\".format(dim)\n )\n if not allow_rechunk:\n chunksizes = chunksizess[dim]\n #### Check if core dimensions consist of only one chunk\n if (dim in core_shapes) and (chunksizes[0][0] < core_shapes[dim]):\n raise ValueError(\n \"Core dimension `'{}'` consists of multiple chunks. To fix, rechunk into a single \\\nchunk along this dimension or set `allow_rechunk=True`, but beware that this may increase memory usage \\\nsignificantly.\".format(\n dim\n )\n )\n #### Check if loop dimensions consist of same chunksizes, when they have sizes > 1\n relevant_chunksizes = list(\n unique(c for s, c in zip(sizes, chunksizes) if s > 1)\n )\n if len(relevant_chunksizes) > 1:\n raise ValueError(\n \"Dimension `'{}'` with different chunksize present\".format(dim)\n )\n\n ## Apply function - use blockwise here\n arginds = list(concat(zip(args, input_dimss)))\n\n ### Use existing `blockwise` but only with loopdims to enforce\n ### concatenation for coredims that appear also at the output\n ### Modifying `blockwise` could improve things here.\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.if_meta_is_not_None__apply_gufunc._Undo_from_above": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_apply_gufunc.if_meta_is_not_None__apply_gufunc._Undo_from_above", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 424, "end_line": 503, "span_ids": ["apply_gufunc"], "tokens": 745}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def apply_gufunc(func, signature, *args, **kwargs):\n # ... other code\n if meta is not None:\n tmp = blockwise(\n func, loop_output_dims, *arginds, concatenate=True, meta=meta, **kwargs\n )\n else:\n try:\n tmp = blockwise( # First try to compute meta\n func, loop_output_dims, *arginds, concatenate=True, **kwargs\n )\n except ValueError:\n # If computing meta doesn't work, provide it explicitly based on\n # provided dtypes\n sample = arginds[0]._meta\n if isinstance(output_dtypes, tuple):\n meta = tuple(\n meta_from_array(sample, dtype=odt)\n for ocd, odt in zip(output_coredimss, output_dtypes)\n )\n else:\n meta = tuple(\n meta_from_array(sample, dtype=odt)\n for ocd, odt in zip((output_coredimss,), (output_dtypes,))\n )\n tmp = blockwise(\n func, loop_output_dims, *arginds, concatenate=True, meta=meta, **kwargs\n )\n\n if isinstance(tmp._meta, tuple):\n metas = tmp._meta\n else:\n metas = (tmp._meta,)\n\n ## Prepare output shapes\n loop_output_shape = tmp.shape\n loop_output_chunks = tmp.chunks\n keys = list(flatten(tmp.__dask_keys__()))\n name, token = keys[0][0].split(\"-\")\n\n ### *) Treat direct output\n if nout is None:\n output_coredimss = [output_coredimss]\n output_dtypes = [output_dtypes]\n\n ## Split output\n leaf_arrs = []\n for i, (ocd, oax, meta) in enumerate(zip(output_coredimss, output_axes, metas)):\n core_output_shape = tuple(core_shapes[d] for d in ocd)\n core_chunkinds = len(ocd) * (0,)\n output_shape = loop_output_shape + core_output_shape\n output_chunks = loop_output_chunks + core_output_shape\n leaf_name = \"%s_%d-%s\" % (name, i, token)\n leaf_dsk = {\n (leaf_name,)\n + key[1:]\n + core_chunkinds: ((getitem, key, i) if nout else key)\n for key in keys\n }\n graph = HighLevelGraph.from_collections(leaf_name, leaf_dsk, dependencies=[tmp])\n meta = meta_from_array(meta, len(output_shape))\n leaf_arr = Array(\n graph, leaf_name, chunks=output_chunks, shape=output_shape, meta=meta\n )\n\n ### Axes:\n if keepdims:\n slices = len(leaf_arr.shape) * (slice(None),) + len(oax) * (np.newaxis,)\n leaf_arr = leaf_arr[slices]\n\n tidcs = [None] * len(leaf_arr.shape)\n for i, oa in zip(range(-len(oax), 0), oax):\n tidcs[oa] = i\n j = 0\n for i in range(len(tidcs)):\n if tidcs[i] is None:\n tidcs[i] = j\n j += 1\n leaf_arr = leaf_arr.transpose(tidcs)\n leaf_arrs.append(leaf_arr)\n\n return (*leaf_arrs,) if nout else leaf_arrs[0] # Undo *) from above", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc_gufunc._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc_gufunc._", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 506, "end_line": 593, "span_ids": ["gufunc"], "tokens": 1114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gufunc(object):\n \"\"\"\n Binds `pyfunc` into ``dask.array.apply_gufunc`` when called.\n\n Parameters\n ----------\n pyfunc : callable\n Function to call like ``func(*args, **kwargs)`` on input arrays\n (``*args``) that returns an array or tuple of arrays. If multiple\n arguments with non-matching dimensions are supplied, this function is\n expected to vectorize (broadcast) over axes of positional arguments in\n the style of NumPy universal functions [1]_ (if this is not the case,\n set ``vectorize=True``). If this function returns multiple outputs,\n ``output_core_dims`` has to be set as well.\n signature : String, keyword only\n Specifies what core dimensions are consumed and produced by ``func``.\n According to the specification of numpy.gufunc signature [2]_\n axes: List of tuples, optional, keyword only\n A list of tuples with indices of axes a generalized ufunc should operate on.\n For instance, for a signature of ``\"(i,j),(j,k)->(i,k)\"`` appropriate for\n matrix multiplication, the base elements are two-dimensional matrices\n and these are taken to be stored in the two last axes of each argument. The\n corresponding axes keyword would be ``[(-2, -1), (-2, -1), (-2, -1)]``.\n For simplicity, for generalized ufuncs that operate on 1-dimensional arrays\n (vectors), a single integer is accepted instead of a single-element tuple,\n and for generalized ufuncs for which all outputs are scalars, the output\n tuples can be omitted.\n axis: int, optional, keyword only\n A single axis over which a generalized ufunc should operate. This is a short-cut\n for ufuncs that operate over a single, shared core dimension, equivalent to passing\n in axes with entries of (axis,) for each single-core-dimension argument and ``()`` for\n all others. For instance, for a signature ``\"(i),(i)->()\"``, it is equivalent to passing\n in ``axes=[(axis,), (axis,), ()]``.\n keepdims: bool, optional, keyword only\n If this is set to True, axes which are reduced over will be left in the result as\n a dimension with size one, so that the result will broadcast correctly against the\n inputs. This option can only be used for generalized ufuncs that operate on inputs\n that all have the same number of core dimensions and with outputs that have no core\n dimensions , i.e., with signatures like ``\"(i),(i)->()\"`` or ``\"(m,m)->()\"``.\n If used, the location of the dimensions in the output can be controlled with axes\n and axis.\n output_dtypes : Optional, dtype or list of dtypes, keyword only\n Valid numpy dtype specification or list thereof.\n If not given, a call of ``func`` with a small set of data\n is performed in order to try to automatically determine the\n output dtypes.\n output_sizes : dict, optional, keyword only\n Optional mapping from dimension names to sizes for outputs. Only used if\n new core dimensions (not found on inputs) appear on outputs.\n vectorize: bool, keyword only\n If set to ``True``, ``np.vectorize`` is applied to ``func`` for\n convenience. Defaults to ``False``.\n allow_rechunk: Optional, bool, keyword only\n Allows rechunking, otherwise chunk sizes need to match and core\n dimensions are to consist only of one chunk.\n Warning: enabling this can increase memory usage significantly.\n Defaults to ``False``.\n\n Returns\n -------\n Wrapped function\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> a = da.random.normal(size=(10,20,30), chunks=(5, 10, 30))\n >>> def stats(x):\n ... return np.mean(x, axis=-1), np.std(x, axis=-1)\n >>> gustats = da.gufunc(stats, signature=\"(i)->(),()\", output_dtypes=(float, float))\n >>> mean, std = gustats(a)\n >>> mean.compute().shape\n (10, 20)\n\n >>> a = da.random.normal(size=( 20,30), chunks=(10, 30))\n >>> b = da.random.normal(size=(10, 1,40), chunks=(5, 1, 40))\n >>> def outer_product(x, y):\n ... return np.einsum(\"i,j->ij\", x, y)\n >>> guouter_product = da.gufunc(outer_product, signature=\"(i),(j)->(i,j)\", output_dtypes=float, vectorize=True)\n >>> c = guouter_product(a, b)\n >>> c.compute().shape\n (10, 20, 30, 40)\n\n References\n ----------\n .. [1] https://docs.scipy.org/doc/numpy/reference/ufuncs.html\n .. [2] https://docs.scipy.org/doc/numpy/reference/c-api/generalized-ufuncs.html\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc.__init___gufunc.__call__.return.apply_gufunc_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_gufunc.__init___gufunc.__call__.return.apply_gufunc_", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 595, "end_line": 641, "span_ids": ["gufunc.__call__", "gufunc.__init__"], "tokens": 370}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class gufunc(object):\n\n def __init__(self, pyfunc, **kwargs):\n self.pyfunc = pyfunc\n self.signature = kwargs.pop(\"signature\", None)\n self.vectorize = kwargs.pop(\"vectorize\", False)\n self.axes = kwargs.pop(\"axes\", None)\n self.axis = kwargs.pop(\"axis\", None)\n self.keepdims = kwargs.pop(\"keepdims\", False)\n self.output_sizes = kwargs.pop(\"output_sizes\", None)\n self.output_dtypes = kwargs.pop(\"output_dtypes\", None)\n self.allow_rechunk = kwargs.pop(\"allow_rechunk\", False)\n if kwargs:\n raise TypeError(\"Unsupported keyword argument(s) provided\")\n\n self.__doc__ = \"\"\"\n Bound ``dask.array.gufunc``\n func: ``{func}``\n signature: ``'{signature}'``\n\n Parameters\n ----------\n *args : numpy/dask arrays or scalars\n Arrays to which to apply to ``func``. Core dimensions as specified in\n ``signature`` need to come last.\n **kwargs : dict\n Extra keyword arguments to pass to ``func``\n\n Returns\n -------\n Single dask.array.Array or tuple of dask.array.Array\n \"\"\".format(\n func=str(self.pyfunc), signature=self.signature\n )\n\n def __call__(self, *args, **kwargs):\n return apply_gufunc(\n self.pyfunc,\n self.signature,\n *args,\n vectorize=self.vectorize,\n axes=self.axes,\n axis=self.axis,\n keepdims=self.keepdims,\n output_sizes=self.output_sizes,\n output_dtypes=self.output_dtypes,\n allow_rechunk=self.allow_rechunk or kwargs.pop(\"allow_rechunk\", False),\n **kwargs,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc_as_gufunc._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc_as_gufunc._", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 644, "end_line": 726, "span_ids": ["as_gufunc"], "tokens": 1031}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def as_gufunc(signature=None, **kwargs):\n \"\"\"\n Decorator for ``dask.array.gufunc``.\n\n Parameters\n ----------\n signature : String\n Specifies what core dimensions are consumed and produced by ``func``.\n According to the specification of numpy.gufunc signature [2]_\n axes: List of tuples, optional, keyword only\n A list of tuples with indices of axes a generalized ufunc should operate on.\n For instance, for a signature of ``\"(i,j),(j,k)->(i,k)\"`` appropriate for\n matrix multiplication, the base elements are two-dimensional matrices\n and these are taken to be stored in the two last axes of each argument. The\n corresponding axes keyword would be ``[(-2, -1), (-2, -1), (-2, -1)]``.\n For simplicity, for generalized ufuncs that operate on 1-dimensional arrays\n (vectors), a single integer is accepted instead of a single-element tuple,\n and for generalized ufuncs for which all outputs are scalars, the output\n tuples can be omitted.\n axis: int, optional, keyword only\n A single axis over which a generalized ufunc should operate. This is a short-cut\n for ufuncs that operate over a single, shared core dimension, equivalent to passing\n in axes with entries of (axis,) for each single-core-dimension argument and ``()`` for\n all others. For instance, for a signature ``\"(i),(i)->()\"``, it is equivalent to passing\n in ``axes=[(axis,), (axis,), ()]``.\n keepdims: bool, optional, keyword only\n If this is set to True, axes which are reduced over will be left in the result as\n a dimension with size one, so that the result will broadcast correctly against the\n inputs. This option can only be used for generalized ufuncs that operate on inputs\n that all have the same number of core dimensions and with outputs that have no core\n dimensions , i.e., with signatures like ``\"(i),(i)->()\"`` or ``\"(m,m)->()\"``.\n If used, the location of the dimensions in the output can be controlled with axes\n and axis.\n output_dtypes : Optional, dtype or list of dtypes, keyword only\n Valid numpy dtype specification or list thereof.\n If not given, a call of ``func`` with a small set of data\n is performed in order to try to automatically determine the\n output dtypes.\n output_sizes : dict, optional, keyword only\n Optional mapping from dimension names to sizes for outputs. Only used if\n new core dimensions (not found on inputs) appear on outputs.\n vectorize: bool, keyword only\n If set to ``True``, ``np.vectorize`` is applied to ``func`` for\n convenience. Defaults to ``False``.\n allow_rechunk: Optional, bool, keyword only\n Allows rechunking, otherwise chunk sizes need to match and core\n dimensions are to consist only of one chunk.\n Warning: enabling this can increase memory usage significantly.\n Defaults to ``False``.\n meta: Optional, tuple, keyword only\n tuple of empty ndarrays describing the shape and dtype of the output of the gufunc.\n Defaults to ``None``.\n\n Returns\n -------\n Decorator for `pyfunc` that itself returns a `gufunc`.\n\n Examples\n --------\n >>> import dask.array as da\n >>> import numpy as np\n >>> a = da.random.normal(size=(10,20,30), chunks=(5, 10, 30))\n >>> @da.as_gufunc(\"(i)->(),()\", output_dtypes=(float, float))\n ... def stats(x):\n ... return np.mean(x, axis=-1), np.std(x, axis=-1)\n >>> mean, std = stats(a)\n >>> mean.compute().shape\n (10, 20)\n\n >>> a = da.random.normal(size=( 20,30), chunks=(10, 30))\n >>> b = da.random.normal(size=(10, 1,40), chunks=(5, 1, 40))\n >>> @da.as_gufunc(\"(i),(j)->(i,j)\", output_dtypes=float, vectorize=True)\n ... def outer_product(x, y):\n ... return np.einsum(\"i,j->ij\", x, y)\n >>> c = outer_product(a, b)\n >>> c.compute().shape\n (10, 20, 30, 40)\n\n References\n ----------\n .. [1] https://docs.scipy.org/doc/numpy/reference/ufuncs.html\n .. [2] https://docs.scipy.org/doc/numpy/reference/c-api/generalized-ufuncs.html\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc._allowedkeys_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/gufunc.py_as_gufunc._allowedkeys_", "embedding": null, "metadata": {"file_path": "dask/array/gufunc.py", "file_name": "gufunc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 727, "end_line": 759, "span_ids": ["as_gufunc"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def as_gufunc(signature=None, **kwargs):\n _allowedkeys = {\n \"vectorize\",\n \"axes\",\n \"axis\",\n \"keepdims\",\n \"output_sizes\",\n \"output_dtypes\",\n \"allow_rechunk\",\n \"meta\",\n }\n if set(_allowedkeys).issubset(kwargs.keys()):\n raise TypeError(\"Unsupported keyword argument(s) provided\")\n\n def _as_gufunc(pyfunc):\n return gufunc(pyfunc, signature=signature, **kwargs)\n\n _as_gufunc.__doc__ = \"\"\"\n Decorator to make ``dask.array.gufunc``\n signature: ``'{signature}'``\n\n Parameters\n ----------\n pyfunc : callable\n Function matching signature ``'{signature}'``.\n\n Returns\n -------\n ``dask.array.gufunc``\n \"\"\".format(\n signature=signature\n )\n return _as_gufunc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/image.py_from_glob_import_glob_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/image.py_from_glob_import_glob_", "embedding": null, "metadata": {"file_path": "dask/array/image.py", "file_name": "image.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 70, "span_ids": ["add_leading_dimension", "imports", "imread"], "tokens": 468}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from glob import glob\nimport os\n\ntry:\n from skimage.io import imread as sk_imread\nexcept (AttributeError, ImportError):\n pass\n\nfrom .core import Array\nfrom ..base import tokenize\n\n\ndef add_leading_dimension(x):\n return x[None, ...]\n\n\ndef imread(filename, imread=None, preprocess=None):\n \"\"\"Read a stack of images into a dask array\n\n Parameters\n ----------\n\n filename: string\n A globstring like 'myfile.*.png'\n imread: function (optional)\n Optionally provide custom imread function.\n Function should expect a filename and produce a numpy array.\n Defaults to ``skimage.io.imread``.\n preprocess: function (optional)\n Optionally provide custom function to preprocess the image.\n Function should expect a numpy array for a single image.\n\n Examples\n --------\n\n >>> from dask.array.image import imread\n >>> im = imread('2015-*-*.png') # doctest: +SKIP\n >>> im.shape # doctest: +SKIP\n (365, 1000, 1000, 3)\n\n Returns\n -------\n\n Dask array of all images stacked along the first dimension. All images\n will be treated as individual chunks\n \"\"\"\n imread = imread or sk_imread\n filenames = sorted(glob(filename))\n if not filenames:\n raise ValueError(\"No files found under name %s\" % filename)\n\n name = \"imread-%s\" % tokenize(filenames, map(os.path.getmtime, filenames))\n\n sample = imread(filenames[0])\n if preprocess:\n sample = preprocess(sample)\n\n keys = [(name, i) + (0,) * len(sample.shape) for i in range(len(filenames))]\n if preprocess:\n values = [\n (add_leading_dimension, (preprocess, (imread, fn))) for fn in filenames\n ]\n else:\n values = [(add_leading_dimension, (imread, fn)) for fn in filenames]\n dsk = dict(zip(keys, values))\n\n chunks = ((1,) * len(filenames),) + tuple((d,) for d in sample.shape)\n\n return Array(dsk, name, chunks, sample.dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_operator__nanmin.return.k_1_if_np_isnan_k_0_else": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_operator__nanmin.return.k_1_if_np_isnan_k_0_else", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["_nanmin", "imports", "_cumsum_part", "_cumsum_blocks"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import operator\nfrom numbers import Number\n\nimport numpy as np\nimport tlz as toolz\n\nfrom ..base import tokenize, wait\nfrom ..delayed import delayed\nfrom ..blockwise import blockwise\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import derived_from, apply\nfrom .core import dotmany, Array, concatenate, from_delayed\nfrom .creation import eye\nfrom .random import RandomState\nfrom .utils import meta_from_array, svd_flip, ones_like_safe\n\n\ndef _cumsum_blocks(it):\n total = 0\n for x in it:\n total_previous = total\n total += x\n yield (total_previous, total)\n\n\ndef _cumsum_part(last, new):\n return (last[1], last[1] + new)\n\n\ndef _nanmin(m, n):\n k_0 = min([m, n])\n k_1 = m if np.isnan(n) else n\n return k_1 if np.isnan(k_0) else k_0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__wrapped_qr__wrapped_qr.if_a_shape_0_0_.else_.return.np_linalg_qr_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__wrapped_qr__wrapped_qr.if_a_shape_0_0_.else_.return.np_linalg_qr_a_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 48, "span_ids": ["_wrapped_qr"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _wrapped_qr(a):\n \"\"\"\n A wrapper for np.linalg.qr that handles arrays with 0 rows\n\n Notes: Created for tsqr so as to manage cases with uncertain\n array dimensions. In particular, the case where arrays have\n (uncertain) chunks with 0 rows.\n \"\"\"\n # workaround may be removed when numpy stops rejecting edge cases\n if a.shape[0] == 0:\n return np.zeros((0, 0)), np.zeros((0, a.shape[1]))\n else:\n return np.linalg.qr(a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr_tsqr.layers.data___dask_graph___lay": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr_tsqr.layers.data___dask_graph___lay", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 129, "span_ids": ["tsqr"], "tokens": 756}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tsqr(data, compute_svd=False, _max_vchunk_size=None):\n \"\"\"Direct Tall-and-Skinny QR algorithm\n\n As presented in:\n\n A. Benson, D. Gleich, and J. Demmel.\n Direct QR factorizations for tall-and-skinny matrices in\n MapReduce architectures.\n IEEE International Conference on Big Data, 2013.\n https://arxiv.org/abs/1301.1071\n\n This algorithm is used to compute both the QR decomposition and the\n Singular Value Decomposition. It requires that the input array have a\n single column of blocks, each of which fit in memory.\n\n Parameters\n ----------\n data: Array\n compute_svd: bool\n Whether to compute the SVD rather than the QR decomposition\n _max_vchunk_size: Integer\n Used internally in recursion to set the maximum row dimension\n of chunks in subsequent recursive calls.\n\n Notes\n -----\n With ``k`` blocks of size ``(m, n)``, this algorithm has memory use that\n scales as ``k * n * n``.\n\n The implementation here is the recursive variant due to the ultimate\n need for one \"single core\" QR decomposition. In the non-recursive version\n of the algorithm, given ``k`` blocks, after ``k`` ``m * n`` QR\n decompositions, there will be a \"single core\" QR decomposition that will\n have to work with a ``(k * n, n)`` matrix.\n\n Here, recursion is applied as necessary to ensure that ``k * n`` is not\n larger than ``m`` (if ``m / n >= 2``). In particular, this is done\n to ensure that single core computations do not have to work on blocks\n larger than ``(m, n)``.\n\n Where blocks are irregular, the above logic is applied with the \"height\" of\n the \"tallest\" block used in place of ``m``.\n\n Consider use of the ``rechunk`` method to control this behavior.\n Taller blocks will reduce overall memory use (assuming that many of them\n still fit in memory at once).\n\n See Also\n --------\n dask.array.linalg.qr\n Powered by this algorithm\n dask.array.linalg.svd\n Powered by this algorithm\n dask.array.linalg.sfqr\n Variant for short-and-fat arrays\n \"\"\"\n nr, nc = len(data.chunks[0]), len(data.chunks[1])\n cr_max, cc = max(data.chunks[0]), data.chunks[1][0]\n\n if not (data.ndim == 2 and nc == 1): # Is a matrix # Only one column block\n raise ValueError(\n \"Input must have the following properties:\\n\"\n \" 1. Have two dimensions\\n\"\n \" 2. Have only one column of blocks\\n\\n\"\n \"Note: This function (tsqr) supports QR decomposition in the case of\\n\"\n \"tall-and-skinny matrices (single column chunk/block; see qr)\\n\"\n \"Current shape: {},\\nCurrent chunksize: {}\".format(\n data.shape, data.chunksize\n )\n )\n\n token = \"-\" + tokenize(data, compute_svd)\n\n m, n = data.shape\n numblocks = (nr, 1)\n\n qq, rr = np.linalg.qr(np.ones(shape=(1, 1), dtype=data.dtype))\n\n layers = data.__dask_graph__().layers.copy()\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.dependencies_tsqr.can_distribute.chunks_well_defined_and_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.dependencies_tsqr.can_distribute.chunks_well_defined_and_i", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 174, "span_ids": ["tsqr"], "tokens": 525}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tsqr(data, compute_svd=False, _max_vchunk_size=None):\n # ... other code\n dependencies = data.__dask_graph__().dependencies.copy()\n\n # Block qr\n name_qr_st1 = \"qr\" + token\n dsk_qr_st1 = blockwise(\n _wrapped_qr,\n name_qr_st1,\n \"ij\",\n data.name,\n \"ij\",\n numblocks={data.name: numblocks},\n )\n layers[name_qr_st1] = dsk_qr_st1\n dependencies[name_qr_st1] = set(data.__dask_layers__())\n\n # Block qr[0]\n name_q_st1 = \"getitem\" + token + \"-q1\"\n dsk_q_st1 = dict(\n ((name_q_st1, i, 0), (operator.getitem, (name_qr_st1, i, 0), 0))\n for i in range(numblocks[0])\n )\n layers[name_q_st1] = dsk_q_st1\n dependencies[name_q_st1] = {name_qr_st1}\n\n # Block qr[1]\n name_r_st1 = \"getitem\" + token + \"-r1\"\n dsk_r_st1 = dict(\n ((name_r_st1, i, 0), (operator.getitem, (name_qr_st1, i, 0), 1))\n for i in range(numblocks[0])\n )\n layers[name_r_st1] = dsk_r_st1\n dependencies[name_r_st1] = {name_qr_st1}\n\n # Next step is to obtain a QR decomposition for the stacked R factors, so either:\n # - gather R factors into a single core and do a QR decomposition\n # - recurse with tsqr (if single core computation too large and a-priori \"meaningful\n # reduction\" possible, meaning that chunks have to be well defined)\n\n single_core_compute_m = nr * cc\n chunks_well_defined = not any(np.isnan(c) for cs in data.chunks for c in cs)\n prospective_blocks = np.ceil(single_core_compute_m / cr_max)\n meaningful_reduction_possible = (\n cr_max if _max_vchunk_size is None else _max_vchunk_size\n ) >= 2 * cc\n can_distribute = chunks_well_defined and int(prospective_blocks) > 1\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an_tsqr.if_chunks_well_defined_an.dependencies_name_q_st3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an_tsqr.if_chunks_well_defined_an.dependencies_name_q_st3_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 273, "span_ids": ["tsqr"], "tokens": 921}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tsqr(data, compute_svd=False, _max_vchunk_size=None):\n # ... other code\n\n if chunks_well_defined and meaningful_reduction_possible and can_distribute:\n # stack chunks into blocks and recurse using tsqr\n\n # Prepare to stack chunks into blocks (from block qr[1])\n all_blocks = []\n curr_block = []\n curr_block_sz = 0\n for idx, a_m in enumerate(data.chunks[0]):\n m_q = a_m\n n_q = min(m_q, cc)\n m_r = n_q\n # n_r = cc\n if curr_block_sz + m_r > cr_max:\n all_blocks.append(curr_block)\n curr_block = []\n curr_block_sz = 0\n curr_block.append((idx, m_r))\n curr_block_sz += m_r\n if len(curr_block) > 0:\n all_blocks.append(curr_block)\n\n # R_stacked\n name_r_stacked = \"stack\" + token + \"-r1\"\n dsk_r_stacked = dict(\n (\n (name_r_stacked, i, 0),\n (\n np.vstack,\n (tuple, [(name_r_st1, idx, 0) for idx, _ in sub_block_info]),\n ),\n )\n for i, sub_block_info in enumerate(all_blocks)\n )\n layers[name_r_stacked] = dsk_r_stacked\n dependencies[name_r_stacked] = {name_r_st1}\n\n # retrieve R_stacked for recursion with tsqr\n vchunks_rstacked = tuple(\n [sum(map(lambda x: x[1], sub_block_info)) for sub_block_info in all_blocks]\n )\n graph = HighLevelGraph(layers, dependencies)\n # dsk.dependencies[name_r_stacked] = {data.name}\n r_stacked_meta = meta_from_array(\n data, len((sum(vchunks_rstacked), n)), dtype=rr.dtype\n )\n r_stacked = Array(\n graph,\n name_r_stacked,\n shape=(sum(vchunks_rstacked), n),\n chunks=(vchunks_rstacked, n),\n meta=r_stacked_meta,\n )\n\n # recurse\n q_inner, r_inner = tsqr(r_stacked, _max_vchunk_size=cr_max)\n layers = toolz.merge(q_inner.dask.layers, r_inner.dask.layers)\n dependencies = toolz.merge(q_inner.dask.dependencies, r_inner.dask.dependencies)\n\n # Q_inner: \"unstack\"\n name_q_st2 = \"getitem\" + token + \"-q2\"\n dsk_q_st2 = dict(\n (\n (name_q_st2, j, 0),\n (\n operator.getitem,\n (q_inner.name, i, 0),\n ((slice(e[0], e[1])), (slice(0, n))),\n ),\n )\n for i, sub_block_info in enumerate(all_blocks)\n for j, e in zip(\n [x[0] for x in sub_block_info],\n _cumsum_blocks([x[1] for x in sub_block_info]),\n )\n )\n layers[name_q_st2] = dsk_q_st2\n dependencies[name_q_st2] = set(q_inner.__dask_layers__())\n\n # R: R_inner\n name_r_st2 = \"r-inner\" + token\n dsk_r_st2 = {(name_r_st2, 0, 0): (r_inner.name, 0, 0)}\n layers[name_r_st2] = dsk_r_st2\n dependencies[name_r_st2] = set(r_inner.__dask_layers__())\n\n # Q: Block qr[0] (*) Q_inner\n name_q_st3 = \"dot\" + token + \"-q3\"\n dsk_q_st3 = blockwise(\n np.dot,\n name_q_st3,\n \"ij\",\n name_q_st1,\n \"ij\",\n name_q_st2,\n \"ij\",\n numblocks={name_q_st1: numblocks, name_q_st2: numblocks},\n )\n layers[name_q_st3] = dsk_q_st3\n dependencies[name_q_st3] = {name_q_st1, name_q_st2}\n # ... other code\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an.else__tsqr.if_chunks_well_defined_an.else_.dependencies_name_r_st2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_chunks_well_defined_an.else__tsqr.if_chunks_well_defined_an.else_.dependencies_name_r_st2_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 274, "end_line": 391, "span_ids": ["tsqr"], "tokens": 1380}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tsqr(data, compute_svd=False, _max_vchunk_size=None):\n\n if chunks_well_defined and meaningful_reduction_possible and can_distribute:\n # stack chunks into blocks and recurse using tsqr\n\n # Prepare to stack chunks into blocks (from block qr[1])\n # ... other code\n else:\n # Do single core computation\n\n # Stacking for in-core QR computation\n to_stack = [(name_r_st1, i, 0) for i in range(numblocks[0])]\n name_r_st1_stacked = \"stack\" + token + \"-r1\"\n dsk_r_st1_stacked = {(name_r_st1_stacked, 0, 0): (np.vstack, (tuple, to_stack))}\n layers[name_r_st1_stacked] = dsk_r_st1_stacked\n dependencies[name_r_st1_stacked] = {name_r_st1}\n\n # In-core QR computation\n name_qr_st2 = \"qr\" + token + \"-qr2\"\n dsk_qr_st2 = blockwise(\n np.linalg.qr,\n name_qr_st2,\n \"ij\",\n name_r_st1_stacked,\n \"ij\",\n numblocks={name_r_st1_stacked: (1, 1)},\n )\n layers[name_qr_st2] = dsk_qr_st2\n dependencies[name_qr_st2] = {name_r_st1_stacked}\n\n # In-core qr[0]\n name_q_st2_aux = \"getitem\" + token + \"-q2-aux\"\n dsk_q_st2_aux = {\n (name_q_st2_aux, 0, 0): (operator.getitem, (name_qr_st2, 0, 0), 0)\n }\n layers[name_q_st2_aux] = dsk_q_st2_aux\n dependencies[name_q_st2_aux] = {name_qr_st2}\n\n chucks_are_all_known = not any(np.isnan(c) for cs in data.chunks for c in cs)\n if chucks_are_all_known:\n # when chunks are all known...\n # obtain slices on q from in-core compute (e.g.: (slice(10, 20), slice(0, 5)))\n q2_block_sizes = [min(e, n) for e in data.chunks[0]]\n block_slices = [\n (slice(e[0], e[1]), slice(0, n)) for e in _cumsum_blocks(q2_block_sizes)\n ]\n dsk_q_blockslices = {}\n deps = set()\n else:\n # when chunks are not already known...\n\n # request shape information: vertical chunk sizes & column dimension (n)\n name_q2bs = \"shape\" + token + \"-q2\"\n dsk_q2_shapes = {\n (name_q2bs, i): (min, (getattr, (data.name, i, 0), \"shape\"))\n for i in range(numblocks[0])\n }\n name_n = \"getitem\" + token + \"-n\"\n dsk_n = {\n name_n: (operator.getitem, (getattr, (data.name, 0, 0), \"shape\"), 1)\n }\n\n # cumulative sums (start, end)\n name_q2cs = \"cumsum\" + token + \"-q2\"\n dsk_q2_cumsum = {(name_q2cs, 0): [0, (name_q2bs, 0)]}\n\n for i in range(1, numblocks[0]):\n dsk_q2_cumsum[(name_q2cs, i)] = (\n _cumsum_part,\n (name_q2cs, i - 1),\n (name_q2bs, i),\n )\n\n # obtain slices on q from in-core compute (e.g.: (slice(10, 20), slice(0, 5)))\n name_blockslice = \"slice\" + token + \"-q\"\n dsk_block_slices = {\n (name_blockslice, i): (\n tuple,\n [(apply, slice, (name_q2cs, i)), (slice, 0, name_n)],\n )\n for i in range(numblocks[0])\n }\n\n dsk_q_blockslices = toolz.merge(\n dsk_n, dsk_q2_shapes, dsk_q2_cumsum, dsk_block_slices\n )\n\n deps = {data.name}\n block_slices = [(name_blockslice, i) for i in range(numblocks[0])]\n\n layers[\"q-blocksizes\" + token] = dsk_q_blockslices\n dependencies[\"q-blocksizes\" + token] = deps\n\n # In-core qr[0] unstacking\n name_q_st2 = \"getitem\" + token + \"-q2\"\n dsk_q_st2 = dict(\n ((name_q_st2, i, 0), (operator.getitem, (name_q_st2_aux, 0, 0), b))\n for i, b in enumerate(block_slices)\n )\n layers[name_q_st2] = dsk_q_st2\n if chucks_are_all_known:\n dependencies[name_q_st2] = {name_q_st2_aux}\n else:\n dependencies[name_q_st2] = {name_q_st2_aux, \"q-blocksizes\" + token}\n\n # Q: Block qr[0] (*) In-core qr[0]\n name_q_st3 = \"dot\" + token + \"-q3\"\n dsk_q_st3 = blockwise(\n np.dot,\n name_q_st3,\n \"ij\",\n name_q_st1,\n \"ij\",\n name_q_st2,\n \"ij\",\n numblocks={name_q_st1: numblocks, name_q_st2: numblocks},\n )\n layers[name_q_st3] = dsk_q_st3\n dependencies[name_q_st3] = {name_q_st1, name_q_st2}\n\n # R: In-core qr[1]\n name_r_st2 = \"getitem\" + token + \"-r2\"\n dsk_r_st2 = {(name_r_st2, 0, 0): (operator.getitem, (name_qr_st2, 0, 0), 1)}\n layers[name_r_st2] = dsk_r_st2\n dependencies[name_r_st2] = {name_qr_st2}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_not_compute_svd__tsqr.if_not_compute_svd_.else_.return.u_s_vh": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_tsqr.if_not_compute_svd__tsqr.if_not_compute_svd_.else_.return.u_s_vh", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 393, "end_line": 510, "span_ids": ["tsqr"], "tokens": 1327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tsqr(data, compute_svd=False, _max_vchunk_size=None):\n # ... other code\n\n if not compute_svd:\n is_unknown_m = np.isnan(data.shape[0]) or any(\n np.isnan(c) for c in data.chunks[0]\n )\n is_unknown_n = np.isnan(data.shape[1]) or any(\n np.isnan(c) for c in data.chunks[1]\n )\n\n if is_unknown_m and is_unknown_n:\n # assumption: m >= n\n q_shape = data.shape\n q_chunks = (data.chunks[0], (np.nan,))\n r_shape = (np.nan, np.nan)\n r_chunks = ((np.nan,), (np.nan,))\n elif is_unknown_m and not is_unknown_n:\n # assumption: m >= n\n q_shape = data.shape\n q_chunks = (data.chunks[0], (n,))\n r_shape = (n, n)\n r_chunks = (n, n)\n elif not is_unknown_m and is_unknown_n:\n # assumption: m >= n\n q_shape = data.shape\n q_chunks = (data.chunks[0], (np.nan,))\n r_shape = (np.nan, np.nan)\n r_chunks = ((np.nan,), (np.nan,))\n else:\n q_shape = (\n data.shape\n if data.shape[0] >= data.shape[1]\n else (data.shape[0], data.shape[0])\n )\n q_chunks = (\n data.chunks\n if data.shape[0] >= data.shape[1]\n else (data.chunks[0], data.chunks[0])\n )\n r_shape = (n, n) if data.shape[0] >= data.shape[1] else data.shape\n r_chunks = r_shape\n\n # dsk.dependencies[name_q_st3] = {data.name}\n # dsk.dependencies[name_r_st2] = {data.name}\n graph = HighLevelGraph(layers, dependencies)\n q_meta = meta_from_array(data, len(q_shape), qq.dtype)\n r_meta = meta_from_array(data, len(r_shape), rr.dtype)\n q = Array(graph, name_q_st3, shape=q_shape, chunks=q_chunks, meta=q_meta)\n r = Array(graph, name_r_st2, shape=r_shape, chunks=r_chunks, meta=r_meta)\n return q, r\n else:\n # In-core SVD computation\n name_svd_st2 = \"svd\" + token + \"-2\"\n dsk_svd_st2 = blockwise(\n np.linalg.svd,\n name_svd_st2,\n \"ij\",\n name_r_st2,\n \"ij\",\n numblocks={name_r_st2: (1, 1)},\n )\n # svd[0]\n name_u_st2 = \"getitem\" + token + \"-u2\"\n dsk_u_st2 = {(name_u_st2, 0, 0): (operator.getitem, (name_svd_st2, 0, 0), 0)}\n # svd[1]\n name_s_st2 = \"getitem\" + token + \"-s2\"\n dsk_s_st2 = {(name_s_st2, 0): (operator.getitem, (name_svd_st2, 0, 0), 1)}\n # svd[2]\n name_v_st2 = \"getitem\" + token + \"-v2\"\n dsk_v_st2 = {(name_v_st2, 0, 0): (operator.getitem, (name_svd_st2, 0, 0), 2)}\n # Q * U\n name_u_st4 = \"getitem\" + token + \"-u4\"\n dsk_u_st4 = blockwise(\n dotmany,\n name_u_st4,\n \"ij\",\n name_q_st3,\n \"ik\",\n name_u_st2,\n \"kj\",\n numblocks={name_q_st3: numblocks, name_u_st2: (1, 1)},\n )\n\n layers[name_svd_st2] = dsk_svd_st2\n dependencies[name_svd_st2] = {name_r_st2}\n layers[name_u_st2] = dsk_u_st2\n dependencies[name_u_st2] = {name_svd_st2}\n layers[name_u_st4] = dsk_u_st4\n dependencies[name_u_st4] = {name_q_st3, name_u_st2}\n layers[name_s_st2] = dsk_s_st2\n dependencies[name_s_st2] = {name_svd_st2}\n layers[name_v_st2] = dsk_v_st2\n dependencies[name_v_st2] = {name_svd_st2}\n\n uu, ss, vvh = np.linalg.svd(np.ones(shape=(1, 1), dtype=data.dtype))\n\n k = _nanmin(m, n) # avoid RuntimeWarning with np.nanmin([m, n])\n\n m_u = m\n n_u = int(k) if not np.isnan(k) else k\n n_s = n_u\n m_vh = n_u\n n_vh = n\n d_vh = max(m_vh, n_vh) # full matrix returned: but basically n\n graph = HighLevelGraph(layers, dependencies)\n u_meta = meta_from_array(data, len((m_u, n_u)), uu.dtype)\n s_meta = meta_from_array(data, len((n_s,)), ss.dtype)\n vh_meta = meta_from_array(data, len((d_vh, d_vh)), vvh.dtype)\n u = Array(\n graph,\n name_u_st4,\n shape=(m_u, n_u),\n chunks=(data.chunks[0], (n_u,)),\n meta=u_meta,\n )\n s = Array(graph, name_s_st2, shape=(n_s,), chunks=((n_s,),), meta=s_meta)\n vh = Array(\n graph, name_v_st2, shape=(d_vh, d_vh), chunks=((n,), (n,)), meta=vh_meta\n )\n return u, s, vh", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr_sfqr.name_R_1.prefix_R_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr_sfqr.name_R_1.prefix_R_1_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 513, "end_line": 585, "span_ids": ["sfqr"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def sfqr(data, name=None):\n \"\"\"Direct Short-and-Fat QR\n\n Currently, this is a quick hack for non-tall-and-skinny matrices which\n are one chunk tall and (unless they are one chunk wide) have chunks\n that are wider than they are tall\n\n Q [R_1 R_2 ...] = [A_1 A_2 ...]\n\n it computes the factorization Q R_1 = A_1, then computes the other\n R_k's in parallel.\n\n Parameters\n ----------\n data: Array\n\n See Also\n --------\n dask.array.linalg.qr\n Main user API that uses this function\n dask.array.linalg.tsqr\n Variant for tall-and-skinny case\n \"\"\"\n nr, nc = len(data.chunks[0]), len(data.chunks[1])\n cr, cc = data.chunks[0][0], data.chunks[1][0]\n\n if not (\n (data.ndim == 2)\n and (nr == 1) # Is a matrix\n and ( # Has exactly one block row\n (cr <= cc)\n or (nc == 1) # Chunking dimension on rows is at least that on cols or...\n )\n ): # ... only one block col\n raise ValueError(\n \"Input must have the following properties:\\n\"\n \" 1. Have two dimensions\\n\"\n \" 2. Have only one row of blocks\\n\"\n \" 3. Either one column of blocks or (first) chunk size on cols\\n\"\n \" is at most that on rows (e.g.: for a 5x20 matrix,\\n\"\n \" chunks=((5), (8,4,8)) is fine, but chunks=((5), (4,8,8)) is not;\\n\"\n \" still, prefer something simple like chunks=(5,10) or chunks=5)\\n\\n\"\n \"Note: This function (sfqr) supports QR decomposition in the case\\n\"\n \"of short-and-fat matrices (single row chunk/block; see qr)\"\n )\n\n prefix = name or \"sfqr-\" + tokenize(data)\n prefix += \"_\"\n\n m, n = data.shape\n\n qq, rr = np.linalg.qr(np.ones(shape=(1, 1), dtype=data.dtype))\n\n layers = data.__dask_graph__().layers.copy()\n dependencies = data.__dask_graph__().dependencies.copy()\n\n # data = A = [A_1 A_rest]\n name_A_1 = prefix + \"A_1\"\n name_A_rest = prefix + \"A_rest\"\n layers[name_A_1] = {(name_A_1, 0, 0): (data.name, 0, 0)}\n dependencies[name_A_1] = set(data.__dask_layers__())\n layers[name_A_rest] = {\n (name_A_rest, 0, idx): (data.name, 0, 1 + idx) for idx in range(nc - 1)\n }\n if len(layers[name_A_rest]) > 0:\n dependencies[name_A_rest] = set(data.__dask_layers__())\n else:\n dependencies[name_A_rest] = set()\n\n # Q R_1 = A_1\n name_Q_R1 = prefix + \"Q_R_1\"\n name_Q = prefix + \"Q\"\n name_R_1 = prefix + \"R_1\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr.layers_name_Q_R1_nam_sfqr.return.Q_R": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_sfqr.layers_name_Q_R1_nam_sfqr.return.Q_R", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 586, "end_line": 618, "span_ids": ["sfqr"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def sfqr(data, name=None):\n # ... other code\n layers[name_Q_R1] = {(name_Q_R1, 0, 0): (np.linalg.qr, (name_A_1, 0, 0))}\n dependencies[name_Q_R1] = {name_A_1}\n\n layers[name_Q] = {(name_Q, 0, 0): (operator.getitem, (name_Q_R1, 0, 0), 0)}\n dependencies[name_Q] = {name_Q_R1}\n\n layers[name_R_1] = {(name_R_1, 0, 0): (operator.getitem, (name_Q_R1, 0, 0), 1)}\n dependencies[name_R_1] = {name_Q_R1}\n\n graph = HighLevelGraph(layers, dependencies)\n\n Q_meta = meta_from_array(data, len((m, min(m, n))), dtype=qq.dtype)\n R_1_meta = meta_from_array(data, len((min(m, n), cc)), dtype=rr.dtype)\n Q = Array(graph, name_Q, shape=(m, min(m, n)), chunks=(m, min(m, n)), meta=Q_meta)\n R_1 = Array(graph, name_R_1, shape=(min(m, n), cc), chunks=(cr, cc), meta=R_1_meta)\n\n # R = [R_1 Q'A_rest]\n Rs = [R_1]\n\n if nc > 1:\n A_rest_meta = meta_from_array(data, len((min(m, n), n - cc)), dtype=rr.dtype)\n A_rest = Array(\n graph,\n name_A_rest,\n shape=(min(m, n), n - cc),\n chunks=(cr, data.chunks[1][1:]),\n meta=A_rest_meta,\n )\n Rs.append(Q.T.dot(A_rest))\n\n R = concatenate(Rs, axis=1)\n\n return Q, R", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_level_compression_level.return.min_max_min_subspace_size": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_level_compression_level.return.min_max_min_subspace_size", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 621, "end_line": 637, "span_ids": ["compression_level"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compression_level(n, q, oversampling=10, min_subspace_size=20):\n \"\"\"Compression level to use in svd_compressed\n\n Given the size ``n`` of a space, compress that that to one of size\n ``q`` plus oversampling.\n\n The oversampling allows for greater flexibility in finding an\n appropriate subspace, a low value is often enough (10 is already a\n very conservative choice, it can be further reduced).\n ``q + oversampling`` should not be larger than ``n``. In this\n specific implementation, ``q + oversampling`` is at least\n ``min_subspace_size``.\n\n >>> compression_level(100, 10)\n 20\n \"\"\"\n return min(max(min_subspace_size, q + oversampling), n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_matrix_compression_matrix.return.q_T": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_compression_matrix_compression_matrix.return.q_T", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 640, "end_line": 692, "span_ids": ["compression_matrix"], "tokens": 447}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compression_matrix(data, q, n_power_iter=0, seed=None, compute=False):\n \"\"\"Randomly sample matrix to find most active subspace\n\n This compression matrix returned by this algorithm can be used to\n compute both the QR decomposition and the Singular Value\n Decomposition.\n\n Parameters\n ----------\n data: Array\n q: int\n Size of the desired subspace (the actual size will be bigger,\n because of oversampling, see ``da.linalg.compression_level``)\n n_power_iter: int\n number of power iterations, useful when the singular values of\n the input matrix decay very slowly.\n compute : bool\n Whether or not to compute data at each use.\n Recomputing the input while performing several passes reduces memory\n pressure, but means that we have to compute the input multiple times.\n This is a good choice if the data is larger than memory and cheap to\n recreate.\n\n References\n ----------\n N. Halko, P. G. Martinsson, and J. A. Tropp.\n Finding structure with randomness: Probabilistic algorithms for\n constructing approximate matrix decompositions.\n SIAM Rev., Survey and Review section, Vol. 53, num. 2,\n pp. 217-288, June 2011\n https://arxiv.org/abs/0909.4061\n \"\"\"\n m, n = data.shape\n comp_level = compression_level(min(m, n), q)\n if isinstance(seed, RandomState):\n state = seed\n else:\n state = RandomState(seed)\n omega = state.standard_normal(\n size=(n, comp_level), chunks=(data.chunks[1], (comp_level,))\n )\n mat_h = data.dot(omega)\n for j in range(n_power_iter):\n if compute:\n mat_h = mat_h.persist()\n wait(mat_h)\n tmp = data.T.dot(mat_h)\n if compute:\n tmp = tmp.persist()\n wait(tmp)\n mat_h = data.dot(tmp)\n q, _ = tsqr(mat_h)\n return q.T", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_compressed_svd_compressed.return.u_s_v": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_compressed_svd_compressed.return.u_s_v", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 695, "end_line": 758, "span_ids": ["svd_compressed"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svd_compressed(a, k, n_power_iter=0, seed=None, compute=False, coerce_signs=True):\n \"\"\"Randomly compressed rank-k thin Singular Value Decomposition.\n\n This computes the approximate singular value decomposition of a large\n array. This algorithm is generally faster than the normal algorithm\n but does not provide exact results. One can balance between\n performance and accuracy with input parameters (see below).\n\n Parameters\n ----------\n a: Array\n Input array\n k: int\n Rank of the desired thin SVD decomposition.\n n_power_iter: int\n Number of power iterations, useful when the singular values\n decay slowly. Error decreases exponentially as n_power_iter\n increases. In practice, set n_power_iter <= 4.\n compute : bool\n Whether or not to compute data at each use.\n Recomputing the input while performing several passes reduces memory\n pressure, but means that we have to compute the input multiple times.\n This is a good choice if the data is larger than memory and cheap to\n recreate.\n coerce_signs : bool\n Whether or not to apply sign coercion to singular vectors in\n order to maintain deterministic results, by default True.\n\n\n Examples\n --------\n >>> u, s, vt = svd_compressed(x, 20) # doctest: +SKIP\n\n Returns\n -------\n u: Array, unitary / orthogonal\n s: Array, singular values in decreasing order (largest first)\n v: Array, unitary / orthogonal\n\n References\n ----------\n N. Halko, P. G. Martinsson, and J. A. Tropp.\n Finding structure with randomness: Probabilistic algorithms for\n constructing approximate matrix decompositions.\n SIAM Rev., Survey and Review section, Vol. 53, num. 2,\n pp. 217-288, June 2011\n https://arxiv.org/abs/0909.4061\n \"\"\"\n comp = compression_matrix(\n a, k, n_power_iter=n_power_iter, seed=seed, compute=compute\n )\n if compute:\n comp = comp.persist()\n wait(comp)\n a_compressed = comp.dot(a)\n v, s, u = tsqr(a_compressed.T, compute_svd=True)\n u = comp.T.dot(u)\n v = v.T\n u = u[:, :k]\n s = s[:k]\n v = v[:k, :]\n if coerce_signs:\n u, v = svd_flip(u, v)\n return u, s, v", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_qr_qr.if_len_a_chunks_1_1_.else_.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_qr_qr.if_len_a_chunks_1_1_.else_.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 761, "end_line": 797, "span_ids": ["qr"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def qr(a):\n \"\"\"\n Compute the qr factorization of a matrix.\n\n Parameters\n ----------\n a : Array\n\n Returns\n -------\n q: Array, orthonormal\n r: Array, upper-triangular\n\n Examples\n --------\n >>> q, r = da.linalg.qr(x) # doctest: +SKIP\n\n See Also\n --------\n numpy.linalg.qr: Equivalent NumPy Operation\n dask.array.linalg.tsqr: Implementation for tall-and-skinny arrays\n dask.array.linalg.sfqr: Implementation for short-and-fat arrays\n \"\"\"\n\n if len(a.chunks[1]) == 1 and len(a.chunks[0]) > 1:\n return tsqr(a)\n elif len(a.chunks[0]) == 1:\n return sfqr(a)\n else:\n raise NotImplementedError(\n \"qr currently supports only tall-and-skinny (single column chunk/block; see tsqr)\\n\"\n \"and short-and-fat (single row chunk/block; see sfqr) matrices\\n\\n\"\n \"Consider use of the rechunk method. For example,\\n\\n\"\n \"x.rechunk({0: -1, 1: 'auto'}) or x.rechunk({0: 'auto', 1: -1})\\n\\n\"\n \"which rechunk one shorter axis to a single chunk, while allowing\\n\"\n \"the other axis to automatically grow/shrink appropriately.\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_svd._Single_chunk_case": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd_svd._Single_chunk_case", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 800, "end_line": 860, "span_ids": ["svd"], "tokens": 533}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svd(a, coerce_signs=True):\n \"\"\"\n Compute the singular value decomposition of a matrix.\n\n Parameters\n ----------\n a : (M, N) Array\n coerce_signs : bool\n Whether or not to apply sign coercion to singular vectors in\n order to maintain deterministic results, by default True.\n\n Examples\n --------\n\n >>> u, s, v = da.linalg.svd(x) # doctest: +SKIP\n\n Returns\n -------\n\n u : (M, K) Array, unitary / orthogonal\n Left-singular vectors of `a` (in columns) with shape (M, K)\n where K = min(M, N).\n s : (K,) Array, singular values in decreasing order (largest first)\n Singular values of `a`.\n v : (K, N) Array, unitary / orthogonal\n Right-singular vectors of `a` (in rows) with shape (K, N)\n where K = min(M, N).\n\n Warnings\n --------\n\n SVD is only supported for arrays with chunking in one dimension.\n This requires that all inputs either contain a single column\n of chunks (tall-and-skinny) or a single row of chunks (short-and-fat).\n For arrays with chunking in both dimensions, see da.linalg.svd_compressed.\n\n See Also\n --------\n\n np.linalg.svd : Equivalent NumPy Operation\n da.linalg.svd_compressed : Randomized SVD for fully chunked arrays\n dask.array.linalg.tsqr : QR factorization for tall-and-skinny arrays\n dask.array.utils.svd_flip : Sign normalization for singular vectors\n \"\"\"\n nb = a.numblocks\n if a.ndim != 2:\n raise ValueError(\n \"Array must be 2D.\\n\"\n \"Input shape: {}\\n\"\n \"Input ndim: {}\\n\".format(a.shape, a.ndim)\n )\n if nb[0] > 1 and nb[1] > 1:\n raise NotImplementedError(\n \"Array must be chunked in one dimension only. \"\n \"This function (svd) only supports tall-and-skinny or short-and-fat \"\n \"matrices (see da.linalg.svd_compressed for SVD on fully chunked arrays).\\n\"\n \"Input shape: {}\\n\"\n \"Input numblocks: {}\\n\".format(a.shape, nb)\n )\n\n # Single-chunk case\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd.if_nb_0_nb_1_1___solve_triangular_lower.return.scipy_linalg_solve_triang": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_svd.if_nb_0_nb_1_1___solve_triangular_lower.return.scipy_linalg_solve_triang", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 861, "end_line": 894, "span_ids": ["svd", "_solve_triangular_lower"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svd(a, coerce_signs=True):\n # ... other code\n if nb[0] == nb[1] == 1:\n m, n = a.shape\n k = min(a.shape)\n mu, ms, mv = np.linalg.svd(ones_like_safe(a._meta, shape=(1, 1)))\n u, s, v = delayed(np.linalg.svd, nout=3)(a, full_matrices=False)\n u = from_delayed(u, shape=(m, k), dtype=mu.dtype)\n s = from_delayed(s, shape=(k,), dtype=ms.dtype)\n v = from_delayed(v, shape=(k, n), dtype=mv.dtype)\n # Multi-chunk cases\n else:\n # Tall-and-skinny case\n if nb[0] > nb[1]:\n u, s, v = tsqr(a, compute_svd=True)\n truncate = a.shape[0] < a.shape[1]\n # Short-and-fat case\n else:\n vt, s, ut = tsqr(a.T, compute_svd=True)\n u, s, v = ut.T, s, vt.T\n truncate = a.shape[0] > a.shape[1]\n # Only when necessary, remove extra singular vectors if array\n # has shape that contradicts chunking, e.g. the array is a\n # column of chunks but still has more columns than rows overall\n if truncate:\n k = min(a.shape)\n u, v = u[:, :k], v[:k, :]\n if coerce_signs:\n u, v = svd_flip(u, v)\n return u, s, v\n\n\ndef _solve_triangular_lower(a, b):\n import scipy.linalg\n\n return scipy.linalg.solve_triangular(a, b, lower=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu_lu.dsk._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu_lu.dsk._", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 897, "end_line": 946, "span_ids": ["lu"], "tokens": 367}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def lu(a):\n \"\"\"\n Compute the lu decomposition of a matrix.\n\n Examples\n --------\n\n >>> p, l, u = da.linalg.lu(x) # doctest: +SKIP\n\n Returns\n -------\n\n p: Array, permutation matrix\n l: Array, lower triangular matrix with unit diagonal.\n u: Array, upper triangular matrix\n \"\"\"\n\n import scipy.linalg\n\n if a.ndim != 2:\n raise ValueError(\"Dimension must be 2 to perform lu decomposition\")\n\n xdim, ydim = a.shape\n if xdim != ydim:\n raise ValueError(\"Input must be a square matrix to perform lu decomposition\")\n if not len(set(a.chunks[0] + a.chunks[1])) == 1:\n msg = (\n \"All chunks must be a square matrix to perform lu decomposition. \"\n \"Use .rechunk method to change the size of chunks.\"\n )\n raise ValueError(msg)\n\n vdim = len(a.chunks[0])\n hdim = len(a.chunks[1])\n\n token = tokenize(a)\n name_lu = \"lu-lu-\" + token\n\n name_p = \"lu-p-\" + token\n name_l = \"lu-l-\" + token\n name_u = \"lu-u-\" + token\n\n # for internal calculation\n name_p_inv = \"lu-p-inv-\" + token\n name_l_permuted = \"lu-l-permute-\" + token\n name_u_transposed = \"lu-u-transpose-\" + token\n name_plu_dot = \"lu-plu-dot-\" + token\n name_lu_dot = \"lu-lu-dot-\" + token\n\n dsk = {}\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.for_i_in_range_min_vdim__lu.for_i_in_range_min_vdim_.for_k_in_range_i_1_vdi.dsk_name_lu_k_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.for_i_in_range_min_vdim__lu.for_i_in_range_min_vdim_.for_k_in_range_i_1_vdi.dsk_name_lu_k_i_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 947, "end_line": 989, "span_ids": ["lu"], "tokens": 487}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def lu(a):\n # ... other code\n for i in range(min(vdim, hdim)):\n target = (a.name, i, i)\n if i > 0:\n prevs = []\n for p in range(i):\n prev = name_plu_dot, i, p, p, i\n dsk[prev] = (np.dot, (name_l_permuted, i, p), (name_u, p, i))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n # diagonal block\n dsk[name_lu, i, i] = (scipy.linalg.lu, target)\n\n # sweep to horizontal\n for j in range(i + 1, hdim):\n target = (np.dot, (name_p_inv, i, i), (a.name, i, j))\n if i > 0:\n prevs = []\n for p in range(i):\n prev = name_lu_dot, i, p, p, j\n dsk[prev] = (np.dot, (name_l, i, p), (name_u, p, j))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n dsk[name_lu, i, j] = (_solve_triangular_lower, (name_l, i, i), target)\n\n # sweep to vertical\n for k in range(i + 1, vdim):\n target = (a.name, k, i)\n if i > 0:\n prevs = []\n for p in range(i):\n prev = name_plu_dot, k, p, p, i\n dsk[prev] = (np.dot, (name_l_permuted, k, p), (name_u, p, i))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n # solving x.dot(u) = target is equal to u.T.dot(x.T) = target.T\n dsk[name_lu, k, i] = (\n np.transpose,\n (\n _solve_triangular_lower,\n (name_u_transposed, i, i),\n (np.transpose, target),\n ),\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.None_4_lu.return.p_l_u": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_lu.None_4_lu.return.p_l_u", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 991, "end_line": 1031, "span_ids": ["lu"], "tokens": 692}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def lu(a):\n # ... other code\n\n for i in range(min(vdim, hdim)):\n for j in range(min(vdim, hdim)):\n if i == j:\n dsk[name_p, i, j] = (operator.getitem, (name_lu, i, j), 0)\n dsk[name_l, i, j] = (operator.getitem, (name_lu, i, j), 1)\n dsk[name_u, i, j] = (operator.getitem, (name_lu, i, j), 2)\n\n # permuted l is required to be propagated to i > j blocks\n dsk[name_l_permuted, i, j] = (np.dot, (name_p, i, j), (name_l, i, j))\n dsk[name_u_transposed, i, j] = (np.transpose, (name_u, i, j))\n # transposed permutation matrix is equal to its inverse\n dsk[name_p_inv, i, j] = (np.transpose, (name_p, i, j))\n elif i > j:\n dsk[name_p, i, j] = (np.zeros, (a.chunks[0][i], a.chunks[1][j]))\n # calculations are performed using permuted l,\n # thus the result should be reverted by inverted (=transposed) p\n # to have the same row order as diagonal blocks\n dsk[name_l, i, j] = (np.dot, (name_p_inv, i, i), (name_lu, i, j))\n dsk[name_u, i, j] = (np.zeros, (a.chunks[0][i], a.chunks[1][j]))\n dsk[name_l_permuted, i, j] = (name_lu, i, j)\n else:\n dsk[name_p, i, j] = (np.zeros, (a.chunks[0][i], a.chunks[1][j]))\n dsk[name_l, i, j] = (np.zeros, (a.chunks[0][i], a.chunks[1][j]))\n dsk[name_u, i, j] = (name_lu, i, j)\n # l_permuted is not referred in upper triangulars\n\n pp, ll, uu = scipy.linalg.lu(np.ones(shape=(1, 1), dtype=a.dtype))\n pp_meta = meta_from_array(a, dtype=pp.dtype)\n ll_meta = meta_from_array(a, dtype=ll.dtype)\n uu_meta = meta_from_array(a, dtype=uu.dtype)\n\n graph = HighLevelGraph.from_collections(name_p, dsk, dependencies=[a])\n p = Array(graph, name_p, shape=a.shape, chunks=a.chunks, meta=pp_meta)\n\n graph = HighLevelGraph.from_collections(name_l, dsk, dependencies=[a])\n l = Array(graph, name_l, shape=a.shape, chunks=a.chunks, meta=ll_meta)\n\n graph = HighLevelGraph.from_collections(name_u, dsk, dependencies=[a])\n u = Array(graph, name_u, shape=a.shape, chunks=a.chunks, meta=uu_meta)\n\n return p, l, u", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_triangular_solve_triangular.return.Array_graph_name_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_triangular_solve_triangular.return.Array_graph_name_shape_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1034, "end_line": 1126, "span_ids": ["solve_triangular"], "tokens": 841}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def solve_triangular(a, b, lower=False):\n \"\"\"\n Solve the equation `a x = b` for `x`, assuming a is a triangular matrix.\n\n Parameters\n ----------\n a : (M, M) array_like\n A triangular matrix\n b : (M,) or (M, N) array_like\n Right-hand side matrix in `a x = b`\n lower : bool, optional\n Use only data contained in the lower triangle of `a`.\n Default is to use upper triangle.\n\n Returns\n -------\n x : (M,) or (M, N) array\n Solution to the system `a x = b`. Shape of return matches `b`.\n \"\"\"\n\n import scipy.linalg\n\n if a.ndim != 2:\n raise ValueError(\"a must be 2 dimensional\")\n if b.ndim <= 2:\n if a.shape[1] != b.shape[0]:\n raise ValueError(\"a.shape[1] and b.shape[0] must be equal\")\n if a.chunks[1] != b.chunks[0]:\n msg = (\n \"a.chunks[1] and b.chunks[0] must be equal. \"\n \"Use .rechunk method to change the size of chunks.\"\n )\n raise ValueError(msg)\n else:\n raise ValueError(\"b must be 1 or 2 dimensional\")\n\n vchunks = len(a.chunks[1])\n hchunks = 1 if b.ndim == 1 else len(b.chunks[1])\n token = tokenize(a, b, lower)\n name = \"solve-triangular-\" + token\n\n # for internal calculation\n # (name, i, j, k, l) corresponds to a_ij.dot(b_kl)\n name_mdot = \"solve-tri-dot-\" + token\n\n def _b_init(i, j):\n if b.ndim == 1:\n return b.name, i\n else:\n return b.name, i, j\n\n def _key(i, j):\n if b.ndim == 1:\n return name, i\n else:\n return name, i, j\n\n dsk = {}\n if lower:\n for i in range(vchunks):\n for j in range(hchunks):\n target = _b_init(i, j)\n if i > 0:\n prevs = []\n for k in range(i):\n prev = name_mdot, i, k, k, j\n dsk[prev] = (np.dot, (a.name, i, k), _key(k, j))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n dsk[_key(i, j)] = (_solve_triangular_lower, (a.name, i, i), target)\n else:\n for i in range(vchunks):\n for j in range(hchunks):\n target = _b_init(i, j)\n if i < vchunks - 1:\n prevs = []\n for k in range(i + 1, vchunks):\n prev = name_mdot, i, k, k, j\n dsk[prev] = (np.dot, (a.name, i, k), _key(k, j))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n dsk[_key(i, j)] = (\n scipy.linalg.solve_triangular,\n (a.name, i, i),\n target,\n )\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[a, b])\n res = _solve_triangular_lower(\n np.array([[1, 0], [1, 2]], dtype=a.dtype), np.array([0, 1], dtype=b.dtype)\n )\n meta = meta_from_array(a, b.ndim, dtype=res.dtype)\n return Array(graph, name, shape=b.shape, chunks=b.chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_solve.return.solve_triangular_u_uy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_solve_solve.return.solve_triangular_u_uy_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1129, "end_line": 1157, "span_ids": ["solve"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def solve(a, b, sym_pos=False):\n \"\"\"\n Solve the equation ``a x = b`` for ``x``. By default, use LU\n decomposition and forward / backward substitutions. When ``sym_pos`` is\n ``True``, use Cholesky decomposition.\n\n Parameters\n ----------\n a : (M, M) array_like\n A square matrix.\n b : (M,) or (M, N) array_like\n Right-hand side matrix in ``a x = b``.\n sym_pos : bool\n Assume a is symmetric and positive definite. If ``True``, use Cholesky\n decomposition.\n\n Returns\n -------\n x : (M,) or (M, N) Array\n Solution to the system ``a x = b``. Shape of the return matches the\n shape of `b`.\n \"\"\"\n if sym_pos:\n l, u = _cholesky(a)\n else:\n p, l, u = lu(a)\n b = p.T.dot(b)\n uy = solve_triangular(l, b, lower=True)\n return solve_triangular(u, uy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_inv__cholesky_lower.return.scipy_linalg_cholesky_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_inv__cholesky_lower.return.scipy_linalg_cholesky_a_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1160, "end_line": 1181, "span_ids": ["_cholesky_lower", "inv"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def inv(a):\n \"\"\"\n Compute the inverse of a matrix with LU decomposition and\n forward / backward substitutions.\n\n Parameters\n ----------\n a : array_like\n Square matrix to be inverted.\n\n Returns\n -------\n ainv : Array\n Inverse of the matrix `a`.\n \"\"\"\n return solve(a, eye(a.shape[0], chunks=a.chunks[0][0]))\n\n\ndef _cholesky_lower(a):\n import scipy.linalg\n\n return scipy.linalg.cholesky(a, lower=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_cholesky_cholesky.if_lower_.else_.return.u": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_cholesky_cholesky.if_lower_.else_.return.u", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1184, "end_line": 1207, "span_ids": ["cholesky"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def cholesky(a, lower=False):\n \"\"\"\n Returns the Cholesky decomposition, :math:`A = L L^*` or\n :math:`A = U^* U` of a Hermitian positive-definite matrix A.\n\n Parameters\n ----------\n a : (M, M) array_like\n Matrix to be decomposed\n lower : bool, optional\n Whether to compute the upper or lower triangular Cholesky\n factorization. Default is upper-triangular.\n\n Returns\n -------\n c : (M, M) Array\n Upper- or lower-triangular Cholesky factor of `a`.\n \"\"\"\n\n l, u = _cholesky(a)\n if lower:\n return l\n else:\n return u", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__cholesky__cholesky.return.lower_upper": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__cholesky__cholesky.return.lower_upper", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1210, "end_line": 1285, "span_ids": ["_cholesky"], "tokens": 855}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _cholesky(a):\n \"\"\"\n Private function to perform Cholesky decomposition, which returns both\n lower and upper triangulars.\n \"\"\"\n import scipy.linalg\n\n if a.ndim != 2:\n raise ValueError(\"Dimension must be 2 to perform cholesky decomposition\")\n\n xdim, ydim = a.shape\n if xdim != ydim:\n raise ValueError(\n \"Input must be a square matrix to perform cholesky decomposition\"\n )\n if not len(set(a.chunks[0] + a.chunks[1])) == 1:\n msg = (\n \"All chunks must be a square matrix to perform cholesky decomposition. \"\n \"Use .rechunk method to change the size of chunks.\"\n )\n raise ValueError(msg)\n\n vdim = len(a.chunks[0])\n hdim = len(a.chunks[1])\n\n token = tokenize(a)\n name = \"cholesky-\" + token\n\n # (name_lt_dot, i, j, k, l) corresponds to l_ij.dot(l_kl.T)\n name_lt_dot = \"cholesky-lt-dot-\" + token\n # because transposed results are needed for calculation,\n # we can build graph for upper triangular simultaneously\n name_upper = \"cholesky-upper-\" + token\n\n # calculates lower triangulars because subscriptions get simpler\n dsk = {}\n for i in range(vdim):\n for j in range(hdim):\n if i < j:\n dsk[name, i, j] = (np.zeros, (a.chunks[0][i], a.chunks[1][j]))\n dsk[name_upper, j, i] = (name, i, j)\n elif i == j:\n target = (a.name, i, j)\n if i > 0:\n prevs = []\n for p in range(i):\n prev = name_lt_dot, i, p, i, p\n dsk[prev] = (np.dot, (name, i, p), (name_upper, p, i))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n dsk[name, i, i] = (_cholesky_lower, target)\n dsk[name_upper, i, i] = (np.transpose, (name, i, i))\n else:\n # solving x.dot(L11.T) = (A21 - L20.dot(L10.T)) is equal to\n # L11.dot(x.T) = A21.T - L10.dot(L20.T)\n # L11.dot(x.T) = A12 - L10.dot(L02)\n target = (a.name, j, i)\n if j > 0:\n prevs = []\n for p in range(j):\n prev = name_lt_dot, j, p, i, p\n dsk[prev] = (np.dot, (name, j, p), (name_upper, p, i))\n prevs.append(prev)\n target = (operator.sub, target, (sum, prevs))\n dsk[name_upper, j, i] = (_solve_triangular_lower, (name, j, j), target)\n dsk[name, i, j] = (np.transpose, (name_upper, j, i))\n\n graph_upper = HighLevelGraph.from_collections(name_upper, dsk, dependencies=[a])\n graph_lower = HighLevelGraph.from_collections(name, dsk, dependencies=[a])\n cho = scipy.linalg.cholesky(np.array([[1, 2], [2, 5]], dtype=a.dtype))\n meta = meta_from_array(a, dtype=cho.dtype)\n\n lower = Array(graph_lower, name, shape=a.shape, chunks=a.chunks, meta=meta)\n # do not use .T, because part of transposed blocks are already calculated\n upper = Array(graph_upper, name_upper, shape=a.shape, chunks=a.chunks, meta=meta)\n return lower, upper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__sort_decreasing_lstsq.return.x_residuals_rank_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py__sort_decreasing_lstsq.return.x_residuals_rank_s", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1288, "end_line": 1360, "span_ids": ["lstsq", "_sort_decreasing"], "tokens": 682}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _sort_decreasing(x):\n x[::-1].sort()\n return x\n\n\ndef lstsq(a, b):\n \"\"\"\n Return the least-squares solution to a linear matrix equation using\n QR decomposition.\n\n Solves the equation `a x = b` by computing a vector `x` that\n minimizes the Euclidean 2-norm `|| b - a x ||^2`. The equation may\n be under-, well-, or over- determined (i.e., the number of\n linearly independent rows of `a` can be less than, equal to, or\n greater than its number of linearly independent columns). If `a`\n is square and of full rank, then `x` (but for round-off error) is\n the \"exact\" solution of the equation.\n\n Parameters\n ----------\n a : (M, N) array_like\n \"Coefficient\" matrix.\n b : (M,) array_like\n Ordinate or \"dependent variable\" values.\n\n Returns\n -------\n x : (N,) Array\n Least-squares solution. If `b` is two-dimensional,\n the solutions are in the `K` columns of `x`.\n residuals : (1,) Array\n Sums of residuals; squared Euclidean 2-norm for each column in\n ``b - a*x``.\n rank : Array\n Rank of matrix `a`.\n s : (min(M, N),) Array\n Singular values of `a`.\n \"\"\"\n q, r = qr(a)\n x = solve_triangular(r, q.T.dot(b))\n residuals = b - a.dot(x)\n residuals = (residuals ** 2).sum(keepdims=True)\n\n token = tokenize(a, b)\n\n # r must be a triangular with single block\n\n # rank\n rname = \"lstsq-rank-\" + token\n rdsk = {(rname,): (np.linalg.matrix_rank, (r.name, 0, 0))}\n graph = HighLevelGraph.from_collections(rname, rdsk, dependencies=[r])\n # rank must be an integer\n rank = Array(graph, rname, shape=(), chunks=(), dtype=int)\n\n # singular\n sname = \"lstsq-singular-\" + token\n rt = r.T\n sdsk = {\n (sname, 0): (\n _sort_decreasing,\n (np.sqrt, (np.linalg.eigvals, (np.dot, (rt.name, 0, 0), (r.name, 0, 0)))),\n )\n }\n graph = HighLevelGraph.from_collections(sname, sdsk, dependencies=[rt, r])\n _, _, _, ss = np.linalg.lstsq(\n np.array([[1, 0], [1, 2]], dtype=a.dtype),\n np.array([0, 1], dtype=b.dtype),\n rcond=-1,\n )\n meta = meta_from_array(r, 1, dtype=ss.dtype)\n s = Array(graph, sname, shape=(r.shape[0],), chunks=r.shape[0], meta=meta)\n\n return x, residuals, rank, s", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_norm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/linalg.py_norm_", "embedding": null, "metadata": {"file_path": "dask/array/linalg.py", "file_name": "linalg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1363, "end_line": 1440, "span_ids": ["norm"], "tokens": 763}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np.linalg)\ndef norm(x, ord=None, axis=None, keepdims=False):\n if axis is None:\n axis = tuple(range(x.ndim))\n elif isinstance(axis, Number):\n axis = (int(axis),)\n else:\n axis = tuple(axis)\n\n if len(axis) > 2:\n raise ValueError(\"Improper number of dimensions to norm.\")\n\n if ord == \"fro\":\n ord = None\n if len(axis) == 1:\n raise ValueError(\"Invalid norm order for vectors.\")\n\n # Coerce to double precision.\n r = x.astype(np.promote_types(x.dtype, float))\n\n if ord is None:\n r = (abs(r) ** 2).sum(axis=axis, keepdims=keepdims) ** 0.5\n elif ord == \"nuc\":\n if len(axis) == 1:\n raise ValueError(\"Invalid norm order for vectors.\")\n if x.ndim > 2:\n raise NotImplementedError(\"SVD based norm not implemented for ndim > 2\")\n\n r = svd(x)[1][None].sum(keepdims=keepdims)\n elif ord == np.inf:\n r = abs(r)\n if len(axis) == 1:\n r = r.max(axis=axis, keepdims=keepdims)\n else:\n r = r.sum(axis=axis[1], keepdims=True).max(axis=axis[0], keepdims=True)\n if keepdims is False:\n r = r.squeeze(axis=axis)\n elif ord == -np.inf:\n r = abs(r)\n if len(axis) == 1:\n r = r.min(axis=axis, keepdims=keepdims)\n else:\n r = r.sum(axis=axis[1], keepdims=True).min(axis=axis[0], keepdims=True)\n if keepdims is False:\n r = r.squeeze(axis=axis)\n elif ord == 0:\n if len(axis) == 2:\n raise ValueError(\"Invalid norm order for matrices.\")\n\n r = (r != 0).astype(r.dtype).sum(axis=axis, keepdims=keepdims)\n elif ord == 1:\n r = abs(r)\n if len(axis) == 1:\n r = r.sum(axis=axis, keepdims=keepdims)\n else:\n r = r.sum(axis=axis[0], keepdims=True).max(axis=axis[1], keepdims=True)\n if keepdims is False:\n r = r.squeeze(axis=axis)\n elif len(axis) == 2 and ord == -1:\n r = abs(r).sum(axis=axis[0], keepdims=True).min(axis=axis[1], keepdims=True)\n if keepdims is False:\n r = r.squeeze(axis=axis)\n elif len(axis) == 2 and ord == 2:\n if x.ndim > 2:\n raise NotImplementedError(\"SVD based norm not implemented for ndim > 2\")\n r = svd(x)[1][None].max(keepdims=keepdims)\n elif len(axis) == 2 and ord == -2:\n if x.ndim > 2:\n raise NotImplementedError(\"SVD based norm not implemented for ndim > 2\")\n r = svd(x)[1][None].min(keepdims=keepdims)\n else:\n if len(axis) == 2:\n raise ValueError(\"Invalid norm order for matrices.\")\n\n r = (abs(r) ** ord).sum(axis=axis, keepdims=keepdims) ** (1.0 / ord)\n\n return r", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_from_functools_import_wra_normalize_masked_array.return._data_mask_fill_value_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_from_functools_import_wra_normalize_masked_array.return._data_mask_fill_value_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["imports", "normalize_masked_array"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import wraps\n\nimport numpy as np\n\nfrom ..base import normalize_token\nfrom .core import (\n concatenate_lookup,\n tensordot_lookup,\n map_blocks,\n asanyarray,\n blockwise,\n)\nfrom .routines import _average\nfrom ..utils import derived_from\n\n\n@normalize_token.register(np.ma.masked_array)\ndef normalize_masked_array(x):\n data = normalize_token(x.data)\n mask = normalize_token(x.mask)\n fill_value = normalize_token(x.fill_value)\n return (data, mask, fill_value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__concatenate__concatenate.return.out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__concatenate__concatenate.return.out", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 38, "span_ids": ["_concatenate"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@concatenate_lookup.register(np.ma.masked_array)\ndef _concatenate(arrays, axis=0):\n out = np.ma.concatenate(arrays, axis=axis)\n fill_values = [i.fill_value for i in arrays if hasattr(i, \"fill_value\")]\n if any(isinstance(f, np.ndarray) for f in fill_values):\n raise ValueError(\n \"Dask doesn't support masked array's with non-scalar `fill_value`s\"\n )\n if fill_values:\n # If all the fill_values are the same copy over the fill value\n fill_values = np.unique(fill_values)\n if len(fill_values) == 1:\n out.fill_value = fill_values[0]\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__tensordot__tensordot.return.res_reshape_olda_oldb_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__tensordot__tensordot.return.res_reshape_olda_oldb_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 106, "span_ids": ["_tensordot"], "tokens": 549}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@tensordot_lookup.register(np.ma.masked_array)\ndef _tensordot(a, b, axes=2):\n # Much of this is stolen from numpy/core/numeric.py::tensordot\n try:\n iter(axes)\n except TypeError:\n axes_a = list(range(-axes, 0))\n axes_b = list(range(0, axes))\n else:\n axes_a, axes_b = axes\n try:\n na = len(axes_a)\n axes_a = list(axes_a)\n except TypeError:\n axes_a = [axes_a]\n na = 1\n try:\n nb = len(axes_b)\n axes_b = list(axes_b)\n except TypeError:\n axes_b = [axes_b]\n nb = 1\n\n # a, b = asarray(a), asarray(b) # <--- modified\n as_ = a.shape\n nda = a.ndim\n bs = b.shape\n ndb = b.ndim\n equal = True\n if na != nb:\n equal = False\n else:\n for k in range(na):\n if as_[axes_a[k]] != bs[axes_b[k]]:\n equal = False\n break\n if axes_a[k] < 0:\n axes_a[k] += nda\n if axes_b[k] < 0:\n axes_b[k] += ndb\n if not equal:\n raise ValueError(\"shape-mismatch for sum\")\n\n # Move the axes to sum over to the end of \"a\"\n # and to the front of \"b\"\n notin = [k for k in range(nda) if k not in axes_a]\n newaxes_a = notin + axes_a\n N2 = 1\n for axis in axes_a:\n N2 *= as_[axis]\n newshape_a = (-1, N2)\n olda = [as_[axis] for axis in notin]\n\n notin = [k for k in range(ndb) if k not in axes_b]\n newaxes_b = axes_b + notin\n N2 = 1\n for axis in axes_b:\n N2 *= bs[axis]\n newshape_b = (N2, -1)\n oldb = [bs[axis] for axis in notin]\n\n at = a.transpose(newaxes_a).reshape(newshape_a)\n bt = b.transpose(newaxes_b).reshape(newshape_b)\n res = np.ma.dot(at, bt)\n return res.reshape(olda + oldb)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_filled_masked_outside.return.x_map_blocks_np_ma_masked": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_filled_masked_outside.return.x_map_blocks_np_ma_masked", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 158, "span_ids": ["impl", "masked_equal", "_wrap_masked", "masked_inside", "masked_outside", "filled", "masked_invalid"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np.ma)\ndef filled(a, fill_value=None):\n a = asanyarray(a)\n return a.map_blocks(np.ma.filled, fill_value=fill_value)\n\n\ndef _wrap_masked(f):\n @wraps(f)\n def _(a, value):\n a = asanyarray(a)\n value = asanyarray(value)\n ainds = tuple(range(a.ndim))[::-1]\n vinds = tuple(range(value.ndim))[::-1]\n oinds = max(ainds, vinds, key=len)\n return blockwise(f, oinds, a, ainds, value, vinds, dtype=a.dtype)\n\n return _\n\n\nmasked_greater = _wrap_masked(np.ma.masked_greater)\nmasked_greater_equal = _wrap_masked(np.ma.masked_greater_equal)\nmasked_less = _wrap_masked(np.ma.masked_less)\nmasked_less_equal = _wrap_masked(np.ma.masked_less_equal)\nmasked_not_equal = _wrap_masked(np.ma.masked_not_equal)\n\n\n@derived_from(np.ma)\ndef masked_equal(a, value):\n a = asanyarray(a)\n if getattr(value, \"shape\", ()):\n raise ValueError(\"da.ma.masked_equal doesn't support array `value`s\")\n inds = tuple(range(a.ndim))\n return blockwise(np.ma.masked_equal, inds, a, inds, value, (), dtype=a.dtype)\n\n\n@derived_from(np.ma)\ndef masked_invalid(a):\n return asanyarray(a).map_blocks(np.ma.masked_invalid)\n\n\n@derived_from(np.ma)\ndef masked_inside(x, v1, v2):\n x = asanyarray(x)\n return x.map_blocks(np.ma.masked_inside, v1, v2)\n\n\n@derived_from(np.ma)\ndef masked_outside(x, v1, v2):\n x = asanyarray(x)\n return x.map_blocks(np.ma.masked_outside, v1, v2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_where_masked_where.return.blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_where_masked_where.return.blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 161, "end_line": 175, "span_ids": ["masked_where"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np.ma)\ndef masked_where(condition, a):\n cshape = getattr(condition, \"shape\", ())\n if cshape and cshape != a.shape:\n raise IndexError(\n \"Inconsistant shape between the condition and the \"\n \"input (got %s and %s)\" % (cshape, a.shape)\n )\n condition = asanyarray(condition)\n a = asanyarray(a)\n ainds = tuple(range(a.ndim))\n cinds = tuple(range(condition.ndim))\n return blockwise(\n np.ma.masked_where, ainds, condition, cinds, a, ainds, dtype=a.dtype\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_values__masked_array.return.np_ma_masked_array_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_values__masked_array.return.np_ma_masked_array_data_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 208, "span_ids": ["getmaskarray", "_masked_array", "masked_values", "getdata", "fix_invalid"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np.ma)\ndef masked_values(x, value, rtol=1e-05, atol=1e-08, shrink=True):\n x = asanyarray(x)\n if getattr(value, \"shape\", ()):\n raise ValueError(\"da.ma.masked_values doesn't support array `value`s\")\n return map_blocks(\n np.ma.masked_values, x, value, rtol=rtol, atol=atol, shrink=shrink\n )\n\n\n@derived_from(np.ma)\ndef fix_invalid(a, fill_value=None):\n a = asanyarray(a)\n return a.map_blocks(np.ma.fix_invalid, fill_value=fill_value)\n\n\n@derived_from(np.ma)\ndef getdata(a):\n a = asanyarray(a)\n return a.map_blocks(np.ma.getdata)\n\n\n@derived_from(np.ma)\ndef getmaskarray(a):\n a = asanyarray(a)\n return a.map_blocks(np.ma.getmaskarray)\n\n\ndef _masked_array(data, mask=np.ma.nomask, **kwargs):\n dtype = kwargs.pop(\"masked_dtype\", None)\n return np.ma.masked_array(data, mask=mask, dtype=dtype, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_array_masked_array.return.blockwise__masked_array_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py_masked_array_masked_array.return.blockwise__masked_array_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 211, "end_line": 238, "span_ids": ["masked_array"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np.ma)\ndef masked_array(data, mask=np.ma.nomask, fill_value=None, **kwargs):\n data = asanyarray(data)\n inds = tuple(range(data.ndim))\n arginds = [inds, data, inds]\n\n if getattr(fill_value, \"shape\", ()):\n raise ValueError(\"non-scalar fill_value not supported\")\n kwargs[\"fill_value\"] = fill_value\n\n if mask is not np.ma.nomask:\n mask = asanyarray(mask)\n if mask.size == 1:\n mask = mask.reshape((1,) * data.ndim)\n elif data.shape != mask.shape:\n raise np.ma.MaskError(\n \"Mask and data not compatible: data shape \"\n \"is %s, and mask shape is \"\n \"%s.\" % (repr(data.shape), repr(mask.shape))\n )\n arginds.extend([mask, inds])\n\n if \"dtype\" in kwargs:\n kwargs[\"masked_dtype\"] = kwargs[\"dtype\"]\n else:\n kwargs[\"dtype\"] = data.dtype\n\n return blockwise(_masked_array, *arginds, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__set_fill_value_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/ma.py__set_fill_value_", "embedding": null, "metadata": {"file_path": "dask/array/ma.py", "file_name": "ma.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 262, "span_ids": ["_set_fill_value", "average", "set_fill_value"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _set_fill_value(x, fill_value):\n if isinstance(x, np.ma.masked_array):\n x = x.copy()\n np.ma.set_fill_value(x, fill_value=fill_value)\n return x\n\n\n@derived_from(np.ma)\ndef set_fill_value(a, fill_value):\n a = asanyarray(a)\n if getattr(fill_value, \"shape\", ()):\n raise ValueError(\"da.ma.set_fill_value doesn't support array `value`s\")\n fill_value = np.ma.core._check_fill_value(fill_value, a.dtype)\n res = a.map_blocks(_set_fill_value, fill_value)\n a.dask = res.dask\n a.name = res.name\n\n\n@derived_from(np.ma)\ndef average(a, axis=None, weights=None, returned=False):\n return _average(a, axis, weights, returned, is_masked=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_from_distutils_version_im_try_.except_TypeError_.ma_divide.np_ma_core__DomainedBinar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_from_distutils_version_im_try_.except_TypeError_.ma_divide.np_ma_core__DomainedBinar", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["imports"], "tokens": 434}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from distutils.version import LooseVersion\n\nimport numpy as np\nimport warnings\n\nfrom ..utils import derived_from\n\n_numpy_115 = LooseVersion(np.__version__) >= \"1.15.0\"\n_numpy_116 = LooseVersion(np.__version__) >= \"1.16.0\"\n_numpy_117 = LooseVersion(np.__version__) >= \"1.17.0\"\n_numpy_118 = LooseVersion(np.__version__) >= \"1.18.0\"\n_numpy_120 = LooseVersion(np.__version__) >= \"1.20.0\"\n\n\n# Taken from scikit-learn:\n# https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/fixes.py#L84\ntry:\n with warnings.catch_warnings():\n if (\n not np.allclose(\n np.divide(0.4, 1, casting=\"unsafe\"),\n np.divide(0.4, 1, casting=\"unsafe\", dtype=float),\n )\n or not np.allclose(np.divide(1, 0.5, dtype=\"i8\"), 2)\n or not np.allclose(np.divide(0.4, 1), 0.4)\n ):\n raise TypeError(\n \"Divide not working with dtype: \"\n \"https://github.com/numpy/numpy/issues/3484\"\n )\n divide = np.divide\n ma_divide = np.ma.divide\n\nexcept TypeError:\n # Divide with dtype doesn't work on Python 3\n def divide(x1, x2, out=None, dtype=None):\n \"\"\"Implementation of numpy.divide that works with dtype kwarg.\n\n Temporary compatibility fix for a bug in numpy's version. See\n https://github.com/numpy/numpy/issues/3484 for the relevant issue.\"\"\"\n x = np.divide(x1, x2, out)\n if dtype is not None:\n x = x.astype(dtype)\n return x\n\n ma_divide = np.ma.core._DomainedBinaryOperation(\n divide, np.ma.core._DomainSafeDivide(), 0, 1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_if_LooseVersion_np___vers_if_LooseVersion_np___vers.take_along_axis.return.arr__make_along_axis_idx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py_if_LooseVersion_np___vers_if_LooseVersion_np___vers.take_along_axis.return.arr__make_along_axis_idx_", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 175, "span_ids": ["imports"], "tokens": 1270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "if LooseVersion(np.__version__) < \"1.15.0\":\n # These functions were added in numpy 1.15.0. For previous versions they\n # are duplicated here\n\n def _make_along_axis_idx(arr_shape, indices, axis):\n # compute dimensions to iterate over\n if not np.issubdtype(indices.dtype, np.integer):\n raise IndexError(\"`indices` must be an integer array\")\n if len(arr_shape) != indices.ndim:\n raise ValueError(\n \"`indices` and `arr` must have the same number of dimensions\"\n )\n shape_ones = (1,) * indices.ndim\n dest_dims = list(range(axis)) + [None] + list(range(axis + 1, indices.ndim))\n\n # build a fancy index, consisting of orthogonal aranges, with the\n # requested index inserted at the right location\n fancy_index = []\n for dim, n in zip(dest_dims, arr_shape):\n if dim is None:\n fancy_index.append(indices)\n else:\n ind_shape = shape_ones[:dim] + (-1,) + shape_ones[dim + 1 :]\n fancy_index.append(np.arange(n).reshape(ind_shape))\n\n return tuple(fancy_index)\n\n def take_along_axis(arr, indices, axis):\n \"\"\"\n Take values from the input array by matching 1d index and data slices.\n This iterates over matching 1d slices oriented along the specified axis in\n the index and data arrays, and uses the former to look up values in the\n latter. These slices can be different lengths.\n Functions returning an index along an axis, like `argsort` and\n `argpartition`, produce suitable indices for this function.\n .. versionadded:: 1.15.0\n Parameters\n ----------\n arr: ndarray (Ni..., M, Nk...)\n Source array\n indices: ndarray (Ni..., J, Nk...)\n Indices to take along each 1d slice of `arr`. This must match the\n dimension of arr, but dimensions Ni and Nj only need to broadcast\n against `arr`.\n axis: int\n The axis to take 1d slices along. If axis is None, the input array is\n treated as if it had first been flattened to 1d, for consistency with\n `sort` and `argsort`.\n Returns\n -------\n out: ndarray (Ni..., J, Nk...)\n The indexed result.\n Notes\n -----\n This is equivalent to (but faster than) the following use of `ndindex` and\n `s_`, which sets each of ``ii`` and ``kk`` to a tuple of indices::\n Ni, M, Nk = a.shape[:axis], a.shape[axis], a.shape[axis+1:]\n J = indices.shape[axis] # Need not equal M\n out = np.empty(Nk + (J,) + Nk)\n for ii in ndindex(Ni):\n for kk in ndindex(Nk):\n a_1d = a [ii + s_[:,] + kk]\n indices_1d = indices[ii + s_[:,] + kk]\n out_1d = out [ii + s_[:,] + kk]\n for j in range(J):\n out_1d[j] = a_1d[indices_1d[j]]\n Equivalently, eliminating the inner loop, the last two lines would be::\n out_1d[:] = a_1d[indices_1d]\n See Also\n --------\n take : Take along an axis, using the same indices for every 1d slice\n put_along_axis :\n Put values into the destination array by matching 1d index and data slices\n Examples\n --------\n For this sample array\n >>> a = np.array([[10, 30, 20], [60, 40, 50]])\n\n We can sort either by using sort directly, or argsort and this function\n >>> np.sort(a, axis=1)\n array([[10, 20, 30],\n [40, 50, 60]])\n >>> ai = np.argsort(a, axis=1); ai\n array([[0, 2, 1],\n [1, 2, 0]])\n >>> take_along_axis(a, ai, axis=1)\n array([[10, 20, 30],\n [40, 50, 60]])\n\n The same works for max and min, if you expand the dimensions:\n >>> np.expand_dims(np.max(a, axis=1), axis=1)\n array([[30],\n [60]])\n >>> ai = np.expand_dims(np.argmax(a, axis=1), axis=1)\n >>> ai\n array([[1],\n [0]])\n >>> take_along_axis(a, ai, axis=1)\n array([[30],\n [60]])\n\n If we want to get the max and min at the same time,\n we can stack the indices first:\n >>> ai_min = np.expand_dims(np.argmin(a, axis=1), axis=1)\n >>> ai_max = np.expand_dims(np.argmax(a, axis=1), axis=1)\n >>> ai = np.concatenate([ai_min, ai_max], axis=1)\n >>> ai\n array([[0, 1],\n [1, 0]])\n >>> take_along_axis(a, ai, axis=1)\n array([[10, 30],\n [40, 60]])\n \"\"\"\n # normalize inputs\n if axis is None:\n arr = arr.flat\n arr_shape = (len(arr),) # flatiter has no .shape\n axis = 0\n else:\n if axis < 0:\n axis = arr.ndim + axis\n arr_shape = arr.shape\n\n # use the fancy index\n return arr[_make_along_axis_idx(arr_shape, indices, axis)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_ge_16__make_sliced_dtype_np_ge_16.return.np_dtype_new_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_ge_16__make_sliced_dtype_np_ge_16.return.np_dtype_new_", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 192, "span_ids": ["_make_sliced_dtype_np_ge_16"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_sliced_dtype_np_ge_16(dtype, index):\n # This was briefly added in 1.14.0\n # https://github.com/numpy/numpy/pull/6053, NumPy >= 1.14\n # which was then reverted in 1.14.1 with\n # https://github.com/numpy/numpy/pull/10411\n # And then was finally released with\n # https://github.com/numpy/numpy/pull/12447\n # in version 1.16.0\n new = {\n \"names\": index,\n \"formats\": [dtype.fields[name][0] for name in index],\n \"offsets\": [dtype.fields[name][1] for name in index],\n \"itemsize\": dtype.itemsize,\n }\n return np.dtype(new)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_lt_14_None_1.else_._make_sliced_dtype._make_sliced_dtype_np_lt_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__make_sliced_dtype_np_lt_14_None_1.else_._make_sliced_dtype._make_sliced_dtype_np_lt_", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 195, "end_line": 206, "span_ids": ["impl:23", "_make_sliced_dtype_np_lt_14"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _make_sliced_dtype_np_lt_14(dtype, index):\n # For numpy < 1.14\n dt = np.dtype([(name, dtype[name]) for name in index])\n return dt\n\n\nif LooseVersion(np.__version__) >= LooseVersion(\"1.16.0\") or LooseVersion(\n np.__version__\n) == LooseVersion(\"1.14.0\"):\n _make_sliced_dtype = _make_sliced_dtype_np_ge_16\nelse:\n _make_sliced_dtype = _make_sliced_dtype_np_lt_14", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser__Recurser.map_reduce.return.f_x_kwargs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser__Recurser.map_reduce.return.f_x_kwargs_", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 269, "span_ids": ["_Recurser.__init__", "_Recurser", "_Recurser.map_reduce"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _Recurser(object):\n \"\"\"\n Utility class for recursing over nested iterables\n \"\"\"\n\n # This was copied almost verbatim from numpy.core.shape_base._Recurser\n\n def __init__(self, recurse_if):\n self.recurse_if = recurse_if\n\n def map_reduce(\n self,\n x,\n f_map=lambda x, **kwargs: x,\n f_reduce=lambda x, **kwargs: x,\n f_kwargs=lambda **kwargs: kwargs,\n **kwargs\n ):\n \"\"\"\n Iterate over the nested list, applying:\n * ``f_map`` (T -> U) to items\n * ``f_reduce`` (Iterable[U] -> U) to mapped items\n\n For instance, ``map_reduce([[1, 2], 3, 4])`` is::\n\n f_reduce([\n f_reduce([\n f_map(1),\n f_map(2)\n ]),\n f_map(3),\n f_map(4)\n ]])\n\n\n State can be passed down through the calls with `f_kwargs`,\n to iterables of mapped items. When kwargs are passed, as in\n ``map_reduce([[1, 2], 3, 4], **kw)``, this becomes::\n\n kw1 = f_kwargs(**kw)\n kw2 = f_kwargs(**kw1)\n f_reduce([\n f_reduce([\n f_map(1), **kw2)\n f_map(2, **kw2)\n ], **kw1),\n f_map(3, **kw1),\n f_map(4, **kw1)\n ]], **kw)\n \"\"\"\n\n def f(x, **kwargs):\n if not self.recurse_if(x):\n return f_map(x, **kwargs)\n else:\n next_kwargs = f_kwargs(**kwargs)\n return f_reduce((f(xi, **next_kwargs) for xi in x), **kwargs)\n\n return f(x, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser.walk_if__numpy_116_.else_._unravel_index_keyword._dims_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Recurser.walk_if__numpy_116_.else_._unravel_index_keyword._dims_", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 271, "end_line": 294, "span_ids": ["impl:29", "_Recurser.walk"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _Recurser(object):\n\n def walk(self, x, index=()):\n \"\"\"\n Iterate over x, yielding (index, value, entering), where\n\n * ``index``: a tuple of indices up to this point\n * ``value``: equal to ``x[index[0]][...][index[-1]]``. On the first iteration, is\n ``x`` itself\n * ``entering``: bool. The result of ``recurse_if(value)``\n \"\"\"\n do_recurse = self.recurse_if(x)\n yield index, x, do_recurse\n\n if not do_recurse:\n return\n for i, xi in enumerate(x):\n # yield from ...\n for v in self.walk(xi, index + (i,)):\n yield v\n\n\nif _numpy_116:\n _unravel_index_keyword = \"shape\"\nelse:\n _unravel_index_keyword = \"dims\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_taken_di_moveaxis.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_taken_di_moveaxis.return.result", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 297, "end_line": 317, "span_ids": ["impl:29", "moveaxis"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Implementation taken directly from numpy:\n# https://github.com/numpy/numpy/blob/d9b1e32cb8ef90d6b4a47853241db2a28146a57d/numpy/core/numeric.py#L1336-L1405\n@derived_from(np)\ndef moveaxis(a, source, destination):\n source = np.core.numeric.normalize_axis_tuple(source, a.ndim, \"source\")\n destination = np.core.numeric.normalize_axis_tuple(\n destination, a.ndim, \"destination\"\n )\n if len(source) != len(destination):\n raise ValueError(\n \"`source` and `destination` arguments must have \"\n \"the same number of elements\"\n )\n\n order = [n for n in range(a.ndim) if n not in source]\n\n for dest, src in sorted(zip(destination, source)):\n order.insert(dest, src)\n\n result = a.transpose(order)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_adapted__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/numpy_compat.py__Implementation_adapted__", "embedding": null, "metadata": {"file_path": "dask/array/numpy_compat.py", "file_name": "numpy_compat.py", "file_type": "text/x-python", "category": "implementation", "start_line": 320, "end_line": 339, "span_ids": ["rollaxis", "moveaxis"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Implementation adapted directly from numpy:\n# https://github.com/numpy/numpy/blob/v1.17.0/numpy/core/numeric.py#L1107-L1204\ndef rollaxis(a, axis, start=0):\n n = a.ndim\n axis = np.core.numeric.normalize_axis_index(axis, n)\n if start < 0:\n start += n\n msg = \"'%s' arg requires %d <= %s < %d, but %d was passed in\"\n if not (0 <= start < n + 1):\n raise ValueError(msg % (\"start\", -n, \"start\", n + 1, start))\n if axis < start:\n # it's been removed\n start -= 1\n if axis == start:\n return a[...]\n axes = list(range(0, n))\n axes.remove(axis)\n axes.insert(start, axis)\n return a.transpose(axes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_from_itertools_import_zip_GETNOREMOVE._getter_getter_nofancy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_from_itertools_import_zip_GETNOREMOVE._getter_getter_nofancy_", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import zip_longest\nfrom operator import getitem\n\nimport numpy as np\n\nfrom .core import getter, getter_nofancy, getter_inline\nfrom ..blockwise import optimize_blockwise, fuse_roots\nfrom ..core import flatten, reverse_dict\nfrom ..optimization import cull, fuse, inline_functions\nfrom ..utils import ensure_dict\nfrom ..highlevelgraph import HighLevelGraph\n\nfrom numbers import Integral\n\n# All get* functions the optimizations know about\nGETTERS = (getter, getter_nofancy, getter_inline, getitem)\n# These get* functions aren't ever completely removed from the graph,\n# even if the index should be a no-op by numpy semantics. Some array-like's\n# don't completely follow semantics, making indexing always necessary.\nGETNOREMOVE = (getter, getter_nofancy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_optimize.return.dsk5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_optimize.return.dsk5", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 70, "span_ids": ["optimize"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def optimize(\n dsk,\n keys,\n fuse_keys=None,\n fast_functions=None,\n inline_functions_fast_functions=(getter_inline,),\n rename_fused_keys=True,\n **kwargs\n):\n \"\"\"Optimize dask for array computation\n\n 1. Cull tasks not necessary to evaluate keys\n 2. Remove full slicing, e.g. x[:]\n 3. Inline fast functions like getitem and np.transpose\n \"\"\"\n keys = list(flatten(keys))\n\n # High level stage optimization\n if isinstance(dsk, HighLevelGraph):\n dsk = optimize_blockwise(dsk, keys=keys)\n dsk = fuse_roots(dsk, keys=keys)\n\n # Low level task optimizations\n dsk = ensure_dict(dsk)\n if fast_functions is not None:\n inline_functions_fast_functions = fast_functions\n\n dsk2, dependencies = cull(dsk, keys)\n hold = hold_keys(dsk2, dependencies)\n\n dsk3, dependencies = fuse(\n dsk2,\n hold + keys + (fuse_keys or []),\n dependencies,\n rename_keys=rename_fused_keys,\n )\n if inline_functions_fast_functions:\n dsk4 = inline_functions(\n dsk3,\n keys,\n dependencies=dependencies,\n fast_functions=inline_functions_fast_functions,\n )\n else:\n dsk4 = dsk3\n dsk5 = optimize_slices(dsk4)\n\n return dsk5", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_hold_keys_hold_keys.return.hold_keys": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_hold_keys_hold_keys.return.hold_keys", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 73, "end_line": 108, "span_ids": ["hold_keys"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def hold_keys(dsk, dependencies):\n \"\"\"Find keys to avoid fusion\n\n We don't want to fuse data present in the graph because it is easier to\n serialize as a raw value.\n\n We don't want to fuse chains after getitem/GETTERS because we want to\n move around only small pieces of data, rather than the underlying arrays.\n \"\"\"\n dependents = reverse_dict(dependencies)\n data = {k for k, v in dsk.items() if type(v) not in (tuple, str)}\n\n hold_keys = list(data)\n for dat in data:\n deps = dependents[dat]\n for dep in deps:\n task = dsk[dep]\n # If the task is a get* function, we walk up the chain, and stop\n # when there's either more than one dependent, or the dependent is\n # no longer a get* function or an alias. We then add the final\n # key to the list of keys not to fuse.\n if type(task) is tuple and task and task[0] in GETTERS:\n try:\n while len(dependents[dep]) == 1:\n new_dep = next(iter(dependents[dep]))\n new_task = dsk[new_dep]\n # If the task is a get* or an alias, continue up the\n # linear chain\n if new_task[0] in GETTERS or new_task in dsk:\n dep = new_dep\n else:\n break\n except (IndexError, TypeError):\n pass\n hold_keys.append(dep)\n return hold_keys", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_slices_optimize_slices.return.dsk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_optimize_slices_optimize_slices.return.dsk", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 111, "end_line": 195, "span_ids": ["optimize_slices"], "tokens": 758}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def optimize_slices(dsk):\n \"\"\"Optimize slices\n\n 1. Fuse repeated slices, like x[5:][2:6] -> x[7:11]\n 2. Remove full slices, like x[:] -> x\n\n See also:\n fuse_slice_dict\n \"\"\"\n fancy_ind_types = (list, np.ndarray)\n dsk = dsk.copy()\n for k, v in dsk.items():\n if type(v) is tuple and v[0] in GETTERS and len(v) in (3, 5):\n if len(v) == 3:\n get, a, a_index = v\n # getter defaults to asarray=True, getitem is semantically False\n a_asarray = get is not getitem\n a_lock = None\n else:\n get, a, a_index, a_asarray, a_lock = v\n while type(a) is tuple and a[0] in GETTERS and len(a) in (3, 5):\n if len(a) == 3:\n f2, b, b_index = a\n b_asarray = f2 is not getitem\n b_lock = None\n else:\n f2, b, b_index, b_asarray, b_lock = a\n\n if a_lock and a_lock is not b_lock:\n break\n if (type(a_index) is tuple) != (type(b_index) is tuple):\n break\n if type(a_index) is tuple:\n indices = b_index + a_index\n if len(a_index) != len(b_index) and any(i is None for i in indices):\n break\n if f2 is getter_nofancy and any(\n isinstance(i, fancy_ind_types) for i in indices\n ):\n break\n elif f2 is getter_nofancy and (\n type(a_index) in fancy_ind_types or type(b_index) in fancy_ind_types\n ):\n break\n try:\n c_index = fuse_slice(b_index, a_index)\n # rely on fact that nested gets never decrease in\n # strictness e.g. `(getter_nofancy, (getter, ...))` never\n # happens\n get = getter if f2 is getter_inline else f2\n except NotImplementedError:\n break\n a, a_index, a_lock = b, c_index, b_lock\n a_asarray |= b_asarray\n\n # Skip the get call if not from from_array and nothing to do\n if get not in GETNOREMOVE and (\n (\n type(a_index) is slice\n and not a_index.start\n and a_index.stop is None\n and a_index.step is None\n )\n or (\n type(a_index) is tuple\n and all(\n type(s) is slice\n and not s.start\n and s.stop is None\n and s.step is None\n for s in a_index\n )\n )\n ):\n dsk[k] = a\n elif get is getitem or (a_asarray and not a_lock):\n # default settings are fine, drop the extra parameters Since we\n # always fallback to inner `get` functions, `get is getitem`\n # can only occur if all gets are getitem, meaning all\n # parameters must be getitem defaults.\n dsk[k] = (get, a, a_index)\n else:\n dsk[k] = (get, a, a_index, a_asarray, a_lock)\n\n return dsk", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_normalize_slice_check_for_nonfusible_fancy_indexing.for_f_n_in_zip_longest_f.if_type_f_is_not_list_an.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_normalize_slice_check_for_nonfusible_fancy_indexing.for_f_n_in_zip_longest_f.if_type_f_is_not_list_an.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 227, "span_ids": ["check_for_nonfusible_fancy_indexing", "normalize_slice"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_slice(s):\n \"\"\"Replace Nones in slices with integers\n\n >>> normalize_slice(slice(None, None, None))\n slice(0, None, 1)\n \"\"\"\n start, stop, step = s.start, s.stop, s.step\n if start is None:\n start = 0\n if step is None:\n step = 1\n if start < 0 or step < 0 or stop is not None and stop < 0:\n raise NotImplementedError()\n return slice(start, stop, step)\n\n\ndef check_for_nonfusible_fancy_indexing(fancy, normal):\n # Check for fancy indexing and normal indexing, where the fancy\n # indexed dimensions != normal indexed dimensions with integers. E.g.:\n # disallow things like:\n # x[:, [1, 2], :][0, :, :] -> x[0, [1, 2], :] or\n # x[0, :, :][:, [1, 2], :] -> x[0, [1, 2], :]\n for f, n in zip_longest(fancy, normal, fillvalue=slice(None)):\n if type(f) is not list and isinstance(n, Integral):\n raise NotImplementedError(\n \"Can't handle normal indexing with \"\n \"integers and fancy indexing if the \"\n \"integers and fancy indices don't \"\n \"align with the same dimensions.\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice_fuse_slice._and_newaxes": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice_fuse_slice._and_newaxes", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 298, "span_ids": ["fuse_slice"], "tokens": 581}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fuse_slice(a, b):\n \"\"\"Fuse stacked slices together\n\n Fuse a pair of repeated slices into a single slice:\n\n >>> fuse_slice(slice(1000, 2000), slice(10, 15))\n slice(1010, 1015, None)\n\n This also works for tuples of slices\n\n >>> fuse_slice((slice(100, 200), slice(100, 200, 10)),\n ... (slice(10, 15), [5, 2]))\n (slice(110, 115, None), [150, 120])\n\n And a variety of other interesting cases\n\n >>> fuse_slice(slice(1000, 2000), 10) # integers\n 1010\n\n >>> fuse_slice(slice(1000, 2000, 5), slice(10, 20, 2))\n slice(1050, 1100, 10)\n\n >>> fuse_slice(slice(1000, 2000, 5), [1, 2, 3]) # lists\n [1005, 1010, 1015]\n\n >>> fuse_slice(None, slice(None, None)) # doctest: +SKIP\n None\n \"\"\"\n # None only works if the second side is a full slice\n if a is None and isinstance(b, slice) and b == slice(None, None):\n return None\n\n # Replace None with 0 and one in start and step\n if isinstance(a, slice):\n a = normalize_slice(a)\n if isinstance(b, slice):\n b = normalize_slice(b)\n\n if isinstance(a, slice) and isinstance(b, Integral):\n if b < 0:\n raise NotImplementedError()\n return a.start + b * a.step\n\n if isinstance(a, slice) and isinstance(b, slice):\n start = a.start + a.step * b.start\n if b.stop is not None:\n stop = a.start + a.step * b.stop\n else:\n stop = None\n if a.stop is not None:\n if stop is not None:\n stop = min(a.stop, stop)\n else:\n stop = a.stop\n step = a.step * b.step\n if step == 1:\n step = None\n return slice(start, stop, step)\n\n if isinstance(b, list):\n return [fuse_slice(a, bb) for bb in b]\n if isinstance(a, list) and isinstance(b, (Integral, slice)):\n return a[b]\n\n if isinstance(a, tuple) and not isinstance(b, tuple):\n b = (b,)\n\n # If given two tuples walk through both, being mindful of uneven sizes\n # and newaxes\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice.None_8_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/optimization.py_fuse_slice.None_8_", "embedding": null, "metadata": {"file_path": "dask/array/optimization.py", "file_name": "optimization.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 328, "span_ids": ["fuse_slice"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fuse_slice(a, b):\n # ... other code\n if isinstance(a, tuple) and isinstance(b, tuple):\n\n # Check for non-fusible cases with fancy-indexing\n a_has_lists = any(isinstance(item, list) for item in a)\n b_has_lists = any(isinstance(item, list) for item in b)\n if a_has_lists and b_has_lists:\n raise NotImplementedError(\"Can't handle multiple list indexing\")\n elif a_has_lists:\n check_for_nonfusible_fancy_indexing(a, b)\n elif b_has_lists:\n check_for_nonfusible_fancy_indexing(b, a)\n\n j = 0\n result = list()\n for i in range(len(a)):\n # axis ceased to exist or we're out of b\n if isinstance(a[i], Integral) or j == len(b):\n result.append(a[i])\n continue\n while b[j] is None: # insert any Nones on the rhs\n result.append(None)\n j += 1\n result.append(fuse_slice(a[i], b[j])) # Common case\n j += 1\n while j < len(b): # anything leftover on the right?\n result.append(b[j])\n j += 1\n return tuple(result)\n raise NotImplementedError()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_warnings_fractional_slice.if_all_ind_slice_None_.else_.return._getitem_rounded_index_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_warnings_fractional_slice.if_all_ind_slice_None_.else_.return._getitem_rounded_index_", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["imports", "fractional_slice"], "tokens": 489}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import warnings\nfrom operator import getitem\nfrom itertools import product\nfrom numbers import Integral\nfrom tlz import merge, pipe, concat, partial, get\nfrom tlz.curried import map\n\nfrom . import chunk, wrap\nfrom .core import (\n Array,\n map_blocks,\n concatenate,\n concatenate3,\n reshapelist,\n unify_chunks,\n)\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..base import tokenize\nfrom ..core import flatten\nfrom ..utils import concrete\n\n\ndef fractional_slice(task, axes):\n \"\"\"\n\n >>> fractional_slice(('x', 5.1), {0: 2}) # doctest: +SKIP\n (getitem, ('x', 6), (slice(0, 2),))\n\n >>> fractional_slice(('x', 3, 5.1), {0: 2, 1: 3}) # doctest: +SKIP\n (getitem, ('x', 3, 5), (slice(None, None, None), slice(-3, None)))\n\n >>> fractional_slice(('x', 2.9, 5.1), {0: 2, 1: 3}) # doctest: +SKIP\n (getitem, ('x', 3, 5), (slice(0, 2), slice(-3, None)))\n \"\"\"\n rounded = (task[0],) + tuple(int(round(i)) for i in task[1:])\n\n index = []\n for i, (t, r) in enumerate(zip(task[1:], rounded[1:])):\n depth = axes.get(i, 0)\n if isinstance(depth, tuple):\n left_depth = depth[0]\n right_depth = depth[1]\n else:\n left_depth = depth\n right_depth = depth\n\n if t == r:\n index.append(slice(None, None, None))\n elif t < r and right_depth:\n index.append(slice(0, right_depth))\n elif t > r and left_depth:\n index.append(slice(-left_depth, None))\n else:\n index.append(slice(0, 0))\n index = tuple(index)\n\n if all(ind == slice(None, None, None) for ind in index):\n return task\n else:\n return (getitem, rounded, index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_expand_key_expand_key.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_expand_key_expand_key.return.result", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 115, "span_ids": ["expand_key"], "tokens": 604}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def expand_key(k, dims, name=None, axes=None):\n \"\"\"Get all neighboring keys around center\n\n Parameters\n ----------\n k: tuple\n They key around which to generate new keys\n dims: Sequence[int]\n The number of chunks in each dimension\n name: Option[str]\n The name to include in the output keys, or none to include no name\n axes: Dict[int, int]\n The axes active in the expansion. We don't expand on non-active axes\n\n Examples\n --------\n >>> expand_key(('x', 2, 3), dims=[5, 5], name='y', axes={0: 1, 1: 1}) # doctest: +NORMALIZE_WHITESPACE\n [[('y', 1.1, 2.1), ('y', 1.1, 3), ('y', 1.1, 3.9)],\n [('y', 2, 2.1), ('y', 2, 3), ('y', 2, 3.9)],\n [('y', 2.9, 2.1), ('y', 2.9, 3), ('y', 2.9, 3.9)]]\n\n >>> expand_key(('x', 0, 4), dims=[5, 5], name='y', axes={0: 1, 1: 1}) # doctest: +NORMALIZE_WHITESPACE\n [[('y', 0, 3.1), ('y', 0, 4)],\n [('y', 0.9, 3.1), ('y', 0.9, 4)]]\n \"\"\"\n\n def inds(i, ind):\n rv = []\n if ind - 0.9 > 0:\n rv.append(ind - 0.9)\n rv.append(ind)\n if ind + 0.9 < dims[i] - 1:\n rv.append(ind + 0.9)\n return rv\n\n shape = []\n for i, ind in enumerate(k[1:]):\n num = 1\n if ind > 0:\n num += 1\n if ind < dims[i] - 1:\n num += 1\n shape.append(num)\n\n args = [\n inds(i, ind) if any((axes.get(i, 0),)) else [ind] for i, ind in enumerate(k[1:])\n ]\n if name is not None:\n args = [[name]] + args\n seq = list(product(*args))\n shape2 = [d if any((axes.get(i, 0),)) else 1 for i, d in enumerate(shape)]\n result = reshapelist(shape2, seq)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_internal_overlap_internal.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_internal_overlap_internal.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 118, "end_line": 178, "span_ids": ["overlap_internal"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def overlap_internal(x, axes):\n \"\"\"Share boundaries between neighboring blocks\n\n Parameters\n ----------\n\n x: da.Array\n A dask array\n axes: dict\n The size of the shared boundary per axis\n\n The axes input informs how many cells to overlap between neighboring blocks\n {0: 2, 2: 5} means share two cells in 0 axis, 5 cells in 2 axis\n \"\"\"\n dims = list(map(len, x.chunks))\n expand_key2 = partial(expand_key, dims=dims, axes=axes)\n\n # Make keys for each of the surrounding sub-arrays\n interior_keys = pipe(\n x.__dask_keys__(), flatten, map(expand_key2), map(flatten), concat, list\n )\n\n name = \"overlap-\" + tokenize(x, axes)\n getitem_name = \"getitem-\" + tokenize(x, axes)\n interior_slices = {}\n overlap_blocks = {}\n for k in interior_keys:\n frac_slice = fractional_slice((x.name,) + k, axes)\n if (x.name,) + k != frac_slice:\n interior_slices[(getitem_name,) + k] = frac_slice\n else:\n interior_slices[(getitem_name,) + k] = (x.name,) + k\n overlap_blocks[(name,) + k] = (\n concatenate3,\n (concrete, expand_key2((None,) + k, name=getitem_name)),\n )\n\n chunks = []\n for i, bds in enumerate(x.chunks):\n depth = axes.get(i, 0)\n if isinstance(depth, tuple):\n left_depth = depth[0]\n right_depth = depth[1]\n else:\n left_depth = depth\n right_depth = depth\n\n if len(bds) == 1:\n chunks.append(bds)\n else:\n left = [bds[0] + right_depth]\n right = [bds[-1] + left_depth]\n mid = []\n for bd in bds[1:-1]:\n mid.append(bd + left_depth + right_depth)\n chunks.append(left + mid + right)\n\n dsk = merge(interior_slices, overlap_blocks)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n\n return Array(graph, name, chunks, meta=x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_trim_overlap_trim_internal.return.map_blocks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_trim_overlap_trim_internal.return.map_blocks_", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 181, "end_line": 242, "span_ids": ["trim_internal", "trim_overlap"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def trim_overlap(x, depth, boundary=None):\n \"\"\"Trim sides from each block.\n\n This couples well with the ``map_overlap`` operation which may leave\n excess data on each block.\n\n See also\n --------\n dask.array.overlap.map_overlap\n\n \"\"\"\n\n # parameter to be passed to trim_internal\n axes = coerce_depth(x.ndim, depth)\n boundary2 = coerce_boundary(x.ndim, boundary)\n return trim_internal(x, axes=axes, boundary=boundary2)\n\n\ndef trim_internal(x, axes, boundary=None):\n \"\"\"Trim sides from each block\n\n This couples well with the overlap operation, which may leave excess data on\n each block\n\n See also\n --------\n dask.array.chunk.trim\n dask.array.map_blocks\n \"\"\"\n boundary = coerce_boundary(x.ndim, boundary)\n\n olist = []\n for i, bd in enumerate(x.chunks):\n bdy = boundary.get(i, \"none\")\n overlap = axes.get(i, 0)\n ilist = []\n for j, d in enumerate(bd):\n if bdy != \"none\":\n if isinstance(overlap, tuple):\n d = d - sum(overlap)\n else:\n d = d - overlap * 2\n\n else:\n if isinstance(overlap, tuple):\n d = d - overlap[0] if j != 0 else d\n d = d - overlap[1] if j != len(bd) - 1 else d\n else:\n d = d - overlap if j != 0 else d\n d = d - overlap if j != len(bd) - 1 else d\n\n ilist.append(d)\n olist.append(tuple(ilist))\n chunks = tuple(olist)\n\n return map_blocks(\n partial(_trim, axes=axes, boundary=boundary),\n x,\n chunks=chunks,\n dtype=x.dtype,\n meta=x._meta,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py__trim__trim.return.x_ind_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py__trim__trim.return.x_ind_", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 245, "end_line": 278, "span_ids": ["_trim"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _trim(x, axes, boundary, block_info):\n \"\"\"Similar to dask.array.chunk.trim but requires one to specificy the\n boundary condition.\n\n ``axes``, and ``boundary`` are assumed to have been coerced.\n\n \"\"\"\n axes = [axes.get(i, 0) for i in range(x.ndim)]\n axes_front = (ax[0] if isinstance(ax, tuple) else ax for ax in axes)\n axes_back = (\n -ax[1]\n if isinstance(ax, tuple) and ax[1]\n else -ax\n if isinstance(ax, Integral) and ax\n else None\n for ax in axes\n )\n\n trim_front = (\n 0 if (chunk_location == 0 and boundary.get(i, \"none\") == \"none\") else ax\n for i, (chunk_location, ax) in enumerate(\n zip(block_info[0][\"chunk-location\"], axes_front)\n )\n )\n trim_back = (\n None\n if (chunk_location == chunks - 1 and boundary.get(i, \"none\") == \"none\")\n else ax\n for i, (chunks, chunk_location, ax) in enumerate(\n zip(block_info[0][\"num-chunks\"], block_info[0][\"chunk-location\"], axes_back)\n )\n )\n ind = tuple(slice(front, back) for front, back in zip(trim_front, trim_back))\n return x[ind]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_periodic_periodic.return.concatenate_r_x_l_ax": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_periodic_periodic.return.concatenate_r_x_l_ax", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 281, "end_line": 302, "span_ids": ["periodic"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def periodic(x, axis, depth):\n \"\"\"Copy a slice of an array around to its other side\n\n Useful to create periodic boundary conditions for overlap\n \"\"\"\n\n left = (\n (slice(None, None, None),) * axis\n + (slice(0, depth),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n right = (\n (slice(None, None, None),) * axis\n + (slice(-depth, None),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n l = x[left]\n r = x[right]\n\n l, r = _remove_overlap_boundaries(l, r, axis, depth)\n\n return concatenate([r, x, l], axis=axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_reflect_reflect.return.concatenate_l_x_r_ax": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_reflect_reflect.return.concatenate_l_x_r_ax", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 305, "end_line": 332, "span_ids": ["reflect"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reflect(x, axis, depth):\n \"\"\"Reflect boundaries of array on the same side\n\n This is the converse of ``periodic``\n \"\"\"\n if depth == 1:\n left = (\n (slice(None, None, None),) * axis\n + (slice(0, 1),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n else:\n left = (\n (slice(None, None, None),) * axis\n + (slice(depth - 1, None, -1),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n right = (\n (slice(None, None, None),) * axis\n + (slice(-1, -depth - 1, -1),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n l = x[left]\n r = x[right]\n\n l, r = _remove_overlap_boundaries(l, r, axis, depth)\n\n return concatenate([l, x, r], axis=axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_nearest_nearest.return.concatenate_l_x_r_ax": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_nearest_nearest.return.concatenate_l_x_r_ax", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 335, "end_line": 357, "span_ids": ["nearest"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def nearest(x, axis, depth):\n \"\"\"Each reflect each boundary value outwards\n\n This mimics what the skimage.filters.gaussian_filter(... mode=\"nearest\")\n does.\n \"\"\"\n left = (\n (slice(None, None, None),) * axis\n + (slice(0, 1),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n right = (\n (slice(None, None, None),) * axis\n + (slice(-1, -2, -1),)\n + (slice(None, None, None),) * (x.ndim - axis - 1)\n )\n\n l = concatenate([x[left]] * depth, axis=axis)\n r = concatenate([x[right]] * depth, axis=axis)\n\n l, r = _remove_overlap_boundaries(l, r, axis, depth)\n\n return concatenate([l, x, r], axis=axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_constant__remove_overlap_boundaries.return.l_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_constant__remove_overlap_boundaries.return.l_r", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 360, "end_line": 389, "span_ids": ["constant", "_remove_overlap_boundaries"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def constant(x, axis, depth, value):\n \"\"\" Add constant slice to either side of array \"\"\"\n chunks = list(x.chunks)\n chunks[axis] = (depth,)\n\n try:\n c = wrap.full_like(\n getattr(x, \"_meta\", x),\n value,\n shape=tuple(map(sum, chunks)),\n chunks=tuple(chunks),\n dtype=x.dtype,\n )\n except TypeError:\n c = wrap.full(\n tuple(map(sum, chunks)), value, chunks=tuple(chunks), dtype=x.dtype\n )\n\n return concatenate([c, x, c], axis=axis)\n\n\ndef _remove_overlap_boundaries(l, r, axis, depth):\n lchunks = list(l.chunks)\n lchunks[axis] = (depth,)\n rchunks = list(r.chunks)\n rchunks[axis] = (depth,)\n\n l = l.rechunk(tuple(lchunks))\n r = r.rechunk(tuple(rchunks))\n return l, r", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_boundaries_boundaries.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_boundaries_boundaries.return.x", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 392, "end_line": 422, "span_ids": ["boundaries"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def boundaries(x, depth=None, kind=None):\n \"\"\"Add boundary conditions to an array before overlaping\n\n See Also\n --------\n periodic\n constant\n \"\"\"\n if not isinstance(kind, dict):\n kind = dict((i, kind) for i in range(x.ndim))\n if not isinstance(depth, dict):\n depth = dict((i, depth) for i in range(x.ndim))\n\n for i in range(x.ndim):\n d = depth.get(i, 0)\n if d == 0:\n continue\n\n this_kind = kind.get(i, \"none\")\n if this_kind == \"none\":\n continue\n elif this_kind == \"periodic\":\n x = periodic(x, i, d)\n elif this_kind == \"reflect\":\n x = reflect(x, i, d)\n elif this_kind == \"nearest\":\n x = nearest(x, i, d)\n elif i in kind:\n x = constant(x, i, d, kind[i])\n\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_overlap._Share_boundaries_betwe": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap_overlap._Share_boundaries_betwe", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 425, "end_line": 476, "span_ids": ["overlap"], "tokens": 1038}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def overlap(x, depth, boundary):\n \"\"\"Share boundaries between neighboring blocks\n\n Parameters\n ----------\n\n x: da.Array\n A dask array\n depth: dict\n The size of the shared boundary per axis\n boundary: dict\n The boundary condition on each axis. Options are 'reflect', 'periodic',\n 'nearest', 'none', or an array value. Such a value will fill the\n boundary with that value.\n\n The depth input informs how many cells to overlap between neighboring\n blocks ``{0: 2, 2: 5}`` means share two cells in 0 axis, 5 cells in 2 axis.\n Axes missing from this input will not be overlapped.\n\n Examples\n --------\n >>> import numpy as np\n >>> import dask.array as da\n\n >>> x = np.arange(64).reshape((8, 8))\n >>> d = da.from_array(x, chunks=(4, 4))\n >>> d.chunks\n ((4, 4), (4, 4))\n\n >>> g = da.overlap.overlap(d, depth={0: 2, 1: 1},\n ... boundary={0: 100, 1: 'reflect'})\n >>> g.chunks\n ((8, 8), (6, 6))\n\n >>> np.array(g)\n array([[100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [ 0, 0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 7],\n [ 8, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 15],\n [ 16, 16, 17, 18, 19, 20, 19, 20, 21, 22, 23, 23],\n [ 24, 24, 25, 26, 27, 28, 27, 28, 29, 30, 31, 31],\n [ 32, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 39],\n [ 40, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 47],\n [ 16, 16, 17, 18, 19, 20, 19, 20, 21, 22, 23, 23],\n [ 24, 24, 25, 26, 27, 28, 27, 28, 29, 30, 31, 31],\n [ 32, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 39],\n [ 40, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 47],\n [ 48, 48, 49, 50, 51, 52, 51, 52, 53, 54, 55, 55],\n [ 56, 56, 57, 58, 59, 60, 59, 60, 61, 62, 63, 63],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]])\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap.depth2_overlap.return.x4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_overlap.depth2_overlap.return.x4", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 477, "end_line": 498, "span_ids": ["overlap"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def overlap(x, depth, boundary):\n depth2 = coerce_depth(x.ndim, depth)\n boundary2 = coerce_boundary(x.ndim, boundary)\n\n # is depth larger than chunk size?\n depth_values = [depth2.get(i, 0) for i in range(x.ndim)]\n for d, c in zip(depth_values, x.chunks):\n maxd = max(d) if isinstance(d, tuple) else d\n if maxd > min(c):\n raise ValueError(\n \"The overlapping depth %d is larger than your\\n\"\n \"smallest chunk size %d. Rechunk your array\\n\"\n \"with a larger chunk size or a chunk size that\\n\"\n \"more evenly divides the shape of your array.\" % (d, min(c))\n )\n x2 = boundaries(x, depth2, boundary2)\n x3 = overlap_internal(x2, depth2)\n trim = dict(\n (k, v * 2 if boundary2.get(k, \"none\") != \"none\" else 0)\n for k, v in depth2.items()\n )\n x4 = chunk.trim(x3, trim)\n return x4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_add_dummy_padding_add_dummy_padding.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_add_dummy_padding_add_dummy_padding.return.x", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 501, "end_line": 538, "span_ids": ["add_dummy_padding"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_dummy_padding(x, depth, boundary):\n \"\"\"\n Pads an array which has 'none' as the boundary type.\n Used to simplify trimming arrays which use 'none'.\n\n >>> import dask.array as da\n >>> x = da.arange(6, chunks=3)\n >>> add_dummy_padding(x, {0: 1}, {0: 'none'}).compute() # doctest: +NORMALIZE_WHITESPACE\n array([..., 0, 1, 2, 3, 4, 5, ...])\n \"\"\"\n for k, v in boundary.items():\n d = depth.get(k, 0)\n if v == \"none\" and d > 0:\n empty_shape = list(x.shape)\n empty_shape[k] = d\n\n empty_chunks = list(x.chunks)\n empty_chunks[k] = (d,)\n\n try:\n empty = wrap.empty_like(\n getattr(x, \"_meta\", x),\n shape=empty_shape,\n chunks=empty_chunks,\n dtype=x.dtype,\n )\n except TypeError:\n empty = wrap.empty(empty_shape, chunks=empty_chunks, dtype=x.dtype)\n\n out_chunks = list(x.chunks)\n ax_chunks = list(out_chunks[k])\n ax_chunks[0] += d\n ax_chunks[-1] += d\n out_chunks[k] = tuple(ax_chunks)\n\n x = concatenate([empty, x, empty], axis=k)\n x = x.rechunk(out_chunks)\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap_map_overlap._Map_a_function_over_bl": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap_map_overlap._Map_a_function_over_bl", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 541, "end_line": 656, "span_ids": ["map_overlap"], "tokens": 1302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_overlap(\n func, *args, depth=None, boundary=None, trim=True, align_arrays=True, **kwargs\n):\n \"\"\"Map a function over blocks of arrays with some overlap\n\n We share neighboring zones between blocks of the array, map a\n function, and then trim away the neighboring strips.\n\n Parameters\n ----------\n func: function\n The function to apply to each extended block.\n If multiple arrays are provided, then the function should expect to\n receive chunks of each array in the same order.\n args : dask arrays\n depth: int, tuple, dict or list\n The number of elements that each block should share with its neighbors\n If a tuple or dict then this can be different per axis.\n If a list then each element of that list must be an int, tuple or dict\n defining depth for the corresponding array in `args`.\n Asymmetric depths may be specified using a dict value of (-/+) tuples.\n Note that asymmetric depths are currently only supported when\n ``boundary`` is 'none'.\n The default value is 0.\n boundary: str, tuple, dict or list\n How to handle the boundaries.\n Values include 'reflect', 'periodic', 'nearest', 'none',\n or any constant value like 0 or np.nan.\n If a list then each element must be a str, tuple or dict defining the\n boundary for the corresponding array in `args`.\n The default value is 'reflect'.\n trim: bool\n Whether or not to trim ``depth`` elements from each block after\n calling the map function.\n Set this to False if your mapping function already does this for you\n align_arrays: bool\n Whether or not to align chunks along equally sized dimensions when\n multiple arrays are provided. This allows for larger chunks in some\n arrays to be broken into smaller ones that match chunk sizes in other\n arrays such that they are compatible for block function mapping. If\n this is false, then an error will be thrown if arrays do not already\n have the same number of blocks in each dimension.\n **kwargs:\n Other keyword arguments valid in ``map_blocks``\n\n Examples\n --------\n >>> import numpy as np\n >>> import dask.array as da\n\n >>> x = np.array([1, 1, 2, 3, 3, 3, 2, 1, 1])\n >>> x = da.from_array(x, chunks=5)\n >>> def derivative(x):\n ... return x - np.roll(x, 1)\n\n >>> y = x.map_overlap(derivative, depth=1, boundary=0)\n >>> y.compute()\n array([ 1, 0, 1, 1, 0, 0, -1, -1, 0])\n\n >>> x = np.arange(16).reshape((4, 4))\n >>> d = da.from_array(x, chunks=(2, 2))\n >>> d.map_overlap(lambda x: x + x.size, depth=1).compute()\n array([[16, 17, 18, 19],\n [20, 21, 22, 23],\n [24, 25, 26, 27],\n [28, 29, 30, 31]])\n\n >>> func = lambda x: x + x.size\n >>> depth = {0: 1, 1: 1}\n >>> boundary = {0: 'reflect', 1: 'none'}\n >>> d.map_overlap(func, depth, boundary).compute() # doctest: +NORMALIZE_WHITESPACE\n array([[12, 13, 14, 15],\n [16, 17, 18, 19],\n [20, 21, 22, 23],\n [24, 25, 26, 27]])\n\n The ``da.map_overlap`` function can also accept multiple arrays.\n\n >>> func = lambda x, y: x + y\n >>> x = da.arange(8).reshape(2, 4).rechunk((1, 2))\n >>> y = da.arange(4).rechunk(2)\n >>> da.map_overlap(func, x, y, depth=1).compute() # doctest: +NORMALIZE_WHITESPACE\n array([[ 0, 2, 4, 6],\n [ 4, 6, 8, 10]])\n\n When multiple arrays are given, they do not need to have the\n same number of dimensions but they must broadcast together.\n Arrays are aligned block by block (just as in ``da.map_blocks``)\n so the blocks must have a common chunk size. This common chunking\n is determined automatically as long as ``align_arrays`` is True.\n\n >>> x = da.arange(8, chunks=4)\n >>> y = da.arange(8, chunks=2)\n >>> r = da.map_overlap(func, x, y, depth=1, align_arrays=True)\n >>> len(r.to_delayed())\n 4\n\n >>> da.map_overlap(func, x, y, depth=1, align_arrays=False).compute()\n Traceback (most recent call last):\n ...\n ValueError: Shapes do not align {'.0': {2, 4}}\n\n Note also that this function is equivalent to ``map_blocks``\n by default. A non-zero ``depth`` must be defined for any\n overlap to appear in the arrays provided to ``func``.\n\n >>> func = lambda x: x.sum()\n >>> x = da.ones(10, dtype='int')\n >>> block_args = dict(chunks=(), drop_axis=0)\n >>> da.map_blocks(func, x, **block_args).compute()\n 10\n >>> da.map_overlap(func, x, **block_args).compute()\n 10\n >>> da.map_overlap(func, x, **block_args, depth=1).compute()\n 12\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap._Look_for_invocation_usi_map_overlap.if_trim_.else_.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_map_overlap._Look_for_invocation_usi_map_overlap.if_trim_.else_.return.x", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 657, "end_line": 726, "span_ids": ["map_overlap"], "tokens": 765}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def map_overlap(\n func, *args, depth=None, boundary=None, trim=True, align_arrays=True, **kwargs\n):\n # Look for invocation using deprecated single-array signature\n # map_overlap(x, func, depth, boundary=None, trim=True, **kwargs)\n if isinstance(func, Array) and callable(args[0]):\n warnings.warn(\n \"The use of map_overlap(array, func, **kwargs) is deprecated since dask 2.17.0 \"\n \"and will be an error in a future release. To silence this warning, use the syntax \"\n \"map_overlap(func, array0,[ array1, ...,] **kwargs) instead.\",\n FutureWarning,\n )\n sig = [\"func\", \"depth\", \"boundary\", \"trim\"]\n depth = get(sig.index(\"depth\"), args, depth)\n boundary = get(sig.index(\"boundary\"), args, boundary)\n trim = get(sig.index(\"trim\"), args, trim)\n func, args = args[0], [func]\n\n if not callable(func):\n raise TypeError(\n \"First argument must be callable function, not {}\\n\"\n \"Usage: da.map_overlap(function, x)\\n\"\n \" or: da.map_overlap(function, x, y, z)\".format(type(func).__name__)\n )\n if not all(isinstance(x, Array) for x in args):\n raise TypeError(\n \"All variadic arguments must be arrays, not {}\\n\"\n \"Usage: da.map_overlap(function, x)\\n\"\n \" or: da.map_overlap(function, x, y, z)\".format(\n [type(x).__name__ for x in args]\n )\n )\n\n # Coerce depth and boundary arguments to lists of individual\n # specifications for each array argument\n def coerce(xs, arg, fn):\n if not isinstance(arg, list):\n arg = [arg] * len(xs)\n return [fn(x.ndim, a) for x, a in zip(xs, arg)]\n\n depth = coerce(args, depth, coerce_depth)\n boundary = coerce(args, boundary, coerce_boundary)\n\n # Align chunks in each array to a common size\n if align_arrays:\n # Reverse unification order to allow block broadcasting\n inds = [list(reversed(range(x.ndim))) for x in args]\n _, args = unify_chunks(*list(concat(zip(args, inds))), warn=False)\n\n for i, x in enumerate(args):\n for j in range(x.ndim):\n if isinstance(depth[i][j], tuple) and boundary[i][j] != \"none\":\n raise NotImplementedError(\n \"Asymmetric overlap is currently only implemented \"\n \"for boundary='none', however boundary for dimension \"\n \"{} in array argument {} is {}\".format(j, i, boundary[i][j])\n )\n\n def assert_int_chunksize(xs):\n assert all(type(c) is int for x in xs for cc in x.chunks for c in cc)\n\n assert_int_chunksize(args)\n args = [overlap(x, depth=d, boundary=b) for x, d, b in zip(args, depth, boundary)]\n assert_int_chunksize(args)\n x = map_blocks(func, *args, **kwargs)\n assert_int_chunksize([x])\n if trim:\n # Find index of array argument with maximum rank and break ties by choosing first provided\n i = sorted(enumerate(args), key=lambda v: (v[1].ndim, -v[0]))[-1][0]\n # Trim using depth/boundary setting for array of highest rank\n return trim_internal(x, depth[i], boundary[i])\n else:\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_coerce_depth_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/overlap.py_coerce_depth_", "embedding": null, "metadata": {"file_path": "dask/array/overlap.py", "file_name": "overlap.py", "file_type": "text/x-python", "category": "implementation", "start_line": 729, "end_line": 757, "span_ids": ["coerce_boundary", "coerce_depth"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def coerce_depth(ndim, depth):\n default = 0\n if depth is None:\n depth = default\n if isinstance(depth, Integral):\n depth = (depth,) * ndim\n if isinstance(depth, tuple):\n depth = dict(zip(range(ndim), depth))\n if isinstance(depth, dict):\n for i in range(ndim):\n if i not in depth:\n depth[i] = 0\n return depth\n\n\ndef coerce_boundary(ndim, boundary):\n default = \"reflect\"\n if boundary is None:\n boundary = default\n if not isinstance(boundary, (tuple, dict)):\n boundary = (boundary,) * ndim\n if isinstance(boundary, tuple):\n boundary = dict(zip(range(ndim), boundary))\n if isinstance(boundary, dict):\n for i in range(ndim):\n if i not in boundary:\n boundary[i] = default\n return boundary", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_from_collections_abc_impo__percentiles_from_tdigest.return.np_array_t_quantile_qs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_from_collections_abc_impo__percentiles_from_tdigest.return.np_array_t_quantile_qs_", "embedding": null, "metadata": {"file_path": "dask/array/percentile.py", "file_name": "percentile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 51, "span_ids": ["_percentile", "imports", "_tdigest_chunk", "_percentiles_from_tdigest"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections.abc import Iterator\nfrom functools import wraps\nfrom numbers import Number\n\nimport numpy as np\nfrom tlz import merge, merge_sorted\n\nfrom .core import Array\nfrom ..base import tokenize\nfrom ..highlevelgraph import HighLevelGraph\n\n\n@wraps(np.percentile)\ndef _percentile(a, q, interpolation=\"linear\"):\n n = len(a)\n if not len(a):\n return None, n\n if isinstance(q, Iterator):\n q = list(q)\n if a.dtype.name == \"category\":\n result = np.percentile(a.codes, q, interpolation=interpolation)\n import pandas as pd\n\n return pd.Categorical.from_codes(result, a.categories, a.ordered), n\n if np.issubdtype(a.dtype, np.datetime64):\n a2 = a.astype(\"i8\")\n result = np.percentile(a2, q, interpolation=interpolation)\n return result.astype(a.dtype), n\n if not np.issubdtype(a.dtype, np.number):\n interpolation = \"nearest\"\n return np.percentile(a, q, interpolation=interpolation), n\n\n\ndef _tdigest_chunk(a):\n\n from crick import TDigest\n\n t = TDigest()\n t.update(a)\n\n return t\n\n\ndef _percentiles_from_tdigest(qs, digests):\n\n from crick import TDigest\n\n t = TDigest()\n t.merge(*digests)\n\n return np.array(t.quantile(qs / 100.0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile_percentile._Allow_using_t_digest_if": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile_percentile._Allow_using_t_digest_if", "embedding": null, "metadata": {"file_path": "dask/array/percentile.py", "file_name": "percentile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 104, "span_ids": ["percentile"], "tokens": 489}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def percentile(a, q, interpolation=\"linear\", method=\"default\"):\n \"\"\"Approximate percentile of 1-D array\n\n Parameters\n ----------\n a : Array\n q : array_like of float\n Percentile or sequence of percentiles to compute, which must be between\n 0 and 100 inclusive.\n interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}, optional\n The interpolation method to use when the desired percentile lies\n between two data points ``i < j``. Only valid for ``method='dask'``.\n\n - 'linear': ``i + (j - i) * fraction``, where ``fraction``\n is the fractional part of the index surrounded by ``i``\n and ``j``.\n - 'lower': ``i``.\n - 'higher': ``j``.\n - 'nearest': ``i`` or ``j``, whichever is nearest.\n - 'midpoint': ``(i + j) / 2``.\n\n method : {'default', 'dask', 'tdigest'}, optional\n What method to use. By default will use dask's internal custom\n algorithm (``'dask'``). If set to ``'tdigest'`` will use tdigest for\n floats and ints and fallback to the ``'dask'`` otherwise.\n\n See Also\n --------\n numpy.percentile : Numpy's equivalent Percentile function\n \"\"\"\n if not a.ndim == 1:\n raise NotImplementedError(\"Percentiles only implemented for 1-d arrays\")\n if isinstance(q, Number):\n q = [q]\n q = np.array(q)\n token = tokenize(a, q, interpolation)\n\n dtype = a.dtype\n if np.issubdtype(dtype, np.integer):\n dtype = (np.array([], dtype=dtype) / 0.5).dtype\n\n allowed_methods = [\"default\", \"dask\", \"tdigest\"]\n if method not in allowed_methods:\n raise ValueError(\"method can only be 'default', 'dask' or 'tdigest'\")\n\n if method == \"default\":\n internal_method = \"dask\"\n else:\n internal_method = method\n\n # Allow using t-digest if interpolation is allowed and dtype is of floating or integer type\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile.if__percentile.return.Array_graph_name2_chunk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_percentile.if__percentile.return.Array_graph_name2_chunk", "embedding": null, "metadata": {"file_path": "dask/array/percentile.py", "file_name": "percentile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 151, "span_ids": ["percentile"], "tokens": 399}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def percentile(a, q, interpolation=\"linear\", method=\"default\"):\n # ... other code\n if (\n internal_method == \"tdigest\"\n and interpolation == \"linear\"\n and (np.issubdtype(dtype, np.floating) or np.issubdtype(dtype, np.integer))\n ):\n\n from dask.utils import import_required\n\n import_required(\n \"crick\", \"crick is a required dependency for using the t-digest method.\"\n )\n\n name = \"percentile_tdigest_chunk-\" + token\n dsk = dict(\n ((name, i), (_tdigest_chunk, key))\n for i, key in enumerate(a.__dask_keys__())\n )\n\n name2 = \"percentile_tdigest-\" + token\n\n dsk2 = {(name2, 0): (_percentiles_from_tdigest, q, sorted(dsk))}\n\n # Otherwise use the custom percentile algorithm\n else:\n # Add 0 and 100 during calculation for more robust behavior (hopefully)\n calc_q = np.pad(q, 1, mode=\"constant\")\n calc_q[-1] = 100\n name = \"percentile_chunk-\" + token\n dsk = dict(\n ((name, i), (_percentile, key, calc_q, interpolation))\n for i, key in enumerate(a.__dask_keys__())\n )\n\n name2 = \"percentile-\" + token\n dsk2 = {\n (name2, 0): (\n merge_percentiles,\n q,\n [calc_q] * len(a.chunks[0]),\n sorted(dsk),\n interpolation,\n )\n }\n\n dsk = merge(dsk, dsk2)\n graph = HighLevelGraph.from_collections(name2, dsk, dependencies=[a])\n return Array(graph, name2, chunks=((len(q),),), dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles_merge_percentiles.combined_vals_counts.merge_sorted_map_zip_va": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles_merge_percentiles.combined_vals_counts.merge_sorted_map_zip_va", "embedding": null, "metadata": {"file_path": "dask/array/percentile.py", "file_name": "percentile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 154, "end_line": 229, "span_ids": ["merge_percentiles"], "tokens": 800}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_percentiles(finalq, qs, vals, interpolation=\"lower\", Ns=None):\n \"\"\"Combine several percentile calculations of different data.\n\n Parameters\n ----------\n\n finalq : numpy.array\n Percentiles to compute (must use same scale as ``qs``).\n qs : sequence of :class:`numpy.array`s\n Percentiles calculated on different sets of data.\n vals : sequence of :class:`numpy.array`s\n Resulting values associated with percentiles ``qs``.\n Ns : sequence of integers\n The number of data elements associated with each data set.\n interpolation : {'linear', 'lower', 'higher', 'midpoint', 'nearest'}\n Specify the type of interpolation to use to calculate final\n percentiles. For more information, see :func:`numpy.percentile`.\n\n Examples\n --------\n\n >>> finalq = [10, 20, 30, 40, 50, 60, 70, 80]\n >>> qs = [[20, 40, 60, 80], [20, 40, 60, 80]]\n >>> vals = [np.array([1, 2, 3, 4]), np.array([10, 11, 12, 13])]\n >>> Ns = [100, 100] # Both original arrays had 100 elements\n\n >>> merge_percentiles(finalq, qs, vals, Ns=Ns)\n array([ 1, 2, 3, 4, 10, 11, 12, 13])\n \"\"\"\n if isinstance(finalq, Iterator):\n finalq = list(finalq)\n finalq = np.array(finalq)\n qs = list(map(list, qs))\n vals = list(vals)\n if Ns is None:\n vals, Ns = zip(*vals)\n Ns = list(Ns)\n\n L = list(zip(*[(q, val, N) for q, val, N in zip(qs, vals, Ns) if N]))\n if not L:\n raise ValueError(\"No non-trivial arrays found\")\n qs, vals, Ns = L\n\n # TODO: Perform this check above in percentile once dtype checking is easy\n # Here we silently change meaning\n if vals[0].dtype.name == \"category\":\n result = merge_percentiles(\n finalq, qs, [v.codes for v in vals], interpolation, Ns\n )\n import pandas as pd\n\n return pd.Categorical.from_codes(result, vals[0].categories, vals[0].ordered)\n if not np.issubdtype(vals[0].dtype, np.number):\n interpolation = \"nearest\"\n\n if len(vals) != len(qs) or len(Ns) != len(qs):\n raise ValueError(\"qs, vals, and Ns parameters must be the same length\")\n\n # transform qs and Ns into number of observations between percentiles\n counts = []\n for q, N in zip(qs, Ns):\n count = np.empty(len(q))\n count[1:] = np.diff(q)\n count[0] = q[0]\n count *= N\n counts.append(count)\n\n # Sort by calculated percentile values, then number of observations.\n # >95% of the time in this function is spent in `merge_sorted` below.\n # An alternative that uses numpy sort is shown. It is sometimes\n # comparable to, but typically slower than, `merge_sorted`.\n #\n # >>> A = np.concatenate(map(np.array, map(zip, vals, counts)))\n # >>> A.sort(0, kind='mergesort')\n\n combined_vals_counts = merge_sorted(*map(zip, vals, counts))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles.combined_vals_combined_c_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/percentile.py_merge_percentiles.combined_vals_combined_c_", "embedding": null, "metadata": {"file_path": "dask/array/percentile.py", "file_name": "percentile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 270, "span_ids": ["merge_percentiles"], "tokens": 401}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_percentiles(finalq, qs, vals, interpolation=\"lower\", Ns=None):\n # ... other code\n combined_vals, combined_counts = zip(*combined_vals_counts)\n\n combined_vals = np.array(combined_vals)\n combined_counts = np.array(combined_counts)\n\n # percentile-like, but scaled by total number of observations\n combined_q = np.cumsum(combined_counts)\n\n # rescale finalq percentiles to match combined_q\n desired_q = finalq * sum(Ns)\n\n # the behavior of different interpolation methods should be\n # investigated further.\n if interpolation == \"linear\":\n rv = np.interp(desired_q, combined_q, combined_vals)\n else:\n left = np.searchsorted(combined_q, desired_q, side=\"left\")\n right = np.searchsorted(combined_q, desired_q, side=\"right\") - 1\n np.minimum(left, len(combined_vals) - 1, left) # don't exceed max index\n lower = np.minimum(left, right)\n upper = np.maximum(left, right)\n if interpolation == \"lower\":\n rv = combined_vals[lower]\n elif interpolation == \"higher\":\n rv = combined_vals[upper]\n elif interpolation == \"midpoint\":\n rv = 0.5 * (combined_vals[lower] + combined_vals[upper])\n elif interpolation == \"nearest\":\n lower_residual = np.abs(combined_q[lower] - desired_q)\n upper_residual = np.abs(combined_q[upper] - desired_q)\n mask = lower_residual > upper_residual\n index = lower # alias; we no longer need lower\n index[mask] = upper[mask]\n rv = combined_vals[index]\n else:\n raise ValueError(\n \"interpolation can only be 'linear', 'lower', \"\n \"'higher', 'midpoint', or 'nearest'\"\n )\n return rv", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_numbers_doc_wraps.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_numbers_doc_wraps.return._", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["imports", "doc_wraps"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numbers\nimport warnings\nfrom itertools import product\nfrom numbers import Integral\nfrom operator import getitem\n\nimport numpy as np\n\nfrom .core import (\n normalize_chunks,\n Array,\n slices_from_chunks,\n asarray,\n broadcast_shapes,\n broadcast_to,\n)\nfrom .creation import arange\nfrom ..base import tokenize\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import ignoring, random_state_data, derived_from, skip_doctest\n\n\ndef doc_wraps(func):\n \"\"\" Copy docstring from one function to another \"\"\"\n warnings.warn(\n \"dask.array.random.doc_wraps is deprecated and will be removed in a future version\",\n FutureWarning,\n )\n\n def _(func2):\n if func.__doc__ is not None:\n func2.__doc__ = skip_doctest(func.__doc__)\n return func2\n\n return _", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState_RandomState.seed.self__numpy_state_seed_se": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState_RandomState.seed.self__numpy_state_seed_se", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 76, "span_ids": ["RandomState.seed", "RandomState", "RandomState.__init__"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n \"\"\"\n Mersenne Twister pseudo-random number generator\n\n This object contains state to deterministically generate pseudo-random\n numbers from a variety of probability distributions. It is identical to\n ``np.random.RandomState`` except that all functions also take a ``chunks=``\n keyword argument.\n\n Parameters\n ----------\n seed: Number\n Object to pass to RandomState to serve as deterministic seed\n RandomState: Callable[seed] -> RandomState\n A callable that, when provided with a ``seed`` keyword provides an\n object that operates identically to ``np.random.RandomState`` (the\n default). This might also be a function that returns a\n ``randomgen.RandomState``, ``mkl_random``, or\n ``cupy.random.RandomState`` object.\n\n Examples\n --------\n >>> import dask.array as da\n >>> state = da.random.RandomState(1234) # a seed\n >>> x = state.normal(10, 0.1, size=3, chunks=(2,))\n >>> x.compute()\n array([10.01867852, 10.04812289, 9.89649746])\n\n See Also\n --------\n np.random.RandomState\n \"\"\"\n\n def __init__(self, seed=None, RandomState=None):\n self._numpy_state = np.random.RandomState(seed)\n self._RandomState = RandomState\n\n def seed(self, seed=None):\n self._numpy_state.seed(seed)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap_RandomState._wrap.vals._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap_RandomState._wrap.vals._", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 159, "span_ids": ["RandomState._wrap"], "tokens": 673}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n def _wrap(\n self, funcname, *args, size=None, chunks=\"auto\", extra_chunks=(), **kwargs\n ):\n \"\"\"Wrap numpy random function to produce dask.array random function\n\n extra_chunks should be a chunks tuple to append to the end of chunks\n \"\"\"\n if size is not None and not isinstance(size, (tuple, list)):\n size = (size,)\n\n args_shapes = {ar.shape for ar in args if isinstance(ar, (Array, np.ndarray))}\n args_shapes.union(\n {ar.shape for ar in kwargs.values() if isinstance(ar, (Array, np.ndarray))}\n )\n\n shapes = list(args_shapes)\n if size is not None:\n shapes.extend([size])\n # broadcast to the final size(shape)\n size = broadcast_shapes(*shapes)\n chunks = normalize_chunks(\n chunks,\n size, # ideally would use dtype here\n dtype=kwargs.get(\"dtype\", np.float64),\n )\n slices = slices_from_chunks(chunks)\n\n def _broadcast_any(ar, shape, chunks):\n if isinstance(ar, Array):\n return broadcast_to(ar, shape).rechunk(chunks)\n if isinstance(ar, np.ndarray):\n return np.ascontiguousarray(np.broadcast_to(ar, shape))\n\n # Broadcast all arguments, get tiny versions as well\n # Start adding the relevant bits to the graph\n dsk = {}\n dsks = []\n lookup = {}\n small_args = []\n dependencies = []\n for i, ar in enumerate(args):\n if isinstance(ar, (np.ndarray, Array)):\n res = _broadcast_any(ar, size, chunks)\n if isinstance(res, Array):\n dependencies.append(res)\n dsks.append(res.dask)\n lookup[i] = res.name\n elif isinstance(res, np.ndarray):\n name = \"array-{}\".format(tokenize(res))\n lookup[i] = name\n dsk[name] = res\n small_args.append(ar[tuple(0 for _ in ar.shape)])\n else:\n small_args.append(ar)\n\n small_kwargs = {}\n for key, ar in kwargs.items():\n if isinstance(ar, (np.ndarray, Array)):\n res = _broadcast_any(ar, size, chunks)\n if isinstance(res, Array):\n dependencies.append(res)\n dsks.append(res.dask)\n lookup[key] = res.name\n elif isinstance(res, np.ndarray):\n name = \"array-{}\".format(tokenize(res))\n lookup[key] = name\n dsk[name] = res\n small_kwargs[key] = ar[tuple(0 for _ in ar.shape)]\n else:\n small_kwargs[key] = ar\n\n sizes = list(product(*chunks))\n seeds = random_state_data(len(sizes), self._numpy_state)\n token = tokenize(seeds, size, chunks, args, kwargs)\n name = \"{0}-{1}\".format(funcname, token)\n\n keys = product(\n [name], *([range(len(bd)) for bd in chunks] + [[0]] * len(extra_chunks))\n )\n blocks = product(*[range(len(bd)) for bd in chunks])\n\n vals = []\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap.for_seed_size_slc_bloc_RandomState._wrap.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._wrap.for_seed_size_slc_bloc_RandomState._wrap.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 197, "span_ids": ["RandomState._wrap"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n def _wrap(\n self, funcname, *args, size=None, chunks=\"auto\", extra_chunks=(), **kwargs\n ):\n # ... other code\n for seed, size, slc, block in zip(seeds, sizes, slices, blocks):\n arg = []\n for i, ar in enumerate(args):\n if i not in lookup:\n arg.append(ar)\n else:\n if isinstance(ar, Array):\n dependencies.append(ar)\n arg.append((lookup[i],) + block)\n else: # np.ndarray\n arg.append((getitem, lookup[i], slc))\n kwrg = {}\n for k, ar in kwargs.items():\n if k not in lookup:\n kwrg[k] = ar\n else:\n if isinstance(ar, Array):\n dependencies.append(ar)\n kwrg[k] = (lookup[k],) + block\n else: # np.ndarray\n kwrg[k] = (getitem, lookup[k], slc)\n vals.append(\n (_apply_random, self._RandomState, funcname, seed, size, arg, kwrg)\n )\n\n meta = _apply_random(\n self._RandomState,\n funcname,\n seed,\n (0,) * len(size),\n small_args,\n small_kwargs,\n )\n\n dsk.update(dict(zip(keys, vals)))\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=dependencies)\n return Array(graph, name, chunks + extra_chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.beta_RandomState.with_ignoring_AttributeEr.choice.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.beta_RandomState.with_ignoring_AttributeEr.choice.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 199, "end_line": 283, "span_ids": ["RandomState.binomial", "RandomState.beta", "RandomState.chisquare", "RandomState:3"], "tokens": 801}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def beta(self, a, b, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"beta\", a, b, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def binomial(self, n, p, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"binomial\", n, p, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def chisquare(self, df, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"chisquare\", df, size=size, chunks=chunks, **kwargs)\n\n with ignoring(AttributeError):\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def choice(self, a, size=None, replace=True, p=None, chunks=\"auto\"):\n dependencies = []\n # Normalize and validate `a`\n if isinstance(a, Integral):\n # On windows the output dtype differs if p is provided or\n # absent, see https://github.com/numpy/numpy/issues/9867\n dummy_p = np.array([1]) if p is not None else p\n dtype = np.random.choice(1, size=(), p=dummy_p).dtype\n len_a = a\n if a < 0:\n raise ValueError(\"a must be greater than 0\")\n else:\n a = asarray(a)\n a = a.rechunk(a.shape)\n dtype = a.dtype\n if a.ndim != 1:\n raise ValueError(\"a must be one dimensional\")\n len_a = len(a)\n dependencies.append(a)\n a = a.__dask_keys__()[0]\n\n # Normalize and validate `p`\n if p is not None:\n if not isinstance(p, Array):\n # If p is not a dask array, first check the sum is close\n # to 1 before converting.\n p = np.asarray(p)\n if not np.isclose(p.sum(), 1, rtol=1e-7, atol=0):\n raise ValueError(\"probabilities do not sum to 1\")\n p = asarray(p)\n else:\n p = p.rechunk(p.shape)\n\n if p.ndim != 1:\n raise ValueError(\"p must be one dimensional\")\n if len(p) != len_a:\n raise ValueError(\"a and p must have the same size\")\n\n dependencies.append(p)\n p = p.__dask_keys__()[0]\n\n if size is None:\n size = ()\n elif not isinstance(size, (tuple, list)):\n size = (size,)\n\n chunks = normalize_chunks(chunks, size, dtype=np.float64)\n if not replace and len(chunks[0]) > 1:\n err_msg = (\n \"replace=False is not currently supported for \"\n \"dask.array.choice with multi-chunk output \"\n \"arrays\"\n )\n raise NotImplementedError(err_msg)\n sizes = list(product(*chunks))\n state_data = random_state_data(len(sizes), self._numpy_state)\n\n name = \"da.random.choice-%s\" % tokenize(\n state_data, size, chunks, a, replace, p\n )\n keys = product([name], *(range(len(bd)) for bd in chunks))\n dsk = {\n k: (_choice, state, a, size, replace, p)\n for k, state, size in zip(keys, state_data, sizes)\n }\n\n graph = HighLevelGraph.from_collections(\n name, dsk, dependencies=dependencies\n )\n return Array(graph, name, chunks, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._derived_from_np_random_RandomState.multinomial.return.self__wrap_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState._derived_from_np_random_RandomState.multinomial.return.self__wrap_", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 285, "end_line": 339, "span_ids": ["RandomState.f", "RandomState.multinomial", "RandomState.lognormal", "RandomState.hypergeometric", "RandomState.logistic", "RandomState:3", "RandomState.gamma", "RandomState.gumbel", "RandomState.exponential", "RandomState.logseries", "RandomState.laplace", "RandomState.geometric"], "tokens": 726}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n # @derived_from(np.random.RandomState, skipblocks=1)\n # def dirichlet(self, alpha, size=None, chunks=\"auto\"):\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def exponential(self, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"exponential\", scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def f(self, dfnum, dfden, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"f\", dfnum, dfden, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def gamma(self, shape, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"gamma\", shape, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def geometric(self, p, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"geometric\", p, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def gumbel(self, loc=0.0, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"gumbel\", loc, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def hypergeometric(self, ngood, nbad, nsample, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"hypergeometric\", ngood, nbad, nsample, size=size, chunks=chunks, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def laplace(self, loc=0.0, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"laplace\", loc, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def logistic(self, loc=0.0, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"logistic\", loc, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def lognormal(self, mean=0.0, sigma=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"lognormal\", mean, sigma, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def logseries(self, p, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"logseries\", p, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def multinomial(self, n, pvals, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"multinomial\",\n n,\n pvals,\n size=size,\n chunks=chunks,\n extra_chunks=((len(pvals),),),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.negative_binomial_RandomState.rayleigh.return.self__wrap_rayleigh_sc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.negative_binomial_RandomState.rayleigh.return.self__wrap_rayleigh_sc", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 341, "end_line": 404, "span_ids": ["RandomState.pareto", "RandomState.noncentral_chisquare", "RandomState.noncentral_f", "RandomState:4", "RandomState.normal", "RandomState.permutation", "RandomState.power", "RandomState.randint", "RandomState.rayleigh", "RandomState.random_sample", "RandomState.random_integers", "RandomState.poisson", "RandomState.negative_binomial"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def negative_binomial(self, n, p, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"negative_binomial\", n, p, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def noncentral_chisquare(self, df, nonc, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"noncentral_chisquare\", df, nonc, size=size, chunks=chunks, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def noncentral_f(self, dfnum, dfden, nonc, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"noncentral_f\", dfnum, dfden, nonc, size=size, chunks=chunks, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def normal(self, loc=0.0, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"normal\", loc, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def pareto(self, a, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"pareto\", a, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def permutation(self, x):\n from .slicing import shuffle_slice\n\n if isinstance(x, numbers.Number):\n x = arange(x, chunks=\"auto\")\n\n index = np.arange(len(x))\n self._numpy_state.shuffle(index)\n return shuffle_slice(x, index)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def poisson(self, lam=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"poisson\", lam, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def power(self, a, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"power\", a, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def randint(self, low, high=None, size=None, chunks=\"auto\", dtype=\"l\", **kwargs):\n return self._wrap(\n \"randint\", low, high, size=size, chunks=chunks, dtype=dtype, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def random_integers(self, low, high=None, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"random_integers\", low, high, size=size, chunks=chunks, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def random_sample(self, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"random_sample\", size=size, chunks=chunks, **kwargs)\n\n random = random_sample\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def rayleigh(self, scale=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"rayleigh\", scale, size=size, chunks=chunks, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.standard_cauchy_RandomState.zipf.return.self__wrap_zipf_a_siz": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py_RandomState.standard_cauchy_RandomState.zipf.return.self__wrap_zipf_a_siz", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 406, "end_line": 454, "span_ids": ["RandomState.tomaxint", "RandomState.standard_t", "RandomState.triangular", "RandomState.weibull", "RandomState.standard_gamma", "RandomState.standard_cauchy", "RandomState.standard_normal", "RandomState.vonmises", "RandomState.zipf", "RandomState.uniform", "RandomState.standard_exponential", "RandomState.wald"], "tokens": 665}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RandomState(object):\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def standard_cauchy(self, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"standard_cauchy\", size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def standard_exponential(self, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"standard_exponential\", size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def standard_gamma(self, shape, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"standard_gamma\", shape, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def standard_normal(self, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"standard_normal\", size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def standard_t(self, df, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"standard_t\", df, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def tomaxint(self, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"tomaxint\", size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def triangular(self, left, mode, right, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\n \"triangular\", left, mode, right, size=size, chunks=chunks, **kwargs\n )\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def uniform(self, low=0.0, high=1.0, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"uniform\", low, high, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def vonmises(self, mu, kappa, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"vonmises\", mu, kappa, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def wald(self, mean, scale, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"wald\", mean, scale, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def weibull(self, a, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"weibull\", a, size=size, chunks=chunks, **kwargs)\n\n @derived_from(np.random.RandomState, skipblocks=1)\n def zipf(self, a, size=None, chunks=\"auto\", **kwargs):\n return self._wrap(\"zipf\", a, size=size, chunks=chunks, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py__choice_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/random.py__choice_", "embedding": null, "metadata": {"file_path": "dask/array/random.py", "file_name": "random.py", "file_type": "text/x-python", "category": "implementation", "start_line": 457, "end_line": 522, "span_ids": ["_apply_random", "impl", "_choice"], "tokens": 468}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _choice(state_data, a, size, replace, p):\n state = np.random.RandomState(state_data)\n return state.choice(a, size=size, replace=replace, p=p)\n\n\ndef _apply_random(RandomState, funcname, state_data, size, args, kwargs):\n \"\"\"Apply RandomState method with seed\"\"\"\n if RandomState is None:\n RandomState = np.random.RandomState\n state = RandomState(state_data)\n func = getattr(state, funcname)\n return func(*args, size=size, **kwargs)\n\n\n_state = RandomState()\n\n\nseed = _state.seed\n\n\nbeta = _state.beta\nbinomial = _state.binomial\nchisquare = _state.chisquare\nif hasattr(_state, \"choice\"):\n choice = _state.choice\nexponential = _state.exponential\nf = _state.f\ngamma = _state.gamma\ngeometric = _state.geometric\ngumbel = _state.gumbel\nhypergeometric = _state.hypergeometric\nlaplace = _state.laplace\nlogistic = _state.logistic\nlognormal = _state.lognormal\nlogseries = _state.logseries\nmultinomial = _state.multinomial\nnegative_binomial = _state.negative_binomial\nnoncentral_chisquare = _state.noncentral_chisquare\nnoncentral_f = _state.noncentral_f\nnormal = _state.normal\npareto = _state.pareto\npermutation = _state.permutation\npoisson = _state.poisson\npower = _state.power\nrayleigh = _state.rayleigh\nrandom_sample = _state.random_sample\nrandom = random_sample\nrandint = _state.randint\nrandom_integers = _state.random_integers\ntriangular = _state.triangular\nuniform = _state.uniform\nvonmises = _state.vonmises\nwald = _state.wald\nweibull = _state.weibull\nzipf = _state.zipf\n\n\"\"\"\nStandard distributions\n\"\"\"\n\nstandard_cauchy = _state.standard_cauchy\nstandard_exponential = _state.standard_exponential\nstandard_gamma = _state.standard_gamma\nstandard_normal = _state.standard_normal\nstandard_t = _state.standard_t", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py___config": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py___config", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["docstring"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nThe rechunk module defines:\n intersect_chunks: a function for\n converting chunks to new dimensions\n rechunk: a function to convert the blocks\n of an existing dask array to new chunks or blockshape\n\"\"\"\nimport math\nimport heapq\nfrom functools import reduce\n\nfrom itertools import product, chain, count\nfrom operator import getitem, add, mul, itemgetter\n\nimport numpy as np\nimport tlz as toolz\nfrom tlz import accumulate\n\nfrom ..base import tokenize\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import parse_bytes\nfrom .core import concatenate3, Array, normalize_chunks\nfrom .utils import validate_axis\nfrom .wrap import empty\nfrom .. import config", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_cumdims_label_cumdims_label.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_cumdims_label_cumdims_label.return._", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 28, "end_line": 38, "span_ids": ["cumdims_label"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def cumdims_label(chunks, const):\n \"\"\"Internal utility for cumulative sum with label.\n\n >>> cumdims_label(((5, 3, 3), (2, 2, 1)), 'n') # doctest: +NORMALIZE_WHITESPACE\n [(('n', 0), ('n', 5), ('n', 8), ('n', 11)),\n (('n', 0), ('n', 2), ('n', 4), ('n', 5))]\n \"\"\"\n return [\n tuple(zip((const,) * (1 + len(bds)), accumulate(add, (0,) + bds)))\n for bds in chunks\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__breakpoints__breakpoints.return.tuple_sorted_cumold_cum": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__breakpoints__breakpoints.return.tuple_sorted_cumold_cum", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 52, "span_ids": ["_breakpoints"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _breakpoints(cumold, cumnew):\n \"\"\"\n\n >>> new = cumdims_label(((2, 3), (2, 2, 1)), 'n')\n >>> old = cumdims_label(((2, 2, 1), (5,)), 'o')\n\n >>> _breakpoints(new[0], old[0])\n (('n', 0), ('o', 0), ('n', 2), ('o', 2), ('o', 4), ('n', 5), ('o', 5))\n >>> _breakpoints(new[1], old[1])\n (('n', 0), ('o', 0), ('n', 2), ('n', 4), ('n', 5), ('o', 5))\n \"\"\"\n return tuple(sorted(cumold + cumnew, key=itemgetter(1)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__intersect_1d__intersect_1d.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__intersect_1d__intersect_1d.return.ret", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 111, "span_ids": ["_intersect_1d"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _intersect_1d(breaks):\n \"\"\"\n Internal utility to intersect chunks for 1d after preprocessing.\n\n >>> new = cumdims_label(((2, 3), (2, 2, 1)), 'n')\n >>> old = cumdims_label(((2, 2, 1), (5,)), 'o')\n\n >>> _intersect_1d(_breakpoints(old[0], new[0])) # doctest: +NORMALIZE_WHITESPACE\n [[(0, slice(0, 2, None))],\n [(1, slice(0, 2, None)), (2, slice(0, 1, None))]]\n >>> _intersect_1d(_breakpoints(old[1], new[1])) # doctest: +NORMALIZE_WHITESPACE\n [[(0, slice(0, 2, None))],\n [(0, slice(2, 4, None))],\n [(0, slice(4, 5, None))]]\n\n Parameters\n ----------\n\n breaks: list of tuples\n Each tuple is ('o', 8) or ('n', 8)\n These are pairs of 'o' old or new 'n'\n indicator with a corresponding cumulative sum.\n\n Uses 'o' and 'n' to make new tuples of slices for\n the new block crosswalk to old blocks.\n \"\"\"\n start = 0\n last_end = 0\n old_idx = 0\n ret = []\n ret_next = []\n for idx in range(1, len(breaks)):\n label, br = breaks[idx]\n last_label, last_br = breaks[idx - 1]\n if last_label == \"n\":\n if ret_next:\n ret.append(ret_next)\n ret_next = []\n if last_label == \"o\":\n start = 0\n else:\n start = last_end\n end = br - last_br + start\n last_end = end\n if br == last_br:\n if label == \"o\":\n old_idx += 1\n continue\n ret_next.append((old_idx, slice(start, end)))\n if label == \"o\":\n old_idx += 1\n start = 0\n\n if ret_next:\n ret.append(ret_next)\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__old_to_new__old_to_new.return.old_to_new": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__old_to_new__old_to_new.return.old_to_new", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 114, "end_line": 155, "span_ids": ["_old_to_new"], "tokens": 490}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _old_to_new(old_chunks, new_chunks):\n \"\"\"Helper to build old_chunks to new_chunks.\n\n Handles missing values, as long as the missing dimension\n is unchanged.\n\n Examples\n --------\n >>> old = ((10, 10, 10, 10, 10), )\n >>> new = ((25, 5, 20), )\n >>> _old_to_new(old, new) # doctest: +NORMALIZE_WHITESPACE\n [[[(0, slice(0, 10, None)), (1, slice(0, 10, None)), (2, slice(0, 5, None))],\n [(2, slice(5, 10, None))],\n [(3, slice(0, 10, None)), (4, slice(0, 10, None))]]]\n \"\"\"\n old_known = [x for x in old_chunks if not any(math.isnan(y) for y in x)]\n new_known = [x for x in new_chunks if not any(math.isnan(y) for y in x)]\n\n n_missing = [sum(math.isnan(y) for y in x) for x in old_chunks]\n n_missing2 = [sum(math.isnan(y) for y in x) for x in new_chunks]\n\n cmo = cumdims_label(old_known, \"o\")\n cmn = cumdims_label(new_known, \"n\")\n\n sums = [sum(o) for o in old_known]\n sums2 = [sum(n) for n in new_known]\n\n if not sums == sums2:\n raise ValueError(\"Cannot change dimensions from %r to %r\" % (sums, sums2))\n if not n_missing == n_missing2:\n raise ValueError(\n \"Chunks must be unchanging along unknown dimensions.\\n\\n\"\n \"A possible solution:\\n x.compute_chunk_sizes()\"\n )\n\n old_to_new = [_intersect_1d(_breakpoints(cm[0], cm[1])) for cm in zip(cmo, cmn)]\n for idx, missing in enumerate(n_missing):\n if missing:\n # Missing dimensions are always unchanged, so old -> new is everything\n extra = [[(i, slice(0, None))] for i in range(missing)]\n old_to_new.insert(idx, extra)\n return old_to_new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_intersect_chunks_intersect_chunks.return.cross": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_intersect_chunks_intersect_chunks.return.cross", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 158, "end_line": 182, "span_ids": ["intersect_chunks"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def intersect_chunks(old_chunks, new_chunks):\n \"\"\"\n Make dask.array slices as intersection of old and new chunks.\n\n >>> intersections = intersect_chunks(((4, 4), (2,)),\n ... ((8,), (1, 1)))\n >>> list(intersections) # doctest: +NORMALIZE_WHITESPACE\n [(((0, slice(0, 4, None)), (0, slice(0, 1, None))),\n ((1, slice(0, 4, None)), (0, slice(0, 1, None)))),\n (((0, slice(0, 4, None)), (0, slice(1, 2, None))),\n ((1, slice(0, 4, None)), (0, slice(1, 2, None))))]\n\n Parameters\n ----------\n\n old_chunks : iterable of tuples\n block sizes along each dimension (convert from old_chunks)\n new_chunks: iterable of tuples\n block sizes along each dimension (converts to new_chunks)\n \"\"\"\n old_to_new = _old_to_new(old_chunks, new_chunks)\n\n cross1 = product(*old_to_new)\n cross = chain(tuple(product(*cr)) for cr in cross1)\n return cross", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_rechunk_rechunk.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_rechunk_rechunk.return.x", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 254, "span_ids": ["rechunk"], "tokens": 618}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def rechunk(x, chunks=\"auto\", threshold=None, block_size_limit=None):\n \"\"\"\n Convert blocks in dask array x for new chunks.\n\n Parameters\n ----------\n x: dask array\n Array to be rechunked.\n chunks: int, tuple, dict or str, optional\n The new block dimensions to create. -1 indicates the full size of the\n corresponding dimension. Default is \"auto\" which automatically\n determines chunk sizes.\n threshold: int, optional\n The graph growth factor under which we don't bother introducing an\n intermediate step.\n block_size_limit: int, optional\n The maximum block size (in bytes) we want to produce\n Defaults to the configuration value ``array.chunk-size``\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = da.ones((1000, 1000), chunks=(100, 100))\n\n Specify uniform chunk sizes with a tuple\n\n >>> y = x.rechunk((1000, 10))\n\n Or chunk only specific dimensions with a dictionary\n\n >>> y = x.rechunk({0: 1000})\n\n Use the value ``-1`` to specify that you want a single chunk along a\n dimension or the value ``\"auto\"`` to specify that dask can freely rechunk a\n dimension to attain blocks of a uniform block size\n\n >>> y = x.rechunk({0: -1, 1: 'auto'}, block_size_limit=1e8)\n \"\"\"\n # don't rechunk if array is empty\n if x.ndim > 0 and all(s == 0 for s in x.shape):\n return x\n if isinstance(chunks, dict):\n chunks = {validate_axis(c, x.ndim): v for c, v in chunks.items()}\n for i in range(x.ndim):\n if i not in chunks:\n chunks[i] = x.chunks[i]\n if isinstance(chunks, (tuple, list)):\n chunks = tuple(lc if lc is not None else rc for lc, rc in zip(chunks, x.chunks))\n chunks = normalize_chunks(\n chunks, x.shape, limit=block_size_limit, dtype=x.dtype, previous_chunks=x.chunks\n )\n\n if chunks == x.chunks:\n return x\n ndim = x.ndim\n if not len(chunks) == ndim:\n raise ValueError(\"Provided chunks are not consistent with shape\")\n new_shapes = tuple(map(sum, chunks))\n\n for new, old in zip(new_shapes, x.shape):\n if new != old and not math.isnan(old) and not math.isnan(new):\n raise ValueError(\"Provided chunks are not consistent with shape\")\n\n steps = plan_rechunk(\n x.chunks, chunks, x.dtype.itemsize, threshold, block_size_limit\n )\n for c in steps:\n x = _compute_rechunk(x, c)\n\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__number_of_blocks_divide_to_width.return.tuple_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__number_of_blocks_divide_to_width.return.tuple_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 257, "end_line": 291, "span_ids": ["estimate_graph_size", "divide_to_width", "_number_of_blocks", "_largest_block_size"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _number_of_blocks(chunks):\n return reduce(mul, map(len, chunks))\n\n\ndef _largest_block_size(chunks):\n return reduce(mul, map(max, chunks))\n\n\ndef estimate_graph_size(old_chunks, new_chunks):\n \"\"\"Estimate the graph size during a rechunk computation.\"\"\"\n # Estimate the number of intermediate blocks that will be produced\n # (we don't use intersect_chunks() which is much more expensive)\n crossed_size = reduce(\n mul,\n (\n (len(oc) + len(nc) - 1 if oc != nc else len(oc))\n for oc, nc in zip(old_chunks, new_chunks)\n ),\n )\n return crossed_size\n\n\ndef divide_to_width(desired_chunks, max_width):\n \"\"\"Minimally divide the given chunks so as to make the largest chunk\n width less or equal than *max_width*.\n \"\"\"\n chunks = []\n for c in desired_chunks:\n nb_divides = int(np.ceil(c / max_width))\n for i in range(nb_divides):\n n = c // (nb_divides - i)\n chunks.append(n)\n c -= n\n assert c == 0\n return tuple(chunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_merge_to_number_merge_to_number.return.tuple_filter_None_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_merge_to_number_merge_to_number.return.tuple_filter_None_chunks", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 294, "end_line": 345, "span_ids": ["merge_to_number"], "tokens": 436}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_to_number(desired_chunks, max_number):\n \"\"\"Minimally merge the given chunks so as to drop the number of\n chunks below *max_number*, while minimizing the largest width.\n \"\"\"\n if len(desired_chunks) <= max_number:\n return desired_chunks\n\n distinct = set(desired_chunks)\n if len(distinct) == 1:\n # Fast path for homogeneous target, also ensuring a regular result\n w = distinct.pop()\n n = len(desired_chunks)\n total = n * w\n\n desired_width = total // max_number\n width = w * (desired_width // w)\n adjust = (total - max_number * width) // w\n\n return (width + w,) * adjust + (width,) * (max_number - adjust)\n\n desired_width = sum(desired_chunks) // max_number\n nmerges = len(desired_chunks) - max_number\n\n heap = [\n (desired_chunks[i] + desired_chunks[i + 1], i, i + 1)\n for i in range(len(desired_chunks) - 1)\n ]\n heapq.heapify(heap)\n\n chunks = list(desired_chunks)\n\n while nmerges > 0:\n # Find smallest interval to merge\n width, i, j = heapq.heappop(heap)\n # If interval was made invalid by another merge, recompute\n # it, re-insert it and retry.\n if chunks[j] == 0:\n j += 1\n while chunks[j] == 0:\n j += 1\n heapq.heappush(heap, (chunks[i] + chunks[j], i, j))\n continue\n elif chunks[i] + chunks[j] != width:\n heapq.heappush(heap, (chunks[i] + chunks[j], i, j))\n continue\n # Merge\n assert chunks[i] != 0\n chunks[i] = 0 # mark deleted\n chunks[j] = width\n nmerges -= 1\n\n return tuple(filter(None, chunks))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_merge_rechunk_find_merge_rechunk.return.tuple_chunks_memory_lim": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_merge_rechunk_find_merge_rechunk.return.tuple_chunks_memory_lim", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 348, "end_line": 418, "span_ids": ["find_merge_rechunk"], "tokens": 684}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def find_merge_rechunk(old_chunks, new_chunks, block_size_limit):\n \"\"\"\n Find an intermediate rechunk that would merge some adjacent blocks\n together in order to get us nearer the *new_chunks* target, without\n violating the *block_size_limit* (in number of elements).\n \"\"\"\n ndim = len(old_chunks)\n\n old_largest_width = [max(c) for c in old_chunks]\n new_largest_width = [max(c) for c in new_chunks]\n\n graph_size_effect = {\n dim: len(nc) / len(oc)\n for dim, (oc, nc) in enumerate(zip(old_chunks, new_chunks))\n }\n\n block_size_effect = {\n dim: new_largest_width[dim] / (old_largest_width[dim] or 1)\n for dim in range(ndim)\n }\n\n # Our goal is to reduce the number of nodes in the rechunk graph\n # by merging some adjacent chunks, so consider dimensions where we can\n # reduce the # of chunks\n merge_candidates = [dim for dim in range(ndim) if graph_size_effect[dim] <= 1.0]\n\n # Merging along each dimension reduces the graph size by a certain factor\n # and increases memory largest block size by a certain factor.\n # We want to optimize the graph size while staying below the given\n # block_size_limit. This is in effect a knapsack problem, except with\n # multiplicative values and weights. Just use a greedy algorithm\n # by trying dimensions in decreasing value / weight order.\n def key(k):\n gse = graph_size_effect[k]\n bse = block_size_effect[k]\n if bse == 1:\n bse = 1 + 1e-9\n return (np.log(gse) / np.log(bse)) if bse > 0 else 0\n\n sorted_candidates = sorted(merge_candidates, key=key)\n\n largest_block_size = reduce(mul, old_largest_width)\n\n chunks = list(old_chunks)\n memory_limit_hit = False\n\n for dim in sorted_candidates:\n # Examine this dimension for possible graph reduction\n new_largest_block_size = (\n largest_block_size * new_largest_width[dim] // (old_largest_width[dim] or 1)\n )\n if new_largest_block_size <= block_size_limit:\n # Full replacement by new chunks is possible\n chunks[dim] = new_chunks[dim]\n largest_block_size = new_largest_block_size\n else:\n # Try a partial rechunk, dividing the new chunks into\n # smaller pieces\n largest_width = old_largest_width[dim]\n chunk_limit = int(block_size_limit * largest_width / largest_block_size)\n c = divide_to_width(new_chunks[dim], chunk_limit)\n if len(c) <= len(old_chunks[dim]):\n # We manage to reduce the number of blocks, so do it\n chunks[dim] = c\n largest_block_size = largest_block_size * max(c) // largest_width\n\n memory_limit_hit = True\n\n assert largest_block_size == _largest_block_size(chunks)\n assert largest_block_size <= block_size_limit\n return tuple(chunks), memory_limit_hit", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_split_rechunk_find_split_rechunk.return.tuple_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_find_split_rechunk_find_split_rechunk.return.tuple_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 421, "end_line": 446, "span_ids": ["find_split_rechunk"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def find_split_rechunk(old_chunks, new_chunks, graph_size_limit):\n \"\"\"\n Find an intermediate rechunk that would split some chunks to\n get us nearer *new_chunks*, without violating the *graph_size_limit*.\n \"\"\"\n ndim = len(old_chunks)\n\n chunks = list(old_chunks)\n\n for dim in range(ndim):\n graph_size = estimate_graph_size(chunks, new_chunks)\n if graph_size > graph_size_limit:\n break\n if len(old_chunks[dim]) > len(new_chunks[dim]):\n # It's not interesting to split\n continue\n # Merge the new chunks so as to stay within the graph size budget\n max_number = int(len(old_chunks[dim]) * graph_size_limit / graph_size)\n c = merge_to_number(new_chunks[dim], max_number)\n assert len(c) <= max_number\n # Consider the merge successful if its result has a greater length\n # and smaller max width than the old chunks\n if len(c) >= len(old_chunks[dim]) and max(c) <= max(old_chunks[dim]):\n chunks[dim] = c\n\n return tuple(chunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_plan_rechunk_plan_rechunk.return.steps_new_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_plan_rechunk_plan_rechunk.return.steps_new_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 449, "end_line": 528, "span_ids": ["plan_rechunk"], "tokens": 631}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def plan_rechunk(\n old_chunks, new_chunks, itemsize, threshold=None, block_size_limit=None\n):\n \"\"\"Plan an iterative rechunking from *old_chunks* to *new_chunks*.\n The plan aims to minimize the rechunk graph size.\n\n Parameters\n ----------\n itemsize: int\n The item size of the array\n threshold: int\n The graph growth factor under which we don't bother\n introducing an intermediate step\n block_size_limit: int\n The maximum block size (in bytes) we want to produce during an\n intermediate step\n\n Notes\n -----\n No intermediate steps will be planned if any dimension of ``old_chunks``\n is unknown.\n \"\"\"\n threshold = threshold or config.get(\"array.rechunk-threshold\")\n block_size_limit = block_size_limit or config.get(\"array.chunk-size\")\n if isinstance(block_size_limit, str):\n block_size_limit = parse_bytes(block_size_limit)\n\n ndim = len(new_chunks)\n steps = []\n has_nans = [any(math.isnan(y) for y in x) for x in old_chunks]\n\n if ndim <= 1 or not all(new_chunks) or any(has_nans):\n # Trivial array / unknown dim => no need / ability for an intermediate\n return steps + [new_chunks]\n\n # Make it a number ef elements\n block_size_limit /= itemsize\n\n # Fix block_size_limit if too small for either old_chunks or new_chunks\n largest_old_block = _largest_block_size(old_chunks)\n largest_new_block = _largest_block_size(new_chunks)\n block_size_limit = max([block_size_limit, largest_old_block, largest_new_block])\n\n # The graph size above which to optimize\n graph_size_threshold = threshold * (\n _number_of_blocks(old_chunks) + _number_of_blocks(new_chunks)\n )\n\n current_chunks = old_chunks\n first_pass = True\n\n while True:\n graph_size = estimate_graph_size(current_chunks, new_chunks)\n if graph_size < graph_size_threshold:\n break\n\n if first_pass:\n chunks = current_chunks\n else:\n # We hit the block_size_limit in a previous merge pass =>\n # accept a significant increase in graph size in exchange for\n # 1) getting nearer the goal 2) reducing the largest block size\n # to make place for the following merge.\n # To see this pass in action, make the block_size_limit very small.\n chunks = find_split_rechunk(\n current_chunks, new_chunks, graph_size * threshold\n )\n chunks, memory_limit_hit = find_merge_rechunk(\n chunks, new_chunks, block_size_limit\n )\n if (chunks == current_chunks and not first_pass) or chunks == new_chunks:\n break\n if chunks != current_chunks:\n steps.append(chunks)\n current_chunks = chunks\n if not memory_limit_hit:\n break\n first_pass = False\n\n return steps + [new_chunks]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__compute_rechunk__compute_rechunk.return.Array_graph_merge_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__compute_rechunk__compute_rechunk.return.Array_graph_merge_name_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 531, "end_line": 589, "span_ids": ["_compute_rechunk"], "tokens": 613}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _compute_rechunk(x, chunks):\n \"\"\"Compute the rechunk of *x* to the given *chunks*.\"\"\"\n if x.size == 0:\n # Special case for empty array, as the algorithm below does not behave correctly\n return empty(x.shape, chunks=chunks, dtype=x.dtype)\n\n ndim = x.ndim\n crossed = intersect_chunks(x.chunks, chunks)\n x2 = dict()\n intermediates = dict()\n token = tokenize(x, chunks)\n merge_name = \"rechunk-merge-\" + token\n split_name = \"rechunk-split-\" + token\n split_name_suffixes = count()\n\n # Pre-allocate old block references, to allow re-use and reduce the\n # graph's memory footprint a bit.\n old_blocks = np.empty([len(c) for c in x.chunks], dtype=\"O\")\n for index in np.ndindex(old_blocks.shape):\n old_blocks[index] = (x.name,) + index\n\n # Iterate over all new blocks\n new_index = product(*(range(len(c)) for c in chunks))\n\n for new_idx, cross1 in zip(new_index, crossed):\n key = (merge_name,) + new_idx\n old_block_indices = [[cr[i][0] for cr in cross1] for i in range(ndim)]\n subdims1 = [len(set(old_block_indices[i])) for i in range(ndim)]\n\n rec_cat_arg = np.empty(subdims1, dtype=\"O\")\n rec_cat_arg_flat = rec_cat_arg.flat\n\n # Iterate over the old blocks required to build the new block\n for rec_cat_index, ind_slices in enumerate(cross1):\n old_block_index, slices = zip(*ind_slices)\n name = (split_name, next(split_name_suffixes))\n old_index = old_blocks[old_block_index][1:]\n if all(\n slc.start == 0 and slc.stop == x.chunks[i][ind]\n for i, (slc, ind) in enumerate(zip(slices, old_index))\n ):\n rec_cat_arg_flat[rec_cat_index] = old_blocks[old_block_index]\n else:\n intermediates[name] = (getitem, old_blocks[old_block_index], slices)\n rec_cat_arg_flat[rec_cat_index] = name\n\n assert rec_cat_index == rec_cat_arg.size - 1\n\n # New block is formed by concatenation of sliced old blocks\n if all(d == 1 for d in rec_cat_arg.shape):\n x2[key] = rec_cat_arg.flat[0]\n else:\n x2[key] = (concatenate3, rec_cat_arg.tolist())\n\n del old_blocks, new_index\n\n layer = toolz.merge(x2, intermediates)\n graph = HighLevelGraph.from_collections(merge_name, layer, dependencies=[x])\n return Array(graph, merge_name, chunks, meta=x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__PrettyBlocks__PrettyBlocks.__repr__.__str__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py__PrettyBlocks__PrettyBlocks.__repr__.__str__", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 592, "end_line": 628, "span_ids": ["_PrettyBlocks.__init__", "_PrettyBlocks.__str__", "_PrettyBlocks", "_PrettyBlocks:2"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _PrettyBlocks(object):\n def __init__(self, blocks):\n self.blocks = blocks\n\n def __str__(self):\n runs = []\n run = []\n repeats = 0\n for c in self.blocks:\n if run and run[-1] == c:\n if repeats == 0 and len(run) > 1:\n runs.append((None, run[:-1]))\n run = run[-1:]\n repeats += 1\n else:\n if repeats > 0:\n assert len(run) == 1\n runs.append((repeats + 1, run[-1]))\n run = []\n repeats = 0\n run.append(c)\n if run:\n if repeats == 0:\n runs.append((None, run))\n else:\n assert len(run) == 1\n runs.append((repeats + 1, run[-1]))\n\n parts = []\n for repeats, run in runs:\n if repeats is None:\n parts.append(str(run))\n else:\n parts.append(\"%d*[%s]\" % (repeats, run))\n return \" | \".join(parts)\n\n __repr__ = __str__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_blocks_format_blocks.return._PrettyBlocks_blocks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_blocks_format_blocks.return._PrettyBlocks_blocks_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 631, "end_line": 645, "span_ids": ["format_blocks"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def format_blocks(blocks):\n \"\"\"\n Pretty-format *blocks*.\n\n >>> format_blocks((10, 10, 10))\n 3*[10]\n >>> format_blocks((2, 3, 4))\n [2, 3, 4]\n >>> format_blocks((10, 10, 5, 6, 2, 2, 2, 7))\n 2*[10] | [5, 6] | 3*[2] | [7]\n \"\"\"\n assert isinstance(blocks, tuple) and all(\n isinstance(x, int) or math.isnan(x) for x in blocks\n )\n return _PrettyBlocks(blocks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/rechunk.py_format_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/rechunk.py", "file_name": "rechunk.py", "file_type": "text/x-python", "category": "implementation", "start_line": 648, "end_line": 663, "span_ids": ["format_plan", "format_chunks"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def format_chunks(chunks):\n \"\"\"\n >>> format_chunks((10 * (3,), 3 * (10,)))\n (10*[3], 3*[10])\n \"\"\"\n assert isinstance(chunks, tuple)\n return tuple(format_blocks(c) for c in chunks)\n\n\ndef format_plan(plan):\n \"\"\"\n >>> format_plan([((10, 10, 10), (15, 15)), ((30,), (10, 10, 10))])\n [(3*[10], 2*[15]), ([30], 3*[10])]\n \"\"\"\n return [format_chunks(c) for c in plan]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_builtins_divide.return.f_a_b_dtype_dtype_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_builtins_divide.return.f_a_b_dtype_dtype_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["imports", "divide"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import builtins\nfrom collections.abc import Iterable\nimport operator\nfrom functools import partial\nfrom itertools import product, repeat\nfrom math import factorial, log, ceil\n\nimport numpy as np\nfrom numbers import Integral, Number\n\nfrom tlz import compose, partition_all, get, accumulate, pluck\n\nfrom . import chunk\nfrom .core import _concatenate2, Array, handle_out, implements\nfrom .blockwise import blockwise\nfrom ..blockwise import lol_tuples\nfrom .creation import arange, diagonal\nfrom .utils import full_like_safe, validate_axis, compute_meta, is_arraylike\nfrom .wrap import zeros, ones\nfrom .numpy_compat import ma_divide, divide as np_divide\nfrom ..base import tokenize\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import ignoring, funcname, Dispatch, deepmap, getargspec, derived_from\nfrom .. import config\n\n# Generic functions to support chunks of different types\nempty_lookup = Dispatch(\"empty\")\nempty_lookup.register((object, np.ndarray), np.empty)\nempty_lookup.register(np.ma.masked_array, np.ma.empty)\ndivide_lookup = Dispatch(\"divide\")\ndivide_lookup.register((object, np.ndarray), np_divide)\ndivide_lookup.register(np.ma.masked_array, ma_divide)\n\n\ndef divide(a, b, dtype=None):\n key = lambda x: getattr(x, \"__array_priority__\", float(\"-inf\"))\n f = divide_lookup.dispatch(type(builtins.max(a, b, key=key)))\n return f(a, b, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction_reduction._General_version_of_red": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction_reduction._General_version_of_red", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 139, "span_ids": ["reduction"], "tokens": 999}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reduction(\n x,\n chunk,\n aggregate,\n axis=None,\n keepdims=False,\n dtype=None,\n split_every=None,\n combine=None,\n name=None,\n out=None,\n concatenate=True,\n output_size=1,\n meta=None,\n):\n \"\"\"General version of reductions\n\n Parameters\n ----------\n x: Array\n Data being reduced along one or more axes\n chunk: callable(x_chunk, axis, keepdims)\n First function to be executed when resolving the dask graph.\n This function is applied in parallel to all original chunks of x.\n See below for function parameters.\n combine: callable(x_chunk, axis, keepdims), optional\n Function used for intermediate recursive aggregation (see\n split_every below). If omitted, it defaults to aggregate.\n If the reduction can be performed in less than 3 steps, it will not\n be invoked at all.\n aggregate: callable(x_chunk, axis, keepdims)\n Last function to be executed when resolving the dask graph,\n producing the final output. It is always invoked, even when the reduced\n Array counts a single chunk along the reduced axes.\n axis: int or sequence of ints, optional\n Axis or axes to aggregate upon. If omitted, aggregate along all axes.\n keepdims: boolean, optional\n Whether the reduction function should preserve the reduced axes,\n leaving them at size ``output_size``, or remove them.\n dtype: np.dtype\n data type of output. This argument was previously optional, but\n leaving as ``None`` will now raise an exception.\n split_every: int >= 2 or dict(axis: int), optional\n Determines the depth of the recursive aggregation. If set to or more\n than the number of input chunks, the aggregation will be performed in\n two steps, one ``chunk`` function per input chunk and a single\n ``aggregate`` function at the end. If set to less than that, an\n intermediate ``combine`` function will be used, so that any one\n ``combine`` or ``aggregate`` function has no more than ``split_every``\n inputs. The depth of the aggregation graph will be\n :math:`log_{split_every}(input chunks along reduced axes)`. Setting to\n a low value can reduce cache size and network transfers, at the cost of\n more CPU and a larger dask graph.\n\n Omit to let dask heuristically decide a good default. A default can\n also be set globally with the ``split_every`` key in\n :mod:`dask.config`.\n name: str, optional\n Prefix of the keys of the intermediate and output nodes. If omitted it\n defaults to the function names.\n out: Array, optional\n Another dask array whose contents will be replaced. Omit to create a\n new one. Note that, unlike in numpy, this setting gives no performance\n benefits whatsoever, but can still be useful if one needs to preserve\n the references to a previously existing Array.\n concatenate: bool, optional\n If True (the default), the outputs of the ``chunk``/``combine``\n functions are concatenated into a single np.array before being passed\n to the ``combine``/``aggregate`` functions. If False, the input of\n ``combine`` and ``aggregate`` will be either a list of the raw outputs\n of the previous step or a single output, and the function will have to\n concatenate it itself. It can be useful to set this to False if the\n chunk and/or combine steps do not produce np.arrays.\n output_size: int >= 1, optional\n Size of the output of the ``aggregate`` function along the reduced\n axes. Ignored if keepdims is False.\n\n Returns\n -------\n dask array\n\n **Function Parameters**\n\n x_chunk: numpy.ndarray\n Individual input chunk. For ``chunk`` functions, it is one of the\n original chunks of x. For ``combine`` and ``aggregate`` functions, it's\n the concatenation of the outputs produced by the previous ``chunk`` or\n ``combine`` functions. If concatenate=False, it's a list of the raw\n outputs from the previous functions.\n axis: tuple\n Normalized list of axes to reduce upon, e.g. ``(0, )``\n Scalar, negative, and None axes have been normalized away.\n Note that some numpy reduction functions cannot reduce along multiple\n axes at once and strictly require an int in input. Such functions have\n to be wrapped to cope.\n keepdims: bool\n Whether the reduction function should preserve the reduced axes or\n remove them.\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction.if_axis_is_None__reduction.return.handle_out_out_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_reduction.if_axis_is_None__reduction.return.handle_out_out_result_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 195, "span_ids": ["reduction"], "tokens": 463}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reduction(\n x,\n chunk,\n aggregate,\n axis=None,\n keepdims=False,\n dtype=None,\n split_every=None,\n combine=None,\n name=None,\n out=None,\n concatenate=True,\n output_size=1,\n meta=None,\n):\n if axis is None:\n axis = tuple(range(x.ndim))\n if isinstance(axis, Integral):\n axis = (axis,)\n axis = validate_axis(axis, x.ndim)\n\n if dtype is None:\n raise ValueError(\"Must specify dtype\")\n if \"dtype\" in getargspec(chunk).args:\n chunk = partial(chunk, dtype=dtype)\n if \"dtype\" in getargspec(aggregate).args:\n aggregate = partial(aggregate, dtype=dtype)\n\n # Map chunk across all blocks\n inds = tuple(range(x.ndim))\n # The dtype of `tmp` doesn't actually matter, and may be incorrect.\n tmp = blockwise(\n chunk, inds, x, inds, axis=axis, keepdims=True, token=name, dtype=dtype or float\n )\n tmp._chunks = tuple(\n (output_size,) * len(c) if i in axis else c for i, c in enumerate(tmp.chunks)\n )\n\n if meta is None and hasattr(x, \"_meta\"):\n try:\n reduced_meta = compute_meta(\n chunk, x.dtype, x._meta, axis=axis, keepdims=True, computing_meta=True\n )\n except TypeError:\n reduced_meta = compute_meta(\n chunk, x.dtype, x._meta, axis=axis, keepdims=True\n )\n except ValueError:\n pass\n else:\n reduced_meta = None\n\n result = _tree_reduce(\n tmp,\n aggregate,\n axis,\n keepdims,\n dtype,\n split_every,\n combine,\n name=name,\n concatenate=concatenate,\n reduced_meta=reduced_meta,\n )\n if keepdims and output_size != 1:\n result._chunks = tuple(\n (output_size,) if i in axis else c for i, c in enumerate(tmp.chunks)\n )\n if meta is not None:\n result._meta = meta\n return handle_out(out, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__tree_reduce__tree_reduce.return.partial_reduce_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__tree_reduce__tree_reduce.return.partial_reduce_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 198, "end_line": 253, "span_ids": ["_tree_reduce"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _tree_reduce(\n x,\n aggregate,\n axis,\n keepdims,\n dtype,\n split_every=None,\n combine=None,\n name=None,\n concatenate=True,\n reduced_meta=None,\n):\n \"\"\"Perform the tree reduction step of a reduction.\n\n Lower level, users should use ``reduction`` or ``arg_reduction`` directly.\n \"\"\"\n # Normalize split_every\n split_every = split_every or config.get(\"split_every\", 4)\n if isinstance(split_every, dict):\n split_every = dict((k, split_every.get(k, 2)) for k in axis)\n elif isinstance(split_every, Integral):\n n = builtins.max(int(split_every ** (1 / (len(axis) or 1))), 2)\n split_every = dict.fromkeys(axis, n)\n else:\n raise ValueError(\"split_every must be a int or a dict\")\n\n # Reduce across intermediates\n depth = 1\n for i, n in enumerate(x.numblocks):\n if i in split_every and split_every[i] != 1:\n depth = int(builtins.max(depth, ceil(log(n, split_every[i]))))\n func = partial(combine or aggregate, axis=axis, keepdims=True)\n if concatenate:\n func = compose(func, partial(_concatenate2, axes=axis))\n for i in range(depth - 1):\n x = partial_reduce(\n func,\n x,\n split_every,\n True,\n dtype=dtype,\n name=(name or funcname(combine or aggregate)) + \"-partial\",\n reduced_meta=reduced_meta,\n )\n func = partial(aggregate, axis=axis, keepdims=keepdims)\n if concatenate:\n func = compose(func, partial(_concatenate2, axes=axis))\n return partial_reduce(\n func,\n x,\n split_every,\n keepdims=keepdims,\n dtype=dtype,\n name=(name or funcname(aggregate)) + \"-aggregate\",\n reduced_meta=reduced_meta,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_partial_reduce_partial_reduce.if_np_isscalar_meta_.else_.return.Array_graph_name_out_ch": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_partial_reduce_partial_reduce.if_np_isscalar_meta_.else_.return.Array_graph_name_out_ch", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 325, "span_ids": ["partial_reduce"], "tokens": 662}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def partial_reduce(\n func, x, split_every, keepdims=False, dtype=None, name=None, reduced_meta=None\n):\n \"\"\"Partial reduction across multiple axes.\n\n Parameters\n ----------\n func : function\n x : Array\n split_every : dict\n Maximum reduction block sizes in each dimension.\n\n Examples\n --------\n Reduce across axis 0 and 2, merging a maximum of 1 block in the 0th\n dimension, and 3 blocks in the 2nd dimension:\n\n >>> partial_reduce(np.min, x, {0: 1, 2: 3}) # doctest: +SKIP\n \"\"\"\n name = (\n (name or funcname(func)) + \"-\" + tokenize(func, x, split_every, keepdims, dtype)\n )\n parts = [\n list(partition_all(split_every.get(i, 1), range(n)))\n for (i, n) in enumerate(x.numblocks)\n ]\n keys = product(*map(range, map(len, parts)))\n out_chunks = [\n tuple(1 for p in partition_all(split_every[i], c)) if i in split_every else c\n for (i, c) in enumerate(x.chunks)\n ]\n if not keepdims:\n out_axis = [i for i in range(x.ndim) if i not in split_every]\n getter = lambda k: get(out_axis, k)\n keys = map(getter, keys)\n out_chunks = list(getter(out_chunks))\n dsk = {}\n for k, p in zip(keys, product(*parts)):\n decided = dict((i, j[0]) for (i, j) in enumerate(p) if len(j) == 1)\n dummy = dict(i for i in enumerate(p) if i[0] not in decided)\n g = lol_tuples((x.name,), range(x.ndim), decided, dummy)\n dsk[(name,) + k] = (func, g)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n\n meta = x._meta\n if reduced_meta is not None:\n try:\n meta = func(reduced_meta, computing_meta=True)\n # no meta keyword argument exists for func, and it isn't required\n except TypeError:\n meta = func(reduced_meta)\n # when no work can be computed on the empty array (e.g., func is a ufunc)\n except ValueError:\n pass\n\n # some functions can't compute empty arrays (those for which reduced_meta\n # fall into the ValueError exception) and we have to rely on reshaping\n # the array according to len(out_chunks)\n if is_arraylike(meta) and meta.ndim != len(out_chunks):\n if len(out_chunks) == 0:\n meta = meta.sum()\n else:\n meta = meta.reshape((0,) * len(out_chunks))\n\n if np.isscalar(meta):\n return Array(graph, name, out_chunks, dtype=dtype)\n else:\n with ignoring(AttributeError):\n meta = meta.astype(dtype)\n return Array(graph, name, out_chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_sum_prod.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_sum_prod.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 328, "end_line": 360, "span_ids": ["sum", "prod"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef sum(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is None:\n dtype = getattr(np.zeros(1, dtype=a.dtype).sum(), \"dtype\", object)\n result = reduction(\n a,\n chunk.sum,\n chunk.sum,\n axis=axis,\n keepdims=keepdims,\n dtype=dtype,\n split_every=split_every,\n out=out,\n )\n return result\n\n\n@derived_from(np)\ndef prod(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.empty((1,), dtype=a.dtype).prod(), \"dtype\", object)\n return reduction(\n a,\n chunk.prod,\n chunk.prod,\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_min_all.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_min_all.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 363, "end_line": 418, "span_ids": ["max", "all", "any", "min"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@implements(np.min, np.amin)\n@derived_from(np)\ndef min(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.min,\n chunk.min,\n axis=axis,\n keepdims=keepdims,\n dtype=a.dtype,\n split_every=split_every,\n out=out,\n )\n\n\n@implements(np.max, np.amax)\n@derived_from(np)\ndef max(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.max,\n chunk.max,\n axis=axis,\n keepdims=keepdims,\n dtype=a.dtype,\n split_every=split_every,\n out=out,\n )\n\n\n@derived_from(np)\ndef any(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.any,\n chunk.any,\n axis=axis,\n keepdims=keepdims,\n dtype=\"bool\",\n split_every=split_every,\n out=out,\n )\n\n\n@derived_from(np)\ndef all(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.all,\n chunk.all,\n axis=axis,\n keepdims=keepdims,\n dtype=\"bool\",\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nansum_nansum.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nansum_nansum.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 421, "end_line": 436, "span_ids": ["nansum"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef nansum(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(chunk.nansum(np.empty((1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n chunk.nansum,\n chunk.sum,\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_with_ignoring_AttributeEr_nanmax.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_with_ignoring_AttributeEr_nanmax.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 439, "end_line": 492, "span_ids": ["impl:9", "nanmax", "nanmin"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "with ignoring(AttributeError):\n\n @derived_from(np)\n def nanprod(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(chunk.nansum(np.empty((1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n chunk.nanprod,\n chunk.prod,\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n out=out,\n )\n\n @derived_from(np)\n def nancumsum(x, axis, dtype=None, out=None):\n return cumreduction(chunk.nancumsum, operator.add, 0, x, axis, dtype, out=out)\n\n @derived_from(np)\n def nancumprod(x, axis, dtype=None, out=None):\n return cumreduction(chunk.nancumprod, operator.mul, 1, x, axis, dtype, out=out)\n\n\n@derived_from(np)\ndef nanmin(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.nanmin,\n chunk.nanmin,\n axis=axis,\n keepdims=keepdims,\n dtype=a.dtype,\n split_every=split_every,\n out=out,\n )\n\n\n@derived_from(np)\ndef nanmax(a, axis=None, keepdims=False, split_every=None, out=None):\n return reduction(\n a,\n chunk.nanmax,\n chunk.nanmax,\n axis=axis,\n keepdims=keepdims,\n dtype=a.dtype,\n split_every=split_every,\n out=out,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_numel_numel.return.full_like_safe_x_prod_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_numel_numel.return.full_like_safe_x_prod_s", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 495, "end_line": 524, "span_ids": ["numel"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def numel(x, **kwargs):\n \"\"\" A reduction to count the number of elements \"\"\"\n\n if hasattr(x, \"mask\"):\n return chunk.sum(np.ones_like(x), **kwargs)\n\n shape = x.shape\n keepdims = kwargs.get(\"keepdims\", False)\n axis = kwargs.get(\"axis\", None)\n dtype = kwargs.get(\"dtype\", np.float64)\n\n if axis is None:\n prod = np.prod(shape, dtype=dtype)\n return (\n full_like_safe(x, prod, shape=(1,) * len(shape), dtype=dtype)\n if keepdims is True\n else prod\n )\n\n if not isinstance(axis, tuple or list):\n axis = [axis]\n\n prod = np.prod([shape[dim] for dim in axis])\n if keepdims is True:\n new_shape = tuple(\n shape[dim] if dim not in axis else 1 for dim in range(len(shape))\n )\n else:\n new_shape = tuple(shape[dim] for dim in range(len(shape)) if dim not in axis)\n return full_like_safe(x, prod, shape=new_shape, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nannumel_mean_chunk.return._n_n_total_total_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nannumel_mean_chunk.return._n_n_total_total_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 527, "end_line": 541, "span_ids": ["mean_chunk", "nannumel"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def nannumel(x, **kwargs):\n \"\"\" A reduction to count the number of elements \"\"\"\n return chunk.sum(~(np.isnan(x)), **kwargs)\n\n\ndef mean_chunk(\n x, sum=chunk.sum, numel=numel, dtype=\"f8\", computing_meta=False, **kwargs\n):\n if computing_meta:\n return x\n n = numel(x, dtype=dtype, **kwargs)\n\n total = sum(x, dtype=dtype, **kwargs)\n\n return {\"n\": n, \"total\": total}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_combine_mean_combine.return._n_n_total_total_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_combine_mean_combine.return._n_n_total_total_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 544, "end_line": 565, "span_ids": ["mean_combine"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def mean_combine(\n pairs,\n sum=chunk.sum,\n numel=numel,\n dtype=\"f8\",\n axis=None,\n computing_meta=False,\n **kwargs\n):\n if not isinstance(pairs, list):\n pairs = [pairs]\n\n ns = deepmap(lambda pair: pair[\"n\"], pairs) if not computing_meta else pairs\n n = _concatenate2(ns, axes=axis).sum(axis=axis, **kwargs)\n\n if computing_meta:\n return n\n\n totals = deepmap(lambda pair: pair[\"total\"], pairs)\n total = _concatenate2(totals, axes=axis).sum(axis=axis, **kwargs)\n\n return {\"n\": n, \"total\": total}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_agg_mean_agg.return.divide_total_n_dtype_dt": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_agg_mean_agg.return.divide_total_n_dtype_dt", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 568, "end_line": 579, "span_ids": ["mean_agg"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def mean_agg(pairs, dtype=\"f8\", axis=None, computing_meta=False, **kwargs):\n ns = deepmap(lambda pair: pair[\"n\"], pairs) if not computing_meta else pairs\n n = _concatenate2(ns, axes=axis)\n n = np.sum(n, axis=axis, dtype=dtype, **kwargs)\n\n if computing_meta:\n return n\n\n totals = deepmap(lambda pair: pair[\"total\"], pairs)\n total = _concatenate2(totals, axes=axis).sum(axis=axis, dtype=dtype, **kwargs)\n\n return divide(total, n, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_mean.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_mean_mean.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 582, "end_line": 599, "span_ids": ["mean"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef mean(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.mean(np.empty(shape=(1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n mean_chunk,\n mean_agg,\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n combine=mean_combine,\n out=out,\n concatenate=False,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmean_None_1.nanmean.derived_from_np_nanmean_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmean_None_1.nanmean.derived_from_np_nanmean_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 602, "end_line": 623, "span_ids": ["impl:10", "nanmean"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef nanmean(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.mean(np.empty(shape=(1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n partial(mean_chunk, sum=chunk.nansum, numel=nannumel),\n mean_agg,\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n out=out,\n concatenate=False,\n combine=partial(mean_combine, sum=chunk.nansum, numel=nannumel),\n )\n\n\nwith ignoring(AttributeError):\n nanmean = derived_from(np)(nanmean)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_chunk_moment_chunk.return._total_total_n_n_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_chunk_moment_chunk.return._total_total_n_n_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 626, "end_line": 639, "span_ids": ["moment_chunk"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def moment_chunk(\n A, order=2, sum=chunk.sum, numel=numel, dtype=\"f8\", computing_meta=False, **kwargs\n):\n if computing_meta:\n return A\n n = numel(A, **kwargs)\n\n n = n.astype(np.int64)\n total = sum(A, dtype=dtype, **kwargs)\n with np.errstate(divide=\"ignore\", invalid=\"ignore\"):\n u = total / n\n xs = [sum((A - u) ** i, dtype=dtype, **kwargs) for i in range(2, order + 1)]\n M = np.stack(xs, axis=-1)\n return {\"total\": total, \"n\": n, \"M\": M}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__moment_helper__moment_helper.return.M": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__moment_helper__moment_helper.return.M", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 642, "end_line": 649, "span_ids": ["_moment_helper"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _moment_helper(Ms, ns, inner_term, order, sum, axis, kwargs):\n M = Ms[..., order - 2].sum(axis=axis, **kwargs) + sum(\n ns * inner_term ** order, axis=axis, **kwargs\n )\n for k in range(1, order - 1):\n coeff = factorial(order) / (factorial(k) * factorial(order - k))\n M += coeff * sum(Ms[..., order - k - 2] * inner_term ** k, axis=axis, **kwargs)\n return M", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_combine_moment_combine.return._total_total_n_n_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_combine_moment_combine.return._total_total_n_n_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 652, "end_line": 687, "span_ids": ["moment_combine"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def moment_combine(\n pairs,\n order=2,\n ddof=0,\n dtype=\"f8\",\n sum=np.sum,\n axis=None,\n computing_meta=False,\n **kwargs\n):\n if not isinstance(pairs, list):\n pairs = [pairs]\n\n kwargs[\"dtype\"] = dtype\n kwargs[\"keepdims\"] = True\n\n ns = deepmap(lambda pair: pair[\"n\"], pairs) if not computing_meta else pairs\n ns = _concatenate2(ns, axes=axis)\n n = ns.sum(axis=axis, **kwargs)\n\n if computing_meta:\n return n\n\n totals = _concatenate2(deepmap(lambda pair: pair[\"total\"], pairs), axes=axis)\n Ms = _concatenate2(deepmap(lambda pair: pair[\"M\"], pairs), axes=axis)\n\n total = totals.sum(axis=axis, **kwargs)\n mu = divide(total, n, dtype=dtype)\n inner_term = divide(totals, ns, dtype=dtype) - mu\n\n xs = [\n _moment_helper(Ms, ns, inner_term, o, sum, axis, kwargs)\n for o in range(2, order + 1)\n ]\n M = np.stack(xs, axis=-1)\n return {\"total\": total, \"n\": n, \"M\": M}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_agg_moment_agg.return.divide_M_denominator_dt": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_agg_moment_agg.return.divide_M_denominator_dt", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 690, "end_line": 733, "span_ids": ["moment_agg"], "tokens": 369}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def moment_agg(\n pairs,\n order=2,\n ddof=0,\n dtype=\"f8\",\n sum=np.sum,\n axis=None,\n computing_meta=False,\n **kwargs\n):\n if not isinstance(pairs, list):\n pairs = [pairs]\n\n kwargs[\"dtype\"] = dtype\n # To properly handle ndarrays, the original dimensions need to be kept for\n # part of the calculation.\n keepdim_kw = kwargs.copy()\n keepdim_kw[\"keepdims\"] = True\n\n ns = deepmap(lambda pair: pair[\"n\"], pairs) if not computing_meta else pairs\n ns = _concatenate2(ns, axes=axis)\n n = ns.sum(axis=axis, **keepdim_kw)\n\n if computing_meta:\n return n\n\n totals = _concatenate2(deepmap(lambda pair: pair[\"total\"], pairs), axes=axis)\n Ms = _concatenate2(deepmap(lambda pair: pair[\"M\"], pairs), axes=axis)\n\n mu = divide(totals.sum(axis=axis, **keepdim_kw), n, dtype=dtype)\n inner_term = divide(totals, ns, dtype=dtype) - mu\n\n M = _moment_helper(Ms, ns, inner_term, order, sum, axis, kwargs)\n\n denominator = n.sum(axis=axis, **kwargs) - ddof\n\n # taking care of the edge case with empty or all-nans array with ddof > 0\n if isinstance(denominator, Number):\n if denominator < 0:\n denominator = np.nan\n elif denominator is not np.ma.masked:\n denominator[denominator < 0] = np.nan\n\n return divide(M, denominator, dtype=dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_moment.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_moment_moment.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 736, "end_line": 765, "span_ids": ["moment"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def moment(\n a, order, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None\n):\n if not isinstance(order, Integral) or order < 0:\n raise ValueError(\"Order must be an integer >= 0\")\n\n if order < 2:\n reduced = a.sum(axis=axis) # get reduced shape and chunks\n if order == 0:\n # When order equals 0, the result is 1, by definition.\n return ones(reduced.shape, chunks=reduced.chunks, dtype=\"f8\")\n # By definition the first order about the mean is 0.\n return zeros(reduced.shape, chunks=reduced.chunks, dtype=\"f8\")\n\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.var(np.ones(shape=(1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n partial(moment_chunk, order=order),\n partial(moment_agg, order=order, ddof=ddof),\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n out=out,\n concatenate=False,\n combine=partial(moment_combine, order=order),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_var_var.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_var_var.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 768, "end_line": 786, "span_ids": ["var"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef var(a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.var(np.ones(shape=(1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n moment_chunk,\n partial(moment_agg, ddof=ddof),\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n combine=moment_combine,\n name=\"var\",\n out=out,\n concatenate=False,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanvar_nanvar.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanvar_nanvar.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 789, "end_line": 808, "span_ids": ["nanvar"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef nanvar(\n a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None\n):\n if dtype is not None:\n dt = dtype\n else:\n dt = getattr(np.var(np.ones(shape=(1,), dtype=a.dtype)), \"dtype\", object)\n return reduction(\n a,\n partial(moment_chunk, sum=chunk.nansum, numel=nannumel),\n partial(moment_agg, sum=np.nansum, ddof=ddof),\n axis=axis,\n keepdims=keepdims,\n dtype=dt,\n split_every=split_every,\n combine=partial(moment_combine, sum=np.nansum),\n out=out,\n concatenate=False,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_2_safe_sqrt.return._sqrt_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_2_safe_sqrt.return._sqrt_a_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 811, "end_line": 833, "span_ids": ["_sqrt", "impl:13", "safe_sqrt"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "with ignoring(AttributeError):\n nanvar = derived_from(np)(nanvar)\n\n\ndef _sqrt(a):\n o = np.sqrt(a)\n if isinstance(o, np.ma.masked_array) and not o.shape and o.mask.all():\n return np.ma.masked\n return o\n\n\ndef safe_sqrt(a):\n \"\"\"A version of sqrt that properly handles scalar masked arrays.\n\n To mimic ``np.ma`` reductions, we need to convert scalar masked arrays that\n have an active mask to the ``np.ma.masked`` singleton. This is properly\n handled automatically for reduction code, but not for ufuncs. We implement\n a simple version here, since calling `np.ma.sqrt` everywhere is\n significantly more expensive.\n \"\"\"\n if hasattr(a, \"_elemwise\"):\n return a._elemwise(_sqrt, a)\n return _sqrt(a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_std_nanstd.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_std_nanstd.return.result", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 836, "end_line": 871, "span_ids": ["std", "nanstd"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef std(a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None):\n result = safe_sqrt(\n var(\n a,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n ddof=ddof,\n split_every=split_every,\n out=out,\n )\n )\n if dtype and dtype != result.dtype:\n result = result.astype(dtype)\n return result\n\n\n@derived_from(np)\ndef nanstd(\n a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None\n):\n result = safe_sqrt(\n nanvar(\n a,\n axis=axis,\n dtype=dtype,\n keepdims=keepdims,\n ddof=ddof,\n split_every=split_every,\n out=out,\n )\n )\n if dtype and dtype != result.dtype:\n result = result.astype(dtype)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_3__arg_combine.return.arg_vals": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_None_3__arg_combine.return.arg_vals", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 874, "end_line": 897, "span_ids": ["impl:16", "_arg_combine"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "with ignoring(AttributeError):\n nanstd = derived_from(np)(nanstd)\n\n\ndef _arg_combine(data, axis, argfunc, keepdims=False):\n \"\"\" Merge intermediate results from ``arg_*`` functions\"\"\"\n axis = None if len(axis) == data.ndim or data.ndim == 1 else axis[0]\n vals = data[\"vals\"]\n arg = data[\"arg\"]\n if axis is None:\n local_args = argfunc(vals, axis=axis, keepdims=keepdims)\n vals = vals.ravel()[local_args]\n arg = arg.ravel()[local_args]\n else:\n local_args = argfunc(vals, axis=axis)\n inds = np.ogrid[tuple(map(slice, local_args.shape))]\n inds.insert(axis, local_args)\n inds = tuple(inds)\n vals = vals[inds]\n arg = arg[inds]\n if keepdims:\n vals = np.expand_dims(vals, axis)\n arg = np.expand_dims(arg, axis)\n return arg, vals", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_chunk_arg_chunk.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_chunk_arg_chunk.return.result", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 900, "end_line": 924, "span_ids": ["arg_chunk"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def arg_chunk(func, argfunc, x, axis, offset_info):\n arg_axis = None if len(axis) == x.ndim or x.ndim == 1 else axis[0]\n vals = func(x, axis=arg_axis, keepdims=True)\n arg = argfunc(x, axis=arg_axis, keepdims=True)\n if arg_axis is None:\n offset, total_shape = offset_info\n ind = np.unravel_index(arg.ravel()[0], x.shape)\n total_ind = tuple(o + i for (o, i) in zip(offset, ind))\n arg[:] = np.ravel_multi_index(total_ind, total_shape)\n else:\n arg += offset_info\n\n if isinstance(vals, np.ma.masked_array):\n if \"min\" in argfunc.__name__:\n fill_value = np.ma.minimum_fill_value(vals)\n else:\n fill_value = np.ma.maximum_fill_value(vals)\n vals = np.ma.filled(vals, fill_value)\n\n result = np.empty(\n shape=vals.shape, dtype=[(\"vals\", vals.dtype), (\"arg\", arg.dtype)]\n )\n result[\"vals\"] = vals\n result[\"arg\"] = arg\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_combine_nanarg_agg.return.arg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_combine_nanarg_agg.return.arg", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 927, "end_line": 945, "span_ids": ["arg_agg", "nanarg_agg", "arg_combine"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def arg_combine(func, argfunc, data, axis=None, **kwargs):\n arg, vals = _arg_combine(data, axis, argfunc, keepdims=True)\n result = np.empty(\n shape=vals.shape, dtype=[(\"vals\", vals.dtype), (\"arg\", arg.dtype)]\n )\n result[\"vals\"] = vals\n result[\"arg\"] = arg\n return result\n\n\ndef arg_agg(func, argfunc, data, axis=None, **kwargs):\n return _arg_combine(data, axis, argfunc, keepdims=False)[0]\n\n\ndef nanarg_agg(func, argfunc, data, axis=None, **kwargs):\n arg, vals = _arg_combine(data, axis, argfunc, keepdims=False)\n if np.any(np.isnan(vals)):\n raise ValueError(\"All NaN slice encountered\")\n return arg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_reduction_arg_reduction.return.handle_out_out_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_arg_reduction_arg_reduction.return.handle_out_out_result_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 948, "end_line": 1004, "span_ids": ["arg_reduction"], "tokens": 543}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def arg_reduction(x, chunk, combine, agg, axis=None, split_every=None, out=None):\n \"\"\"Generic function for argreduction.\n\n Parameters\n ----------\n x : Array\n chunk : callable\n Partialed ``arg_chunk``.\n combine : callable\n Partialed ``arg_combine``.\n agg : callable\n Partialed ``arg_agg``.\n axis : int, optional\n split_every : int or dict, optional\n \"\"\"\n if axis is None:\n axis = tuple(range(x.ndim))\n ravel = True\n elif isinstance(axis, Integral):\n axis = validate_axis(axis, x.ndim)\n axis = (axis,)\n ravel = x.ndim == 1\n else:\n raise TypeError(\"axis must be either `None` or int, got '{0}'\".format(axis))\n\n for ax in axis:\n chunks = x.chunks[ax]\n if len(chunks) > 1 and np.isnan(chunks).any():\n raise ValueError(\n \"Arg-reductions do not work with arrays that have \"\n \"unknown chunksizes. At some point in your computation \"\n \"this array lost chunking information.\\n\\n\"\n \"A possible solution is with \\n\"\n \" x.compute_chunk_sizes()\"\n )\n\n # Map chunk across all blocks\n name = \"arg-reduce-{0}\".format(tokenize(axis, x, chunk, combine, split_every))\n old = x.name\n keys = list(product(*map(range, x.numblocks)))\n offsets = list(product(*(accumulate(operator.add, bd[:-1], 0) for bd in x.chunks)))\n if ravel:\n offset_info = zip(offsets, repeat(x.shape))\n else:\n offset_info = pluck(axis[0], offsets)\n\n chunks = tuple((1,) * len(c) if i in axis else c for (i, c) in enumerate(x.chunks))\n dsk = dict(\n ((name,) + k, (chunk, (old,) + k, axis, off))\n for (k, off) in zip(keys, offset_info)\n )\n # The dtype of `tmp` doesn't actually matter, just need to provide something\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n tmp = Array(graph, name, chunks, dtype=x.dtype)\n dtype = np.argmin([1]).dtype\n result = _tree_reduce(tmp, agg, axis, False, dtype, split_every, combine)\n return handle_out(out, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_make_arg_reduction_make_arg_reduction.return.derived_from_np_wrapped_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_make_arg_reduction_make_arg_reduction.return.derived_from_np_wrapped_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1007, "end_line": 1031, "span_ids": ["make_arg_reduction"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_arg_reduction(func, argfunc, is_nan_func=False):\n \"\"\"Create an argreduction callable\n\n Parameters\n ----------\n func : callable\n The reduction (e.g. ``min``)\n argfunc : callable\n The argreduction (e.g. ``argmin``)\n \"\"\"\n chunk = partial(arg_chunk, func, argfunc)\n combine = partial(arg_combine, func, argfunc)\n if is_nan_func:\n agg = partial(nanarg_agg, func, argfunc)\n else:\n agg = partial(arg_agg, func, argfunc)\n\n def wrapped(x, axis=None, split_every=None, out=None):\n return arg_reduction(\n x, chunk, combine, agg, axis, split_every=split_every, out=out\n )\n\n wrapped.__name__ = func.__name__\n\n return derived_from(np)(wrapped)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__nanargmin_nanargmax.make_arg_reduction_chunk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__nanargmin_nanargmax.make_arg_reduction_chunk_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1034, "end_line": 1051, "span_ids": ["_nanargmax", "impl:19", "_nanargmin"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _nanargmin(x, axis, **kwargs):\n try:\n return chunk.nanargmin(x, axis, **kwargs)\n except ValueError:\n return chunk.nanargmin(np.where(np.isnan(x), np.inf, x), axis, **kwargs)\n\n\ndef _nanargmax(x, axis, **kwargs):\n try:\n return chunk.nanargmax(x, axis, **kwargs)\n except ValueError:\n return chunk.nanargmax(np.where(np.isnan(x), -np.inf, x), axis, **kwargs)\n\n\nargmin = make_arg_reduction(chunk.min, chunk.argmin)\nargmax = make_arg_reduction(chunk.max, chunk.argmax)\nnanargmin = make_arg_reduction(chunk.nanmin, _nanargmin, True)\nnanargmax = make_arg_reduction(chunk.nanmax, _nanargmax, True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_cumreduction_cumreduction.return.handle_out_out_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_cumreduction_cumreduction.return.handle_out_out_result_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1054, "end_line": 1120, "span_ids": ["cumreduction"], "tokens": 593}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def cumreduction(func, binop, ident, x, axis=None, dtype=None, out=None):\n \"\"\"Generic function for cumulative reduction\n\n Parameters\n ----------\n func: callable\n Cumulative function like np.cumsum or np.cumprod\n binop: callable\n Associated binary operator like ``np.cumsum->add`` or ``np.cumprod->mul``\n ident: Number\n Associated identity like ``np.cumsum->0`` or ``np.cumprod->1``\n x: dask Array\n axis: int\n dtype: dtype\n\n Returns\n -------\n dask array\n\n See also\n --------\n cumsum\n cumprod\n \"\"\"\n if axis is None:\n x = x.flatten()\n axis = 0\n if dtype is None:\n dtype = getattr(func(np.empty((0,), dtype=x.dtype)), \"dtype\", object)\n assert isinstance(axis, Integral)\n axis = validate_axis(axis, x.ndim)\n\n m = x.map_blocks(func, axis=axis, dtype=dtype)\n\n name = \"{0}-{1}\".format(func.__name__, tokenize(func, axis, binop, ident, x, dtype))\n n = x.numblocks[axis]\n full = slice(None, None, None)\n slc = (full,) * axis + (slice(-1, None),) + (full,) * (x.ndim - axis - 1)\n\n indices = list(\n product(*[range(nb) if i != axis else [0] for i, nb in enumerate(x.numblocks)])\n )\n dsk = dict()\n for ind in indices:\n shape = tuple(x.chunks[i][ii] if i != axis else 1 for i, ii in enumerate(ind))\n dsk[(name, \"extra\") + ind] = (np.full, shape, ident, m.dtype)\n dsk[(name,) + ind] = (m.name,) + ind\n\n for i in range(1, n):\n last_indices = indices\n indices = list(\n product(\n *[range(nb) if ii != axis else [i] for ii, nb in enumerate(x.numblocks)]\n )\n )\n for old, ind in zip(last_indices, indices):\n this_slice = (name, \"extra\") + ind\n dsk[this_slice] = (\n binop,\n (name, \"extra\") + old,\n (operator.getitem, (m.name,) + old, slc),\n )\n dsk[(name,) + ind] = (binop, this_slice, (m.name,) + ind)\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[m])\n result = Array(graph, name, x.chunks, m.dtype)\n return handle_out(out, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__cumsum_merge_cumprod.return.cumreduction_np_cumprod_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py__cumsum_merge_cumprod.return.cumreduction_np_cumprod_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1123, "end_line": 1144, "span_ids": ["cumsum", "_cumsum_merge", "cumprod", "_cumprod_merge"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _cumsum_merge(a, b):\n if isinstance(a, np.ma.masked_array) or isinstance(b, np.ma.masked_array):\n values = np.ma.getdata(a) + np.ma.getdata(b)\n return np.ma.masked_array(values, mask=np.ma.getmaskarray(b))\n return a + b\n\n\ndef _cumprod_merge(a, b):\n if isinstance(a, np.ma.masked_array) or isinstance(b, np.ma.masked_array):\n values = np.ma.getdata(a) * np.ma.getdata(b)\n return np.ma.masked_array(values, mask=np.ma.getmaskarray(b))\n return a * b\n\n\n@derived_from(np)\ndef cumsum(x, axis=None, dtype=None, out=None):\n return cumreduction(np.cumsum, _cumsum_merge, 0, x, axis, dtype, out=out)\n\n\n@derived_from(np)\ndef cumprod(x, axis=None, dtype=None, out=None):\n return cumreduction(np.cumprod, _cumprod_merge, 1, x, axis, dtype, out=out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_topk_topk.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_topk_topk.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1147, "end_line": 1203, "span_ids": ["topk"], "tokens": 459}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def topk(a, k, axis=-1, split_every=None):\n \"\"\"Extract the k largest elements from a on the given axis,\n and return them sorted from largest to smallest.\n If k is negative, extract the -k smallest elements instead,\n and return them sorted from smallest to largest.\n\n This performs best when ``k`` is much smaller than the chunk size. All\n results will be returned in a single chunk along the given axis.\n\n Parameters\n ----------\n x: Array\n Data being sorted\n k: int\n axis: int, optional\n split_every: int >=2, optional\n See :func:`reduce`. This parameter becomes very important when k is\n on the same order of magnitude of the chunk size or more, as it\n prevents getting the whole or a significant portion of the input array\n in memory all at once, with a negative impact on network transfer\n too when running on distributed.\n\n Returns\n -------\n Selection of x with size abs(k) along the given axis.\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = np.array([5, 1, 3, 6])\n >>> d = da.from_array(x, chunks=2)\n >>> d.topk(2).compute()\n array([6, 5])\n >>> d.topk(-2).compute()\n array([1, 3])\n \"\"\"\n axis = validate_axis(axis, a.ndim)\n\n # chunk and combine steps of the reduction, which recursively invoke\n # np.partition to pick the top/bottom k elements from the previous step.\n # The selection is not sorted internally.\n chunk_combine = partial(chunk.topk, k=k)\n # aggregate step of the reduction. Internally invokes the chunk/combine\n # function, then sorts the results internally.\n aggregate = partial(chunk.topk_aggregate, k=k)\n\n return reduction(\n a,\n chunk=chunk_combine,\n combine=chunk_combine,\n aggregate=aggregate,\n axis=axis,\n keepdims=True,\n dtype=a.dtype,\n split_every=split_every,\n output_size=abs(k),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_argtopk_argtopk.return.reduction_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_argtopk_argtopk.return.reduction_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1206, "end_line": 1275, "span_ids": ["argtopk"], "tokens": 610}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def argtopk(a, k, axis=-1, split_every=None):\n \"\"\"Extract the indices of the k largest elements from a on the given axis,\n and return them sorted from largest to smallest. If k is negative, extract\n the indices of the -k smallest elements instead, and return them sorted\n from smallest to largest.\n\n This performs best when ``k`` is much smaller than the chunk size. All\n results will be returned in a single chunk along the given axis.\n\n Parameters\n ----------\n x: Array\n Data being sorted\n k: int\n axis: int, optional\n split_every: int >=2, optional\n See :func:`topk`. The performance considerations for topk also apply\n here.\n\n Returns\n -------\n Selection of np.intp indices of x with size abs(k) along the given axis.\n\n Examples\n --------\n >>> import dask.array as da\n >>> x = np.array([5, 1, 3, 6])\n >>> d = da.from_array(x, chunks=2)\n >>> d.argtopk(2).compute()\n array([3, 0])\n >>> d.argtopk(-2).compute()\n array([1, 2])\n \"\"\"\n axis = validate_axis(axis, a.ndim)\n\n # Generate nodes where every chunk is a tuple of (a, original index of a)\n idx = arange(a.shape[axis], chunks=(a.chunks[axis],), dtype=np.intp)\n idx = idx[tuple(slice(None) if i == axis else np.newaxis for i in range(a.ndim))]\n a_plus_idx = a.map_blocks(chunk.argtopk_preprocess, idx, dtype=object)\n\n # chunk and combine steps of the reduction. They acquire in input a tuple\n # of (a, original indices of a) and return another tuple containing the top\n # k elements of a and the matching original indices. The selection is not\n # sorted internally, as in np.argpartition.\n chunk_combine = partial(chunk.argtopk, k=k)\n # aggregate step of the reduction. Internally invokes the chunk/combine\n # function, then sorts the results internally, drops a and returns the\n # index only.\n aggregate = partial(chunk.argtopk_aggregate, k=k)\n\n if isinstance(axis, Number):\n naxis = 1\n else:\n naxis = len(axis)\n\n meta = a._meta.astype(np.intp).reshape((0,) * (a.ndim - naxis + 1))\n\n return reduction(\n a_plus_idx,\n chunk=chunk_combine,\n combine=chunk_combine,\n aggregate=aggregate,\n axis=axis,\n keepdims=True,\n dtype=np.intp,\n split_every=split_every,\n concatenate=False,\n output_size=abs(k),\n meta=meta,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_trace_median.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_trace_median.return.result", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1278, "end_line": 1313, "span_ids": ["median", "trace"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef trace(a, offset=0, axis1=0, axis2=1, dtype=None):\n return diagonal(a, offset=offset, axis1=axis1, axis2=axis2).sum(-1, dtype=dtype)\n\n\n@derived_from(np)\ndef median(a, axis=None, keepdims=False, out=None):\n \"\"\"\n This works by automatically chunking the reduced axes to a single chunk\n and then calling ``numpy.median`` function across the remaining dimensions\n \"\"\"\n if axis is None:\n raise NotImplementedError(\n \"The da.median function only works along an axis. \"\n \"The full algorithm is difficult to do in parallel\"\n )\n\n if not isinstance(axis, Iterable):\n axis = (axis,)\n\n axis = [ax + a.ndim if ax < 0 else ax for ax in axis]\n\n a = a.rechunk({ax: -1 if ax in axis else \"auto\" for ax in range(a.ndim)})\n\n result = a.map_blocks(\n np.median,\n axis=axis,\n keepdims=keepdims,\n drop_axis=axis if not keepdims else None,\n chunks=[1 if ax in axis else c for ax, c in enumerate(a.chunks)]\n if keepdims\n else None,\n )\n\n result = handle_out(out, result)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmedian_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reductions.py_nanmedian_", "embedding": null, "metadata": {"file_path": "dask/array/reductions.py", "file_name": "reductions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1316, "end_line": 1347, "span_ids": ["nanmedian"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef nanmedian(a, axis=None, keepdims=False, out=None):\n \"\"\"\n This works by automatically chunking the reduced axes to a single chunk\n and then calling ``numpy.nanmedian`` function across the remaining dimensions\n \"\"\"\n if axis is None:\n raise NotImplementedError(\n \"The da.nanmedian function only works along an axis or a subset of axes. \"\n \"The full algorithm is difficult to do in parallel\"\n )\n\n if not isinstance(axis, Iterable):\n axis = (axis,)\n\n axis = [ax + a.ndim if ax < 0 else ax for ax in axis]\n\n a = a.rechunk({ax: -1 if ax in axis else \"auto\" for ax in range(a.ndim)})\n\n result = a.map_blocks(\n np.nanmedian,\n axis=axis,\n keepdims=keepdims,\n drop_axis=axis if not keepdims else None,\n chunks=[1 if ax in axis else c for ax, c in enumerate(a.chunks)]\n if keepdims\n else None,\n )\n\n result = handle_out(out, result)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_from_functools_import_red_reshape_rechunk.return.tuple_result_inchunks_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_from_functools_import_red_reshape_rechunk.return.tuple_result_inchunks_t", "embedding": null, "metadata": {"file_path": "dask/array/reshape.py", "file_name": "reshape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 79, "span_ids": ["imports", "reshape_rechunk"], "tokens": 795}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import reduce\nfrom itertools import product\nfrom operator import mul\n\nimport numpy as np\n\nfrom .core import Array\nfrom .utils import meta_from_array\nfrom ..base import tokenize\nfrom ..core import flatten\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import M\n\n\ndef reshape_rechunk(inshape, outshape, inchunks):\n assert all(isinstance(c, tuple) for c in inchunks)\n ii = len(inshape) - 1\n oi = len(outshape) - 1\n result_inchunks = [None for i in range(len(inshape))]\n result_outchunks = [None for i in range(len(outshape))]\n\n while ii >= 0 or oi >= 0:\n if inshape[ii] == outshape[oi]:\n result_inchunks[ii] = inchunks[ii]\n result_outchunks[oi] = inchunks[ii]\n ii -= 1\n oi -= 1\n continue\n din = inshape[ii]\n dout = outshape[oi]\n if din == 1:\n result_inchunks[ii] = (1,)\n ii -= 1\n elif dout == 1:\n result_outchunks[oi] = (1,)\n oi -= 1\n elif din < dout: # (4, 4, 4) -> (64,)\n ileft = ii - 1\n while (\n ileft >= 0 and reduce(mul, inshape[ileft : ii + 1]) < dout\n ): # 4 < 64, 4*4 < 64, 4*4*4 == 64\n ileft -= 1\n if reduce(mul, inshape[ileft : ii + 1]) != dout:\n raise ValueError(\"Shapes not compatible\")\n\n for i in range(ileft + 1, ii + 1): # need single-shape dimensions\n result_inchunks[i] = (inshape[i],) # chunks[i] = (4,)\n\n chunk_reduction = reduce(mul, map(len, inchunks[ileft + 1 : ii + 1]))\n result_inchunks[ileft] = expand_tuple(inchunks[ileft], chunk_reduction)\n\n prod = reduce(mul, inshape[ileft + 1 : ii + 1]) # 16\n result_outchunks[oi] = tuple(\n prod * c for c in result_inchunks[ileft]\n ) # (1, 1, 1, 1) .* 16\n\n oi -= 1\n ii = ileft - 1\n elif din > dout: # (64,) -> (4, 4, 4)\n oleft = oi - 1\n while oleft >= 0 and reduce(mul, outshape[oleft : oi + 1]) < din:\n oleft -= 1\n if reduce(mul, outshape[oleft : oi + 1]) != din:\n raise ValueError(\"Shapes not compatible\")\n\n # TODO: don't coalesce shapes unnecessarily\n cs = reduce(mul, outshape[oleft + 1 : oi + 1])\n\n result_inchunks[ii] = contract_tuple(inchunks[ii], cs) # (16, 16, 16, 16)\n\n for i in range(oleft + 1, oi + 1):\n result_outchunks[i] = (outshape[i],)\n\n result_outchunks[oleft] = tuple(c // cs for c in result_inchunks[ii])\n\n oi = oleft - 1\n ii -= 1\n\n return tuple(result_inchunks), tuple(result_outchunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_expand_tuple_expand_tuple.return.tuple_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_expand_tuple_expand_tuple.return.tuple_out_", "embedding": null, "metadata": {"file_path": "dask/array/reshape.py", "file_name": "reshape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 110, "span_ids": ["expand_tuple"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def expand_tuple(chunks, factor):\n \"\"\"\n\n >>> expand_tuple((2, 4), 2)\n (1, 1, 2, 2)\n\n >>> expand_tuple((2, 4), 3)\n (1, 1, 1, 1, 2)\n\n >>> expand_tuple((3, 4), 2)\n (1, 2, 2, 2)\n\n >>> expand_tuple((7, 4), 3)\n (2, 2, 3, 1, 1, 2)\n \"\"\"\n if factor == 1:\n return chunks\n\n out = []\n for c in chunks:\n x = c\n part = max(x / factor, 1)\n while x >= 2 * part:\n out.append(int(part))\n x -= int(part)\n if x:\n out.append(x)\n assert sum(chunks) == sum(out)\n return tuple(out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_contract_tuple_contract_tuple.return.tuple_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_contract_tuple_contract_tuple.return.tuple_out_", "embedding": null, "metadata": {"file_path": "dask/array/reshape.py", "file_name": "reshape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 133, "span_ids": ["contract_tuple"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def contract_tuple(chunks, factor):\n \"\"\"Return simple chunks tuple such that factor divides all elements\n\n Examples\n --------\n\n >>> contract_tuple((2, 2, 8, 4), 4)\n (4, 8, 4)\n \"\"\"\n assert sum(chunks) % factor == 0\n\n out = []\n residual = 0\n for chunk in chunks:\n chunk += residual\n div = chunk // factor\n residual = chunk % factor\n good = factor * div\n if good:\n out.append(good)\n return tuple(out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_reshape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/reshape.py_reshape_", "embedding": null, "metadata": {"file_path": "dask/array/reshape.py", "file_name": "reshape.py", "file_type": "text/x-python", "category": "implementation", "start_line": 136, "end_line": 206, "span_ids": ["reshape"], "tokens": 709}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reshape(x, shape):\n \"\"\"Reshape array to new shape\n\n This is a parallelized version of the ``np.reshape`` function with the\n following limitations:\n\n 1. It assumes that the array is stored in `row-major order`_\n 2. It only allows for reshapings that collapse or merge dimensions like\n ``(1, 2, 3, 4) -> (1, 6, 4)`` or ``(64,) -> (4, 4, 4)``\n\n .. _`row-major order`: https://en.wikipedia.org/wiki/Row-_and_column-major_order\n\n When communication is necessary this algorithm depends on the logic within\n rechunk. It endeavors to keep chunk sizes roughly the same when possible.\n\n See Also\n --------\n dask.array.rechunk\n numpy.reshape\n \"\"\"\n # Sanitize inputs, look for -1 in shape\n from .slicing import sanitize_index\n\n shape = tuple(map(sanitize_index, shape))\n known_sizes = [s for s in shape if s != -1]\n if len(known_sizes) < len(shape):\n if len(shape) - len(known_sizes) > 1:\n raise ValueError(\"can only specify one unknown dimension\")\n # Fastpath for x.reshape(-1) on 1D arrays, allows unknown shape in x\n # for this case only.\n if len(shape) == 1 and x.ndim == 1:\n return x\n missing_size = sanitize_index(x.size / reduce(mul, known_sizes, 1))\n shape = tuple(missing_size if s == -1 else s for s in shape)\n\n if np.isnan(sum(x.shape)):\n raise ValueError(\n \"Array chunk size or shape is unknown. shape: %s\\n\\n\"\n \"Possible solution with x.compute_chunk_sizes()\" % x.shape\n )\n\n if reduce(mul, shape, 1) != x.size:\n raise ValueError(\"total size of new array must be unchanged\")\n\n if x.shape == shape:\n return x\n\n meta = meta_from_array(x, len(shape))\n\n name = \"reshape-\" + tokenize(x, shape)\n\n if x.npartitions == 1:\n key = next(flatten(x.__dask_keys__()))\n dsk = {(name,) + (0,) * len(shape): (M.reshape, key, shape)}\n chunks = tuple((d,) for d in shape)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n return Array(graph, name, chunks, meta=meta)\n\n # Logic for how to rechunk\n inchunks, outchunks = reshape_rechunk(x.shape, shape, x.chunks)\n x2 = x.rechunk(inchunks)\n\n # Construct graph\n in_keys = list(product([x2.name], *[range(len(c)) for c in inchunks]))\n out_keys = list(product([name], *[range(len(c)) for c in outchunks]))\n shapes = list(product(*outchunks))\n dsk = {a: (M.reshape, b, shape) for a, b, shape in zip(out_keys, in_keys, shapes)}\n\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x2])\n return Array(graph, name, outchunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_inspect_result_type.return.np_result_type_args_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_inspect_result_type.return.np_result_type_args_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["result_type", "imports", "array"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nimport math\nimport warnings\nfrom collections.abc import Iterable\nfrom functools import wraps, partial\nfrom numbers import Real, Integral\nfrom distutils.version import LooseVersion\nfrom typing import List\n\nimport numpy as np\nfrom tlz import concat, sliding_window, interleave\n\nfrom ..compatibility import apply\nfrom ..core import flatten\nfrom ..base import tokenize, is_dask_collection\nfrom ..delayed import unpack_collections, Delayed\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..utils import funcname, derived_from, is_arraylike\nfrom . import chunk\nfrom .creation import arange, diag, empty, indices\nfrom .utils import safe_wraps, validate_axis, meta_from_array, zeros_like_safe\nfrom .wrap import ones\nfrom .ufunc import multiply, sqrt\n\nfrom .core import (\n Array,\n map_blocks,\n elemwise,\n asarray,\n asanyarray,\n concatenate,\n stack,\n blockwise,\n broadcast_shapes,\n is_scalar_for_elemwise,\n broadcast_to,\n tensordot_lookup,\n implements,\n)\n\nfrom .einsumfuncs import einsum # noqa\nfrom .numpy_compat import _unravel_index_keyword\n\n\n@derived_from(np)\ndef array(x, dtype=None, ndmin=None):\n x = asarray(x)\n while ndmin is not None and x.ndim < ndmin:\n x = x[None, :]\n if dtype is not None and x.dtype != dtype:\n x = x.astype(dtype)\n return x\n\n\n@derived_from(np)\ndef result_type(*args):\n args = [a if is_scalar_for_elemwise(a) else a.dtype for a in args]\n return np.result_type(*args)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_3d_atleast_3d.if_len_new_arys_1_.else_.return.new_arys": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_3d_atleast_3d.if_len_new_arys_1_.else_.return.new_arys", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 78, "span_ids": ["atleast_3d"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef atleast_3d(*arys):\n new_arys = []\n for x in arys:\n x = asanyarray(x)\n if x.ndim == 0:\n x = x[None, None, None]\n elif x.ndim == 1:\n x = x[None, :, None]\n elif x.ndim == 2:\n x = x[:, :, None]\n\n new_arys.append(x)\n\n if len(new_arys) == 1:\n return new_arys[0]\n else:\n return new_arys", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_2d_dstack.return.concatenate_tup_axis_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_atleast_2d_dstack.return.concatenate_tup_axis_2_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 81, "end_line": 136, "span_ids": ["atleast_2d", "vstack", "dstack", "hstack", "atleast_1d"], "tokens": 374}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef atleast_2d(*arys):\n new_arys = []\n for x in arys:\n x = asanyarray(x)\n if x.ndim == 0:\n x = x[None, None]\n elif x.ndim == 1:\n x = x[None, :]\n\n new_arys.append(x)\n\n if len(new_arys) == 1:\n return new_arys[0]\n else:\n return new_arys\n\n\n@derived_from(np)\ndef atleast_1d(*arys):\n new_arys = []\n for x in arys:\n x = asanyarray(x)\n if x.ndim == 0:\n x = x[None]\n\n new_arys.append(x)\n\n if len(new_arys) == 1:\n return new_arys[0]\n else:\n return new_arys\n\n\n@derived_from(np)\ndef vstack(tup, allow_unknown_chunksizes=False):\n tup = tuple(atleast_2d(x) for x in tup)\n return concatenate(tup, axis=0, allow_unknown_chunksizes=allow_unknown_chunksizes)\n\n\n@derived_from(np)\ndef hstack(tup, allow_unknown_chunksizes=False):\n if all(x.ndim == 1 for x in tup):\n return concatenate(\n tup, axis=0, allow_unknown_chunksizes=allow_unknown_chunksizes\n )\n else:\n return concatenate(\n tup, axis=1, allow_unknown_chunksizes=allow_unknown_chunksizes\n )\n\n\n@derived_from(np)\ndef dstack(tup, allow_unknown_chunksizes=False):\n tup = tuple(atleast_3d(x) for x in tup)\n return concatenate(tup, axis=2, allow_unknown_chunksizes=allow_unknown_chunksizes)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_swapaxes_transpose.return.blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_swapaxes_transpose.return.blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 164, "span_ids": ["transpose", "swapaxes"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef swapaxes(a, axis1, axis2):\n if axis1 == axis2:\n return a\n if axis1 < 0:\n axis1 = axis1 + a.ndim\n if axis2 < 0:\n axis2 = axis2 + a.ndim\n ind = list(range(a.ndim))\n out = list(ind)\n out[axis1], out[axis2] = axis2, axis1\n\n return blockwise(np.swapaxes, out, a, ind, axis1=axis1, axis2=axis2, dtype=a.dtype)\n\n\n@derived_from(np)\ndef transpose(a, axes=None):\n if axes:\n if len(axes) != a.ndim:\n raise ValueError(\"axes don't match array\")\n else:\n axes = tuple(range(a.ndim))[::-1]\n axes = tuple(d + a.ndim if d < 0 else d for d in axes)\n return blockwise(\n np.transpose, axes, a, tuple(range(a.ndim)), dtype=a.dtype, axes=axes\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_flip_ALPHABET.alphabet_upper_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_flip_ALPHABET.alphabet_upper_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 167, "end_line": 206, "span_ids": ["flip", "fliplr", "flipud", "impl"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def flip(m, axis):\n \"\"\"\n Reverse element order along axis.\n\n Parameters\n ----------\n axis : int\n Axis to reverse element order of.\n\n Returns\n -------\n reversed array : ndarray\n \"\"\"\n\n m = asanyarray(m)\n\n sl = m.ndim * [slice(None)]\n try:\n sl[axis] = slice(None, None, -1)\n except IndexError as e:\n raise ValueError(\n \"`axis` of %s invalid for %s-D array\" % (str(axis), str(m.ndim))\n ) from e\n sl = tuple(sl)\n\n return m[sl]\n\n\n@derived_from(np)\ndef flipud(m):\n return flip(m, 0)\n\n\n@derived_from(np)\ndef fliplr(m):\n return flip(m, 1)\n\n\nalphabet = \"abcdefghijklmnopqrstuvwxyz\"\nALPHABET = alphabet.upper()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__tensordot__tensordot.return.x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__tensordot__tensordot.return.x", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 235, "span_ids": ["_tensordot"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _tensordot(a, b, axes):\n x = max([a, b], key=lambda x: x.__array_priority__)\n tensordot = tensordot_lookup.dispatch(type(x))\n\n # workaround may be removed when numpy version (currently 1.13.0) is bumped\n a_dims = np.array([a.shape[i] for i in axes[0]])\n b_dims = np.array([b.shape[i] for i in axes[1]])\n if (\n len(a_dims) > 0\n and (a_dims == b_dims).all()\n and a_dims.min() == 0\n and LooseVersion(np.__version__) < LooseVersion(\"1.14\")\n ):\n x = np.zeros(\n tuple(\n [s for i, s in enumerate(a.shape) if i not in axes[0]]\n + [s for i, s in enumerate(b.shape) if i not in axes[1]]\n )\n )\n else:\n x = tensordot(a, b, axes=axes)\n\n ind = [slice(None, None)] * x.ndim\n for a in sorted(axes[0]):\n ind.insert(a, None)\n x = x[tuple(ind)]\n return x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_tensordot_vdot.return.dot_a_conj_ravel_b_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_tensordot_vdot.return.dot_a_conj_ravel_b_r", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 238, "end_line": 287, "span_ids": ["vdot", "tensordot", "dot"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef tensordot(lhs, rhs, axes=2):\n if isinstance(axes, Iterable):\n left_axes, right_axes = axes\n else:\n left_axes = tuple(range(lhs.ndim - axes, lhs.ndim))\n right_axes = tuple(range(0, axes))\n\n if isinstance(left_axes, Integral):\n left_axes = (left_axes,)\n if isinstance(right_axes, Integral):\n right_axes = (right_axes,)\n if isinstance(left_axes, list):\n left_axes = tuple(left_axes)\n if isinstance(right_axes, list):\n right_axes = tuple(right_axes)\n\n dt = np.promote_types(lhs.dtype, rhs.dtype)\n\n left_index = list(range(lhs.ndim))\n right_index = list(range(lhs.ndim, lhs.ndim + rhs.ndim))\n out_index = left_index + right_index\n\n for l, r in zip(left_axes, right_axes):\n out_index.remove(right_index[r])\n right_index[r] = left_index[l]\n\n intermediate = blockwise(\n _tensordot,\n out_index,\n lhs,\n left_index,\n rhs,\n right_index,\n dtype=dt,\n axes=(left_axes, right_axes),\n )\n\n result = intermediate.sum(axis=left_axes)\n return result\n\n\n@derived_from(np)\ndef dot(a, b):\n return tensordot(a, b, axes=((a.ndim - 1,), (b.ndim - 2,)))\n\n\n@derived_from(np)\ndef vdot(a, b):\n return dot(a.conj().ravel(), b.ravel())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_matmul_matmul.return.out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_matmul_matmul.return.out", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 290, "end_line": 329, "span_ids": ["matmul"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef matmul(a, b):\n a = asanyarray(a)\n b = asanyarray(b)\n\n if a.ndim == 0 or b.ndim == 0:\n raise ValueError(\"`matmul` does not support scalars.\")\n\n a_is_1d = False\n if a.ndim == 1:\n a_is_1d = True\n a = a[np.newaxis, :]\n\n b_is_1d = False\n if b.ndim == 1:\n b_is_1d = True\n b = b[:, np.newaxis]\n\n if a.ndim < b.ndim:\n a = a[(b.ndim - a.ndim) * (np.newaxis,)]\n elif a.ndim > b.ndim:\n b = b[(a.ndim - b.ndim) * (np.newaxis,)]\n\n out = blockwise(\n np.matmul,\n tuple(range(1, a.ndim + 1)),\n a,\n tuple(range(1, a.ndim - 1)) + (a.ndim - 1, 0),\n b,\n tuple(range(1, a.ndim - 1)) + (0, a.ndim),\n dtype=result_type(a, b),\n concatenate=True,\n )\n\n if a_is_1d:\n out = out[..., 0, :]\n if b_is_1d:\n out = out[..., 0]\n\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_outer__inner_apply_along_axis.return.np_apply_along_axis_func1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_outer__inner_apply_along_axis.return.np_apply_along_axis_func1", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 332, "end_line": 343, "span_ids": ["outer", "_inner_apply_along_axis"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef outer(a, b):\n a = a.flatten()\n b = b.flatten()\n\n dtype = np.outer(a.dtype.type(), b.dtype.type()).dtype\n\n return blockwise(np.outer, \"ij\", a, \"i\", b, \"j\", dtype=dtype)\n\n\ndef _inner_apply_along_axis(arr, func1d, func1d_axis, func1d_args, func1d_kwargs):\n return np.apply_along_axis(func1d, func1d_axis, arr, *func1d_args, **func1d_kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_along_axis_apply_along_axis.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_along_axis_apply_along_axis.return.result", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 346, "end_line": 410, "span_ids": ["apply_along_axis"], "tokens": 587}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef apply_along_axis(func1d, axis, arr, *args, dtype=None, shape=None, **kwargs):\n \"\"\"\n Apply a function to 1-D slices along the given axis. This is\n a blocked variant of :func:`numpy.apply_along_axis` implemented via\n :func:`dask.array.map_blocks`\n\n Parameters\n ----------\n func1d : callable\n Function to apply to 1-D slices of the array along the given axis\n axis : int\n Axis along which func1d will be applied\n arr : dask array\n Dask array to which ``func1d`` will be applied\n args : any\n Additional arguments to ``func1d``.\n dtype : str or dtype, optional\n The dtype of the output of ``func1d``.\n shape : tuple, optional\n The shape of the output of ``func1d``.\n kwargs : any\n Additional keyword arguments for ``func1d``.\n\n Notes\n -----\n If either of `dtype` or `shape` are not provided, Dask attempts to\n determine them by calling `func1d` on a dummy array. This may produce\n incorrect values for `dtype` or `shape`, so we recommend providing them.\n \"\"\"\n arr = asarray(arr)\n\n # Verify that axis is valid and throw an error otherwise\n axis = len(arr.shape[:axis])\n\n # If necessary, infer dtype and shape of the output of func1d by calling it on test data.\n if shape is None or dtype is None:\n test_data = np.ones((1,), dtype=arr.dtype)\n test_result = np.array(func1d(test_data, *args, **kwargs))\n if shape is None:\n shape = test_result.shape\n if dtype is None:\n dtype = test_result.dtype\n\n # Rechunk so that func1d is applied over the full axis.\n arr = arr.rechunk(\n arr.chunks[:axis] + (arr.shape[axis : axis + 1],) + arr.chunks[axis + 1 :]\n )\n\n # Map func1d over the data to get the result\n # Adds other axes as needed.\n result = arr.map_blocks(\n _inner_apply_along_axis,\n name=funcname(func1d) + \"-along-axis\",\n dtype=dtype,\n chunks=(arr.chunks[:axis] + shape + arr.chunks[axis + 1 :]),\n drop_axis=axis,\n new_axis=list(range(axis, axis + len(shape), 1)),\n func1d=func1d,\n func1d_axis=axis,\n func1d_args=args,\n func1d_kwargs=kwargs,\n )\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_over_axes_apply_over_axes.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_apply_over_axes_apply_over_axes.return.result", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 413, "end_line": 438, "span_ids": ["apply_over_axes"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef apply_over_axes(func, a, axes):\n # Validate arguments\n a = asarray(a)\n try:\n axes = tuple(axes)\n except TypeError:\n axes = (axes,)\n\n sl = a.ndim * (slice(None),)\n\n # Compute using `apply_along_axis`.\n result = a\n for i in axes:\n result = apply_along_axis(func, i, result, 0)\n\n # Restore original dimensionality or error.\n if result.ndim == (a.ndim - 1):\n result = result[sl[:i] + (None,)]\n elif result.ndim != a.ndim:\n raise ValueError(\n \"func must either preserve dimensionality of the input\"\n \" or reduce it by one.\"\n )\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ptp_diff.return.r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ptp_diff.return.r", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 441, "end_line": 465, "span_ids": ["ptp", "diff"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef ptp(a, axis=None):\n return a.max(axis=axis) - a.min(axis=axis)\n\n\n@derived_from(np)\ndef diff(a, n=1, axis=-1):\n a = asarray(a)\n n = int(n)\n axis = int(axis)\n\n sl_1 = a.ndim * [slice(None)]\n sl_2 = a.ndim * [slice(None)]\n\n sl_1[axis] = slice(1, None)\n sl_2[axis] = slice(None, -1)\n\n sl_1 = tuple(sl_1)\n sl_2 = tuple(sl_2)\n\n r = a\n for i in range(n):\n r = r[sl_1] - r[sl_2]\n\n return r", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ediff1d__gradient_kernel.return.grad": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_ediff1d__gradient_kernel.return.grad", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 468, "end_line": 502, "span_ids": ["_gradient_kernel", "ediff1d"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef ediff1d(ary, to_end=None, to_begin=None):\n ary = asarray(ary)\n\n aryf = ary.flatten()\n r = aryf[1:] - aryf[:-1]\n\n r = [r]\n if to_begin is not None:\n r = [asarray(to_begin).flatten()] + r\n if to_end is not None:\n r = r + [asarray(to_end).flatten()]\n r = concatenate(r)\n\n return r\n\n\ndef _gradient_kernel(x, block_id, coord, axis, array_locs, grad_kwargs):\n \"\"\"\n x: nd-array\n array of one block\n coord: 1d-array or scalar\n coordinate along which the gradient is computed.\n axis: int\n axis along which the gradient is computed\n array_locs:\n actual location along axis. None if coordinate is scalar\n grad_kwargs:\n keyword to be passed to np.gradient\n \"\"\"\n block_loc = block_id[axis]\n if array_locs is not None:\n coord = coord[array_locs[0][block_loc] : array_locs[1][block_loc]]\n grad = np.gradient(x, coord, axis=axis, **grad_kwargs)\n return grad", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_gradient_gradient.return.results": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_gradient_gradient.return.results", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 505, "end_line": 581, "span_ids": ["gradient"], "tokens": 581}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef gradient(f, *varargs, **kwargs):\n f = asarray(f)\n\n kwargs[\"edge_order\"] = math.ceil(kwargs.get(\"edge_order\", 1))\n if kwargs[\"edge_order\"] > 2:\n raise ValueError(\"edge_order must be less than or equal to 2.\")\n\n drop_result_list = False\n axis = kwargs.pop(\"axis\", None)\n if axis is None:\n axis = tuple(range(f.ndim))\n elif isinstance(axis, Integral):\n drop_result_list = True\n axis = (axis,)\n\n axis = validate_axis(axis, f.ndim)\n\n if len(axis) != len(set(axis)):\n raise ValueError(\"duplicate axes not allowed\")\n\n axis = tuple(ax % f.ndim for ax in axis)\n\n if varargs == ():\n varargs = (1,)\n if len(varargs) == 1:\n varargs = len(axis) * varargs\n if len(varargs) != len(axis):\n raise TypeError(\n \"Spacing must either be a single scalar, or a scalar / 1d-array per axis\"\n )\n\n if issubclass(f.dtype.type, (np.bool8, Integral)):\n f = f.astype(float)\n elif issubclass(f.dtype.type, Real) and f.dtype.itemsize < 4:\n f = f.astype(float)\n\n results = []\n for i, ax in enumerate(axis):\n for c in f.chunks[ax]:\n if np.min(c) < kwargs[\"edge_order\"] + 1:\n raise ValueError(\n \"Chunk size must be larger than edge_order + 1. \"\n \"Minimum chunk for axis {} is {}. Rechunk to \"\n \"proceed.\".format(ax, np.min(c))\n )\n\n if np.isscalar(varargs[i]):\n array_locs = None\n else:\n if isinstance(varargs[i], Array):\n raise NotImplementedError(\"dask array coordinated is not supported.\")\n # coordinate position for each block taking overlap into account\n chunk = np.array(f.chunks[ax])\n array_loc_stop = np.cumsum(chunk) + 1\n array_loc_start = array_loc_stop - chunk - 2\n array_loc_stop[-1] -= 1\n array_loc_start[0] = 0\n array_locs = (array_loc_start, array_loc_stop)\n\n results.append(\n f.map_overlap(\n _gradient_kernel,\n dtype=f.dtype,\n depth={j: 1 if j == ax else 0 for j in range(f.ndim)},\n boundary=\"none\",\n coord=varargs[i],\n axis=ax,\n array_locs=array_locs,\n grad_kwargs=kwargs,\n )\n )\n\n if drop_result_list:\n results = results[0]\n\n return results", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__bincount_sum_bincount.return.Array_graph_final_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__bincount_sum_bincount.return.Array_graph_final_name_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 584, "end_line": 629, "span_ids": ["_bincount_sum", "bincount"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _bincount_sum(bincounts, dtype=int):\n n = max(map(len, bincounts))\n out = zeros_like_safe(bincounts[0], shape=n, dtype=dtype)\n for b in bincounts:\n out[: len(b)] += b\n return out\n\n\n@derived_from(np)\ndef bincount(x, weights=None, minlength=0):\n if x.ndim != 1:\n raise ValueError(\"Input array must be one dimensional. Try using x.ravel()\")\n if weights is not None:\n if weights.chunks != x.chunks:\n raise ValueError(\"Chunks of input array x and weights must match.\")\n\n token = tokenize(x, weights, minlength)\n name = \"bincount-\" + token\n final_name = \"bincount-sum\" + token\n # Call np.bincount on each block, possibly with weights\n if weights is not None:\n dsk = {\n (name, i): (np.bincount, (x.name, i), (weights.name, i), minlength)\n for i, _ in enumerate(x.__dask_keys__())\n }\n dtype = np.bincount([1], weights=[1]).dtype\n else:\n dsk = {\n (name, i): (np.bincount, (x.name, i), None, minlength)\n for i, _ in enumerate(x.__dask_keys__())\n }\n dtype = np.bincount([]).dtype\n\n dsk[(final_name, 0)] = (_bincount_sum, list(dsk), dtype)\n graph = HighLevelGraph.from_collections(\n final_name, dsk, dependencies=[x] if weights is None else [x, weights]\n )\n\n if minlength == 0:\n chunks = ((np.nan,),)\n else:\n chunks = ((minlength,),)\n\n meta = meta_from_array(x, 1, dtype=dtype)\n\n return Array(graph, final_name, chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_digitize__block_hist.return.np_histogram_x_bins_ran": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_digitize__block_hist.return.np_histogram_x_bins_ran", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 632, "end_line": 656, "span_ids": ["_block_hist", "digitize", "_linspace_from_delayed"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef digitize(a, bins, right=False):\n bins = np.asarray(bins)\n dtype = np.digitize([0], bins, right=False).dtype\n return a.map_blocks(np.digitize, dtype=dtype, bins=bins, right=right)\n\n\n# TODO: dask linspace doesn't support delayed values\ndef _linspace_from_delayed(start, stop, num=50):\n linspace_name = \"linspace-\" + tokenize(start, stop, num)\n (start_ref, stop_ref, num_ref), deps = unpack_collections([start, stop, num])\n if len(deps) == 0:\n return np.linspace(start, stop, num=num)\n\n linspace_dsk = {(linspace_name, 0): (np.linspace, start_ref, stop_ref, num_ref)}\n linspace_graph = HighLevelGraph.from_collections(\n linspace_name, linspace_dsk, dependencies=deps\n )\n\n chunks = ((np.nan,),) if is_dask_collection(num) else ((num,),)\n return Array(linspace_graph, linspace_name, chunks, dtype=float)\n\n\ndef _block_hist(x, bins, range=None, weights=None):\n return np.histogram(x, bins, range=range, weights=weights)[0][np.newaxis]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram_histogram._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram_histogram._", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 659, "end_line": 734, "span_ids": ["histogram"], "tokens": 884}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def histogram(a, bins=None, range=None, normed=False, weights=None, density=None):\n \"\"\"\n Blocked variant of :func:`numpy.histogram`.\n\n Parameters\n ----------\n a : array_like\n Input data. The histogram is computed over the flattened array.\n bins : int or sequence of scalars, optional\n Either an iterable specifying the ``bins`` or the number of ``bins``\n and a ``range`` argument is required as computing ``min`` and ``max``\n over blocked arrays is an expensive operation that must be performed\n explicitly.\n If `bins` is an int, it defines the number of equal-width\n bins in the given range (10, by default). If `bins` is a\n sequence, it defines a monotonically increasing array of bin edges,\n including the rightmost edge, allowing for non-uniform bin widths.\n range : (float, float), optional\n The lower and upper range of the bins. If not provided, range\n is simply ``(a.min(), a.max())``. Values outside the range are\n ignored. The first element of the range must be less than or\n equal to the second. `range` affects the automatic bin\n computation as well. While bin width is computed to be optimal\n based on the actual data within `range`, the bin count will fill\n the entire range including portions containing no data.\n normed : bool, optional\n This is equivalent to the ``density`` argument, but produces incorrect\n results for unequal bin widths. It should not be used.\n weights : array_like, optional\n A dask.array.Array of weights, of the same block structure as ``a``. Each value in\n ``a`` only contributes its associated weight towards the bin count\n (instead of 1). If ``density`` is True, the weights are\n normalized, so that the integral of the density over the range\n remains 1.\n density : bool, optional\n If ``False``, the result will contain the number of samples in\n each bin. If ``True``, the result is the value of the\n probability *density* function at the bin, normalized such that\n the *integral* over the range is 1. Note that the sum of the\n histogram values will not be equal to 1 unless bins of unity\n width are chosen; it is not a probability *mass* function.\n Overrides the ``normed`` keyword if given.\n If ``density`` is True, ``bins`` cannot be a single-number delayed\n value. It must be a concrete number, or a (possibly-delayed)\n array/sequence of the bin edges.\n Returns\n -------\n hist : dask Array\n The values of the histogram. See `density` and `weights` for a\n description of the possible semantics.\n bin_edges : dask Array of dtype float\n Return the bin edges ``(length(hist)+1)``.\n\n\n Examples\n --------\n Using number of bins and range:\n\n >>> import dask.array as da\n >>> import numpy as np\n >>> x = da.from_array(np.arange(10000), chunks=10)\n >>> h, bins = da.histogram(x, bins=10, range=[0, 10000])\n >>> bins\n array([ 0., 1000., 2000., 3000., 4000., 5000., 6000., 7000.,\n 8000., 9000., 10000.])\n >>> h.compute()\n array([1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000])\n\n Explicitly specifying the bins:\n\n >>> h, bins = da.histogram(x, bins=np.array([0, 5000, 10000]))\n >>> bins\n array([ 0, 5000, 10000])\n >>> h.compute()\n array([5000, 5000])\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_isinstance_bins_Array_histogram._Map_the_histogram_to_al": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_isinstance_bins_Array_histogram._Map_the_histogram_to_al", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 735, "end_line": 805, "span_ids": ["histogram"], "tokens": 692}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def histogram(a, bins=None, range=None, normed=False, weights=None, density=None):\n if isinstance(bins, Array):\n scalar_bins = bins.ndim == 0\n # ^ `np.ndim` is not implemented by Dask array.\n elif isinstance(bins, Delayed):\n scalar_bins = bins._length is None or bins._length == 1\n else:\n scalar_bins = np.ndim(bins) == 0\n\n if bins is None or (scalar_bins and range is None):\n raise ValueError(\n \"dask.array.histogram requires either specifying \"\n \"bins as an iterable or specifying both a range and \"\n \"the number of bins\"\n )\n\n if weights is not None and weights.chunks != a.chunks:\n raise ValueError(\"Input array and weights must have the same chunked structure\")\n\n if normed is not False:\n raise ValueError(\n \"The normed= keyword argument has been deprecated. \"\n \"Please use density instead. \"\n \"See the numpy.histogram docstring for more information.\"\n )\n\n if density and scalar_bins and isinstance(bins, (Array, Delayed)):\n raise NotImplementedError(\n \"When `density` is True, `bins` cannot be a scalar Dask object. \"\n \"It must be a concrete number or a (possibly-delayed) array/sequence of bin edges.\"\n )\n\n for argname, val in [(\"bins\", bins), (\"range\", range), (\"weights\", weights)]:\n if not isinstance(bins, (Array, Delayed)) and is_dask_collection(bins):\n raise TypeError(\n \"Dask types besides Array and Delayed are not supported \"\n \"for `histogram`. For argument `{}`, got: {!r}\".format(argname, val)\n )\n\n if range is not None:\n try:\n if len(range) != 2:\n raise ValueError(\n f\"range must be a sequence or array of length 2, but got {len(range)} items\"\n )\n if isinstance(range, (Array, np.ndarray)) and range.shape != (2,):\n raise ValueError(\n f\"range must be a 1-dimensional array of two items, but got an array of shape {range.shape}\"\n )\n except TypeError:\n raise TypeError(\n f\"Expected a sequence or array for range, not {range}\"\n ) from None\n\n token = tokenize(a, bins, range, weights, density)\n name = \"histogram-sum-\" + token\n\n if scalar_bins:\n bins = _linspace_from_delayed(range[0], range[1], bins + 1)\n # ^ NOTE `range[1]` is safe because of the above check, and the initial check\n # that range must not be None if `scalar_bins`\n else:\n if not isinstance(bins, (Array, np.ndarray)):\n bins = asarray(bins)\n if bins.ndim != 1:\n raise ValueError(\n f\"bins must be a 1-dimensional array or sequence, got shape {bins.shape}\"\n )\n\n (bins_ref, range_ref), deps = unpack_collections([bins, range])\n\n # Map the histogram to all bins, forming a 2D array of histograms, stacked for each chunk\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_weights_is_None__histogram.if_density_is_not_None_.else_.return.n_bins": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_histogram.if_weights_is_None__histogram.if_density_is_not_None_.else_.return.n_bins", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 806, "end_line": 843, "span_ids": ["histogram"], "tokens": 380}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def histogram(a, bins=None, range=None, normed=False, weights=None, density=None):\n # ... other code\n if weights is None:\n dsk = {\n (name, i, 0): (_block_hist, k, bins_ref, range_ref)\n for i, k in enumerate(flatten(a.__dask_keys__()))\n }\n dtype = np.histogram([])[0].dtype\n else:\n a_keys = flatten(a.__dask_keys__())\n w_keys = flatten(weights.__dask_keys__())\n dsk = {\n (name, i, 0): (_block_hist, k, bins_ref, range_ref, w)\n for i, (k, w) in enumerate(zip(a_keys, w_keys))\n }\n dtype = weights.dtype\n\n deps = (a,) + deps\n if weights is not None:\n deps += (weights,)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=deps)\n\n # Turn graph into a 2D Array of shape (nchunks, nbins)\n nchunks = len(list(flatten(a.__dask_keys__())))\n nbins = bins.size - 1 # since `bins` is 1D\n chunks = ((1,) * nchunks, (nbins,))\n mapped = Array(graph, name, chunks, dtype=dtype)\n\n # Sum over chunks to get the final histogram\n n = mapped.sum(axis=0)\n\n # We need to replicate normed and density options from numpy\n if density is not None:\n if density:\n db = asarray(np.diff(bins).astype(float), chunks=n.chunks)\n return n / db / n.sum(), bins\n else:\n return n, bins\n else:\n return n, bins", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_cov_cov.if_not_rowvar_.else_.return._dot_X_X_T_conj_fac": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_cov_cov.if_not_rowvar_.else_.return._dot_X_X_T_conj_fac", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 846, "end_line": 891, "span_ids": ["cov"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef cov(m, y=None, rowvar=1, bias=0, ddof=None):\n # This was copied almost verbatim from np.cov\n if ddof is not None and ddof != int(ddof):\n raise ValueError(\"ddof must be integer\")\n\n # Handles complex arrays too\n m = asarray(m)\n if y is None:\n dtype = np.result_type(m, np.float64)\n else:\n y = asarray(y)\n dtype = np.result_type(m, y, np.float64)\n X = array(m, ndmin=2, dtype=dtype)\n\n if X.shape[0] == 1:\n rowvar = 1\n if rowvar:\n N = X.shape[1]\n axis = 0\n else:\n N = X.shape[0]\n axis = 1\n\n # check ddof\n if ddof is None:\n if bias == 0:\n ddof = 1\n else:\n ddof = 0\n fact = float(N - ddof)\n if fact <= 0:\n warnings.warn(\"Degrees of freedom <= 0 for slice\", RuntimeWarning)\n fact = 0.0\n\n if y is not None:\n y = array(y, ndmin=2, dtype=dtype)\n X = concatenate((X, y), axis)\n\n X = X - X.mean(axis=1 - axis, keepdims=True)\n if not rowvar:\n return (dot(X.T, X.conj()) / fact).squeeze()\n else:\n return (dot(X, X.T.conj()) / fact).squeeze()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_corrcoef_iscomplexobj.return.issubclass_x_dtype_type_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_corrcoef_iscomplexobj.return.issubclass_x_dtype_type_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 894, "end_line": 914, "span_ids": ["iscomplexobj", "round", "corrcoef"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef corrcoef(x, y=None, rowvar=1):\n c = cov(x, y, rowvar)\n if c.shape == ():\n return c / c\n d = diag(c)\n d = d.reshape((d.shape[0], 1))\n sqr_d = sqrt(d)\n return (c / sqr_d) / sqr_d.T\n\n\n@implements(np.round, np.round_)\n@derived_from(np)\ndef round(a, decimals=0):\n return a.map_blocks(np.round, decimals=decimals, dtype=a.dtype)\n\n\n@implements(np.iscomplexobj)\n@derived_from(np)\ndef iscomplexobj(x):\n return issubclass(x.dtype.type, np.complexfloating)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__unique_internal__unique_internal.return.r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__unique_internal__unique_internal.return.r", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 917, "end_line": 975, "span_ids": ["_unique_internal"], "tokens": 596}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _unique_internal(ar, indices, counts, return_inverse=False):\n \"\"\"\n Helper/wrapper function for :func:`numpy.unique`.\n\n Uses :func:`numpy.unique` to find the unique values for the array chunk.\n Given this chunk may not represent the whole array, also take the\n ``indices`` and ``counts`` that are in 1-to-1 correspondence to ``ar``\n and reduce them in the same fashion as ``ar`` is reduced. Namely sum\n any counts that correspond to the same value and take the smallest\n index that corresponds to the same value.\n\n To handle the inverse mapping from the unique values to the original\n array, simply return a NumPy array created with ``arange`` with enough\n values to correspond 1-to-1 to the unique values. While there is more\n work needed to be done to create the full inverse mapping for the\n original array, this provides enough information to generate the\n inverse mapping in Dask.\n\n Given Dask likes to have one array returned from functions like\n ``blockwise``, some formatting is done to stuff all of the resulting arrays\n into one big NumPy structured array. Dask is then able to handle this\n object and can split it apart into the separate results on the Dask side,\n which then can be passed back to this function in concatenated chunks for\n further reduction or can be return to the user to perform other forms of\n analysis.\n\n By handling the problem in this way, it does not matter where a chunk\n is in a larger array or how big it is. The chunk can still be computed\n on the same way. Also it does not matter if the chunk is the result of\n other chunks being run through this function multiple times. The end\n result will still be just as accurate using this strategy.\n \"\"\"\n\n return_index = indices is not None\n return_counts = counts is not None\n\n u = np.unique(ar)\n\n dt = [(\"values\", u.dtype)]\n if return_index:\n dt.append((\"indices\", np.intp))\n if return_inverse:\n dt.append((\"inverse\", np.intp))\n if return_counts:\n dt.append((\"counts\", np.intp))\n\n r = np.empty(u.shape, dtype=dt)\n r[\"values\"] = u\n if return_inverse:\n r[\"inverse\"] = np.arange(len(r), dtype=np.intp)\n if return_index or return_counts:\n for i, v in enumerate(r[\"values\"]):\n m = ar == v\n if return_index:\n indices[m].min(keepdims=True, out=r[\"indices\"][i : i + 1])\n if return_counts:\n counts[m].sum(keepdims=True, out=r[\"counts\"][i : i + 1])\n\n return r", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unique_unique.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unique_unique.return.result", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 978, "end_line": 1068, "span_ids": ["unique"], "tokens": 770}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef unique(ar, return_index=False, return_inverse=False, return_counts=False):\n ar = ar.ravel()\n\n # Run unique on each chunk and collect results in a Dask Array of\n # unknown size.\n\n args = [ar, \"i\"]\n out_dtype = [(\"values\", ar.dtype)]\n if return_index:\n args.extend([arange(ar.shape[0], dtype=np.intp, chunks=ar.chunks[0]), \"i\"])\n out_dtype.append((\"indices\", np.intp))\n else:\n args.extend([None, None])\n if return_counts:\n args.extend([ones((ar.shape[0],), dtype=np.intp, chunks=ar.chunks[0]), \"i\"])\n out_dtype.append((\"counts\", np.intp))\n else:\n args.extend([None, None])\n\n out = blockwise(_unique_internal, \"i\", *args, dtype=out_dtype, return_inverse=False)\n out._chunks = tuple((np.nan,) * len(c) for c in out.chunks)\n\n # Take the results from the unique chunks and do the following.\n #\n # 1. Collect all results as arguments.\n # 2. Concatenate each result into one big array.\n # 3. Pass all results as arguments to the internal unique again.\n #\n # TODO: This should be replaced with a tree reduction using this strategy.\n # xref: https://github.com/dask/dask/issues/2851\n\n out_parts = [out[\"values\"]]\n if return_index:\n out_parts.append(out[\"indices\"])\n else:\n out_parts.append(None)\n if return_counts:\n out_parts.append(out[\"counts\"])\n else:\n out_parts.append(None)\n\n name = \"unique-aggregate-\" + out.name\n dsk = {\n (name, 0): (\n (_unique_internal,)\n + tuple(\n (np.concatenate, o.__dask_keys__())\n if hasattr(o, \"__dask_keys__\")\n else o\n for o in out_parts\n )\n + (return_inverse,)\n )\n }\n out_dtype = [(\"values\", ar.dtype)]\n if return_index:\n out_dtype.append((\"indices\", np.intp))\n if return_inverse:\n out_dtype.append((\"inverse\", np.intp))\n if return_counts:\n out_dtype.append((\"counts\", np.intp))\n\n dependencies = [o for o in out_parts if hasattr(o, \"__dask_keys__\")]\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=dependencies)\n chunks = ((np.nan,),)\n out = Array(graph, name, chunks, out_dtype)\n\n # Split out all results to return to the user.\n\n result = [out[\"values\"]]\n if return_index:\n result.append(out[\"indices\"])\n if return_inverse:\n # Using the returned unique values and arange of unknown length, find\n # each value matching a unique value and replace it with its\n # corresponding index or `0`. There should be only one entry for this\n # index in axis `1` (the one of unknown length). Reduce axis `1`\n # through summing to get an array with known dimensionality and the\n # mapping of the original values.\n mtches = (ar[:, None] == out[\"values\"][None, :]).astype(np.intp)\n result.append((mtches * out[\"inverse\"]).sum(axis=1))\n if return_counts:\n result.append(out[\"counts\"])\n\n if len(result) == 1:\n result = result[0]\n else:\n result = tuple(result)\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__isin_kernel_isin.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__isin_kernel_isin.return.result", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1071, "end_line": 1097, "span_ids": ["_isin_kernel", "isin"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _isin_kernel(element, test_elements, assume_unique=False):\n values = np.in1d(element.ravel(), test_elements, assume_unique=assume_unique)\n return values.reshape(element.shape + (1,) * test_elements.ndim)\n\n\n@safe_wraps(getattr(np, \"isin\", None))\ndef isin(element, test_elements, assume_unique=False, invert=False):\n element = asarray(element)\n test_elements = asarray(test_elements)\n element_axes = tuple(range(element.ndim))\n test_axes = tuple(i + element.ndim for i in range(test_elements.ndim))\n mapped = blockwise(\n _isin_kernel,\n element_axes + test_axes,\n element,\n element_axes,\n test_elements,\n test_axes,\n adjust_chunks={axis: lambda _: 1 for axis in test_axes},\n dtype=bool,\n assume_unique=assume_unique,\n )\n\n result = mapped.any(axis=test_axes)\n if invert:\n result = ~result\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_roll_roll.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_roll_roll.return.result", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1100, "end_line": 1144, "span_ids": ["roll"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef roll(array, shift, axis=None):\n result = array\n\n if axis is None:\n result = ravel(result)\n\n if not isinstance(shift, Integral):\n raise TypeError(\n \"Expect `shift` to be an instance of Integral when `axis` is None.\"\n )\n\n shift = (shift,)\n axis = (0,)\n else:\n try:\n len(shift)\n except TypeError:\n shift = (shift,)\n try:\n len(axis)\n except TypeError:\n axis = (axis,)\n\n if len(shift) != len(axis):\n raise ValueError(\"Must have the same number of shifts as axes.\")\n\n for i, s in zip(axis, shift):\n s = -s\n s %= result.shape[i]\n\n sl1 = result.ndim * [slice(None)]\n sl2 = result.ndim * [slice(None)]\n\n sl1[i] = slice(s, None)\n sl2[i] = slice(None, s)\n\n sl1 = tuple(sl1)\n sl2 = tuple(sl2)\n\n result = concatenate([result[sl1], result[sl2]], axis=i)\n\n result = result.reshape(array.shape)\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_shape_squeeze.return.a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_shape_squeeze.return.a", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1147, "end_line": 1178, "span_ids": ["ravel", "shape", "squeeze", "union1d"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef shape(array):\n return array.shape\n\n\n@derived_from(np)\ndef union1d(ar1, ar2):\n return unique(concatenate((ar1.ravel(), ar2.ravel())))\n\n\n@derived_from(np)\ndef ravel(array):\n return array.reshape((-1,))\n\n\n@derived_from(np)\ndef squeeze(a, axis=None):\n if axis is None:\n axis = tuple(i for i, d in enumerate(a.shape) if d == 1)\n elif not isinstance(axis, tuple):\n axis = (axis,)\n\n if any(a.shape[i] != 1 for i in axis):\n raise ValueError(\"cannot squeeze axis with size other than one\")\n\n axis = validate_axis(axis, a.ndim)\n\n sl = tuple(0 if i in axis else slice(None) for i, s in enumerate(a.shape))\n\n a = a[sl]\n\n return a", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_compress_compress.return.a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_compress_compress.return.a", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1181, "end_line": 1210, "span_ids": ["compress"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef compress(condition, a, axis=None):\n\n if not is_arraylike(condition):\n # Allow `condition` to be anything array-like, otherwise ensure `condition`\n # is a numpy array.\n condition = np.asarray(condition)\n condition = condition.astype(bool)\n a = asarray(a)\n\n if condition.ndim != 1:\n raise ValueError(\"Condition must be one dimensional\")\n\n if axis is None:\n a = a.ravel()\n axis = 0\n axis = validate_axis(axis, a.ndim)\n\n # Treat `condition` as filled with `False` (if it is too short)\n a = a[\n tuple(\n slice(None, len(condition)) if i == axis else slice(None)\n for i in range(a.ndim)\n )\n ]\n\n # Use `condition` to select along 1 dimension\n a = a[tuple(condition if i == axis else slice(None) for i in range(a.ndim))]\n\n return a", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_extract__isnonzero_vec.np_vectorize__isnonzero_v": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_extract__isnonzero_vec.np_vectorize__isnonzero_v", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1213, "end_line": 1287, "span_ids": ["isclose", "isnull", "notnull", "allclose", "variadic_choose", "choose", "_take_dask_array_from_numpy", "_isnonzero_vec", "around", "impl:5", "extract", "_asarray_isnull", "take"], "tokens": 514}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef extract(condition, arr):\n condition = asarray(condition).astype(bool)\n arr = asarray(arr)\n return compress(condition.ravel(), arr.ravel())\n\n\n@derived_from(np)\ndef take(a, indices, axis=0):\n axis = validate_axis(axis, a.ndim)\n\n if isinstance(a, np.ndarray) and isinstance(indices, Array):\n return _take_dask_array_from_numpy(a, indices, axis)\n else:\n return a[(slice(None),) * axis + (indices,)]\n\n\ndef _take_dask_array_from_numpy(a, indices, axis):\n assert isinstance(a, np.ndarray)\n assert isinstance(indices, Array)\n\n return indices.map_blocks(\n lambda block: np.take(a, block, axis), chunks=indices.chunks, dtype=a.dtype\n )\n\n\n@derived_from(np)\ndef around(x, decimals=0):\n return map_blocks(partial(np.around, decimals=decimals), x, dtype=x.dtype)\n\n\ndef _asarray_isnull(values):\n import pandas as pd\n\n return np.asarray(pd.isnull(values))\n\n\ndef isnull(values):\n \"\"\" pandas.isnull for dask arrays \"\"\"\n # eagerly raise ImportError, if pandas isn't available\n import pandas as pd # noqa\n\n return elemwise(_asarray_isnull, values, dtype=\"bool\")\n\n\ndef notnull(values):\n \"\"\" pandas.notnull for dask arrays \"\"\"\n return ~isnull(values)\n\n\n@derived_from(np)\ndef isclose(arr1, arr2, rtol=1e-5, atol=1e-8, equal_nan=False):\n func = partial(np.isclose, rtol=rtol, atol=atol, equal_nan=equal_nan)\n return elemwise(func, arr1, arr2, dtype=\"bool\")\n\n\n@derived_from(np)\ndef allclose(arr1, arr2, rtol=1e-5, atol=1e-8, equal_nan=False):\n return isclose(arr1, arr2, rtol=rtol, atol=atol, equal_nan=equal_nan).all()\n\n\ndef variadic_choose(a, *choices):\n return np.choose(a, choices)\n\n\n@derived_from(np)\ndef choose(a, choices):\n return elemwise(variadic_choose, a, *choices)\n\n\ndef _isnonzero_vec(v):\n return bool(np.count_nonzero(v))\n\n\n_isnonzero_vec = np.vectorize(_isnonzero_vec, otypes=[bool])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_isnonzero_isnonzero.try_.else_.return.a_astype_bool_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_isnonzero_isnonzero.try_.else_.return.a_astype_bool_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1290, "end_line": 1309, "span_ids": ["isnonzero"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def isnonzero(a):\n if a.dtype.kind in {\"U\", \"S\"}:\n # NumPy treats all-whitespace strings as falsy (like in `np.nonzero`).\n # but not in `.astype(bool)`. To match the behavior of numpy at least until\n # 1.19, we use `_isnonzero_vec`. When NumPy changes behavior, we should just\n # use the try block below.\n # https://github.com/numpy/numpy/issues/9875\n return a.map_blocks(_isnonzero_vec, dtype=bool)\n try:\n np.zeros(tuple(), dtype=a.dtype).astype(bool)\n except ValueError:\n ######################################################\n # Handle special cases where conversion to bool does #\n # not work correctly. #\n # #\n # xref: https://github.com/numpy/numpy/issues/9479 #\n ######################################################\n return a.map_blocks(_isnonzero_vec, dtype=bool)\n else:\n return a.astype(bool)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_argwhere_where.if_np_isscalar_condition_.else_.return.elemwise_np_where_condit": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_argwhere_where.if_np_isscalar_condition_.else_.return.elemwise_np_where_condit", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1312, "end_line": 1343, "span_ids": ["argwhere", "where"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef argwhere(a):\n a = asarray(a)\n\n nz = isnonzero(a).flatten()\n\n ind = indices(a.shape, dtype=np.intp, chunks=a.chunks)\n if ind.ndim > 1:\n ind = stack([ind[i].ravel() for i in range(len(ind))], axis=1)\n ind = compress(nz, ind, axis=0)\n\n return ind\n\n\n@derived_from(np)\ndef where(condition, x=None, y=None):\n if (x is None) != (y is None):\n raise ValueError(\"either both or neither of x and y should be given\")\n if (x is None) and (y is None):\n return nonzero(condition)\n\n if np.isscalar(condition):\n dtype = result_type(x, y)\n x = asarray(x)\n y = asarray(y)\n\n shape = broadcast_shapes(x.shape, y.shape)\n out = x if condition else y\n\n return broadcast_to(out, shape).astype(dtype)\n else:\n return elemwise(np.where, condition, x, y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_count_nonzero__unravel_index_kernel.return.np_stack_np_unravel_index": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_count_nonzero__unravel_index_kernel.return.np_stack_np_unravel_index", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1346, "end_line": 1372, "span_ids": ["_unravel_index_kernel", "nonzero", "flatnonzero", "count_nonzero", "_int_piecewise"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef count_nonzero(a, axis=None):\n return isnonzero(asarray(a)).astype(np.intp).sum(axis=axis)\n\n\n@derived_from(np)\ndef flatnonzero(a):\n return argwhere(asarray(a).ravel())[:, 0]\n\n\n@derived_from(np)\ndef nonzero(a):\n ind = argwhere(a)\n if ind.ndim > 1:\n return tuple(ind[:, i] for i in range(ind.shape[1]))\n else:\n return (ind,)\n\n\ndef _int_piecewise(x, *condlist, **kwargs):\n return np.piecewise(\n x, list(condlist), kwargs[\"funclist\"], *kwargs[\"func_args\"], **kwargs[\"func_kw\"]\n )\n\n\ndef _unravel_index_kernel(indices, func_kwargs):\n return np.stack(np.unravel_index(indices, **func_kwargs))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unravel_index_piecewise.return.map_blocks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_unravel_index_piecewise.return.map_blocks_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1375, "end_line": 1404, "span_ids": ["unravel_index", "piecewise"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef unravel_index(indices, shape, order=\"C\"):\n if shape and indices.size:\n unraveled_indices = tuple(\n indices.map_blocks(\n _unravel_index_kernel,\n dtype=np.intp,\n chunks=(((len(shape),),) + indices.chunks),\n new_axis=0,\n func_kwargs={_unravel_index_keyword: shape, \"order\": order},\n )\n )\n else:\n unraveled_indices = tuple(empty((0,), dtype=np.intp, chunks=1) for i in shape)\n\n return unraveled_indices\n\n\n@derived_from(np)\ndef piecewise(x, condlist, funclist, *args, **kw):\n return map_blocks(\n _int_piecewise,\n x,\n *condlist,\n dtype=x.dtype,\n name=\"piecewise\",\n funclist=funclist,\n func_args=args,\n func_kw=kw,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_aligned_coarsen_chunks_aligned_coarsen_chunks.return.tuple_newchunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_aligned_coarsen_chunks_aligned_coarsen_chunks.return.tuple_newchunks_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1407, "end_line": 1457, "span_ids": ["aligned_coarsen_chunks"], "tokens": 416}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def aligned_coarsen_chunks(chunks: List[int], multiple: int) -> List[int]:\n \"\"\"\n Returns a new chunking aligned with the coarsening multiple.\n Any excess is at the end of the array.\n\n Examples\n --------\n >>> aligned_coarsen_chunks(chunks=(1, 2, 3), multiple=4)\n (4, 2)\n >>> aligned_coarsen_chunks(chunks=(1, 20, 3, 4), multiple=4)\n (20, 4, 4)\n >>> aligned_coarsen_chunks(chunks=(20, 10, 15, 23, 24), multiple=10)\n (20, 10, 20, 20, 20, 2)\n \"\"\"\n\n def choose_new_size(multiple, q, left):\n \"\"\"\n See if multiple * q is a good choice when 'left' elements are remaining.\n Else return multiple * (q-1)\n \"\"\"\n possible = multiple * q\n if (left - possible) > 0:\n return possible\n else:\n return multiple * (q - 1)\n\n newchunks = []\n left = sum(chunks) - sum(newchunks)\n chunkgen = (c for c in chunks)\n while left > 0:\n if left < multiple:\n newchunks.append(left)\n break\n\n chunk_size = next(chunkgen, 0)\n if chunk_size == 0:\n chunk_size = multiple\n\n q, r = divmod(chunk_size, multiple)\n if q == 0:\n continue\n elif r == 0:\n newchunks.append(chunk_size)\n elif r >= 5:\n newchunks.append(choose_new_size(multiple, q + 1, left))\n else:\n newchunks.append(choose_new_size(multiple, q, left))\n\n left = sum(chunks) - sum(newchunks)\n\n return tuple(newchunks)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_coarsen_coarsen.return.Array_graph_name_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_coarsen_coarsen.return.Array_graph_name_chunks", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1460, "end_line": 1489, "span_ids": ["coarsen"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@wraps(chunk.coarsen)\ndef coarsen(reduction, x, axes, trim_excess=False, **kwargs):\n if not trim_excess and not all(x.shape[i] % div == 0 for i, div in axes.items()):\n msg = \"Coarsening factor does not align with block dimensions\"\n raise ValueError(msg)\n\n if \"dask\" in inspect.getfile(reduction):\n reduction = getattr(np, reduction.__name__)\n\n new_chunks = {}\n for i, div in axes.items():\n aligned = aligned_coarsen_chunks(x.chunks[i], div)\n if aligned != x.chunks[i]:\n new_chunks[i] = aligned\n if new_chunks:\n x = x.rechunk(new_chunks)\n\n name = \"coarsen-\" + tokenize(reduction, x, axes, trim_excess)\n dsk = {\n (name,)\n + key[1:]: (apply, chunk.coarsen, [reduction, key, axes, trim_excess], kwargs)\n for key in flatten(x.__dask_keys__())\n }\n chunks = tuple(\n tuple(int(bd // axes.get(i, 1)) for bd in bds) for i, bds in enumerate(x.chunks)\n )\n\n meta = reduction(np.empty((1,) * x.ndim, dtype=x.dtype), **kwargs)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[x])\n return Array(graph, name, chunks, meta=meta)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_split_at_breaks_split_at_breaks.return.split_array": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_split_at_breaks_split_at_breaks.return.split_array", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1492, "end_line": 1502, "span_ids": ["split_at_breaks"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def split_at_breaks(array, breaks, axis=0):\n \"\"\"Split an array into a list of arrays (using slices) at the given breaks\n\n >>> split_at_breaks(np.arange(6), [3, 5])\n [array([0, 1, 2]), array([3, 4]), array([5])]\n \"\"\"\n padded_breaks = concat([[None], breaks, [None]])\n slices = [slice(i, j) for i, j in sliding_window(2, padded_breaks)]\n preslice = (slice(None),) * axis\n split_array = [array[preslice + (s,)] for s in slices]\n return split_array", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_insert_insert.return.concatenate_interleaved_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py_insert_insert.return.concatenate_interleaved_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1505, "end_line": 1551, "span_ids": ["insert"], "tokens": 439}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(np)\ndef insert(arr, obj, values, axis):\n # axis is a required argument here to avoid needing to deal with the numpy\n # default case (which reshapes the array to make it flat)\n axis = validate_axis(axis, arr.ndim)\n\n if isinstance(obj, slice):\n obj = np.arange(*obj.indices(arr.shape[axis]))\n obj = np.asarray(obj)\n scalar_obj = obj.ndim == 0\n if scalar_obj:\n obj = np.atleast_1d(obj)\n\n obj = np.where(obj < 0, obj + arr.shape[axis], obj)\n if (np.diff(obj) < 0).any():\n raise NotImplementedError(\n \"da.insert only implemented for monotonic ``obj`` argument\"\n )\n\n split_arr = split_at_breaks(arr, np.unique(obj), axis)\n\n if getattr(values, \"ndim\", 0) == 0:\n # we need to turn values into a dask array\n name = \"values-\" + tokenize(values)\n dtype = getattr(values, \"dtype\", type(values))\n values = Array({(name,): values}, name, chunks=(), dtype=dtype)\n\n values_shape = tuple(\n len(obj) if axis == n else s for n, s in enumerate(arr.shape)\n )\n values = broadcast_to(values, values_shape)\n elif scalar_obj:\n values = values[(slice(None),) * axis + (None,)]\n\n values_chunks = tuple(\n values_bd if axis == n else arr_bd\n for n, (arr_bd, values_bd) in enumerate(zip(arr.chunks, values.chunks))\n )\n values = values.rechunk(values_chunks)\n\n counts = np.bincount(obj)[:-1]\n values_breaks = np.cumsum(counts[counts > 0])\n split_values = split_at_breaks(values, values_breaks, axis)\n\n interleaved = list(interleave([split_arr, split_values]))\n interleaved = [i for i in interleaved if i.nbytes]\n return concatenate(interleaved, axis=axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__average_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/routines.py__average_", "embedding": null, "metadata": {"file_path": "dask/array/routines.py", "file_name": "routines.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1554, "end_line": 1608, "span_ids": ["average", "_average"], "tokens": 405}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _average(a, axis=None, weights=None, returned=False, is_masked=False):\n # This was minimally modified from numpy.average\n a = asanyarray(a)\n\n if weights is None:\n avg = a.mean(axis)\n scl = avg.dtype.type(a.size / avg.size)\n else:\n wgt = asanyarray(weights)\n\n if issubclass(a.dtype.type, (np.integer, np.bool_)):\n result_dtype = result_type(a.dtype, wgt.dtype, \"f8\")\n else:\n result_dtype = result_type(a.dtype, wgt.dtype)\n\n # Sanity checks\n if a.shape != wgt.shape:\n if axis is None:\n raise TypeError(\n \"Axis must be specified when shapes of a and weights differ.\"\n )\n if wgt.ndim != 1:\n raise TypeError(\n \"1D weights expected when shapes of a and weights differ.\"\n )\n if wgt.shape[0] != a.shape[axis]:\n raise ValueError(\n \"Length of weights not compatible with specified axis.\"\n )\n\n # setup wgt to broadcast along axis\n wgt = broadcast_to(wgt, (a.ndim - 1) * (1,) + wgt.shape)\n wgt = wgt.swapaxes(-1, axis)\n if is_masked:\n from .ma import getmaskarray\n\n wgt = wgt * (~getmaskarray(a))\n scl = wgt.sum(axis=axis, dtype=result_dtype)\n avg = multiply(a, wgt, dtype=result_dtype).sum(axis) / scl\n\n if returned:\n if scl.shape != avg.shape:\n scl = broadcast_to(scl, avg.shape).copy()\n return avg, scl\n else:\n return avg\n\n\n@derived_from(np)\ndef average(a, axis=None, weights=None, returned=False):\n return _average(a, axis, weights, returned, is_masked=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_from_itertools_import_pro__sanitize_index_element.if_isinstance_ind_Number.else_.raise_TypeError_Invalid_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_from_itertools_import_pro__sanitize_index_element.if_isinstance_ind_Number.else_.raise_TypeError_Invalid_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["imports", "_sanitize_index_element"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import product\nimport math\nfrom numbers import Integral, Number\nfrom operator import add, getitem, itemgetter\nimport warnings\nimport functools\nimport bisect\n\nimport numpy as np\nfrom tlz import memoize, merge, pluck, concat, accumulate\n\nfrom .. import core\nfrom .. import config\nfrom .. import utils\nfrom ..highlevelgraph import HighLevelGraph\nfrom ..base import tokenize, is_dask_collection\n\ncolon = slice(None, None, None)\n\n\ndef _sanitize_index_element(ind):\n \"\"\"Sanitize a one-element index.\"\"\"\n if isinstance(ind, Number):\n ind2 = int(ind)\n if ind2 != ind:\n raise IndexError(\"Bad index. Must be integer-like: %s\" % ind)\n else:\n return ind2\n elif ind is None:\n return None\n else:\n raise TypeError(\"Invalid index type\", type(ind), ind)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_sanitize_index_sanitize_index.if_index_array_dtype_b.else_.raise_TypeError_Invalid_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_sanitize_index_sanitize_index.if_index_array_dtype_b.else_.raise_TypeError_Invalid_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 85, "span_ids": ["sanitize_index"], "tokens": 450}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def sanitize_index(ind):\n \"\"\"Sanitize the elements for indexing along one axis\n\n >>> sanitize_index([2, 3, 5])\n array([2, 3, 5])\n >>> sanitize_index([True, False, True, False])\n array([0, 2])\n >>> sanitize_index(np.array([1, 2, 3]))\n array([1, 2, 3])\n >>> sanitize_index(np.array([False, True, True]))\n array([1, 2])\n >>> type(sanitize_index(np.int32(0)))\n \n >>> sanitize_index(1.0)\n 1\n >>> sanitize_index(0.5)\n Traceback (most recent call last):\n ...\n IndexError: Bad index. Must be integer-like: 0.5\n \"\"\"\n if ind is None:\n return None\n elif isinstance(ind, slice):\n return slice(\n _sanitize_index_element(ind.start),\n _sanitize_index_element(ind.stop),\n _sanitize_index_element(ind.step),\n )\n elif isinstance(ind, Number):\n return _sanitize_index_element(ind)\n elif is_dask_collection(ind):\n return ind\n index_array = np.asanyarray(ind)\n if index_array.dtype == bool:\n nonzero = np.nonzero(index_array)\n if len(nonzero) == 1:\n # If a 1-element tuple, unwrap the element\n nonzero = nonzero[0]\n return np.asanyarray(nonzero)\n elif np.issubdtype(index_array.dtype, np.integer):\n return index_array\n elif np.issubdtype(index_array.dtype, np.floating):\n int_index = index_array.astype(np.intp)\n if np.allclose(index_array, int_index):\n return int_index\n else:\n check_int = np.isclose(index_array, int_index)\n first_err = index_array.ravel()[np.flatnonzero(~check_int)[0]]\n raise IndexError(\"Bad index. Must be integer-like: %s\" % first_err)\n else:\n raise TypeError(\"Invalid index type\", type(ind), ind)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_array_slice_array.return.dsk_out_bd_out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_array_slice_array.return.dsk_out_bd_out", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 165, "span_ids": ["slice_array"], "tokens": 704}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_array(out_name, in_name, blockdims, index, itemsize):\n \"\"\"\n Master function for array slicing\n\n This function makes a new dask that slices blocks along every\n dimension and aggregates (via cartesian product) each dimension's\n slices so that the resulting block slices give the same results\n as the original slice on the original structure\n\n Index must be a tuple. It may contain the following types\n\n int, slice, list (at most one list), None\n\n Parameters\n ----------\n in_name - string\n This is the dask variable name that will be used as input\n out_name - string\n This is the dask variable output name\n blockshape - iterable of integers\n index - iterable of integers, slices, lists, or None\n itemsize : int\n The number of bytes required for each element of the array.\n\n Returns\n -------\n Dict where the keys are tuples of\n\n (out_name, dim_index[, dim_index[, ...]])\n\n and the values are\n\n (function, (in_name, dim_index, dim_index, ...),\n (slice(...), [slice()[,...]])\n\n Also new blockdims with shapes of each block\n\n ((10, 10, 10, 10), (20, 20))\n\n Examples\n --------\n >>> dsk, blockdims = slice_array('y', 'x', [(20, 20, 20, 20, 20)],\n ... (slice(10, 35),)) # doctest: +SKIP\n >>> dsk # doctest: +SKIP\n {('y', 0): (getitem, ('x', 0), (slice(10, 20),)),\n ('y', 1): (getitem, ('x', 1), (slice(0, 15),))}\n >>> blockdims # doctest: +SKIP\n ((10, 15),)\n\n See Also\n --------\n This function works by successively unwrapping cases and passing down\n through a sequence of functions.\n\n slice_with_newaxis : handle None/newaxis case\n slice_wrap_lists : handle fancy indexing with lists\n slice_slices_and_integers : handle everything else\n \"\"\"\n blockdims = tuple(map(tuple, blockdims))\n\n # x[:, :, :] - Punt and return old value\n if all(\n isinstance(index, slice) and index == slice(None, None, None) for index in index\n ):\n suffixes = product(*[range(len(bd)) for bd in blockdims])\n dsk = dict(((out_name,) + s, (in_name,) + s) for s in suffixes)\n return dsk, blockdims\n\n # Add in missing colons at the end as needed. x[5] -> x[5, :, :]\n not_none_count = sum(i is not None for i in index)\n missing = len(blockdims) - not_none_count\n index += (slice(None, None, None),) * missing\n\n # Pass down to next function\n dsk_out, bd_out = slice_with_newaxes(out_name, in_name, blockdims, index, itemsize)\n\n bd_out = tuple(map(tuple, bd_out))\n return dsk_out, bd_out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_newaxes_slice_with_newaxes.if_where_none_.else_.return.dsk_blockdims2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_newaxes_slice_with_newaxes.if_where_none_.else_.return.dsk_blockdims2", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 206, "span_ids": ["slice_with_newaxes"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_newaxes(out_name, in_name, blockdims, index, itemsize):\n \"\"\"\n Handle indexing with Nones\n\n Strips out Nones then hands off to slice_wrap_lists\n \"\"\"\n # Strip Nones from index\n index2 = tuple([ind for ind in index if ind is not None])\n where_none = [i for i, ind in enumerate(index) if ind is None]\n where_none_orig = list(where_none)\n for i, x in enumerate(where_none):\n n = sum(isinstance(ind, Integral) for ind in index[:x])\n if n:\n where_none[i] -= n\n\n # Pass down and do work\n dsk, blockdims2 = slice_wrap_lists(out_name, in_name, blockdims, index2, itemsize)\n\n if where_none:\n expand = expander(where_none)\n expand_orig = expander(where_none_orig)\n\n # Insert \",0\" into the key: ('x', 2, 3) -> ('x', 0, 2, 0, 3)\n dsk2 = {\n (out_name,) + expand(k[1:], 0): (v[:2] + (expand_orig(v[2], None),))\n for k, v in dsk.items()\n if k[0] == out_name\n }\n\n # Add back intermediate parts of the dask that weren't the output\n dsk3 = merge(dsk2, {k: v for k, v in dsk.items() if k[0] != out_name})\n\n # Insert (1,) into blockdims: ((2, 2), (3, 3)) -> ((2, 2), (1,), (3, 3))\n blockdims3 = expand(blockdims2, (1,))\n\n return dsk3, blockdims3\n\n else:\n return dsk, blockdims2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_wrap_lists_slice_wrap_lists.return.dsk3_blockdims2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_wrap_lists_slice_wrap_lists.return.dsk3_blockdims2", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 271, "span_ids": ["slice_wrap_lists"], "tokens": 629}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_wrap_lists(out_name, in_name, blockdims, index, itemsize):\n \"\"\"\n Fancy indexing along blocked array dasks\n\n Handles index of type list. Calls slice_slices_and_integers for the rest\n\n See Also\n --------\n\n take : handle slicing with lists (\"fancy\" indexing)\n slice_slices_and_integers : handle slicing with slices and integers\n \"\"\"\n assert all(isinstance(i, (slice, list, Integral, np.ndarray)) for i in index)\n if not len(blockdims) == len(index):\n raise IndexError(\"Too many indices for array\")\n\n # Do we have more than one list in the index?\n where_list = [\n i for i, ind in enumerate(index) if isinstance(ind, np.ndarray) and ind.ndim > 0\n ]\n if len(where_list) > 1:\n raise NotImplementedError(\"Don't yet support nd fancy indexing\")\n # Is the single list an empty list? In this case just treat it as a zero\n # length slice\n if where_list and not index[where_list[0]].size:\n index = list(index)\n index[where_list.pop()] = slice(0, 0, 1)\n index = tuple(index)\n\n # No lists, hooray! just use slice_slices_and_integers\n if not where_list:\n return slice_slices_and_integers(out_name, in_name, blockdims, index)\n\n # Replace all lists with full slices [3, 1, 0] -> slice(None, None, None)\n index_without_list = tuple(\n slice(None, None, None) if isinstance(i, np.ndarray) else i for i in index\n )\n\n # lists and full slices. Just use take\n if all(isinstance(i, np.ndarray) or i == slice(None, None, None) for i in index):\n axis = where_list[0]\n blockdims2, dsk3 = take(\n out_name, in_name, blockdims, index[where_list[0]], itemsize, axis=axis\n )\n # Mixed case. Both slices/integers and lists. slice/integer then take\n else:\n # Do first pass without lists\n tmp = \"slice-\" + tokenize((out_name, in_name, blockdims, index))\n dsk, blockdims2 = slice_slices_and_integers(\n tmp, in_name, blockdims, index_without_list\n )\n\n # After collapsing some axes due to int indices, adjust axis parameter\n axis = where_list[0]\n axis2 = axis - sum(\n 1 for i, ind in enumerate(index) if i < axis and isinstance(ind, Integral)\n )\n\n # Do work\n blockdims2, dsk2 = take(out_name, tmp, blockdims2, index[axis], 8, axis=axis2)\n dsk3 = merge(dsk, dsk2)\n\n return dsk3, blockdims2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_slices_and_integers_slice_slices_and_integers.return.dsk_out_new_blockdims": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_slices_and_integers_slice_slices_and_integers.return.dsk_out_new_blockdims", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 274, "end_line": 328, "span_ids": ["slice_slices_and_integers"], "tokens": 493}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_slices_and_integers(out_name, in_name, blockdims, index):\n \"\"\"\n Dask array indexing with slices and integers\n\n See Also\n --------\n\n _slice_1d\n \"\"\"\n from .core import unknown_chunk_message\n\n shape = tuple(cached_cumsum(dim, initial_zero=True)[-1] for dim in blockdims)\n\n for dim, ind in zip(shape, index):\n if np.isnan(dim) and ind != slice(None, None, None):\n raise ValueError(\n \"Arrays chunk sizes are unknown: %s%s\" % (shape, unknown_chunk_message)\n )\n\n assert all(isinstance(ind, (slice, Integral)) for ind in index)\n assert len(index) == len(blockdims)\n\n # Get a list (for each dimension) of dicts{blocknum: slice()}\n block_slices = list(map(_slice_1d, shape, blockdims, index))\n sorted_block_slices = [sorted(i.items()) for i in block_slices]\n\n # (in_name, 1, 1, 2), (in_name, 1, 1, 4), (in_name, 2, 1, 2), ...\n in_names = list(product([in_name], *[pluck(0, s) for s in sorted_block_slices]))\n\n # (out_name, 0, 0, 0), (out_name, 0, 0, 1), (out_name, 0, 1, 0), ...\n out_names = list(\n product(\n [out_name],\n *[\n range(len(d))[::-1] if i.step and i.step < 0 else range(len(d))\n for d, i in zip(block_slices, index)\n if not isinstance(i, Integral)\n ]\n )\n )\n\n all_slices = list(product(*[pluck(1, s) for s in sorted_block_slices]))\n\n dsk_out = {\n out_name: (getitem, in_name, slices)\n for out_name, in_name, slices in zip(out_names, in_names, all_slices)\n }\n\n new_blockdims = [\n new_blockdim(d, db, i)\n for d, i, db in zip(shape, index, blockdims)\n if not isinstance(i, Integral)\n ]\n\n return dsk_out, new_blockdims", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d__slice_1d._Returns_a_dict_of_blo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d__slice_1d._Returns_a_dict_of_blo", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 331, "end_line": 403, "span_ids": ["_slice_1d"], "tokens": 883}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _slice_1d(dim_shape, lengths, index):\n \"\"\"Returns a dict of {blocknum: slice}\n\n This function figures out where each slice should start in each\n block for a single dimension. If the slice won't return any elements\n in the block, that block will not be in the output.\n\n Parameters\n ----------\n\n dim_shape - the number of elements in this dimension.\n This should be a positive, non-zero integer\n blocksize - the number of elements per block in this dimension\n This should be a positive, non-zero integer\n index - a description of the elements in this dimension that we want\n This might be an integer, a slice(), or an Ellipsis\n\n Returns\n -------\n\n dictionary where the keys are the integer index of the blocks that\n should be sliced and the values are the slices\n\n Examples\n --------\n\n Trivial slicing\n\n >>> _slice_1d(100, [60, 40], slice(None, None, None))\n {0: slice(None, None, None), 1: slice(None, None, None)}\n\n 100 length array cut into length 20 pieces, slice 0:35\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], slice(0, 35))\n {0: slice(None, None, None), 1: slice(0, 15, 1)}\n\n Support irregular blocks and various slices\n\n >>> _slice_1d(100, [20, 10, 10, 10, 25, 25], slice(10, 35))\n {0: slice(10, 20, 1), 1: slice(None, None, None), 2: slice(0, 5, 1)}\n\n Support step sizes\n\n >>> _slice_1d(100, [15, 14, 13], slice(10, 41, 3))\n {0: slice(10, 15, 3), 1: slice(1, 14, 3), 2: slice(2, 12, 3)}\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], slice(0, 100, 40)) # step > blocksize\n {0: slice(0, 20, 40), 2: slice(0, 20, 40), 4: slice(0, 20, 40)}\n\n Also support indexing single elements\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], 25)\n {1: 5}\n\n And negative slicing\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], slice(100, 0, -3)) # doctest: +NORMALIZE_WHITESPACE\n {4: slice(-1, -21, -3),\n 3: slice(-2, -21, -3),\n 2: slice(-3, -21, -3),\n 1: slice(-1, -21, -3),\n 0: slice(-2, -20, -3)}\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], slice(100, 12, -3)) # doctest: +NORMALIZE_WHITESPACE\n {4: slice(-1, -21, -3),\n 3: slice(-2, -21, -3),\n 2: slice(-3, -21, -3),\n 1: slice(-1, -21, -3),\n 0: slice(-2, -8, -3)}\n\n >>> _slice_1d(100, [20, 20, 20, 20, 20], slice(100, -12, -3))\n {4: slice(-1, -12, -3)}\n \"\"\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d.chunk_boundaries__slice_1d.return.d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__slice_1d.chunk_boundaries__slice_1d.return.d", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 404, "end_line": 495, "span_ids": ["_slice_1d"], "tokens": 793}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _slice_1d(dim_shape, lengths, index):\n chunk_boundaries = cached_cumsum(lengths)\n\n if isinstance(index, Integral):\n # use right-side search to be consistent with previous result\n i = bisect.bisect_right(chunk_boundaries, index)\n if i > 0:\n # the very first chunk has no relative shift\n ind = index - chunk_boundaries[i - 1]\n else:\n ind = index\n return {int(i): int(ind)}\n\n assert isinstance(index, slice)\n\n if index == colon:\n return {k: colon for k in range(len(lengths))}\n\n step = index.step or 1\n if step > 0:\n start = index.start or 0\n stop = index.stop if index.stop is not None else dim_shape\n else:\n start = index.start if index.start is not None else dim_shape - 1\n start = dim_shape - 1 if start >= dim_shape else start\n stop = -(dim_shape + 1) if index.stop is None else index.stop\n\n # posify start and stop\n if start < 0:\n start += dim_shape\n if stop < 0:\n stop += dim_shape\n\n d = dict()\n if step > 0:\n istart = bisect.bisect_right(chunk_boundaries, start)\n istop = bisect.bisect_left(chunk_boundaries, stop)\n\n # the bound is not exactly tight; make it tighter?\n istop = min(istop + 1, len(lengths))\n\n # jump directly to istart\n if istart > 0:\n start = start - chunk_boundaries[istart - 1]\n stop = stop - chunk_boundaries[istart - 1]\n\n for i in range(istart, istop):\n length = lengths[i]\n if start < length and stop > 0:\n d[i] = slice(start, min(stop, length), step)\n start = (start - length) % step\n else:\n start = start - length\n stop -= length\n else:\n rstart = start # running start\n\n istart = bisect.bisect_left(chunk_boundaries, start)\n istop = bisect.bisect_right(chunk_boundaries, stop)\n\n # the bound is not exactly tight; make it tighter?\n istart = min(istart + 1, len(chunk_boundaries) - 1)\n istop = max(istop - 1, -1)\n\n for i in range(istart, istop, -1):\n chunk_stop = chunk_boundaries[i]\n # create a chunk start and stop\n if i == 0:\n chunk_start = 0\n else:\n chunk_start = chunk_boundaries[i - 1]\n\n # if our slice is in this chunk\n if (chunk_start <= rstart < chunk_stop) and (rstart > stop):\n d[i] = slice(\n rstart - chunk_stop,\n max(chunk_start - chunk_stop - 1, stop - chunk_stop),\n step,\n )\n\n # compute the next running start point,\n offset = (rstart - (chunk_start - 1)) % step\n rstart = chunk_start + offset - 1\n\n # replace 0:20:1 with : if appropriate\n for k, v in d.items():\n if v == slice(0, lengths[k], 1):\n d[k] = slice(None, None, None)\n\n if not d: # special case x[:0]\n d[0] = slice(0, 0, 1)\n\n return d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_partition_by_size_issorted.return.np_all_seq_1_seq_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_partition_by_size_issorted.return.np_all_seq_1_seq_1_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 498, "end_line": 525, "span_ids": ["issorted", "partition_by_size"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def partition_by_size(sizes, seq):\n \"\"\"\n\n >>> partition_by_size([10, 20, 10], [1, 5, 9, 12, 29, 35])\n [array([1, 5, 9]), array([ 2, 19]), array([5])]\n \"\"\"\n seq = np.asanyarray(seq)\n left = np.empty(len(sizes) + 1, dtype=int)\n left[0] = 0\n\n right = np.cumsum(sizes, out=left[1:])\n locations = np.empty(len(sizes) + 1, dtype=int)\n locations[0] = 0\n locations[1:] = np.searchsorted(seq, right)\n return [(seq[j:k] - l) for j, k, l in zip(locations[:-1], locations[1:], left)]\n\n\ndef issorted(seq):\n \"\"\"Is sequence sorted?\n\n >>> issorted([1, 2, 3])\n True\n >>> issorted([3, 1, 2])\n False\n \"\"\"\n if len(seq) == 0:\n return True\n return np.all(seq[:-1] <= seq[1:])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slicing_plan_slicing_plan.return.out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slicing_plan_slicing_plan.return.out", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 528, "end_line": 558, "span_ids": ["slicing_plan"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slicing_plan(chunks, index):\n \"\"\"Construct a plan to slice chunks with the given index\n\n Parameters\n ----------\n chunks : Tuple[int]\n One dimensions worth of chunking information\n index : np.ndarray[int]\n The index passed to slice on that dimension\n\n Returns\n -------\n out : List[Tuple[int, np.ndarray]]\n A list of chunk/sub-index pairs corresponding to each output chunk\n \"\"\"\n index = np.asanyarray(index)\n cum_chunks = cached_cumsum(chunks)\n\n chunk_locations = np.searchsorted(cum_chunks, index, side=\"right\")\n where = np.where(np.diff(chunk_locations))[0] + 1\n where = np.concatenate([[0], where, [len(chunk_locations)]])\n\n out = []\n for i in range(len(where) - 1):\n sub_index = index[where[i] : where[i + 1]]\n chunk = chunk_locations[where[i]]\n if chunk > 0:\n sub_index = sub_index - cum_chunks[chunk - 1]\n out.append((chunk, sub_index))\n\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take_take.outdims.list_dims_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take_take.outdims.list_dims_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 561, "end_line": 635, "span_ids": ["take"], "tokens": 778}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def take(outname, inname, chunks, index, itemsize, axis=0):\n \"\"\"Index array with an iterable of index\n\n Handles a single index by a single list\n\n Mimics ``np.take``\n\n >>> chunks, dsk = take('y', 'x', [(20, 20, 20, 20)], [5, 1, 47, 3], 8, axis=0)\n >>> chunks\n ((2, 1, 1),)\n >>> dsk # doctest: +SKIP\n {('y', 0): (getitem, (np.concatenate, [(getitem, ('x', 0), ([1, 3, 5],)),\n (getitem, ('x', 2), ([7],))],\n 0),\n (2, 0, 4, 1))}\n\n When list is sorted we retain original block structure\n\n >>> chunks, dsk = take('y', 'x', [(20, 20, 20, 20)], [1, 3, 5, 47], 8, axis=0)\n >>> chunks\n ((3, 1),)\n >>> dsk # doctest: +SKIP\n {('y', 0): (getitem, ('x', 0), ([1, 3, 5],)),\n ('y', 2): (getitem, ('x', 2), ([7],))}\n\n When any indexed blocks would otherwise grow larger than\n dask.config.array.chunk-size, we split them.\n\n >>> chunks, dsk = take('y', 'x', [(1, 1, 1), (1000, 1000), (1000, 1000)],\n ... [0] + [1] * 6 + [2], axis=0, itemsize=8)\n >>> chunks\n ((1, 3, 3, 1), (1000, 1000), (1000, 1000))\n \"\"\"\n plan = slicing_plan(chunks[axis], index)\n if len(plan) >= len(chunks[axis]) * 10:\n factor = math.ceil(len(plan) / len(chunks[axis]))\n from .core import PerformanceWarning\n\n warnings.warn(\n \"Slicing with an out-of-order index is generating %d \"\n \"times more chunks\" % factor,\n PerformanceWarning,\n stacklevel=6,\n )\n index = np.asarray(index)\n\n # Check for chunks from the plan that would violate the user's\n # configured chunk size.\n nbytes = utils.parse_bytes(config.get(\"array.chunk-size\"))\n other_chunks = [chunks[i] for i in range(len(chunks)) if i != axis]\n other_numel = np.prod([sum(x) for x in other_chunks])\n\n maxsize = nbytes / (other_numel * itemsize)\n\n where_index = []\n index_lists = []\n for where_idx, index_list in plan:\n index_length = len(index_list)\n if index_length > maxsize:\n index_sublist = np.array_split(\n index_list, math.ceil(index_length / maxsize)\n )\n index_lists.extend(index_sublist)\n where_index.extend([where_idx] * len(index_sublist))\n else:\n index_lists.append(np.array(index_list))\n where_index.append(where_idx)\n\n dims = [range(len(bd)) for bd in chunks]\n\n indims = list(dims)\n indims[axis] = list(range(len(where_index)))\n keys = list(product([outname], *indims))\n\n outdims = list(dims)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take.outdims_axis_where_ind_take.return.tuple_chunks2_dsk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_take.outdims_axis_where_ind_take.return.tuple_chunks2_dsk", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 636, "end_line": 646, "span_ids": ["take"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def take(outname, inname, chunks, index, itemsize, axis=0):\n # ... other code\n outdims[axis] = where_index\n slices = [[colon] * len(bd) for bd in chunks]\n slices[axis] = index_lists\n slices = list(product(*slices))\n inkeys = list(product([inname], *outdims))\n values = [(getitem, inkey, slc) for inkey, slc in zip(inkeys, slices)]\n\n chunks2 = list(chunks)\n chunks2[axis] = tuple(map(len, index_lists))\n dsk = dict(zip(keys, values))\n return tuple(chunks2), dsk", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_posify_index_posify_index.return.ind": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_posify_index_posify_index.return.ind", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 649, "end_line": 674, "span_ids": ["posify_index"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def posify_index(shape, ind):\n \"\"\"Flip negative indices around to positive ones\n\n >>> posify_index(10, 3)\n 3\n >>> posify_index(10, -3)\n 7\n >>> posify_index(10, [3, -3])\n array([3, 7])\n\n >>> posify_index((10, 20), (3, -3))\n (3, 17)\n >>> posify_index((10, 20), (3, [3, 4, -3])) # doctest: +NORMALIZE_WHITESPACE\n (3, array([ 3, 4, 17]))\n \"\"\"\n if isinstance(ind, tuple):\n return tuple(map(posify_index, shape, ind))\n if isinstance(ind, Integral):\n if ind < 0 and not math.isnan(shape):\n return ind + shape\n else:\n return ind\n if isinstance(ind, (np.ndarray, list)) and not math.isnan(shape):\n ind = np.asanyarray(ind)\n return np.where(ind < 0, ind + shape, ind)\n return ind", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__expander_expander.return._expander_tuple_where_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__expander_expander.return._expander_tuple_where_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 677, "end_line": 711, "span_ids": ["expander", "_expander"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@memoize\ndef _expander(where):\n if not where:\n\n def expand(seq, val):\n return seq\n\n return expand\n else:\n decl = \"\"\"def expand(seq, val):\n return ({left}) + tuple({right})\n \"\"\"\n left = []\n j = 0\n for i in range(max(where) + 1):\n if i in where:\n left.append(\"val, \")\n else:\n left.append(\"seq[%d], \" % j)\n j += 1\n right = \"seq[%d:]\" % j\n left = \"\".join(left)\n decl = decl.format(**locals())\n ns = {}\n exec(compile(decl, \"\", \"exec\"), ns, ns)\n return ns[\"expand\"]\n\n\ndef expander(where):\n \"\"\"Create a function to insert value at many locations in sequence.\n\n >>> expander([0, 2])(['a', 'b', 'c'], 'z')\n ('z', 'a', 'z', 'b', 'c')\n \"\"\"\n return _expander(tuple(where))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_new_blockdim_new_blockdim.return._int_math_ceil_1_0_slc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_new_blockdim_new_blockdim.return._int_math_ceil_1_0_slc", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 714, "end_line": 738, "span_ids": ["new_blockdim"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def new_blockdim(dim_shape, lengths, index):\n \"\"\"\n\n >>> new_blockdim(100, [20, 10, 20, 10, 40], slice(0, 90, 2))\n [10, 5, 10, 5, 15]\n\n >>> new_blockdim(100, [20, 10, 20, 10, 40], [5, 1, 30, 22])\n [4]\n\n >>> new_blockdim(100, [20, 10, 20, 10, 40], slice(90, 10, -2))\n [16, 5, 10, 5, 4]\n \"\"\"\n if index == slice(None, None, None):\n return lengths\n if isinstance(index, list):\n return [len(index)]\n assert not isinstance(index, Integral)\n pairs = sorted(_slice_1d(dim_shape, lengths, index).items(), key=itemgetter(0))\n slices = [\n slice(0, lengths[i], 1) if slc == slice(None, None, None) else slc\n for i, slc in pairs\n ]\n if isinstance(index, slice) and index.step and index.step < 0:\n slices = slices[::-1]\n return [int(math.ceil((1.0 * slc.stop - slc.start) / slc.step)) for slc in slices]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_replace_ellipsis_replace_ellipsis.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_replace_ellipsis_replace_ellipsis.return._", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 741, "end_line": 759, "span_ids": ["replace_ellipsis"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def replace_ellipsis(n, index):\n \"\"\"Replace ... with slices, :, : ,:\n\n >>> replace_ellipsis(4, (3, Ellipsis, 2))\n (3, slice(None, None, None), slice(None, None, None), 2)\n\n >>> replace_ellipsis(2, (Ellipsis, None))\n (slice(None, None, None), slice(None, None, None), None)\n \"\"\"\n # Careful about using in or index because index may contain arrays\n isellipsis = [i for i, ind in enumerate(index) if ind is Ellipsis]\n if not isellipsis:\n return index\n else:\n loc = isellipsis[0]\n extra_dimensions = n - (len(index) - sum(i is None for i in index) - 1)\n return (\n index[:loc] + (slice(None, None, None),) * extra_dimensions + index[loc + 1 :]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_slice_normalize_slice.return.idx": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_slice_normalize_slice.return.idx", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 762, "end_line": 795, "span_ids": ["normalize_slice"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_slice(idx, dim):\n \"\"\"Normalize slices to canonical form\n\n Parameters\n ----------\n idx: slice or other index\n dim: dimension length\n\n Examples\n --------\n >>> normalize_slice(slice(0, 10, 1), 10)\n slice(None, None, None)\n \"\"\"\n\n if isinstance(idx, slice):\n if math.isnan(dim):\n return idx\n start, stop, step = idx.indices(dim)\n if step > 0:\n if start == 0:\n start = None\n if stop >= dim:\n stop = None\n if step == 1:\n step = None\n if stop is not None and start is not None and stop < start:\n stop = start\n elif step < 0:\n if start >= dim - 1:\n start = None\n if stop < 0:\n stop = None\n return slice(start, stop, step)\n return idx", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_index_normalize_index.return.idx": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_normalize_index_normalize_index.return.idx", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 798, "end_line": 863, "span_ids": ["normalize_index"], "tokens": 595}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def normalize_index(idx, shape):\n \"\"\"Normalize slicing indexes\n\n 1. Replaces ellipses with many full slices\n 2. Adds full slices to end of index\n 3. Checks bounding conditions\n 4. Replace multidimensional numpy arrays with dask arrays\n 5. Replaces numpy arrays with lists\n 6. Posify's integers and lists\n 7. Normalizes slices to canonical form\n\n Examples\n --------\n >>> normalize_index(1, (10,))\n (1,)\n >>> normalize_index(-1, (10,))\n (9,)\n >>> normalize_index([-1], (10,))\n (array([9]),)\n >>> normalize_index(slice(-3, 10, 1), (10,))\n (slice(7, None, None),)\n >>> normalize_index((Ellipsis, None), (10,))\n (slice(None, None, None), None)\n >>> normalize_index(np.array([[True, False], [False, True], [True, True]]), (3, 2))\n (dask.array,)\n \"\"\"\n from .core import from_array\n\n if not isinstance(idx, tuple):\n idx = (idx,)\n\n # if a > 1D numpy.array is provided, cast it to a dask array\n if len(idx) > 0 and len(shape) > 1:\n i = idx[0]\n if isinstance(i, np.ndarray) and i.shape == shape:\n idx = (from_array(i), *idx[1:])\n\n idx = replace_ellipsis(len(shape), idx)\n n_sliced_dims = 0\n for i in idx:\n if hasattr(i, \"ndim\") and i.ndim >= 1:\n n_sliced_dims += i.ndim\n elif i is None:\n continue\n else:\n n_sliced_dims += 1\n idx = idx + (slice(None),) * (len(shape) - n_sliced_dims)\n if len([i for i in idx if i is not None]) > len(shape):\n raise IndexError(\"Too many indices for array\")\n\n none_shape = []\n i = 0\n for ind in idx:\n if ind is not None:\n none_shape.append(shape[i])\n i += 1\n else:\n none_shape.append(None)\n\n for i, d in zip(idx, none_shape):\n if d is not None:\n check_index(i, d)\n idx = tuple(map(sanitize_index, idx))\n idx = tuple(map(normalize_slice, idx, none_shape))\n idx = posify_index(none_shape, idx)\n return idx", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_check_index_check_index.if_np_isnan_dimension_.None_5.raise_IndexError_msg_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_check_index_check_index.if_np_isnan_dimension_.None_5.raise_IndexError_msg_i", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 866, "end_line": 933, "span_ids": ["check_index"], "tokens": 517}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_index(ind, dimension):\n \"\"\"Check validity of index for a given dimension\n\n Examples\n --------\n >>> check_index(3, 5)\n >>> check_index(5, 5)\n Traceback (most recent call last):\n ...\n IndexError: Index is not smaller than dimension 5 >= 5\n\n >>> check_index(6, 5)\n Traceback (most recent call last):\n ...\n IndexError: Index is not smaller than dimension 6 >= 5\n\n >>> check_index(-1, 5)\n >>> check_index(-6, 5)\n Traceback (most recent call last):\n ...\n IndexError: Negative index is not greater than negative dimension -6 <= -5\n\n >>> check_index([1, 2], 5)\n >>> check_index([6, 3], 5)\n Traceback (most recent call last):\n ...\n IndexError: Index out of bounds 5\n\n >>> check_index(slice(0, 3), 5)\n\n >>> check_index([True], 1)\n >>> check_index([True, True], 3)\n Traceback (most recent call last):\n ...\n IndexError: Boolean array length 2 doesn't equal dimension 3\n >>> check_index([True, True, True], 1)\n Traceback (most recent call last):\n ...\n IndexError: Boolean array length 3 doesn't equal dimension 1\n \"\"\"\n # unknown dimension, assumed to be in bounds\n if np.isnan(dimension):\n return\n elif isinstance(ind, (list, np.ndarray)):\n x = np.asanyarray(ind)\n if x.dtype == bool:\n if x.size != dimension:\n raise IndexError(\n \"Boolean array length %s doesn't equal dimension %s\"\n % (x.size, dimension)\n )\n elif (x >= dimension).any() or (x < -dimension).any():\n raise IndexError(\"Index out of bounds %s\" % dimension)\n elif isinstance(ind, slice):\n return\n elif is_dask_collection(ind):\n return\n elif ind is None:\n return\n\n elif ind >= dimension:\n raise IndexError(\n \"Index is not smaller than dimension %d >= %d\" % (ind, dimension)\n )\n\n elif ind < -dimension:\n msg = \"Negative index is not greater than negative dimension %d <= -%d\"\n raise IndexError(msg % (ind, dimension))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_out_index_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_slice_with_int_dask_array.return.x_tuple_out_index_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 936, "end_line": 986, "span_ids": ["slice_with_int_dask_array"], "tokens": 424}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_int_dask_array(x, index):\n \"\"\"Slice x with at most one 1D dask arrays of ints.\n\n This is a helper function of :meth:`Array.__getitem__`.\n\n Parameters\n ----------\n x: Array\n index: tuple with as many elements as x.ndim, among which there are\n one or more Array's with dtype=int\n\n Returns\n -------\n tuple of (sliced x, new index)\n\n where the new index is the same as the input, but with slice(None)\n replaced to the original slicer where a 1D filter has been applied and\n one less element where a zero-dimensional filter has been applied.\n \"\"\"\n from .core import Array\n\n assert len(index) == x.ndim\n fancy_indexes = [\n isinstance(idx, (tuple, list))\n or (isinstance(idx, (np.ndarray, Array)) and idx.ndim > 0)\n for idx in index\n ]\n if sum(fancy_indexes) > 1:\n raise NotImplementedError(\"Don't yet support nd fancy indexing\")\n\n out_index = []\n dropped_axis_cnt = 0\n for in_axis, idx in enumerate(index):\n out_axis = in_axis - dropped_axis_cnt\n if isinstance(idx, Array) and idx.dtype.kind in \"iu\":\n if idx.ndim == 0:\n idx = idx[np.newaxis]\n x = slice_with_int_dask_array_on_axis(x, idx, out_axis)\n x = x[tuple(0 if i == out_axis else slice(None) for i in range(x.ndim))]\n dropped_axis_cnt += 1\n elif idx.ndim == 1:\n x = slice_with_int_dask_array_on_axis(x, idx, out_axis)\n out_index.append(slice(None))\n else:\n raise NotImplementedError(\n \"Slicing with dask.array of ints only permitted when \"\n \"the indexer has zero or one dimensions\"\n )\n else:\n out_index.append(idx)\n return x, tuple(out_index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_on_axis_slice_with_int_dask_array_on_axis.return.y": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_int_dask_array_on_axis_slice_with_int_dask_array_on_axis.return.y", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 989, "end_line": 1050, "span_ids": ["slice_with_int_dask_array_on_axis"], "tokens": 486}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_int_dask_array_on_axis(x, idx, axis):\n \"\"\"Slice a ND dask array with a 1D dask arrays of ints along the given\n axis.\n\n This is a helper function of :func:`slice_with_int_dask_array`.\n \"\"\"\n from .core import Array, blockwise, from_array\n from . import chunk\n\n assert 0 <= axis < x.ndim\n\n if np.isnan(x.chunks[axis]).any():\n raise NotImplementedError(\n \"Slicing an array with unknown chunks with \"\n \"a dask.array of ints is not supported\"\n )\n\n # Calculate the offset at which each chunk starts along axis\n # e.g. chunks=(..., (5, 3, 4), ...) -> offset=[0, 5, 8]\n offset = np.roll(np.cumsum(x.chunks[axis]), 1)\n offset[0] = 0\n offset = from_array(offset, chunks=1)\n # Tamper with the declared chunks of offset to make blockwise align it with\n # x[axis]\n offset = Array(offset.dask, offset.name, (x.chunks[axis],), offset.dtype)\n\n # Define axis labels for blockwise\n x_axes = tuple(range(x.ndim))\n idx_axes = (x.ndim,) # arbitrary index not already in x_axes\n offset_axes = (axis,)\n p_axes = x_axes[: axis + 1] + idx_axes + x_axes[axis + 1 :]\n y_axes = x_axes[:axis] + idx_axes + x_axes[axis + 1 :]\n\n # Calculate the cartesian product of every chunk of x vs every chunk of idx\n p = blockwise(\n chunk.slice_with_int_dask_array,\n p_axes,\n x,\n x_axes,\n idx,\n idx_axes,\n offset,\n offset_axes,\n x_size=x.shape[axis],\n axis=axis,\n dtype=x.dtype,\n )\n\n # Aggregate on the chunks of x along axis\n y = blockwise(\n chunk.slice_with_int_dask_array_aggregate,\n y_axes,\n idx,\n idx_axes,\n p,\n p_axes,\n concatenate=True,\n x_chunks=x.chunks[axis],\n axis=axis,\n dtype=x.dtype,\n )\n return y", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_bool_dask_array_slice_with_bool_dask_array.return.out_tuple_out_index_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_slice_with_bool_dask_array_slice_with_bool_dask_array.return.out_tuple_out_index_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1053, "end_line": 1142, "span_ids": ["slice_with_bool_dask_array"], "tokens": 715}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slice_with_bool_dask_array(x, index):\n \"\"\"Slice x with one or more dask arrays of bools\n\n This is a helper function of `Array.__getitem__`.\n\n Parameters\n ----------\n x: Array\n index: tuple with as many elements as x.ndim, among which there are\n one or more Array's with dtype=bool\n\n Returns\n -------\n tuple of (sliced x, new index)\n\n where the new index is the same as the input, but with slice(None)\n replaced to the original slicer when a filter has been applied.\n\n Note: The sliced x will have nan chunks on the sliced axes.\n \"\"\"\n from .core import Array, blockwise, elemwise\n\n out_index = [\n slice(None) if isinstance(ind, Array) and ind.dtype == bool else ind\n for ind in index\n ]\n\n if len(index) == 1 and index[0].ndim == x.ndim:\n if not np.isnan(x.shape).any() and not np.isnan(index[0].shape).any():\n x = x.ravel()\n index = tuple(i.ravel() for i in index)\n elif x.ndim > 1:\n warnings.warn(\n \"When slicing a Dask array of unknown chunks with a boolean mask \"\n \"Dask array, the output array may have a different ordering \"\n \"compared to the equivalent NumPy operation. This will raise an \"\n \"error in a future release of Dask.\",\n stacklevel=3,\n )\n y = elemwise(getitem, x, *index, dtype=x.dtype)\n name = \"getitem-\" + tokenize(x, index)\n dsk = {(name, i): k for i, k in enumerate(core.flatten(y.__dask_keys__()))}\n chunks = ((np.nan,) * y.npartitions,)\n graph = HighLevelGraph.from_collections(name, dsk, dependencies=[y])\n return Array(graph, name, chunks, x.dtype), out_index\n\n if any(\n isinstance(ind, Array) and ind.dtype == bool and ind.ndim != 1 for ind in index\n ):\n raise NotImplementedError(\n \"Slicing with dask.array of bools only permitted when \"\n \"the indexer has only one dimension or when \"\n \"it has the same dimension as the sliced \"\n \"array\"\n )\n indexes = [\n ind if isinstance(ind, Array) and ind.dtype == bool else slice(None)\n for ind in index\n ]\n\n arginds = []\n i = 0\n for ind in indexes:\n if isinstance(ind, Array) and ind.dtype == bool:\n new = (ind, tuple(range(i, i + ind.ndim)))\n i += x.ndim\n else:\n new = (slice(None), None)\n i += 1\n arginds.append(new)\n\n arginds = list(concat(arginds))\n\n out = blockwise(\n getitem_variadic,\n tuple(range(x.ndim)),\n x,\n tuple(range(x.ndim)),\n *arginds,\n dtype=x.dtype\n )\n\n chunks = []\n for ind, chunk in zip(index, out.chunks):\n if isinstance(ind, Array) and ind.dtype == bool:\n chunks.append((np.nan,) * len(chunk))\n else:\n chunks.append(chunk)\n out._chunks = tuple(chunks)\n return out, tuple(out_index)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_getitem_variadic_make_block_sorted_slices.return.index2_index3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_getitem_variadic_make_block_sorted_slices.return.index2_index3", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1145, "end_line": 1200, "span_ids": ["make_block_sorted_slices", "getitem_variadic"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def getitem_variadic(x, *index):\n return x[index]\n\n\ndef make_block_sorted_slices(index, chunks):\n \"\"\"Generate blockwise-sorted index pairs for shuffling an array.\n\n Parameters\n ----------\n index : ndarray\n An array of index positions.\n chunks : tuple\n Chunks from the original dask array\n\n Returns\n -------\n index2 : ndarray\n Same values as `index`, but each block has been sorted\n index3 : ndarray\n The location of the values of `index` in `index2`\n\n Examples\n --------\n >>> index = np.array([6, 0, 4, 2, 7, 1, 5, 3])\n >>> chunks = ((4, 4),)\n >>> a, b = make_block_sorted_slices(index, chunks)\n\n Notice that the first set of 4 items are sorted, and the\n second set of 4 items are sorted.\n\n >>> a\n array([0, 2, 4, 6, 1, 3, 5, 7])\n >>> b\n array([3, 0, 2, 1, 7, 4, 6, 5])\n \"\"\"\n from .core import slices_from_chunks\n\n slices = slices_from_chunks(chunks)\n\n if len(slices[0]) > 1:\n slices = [slice_[0] for slice_ in slices]\n\n offsets = np.roll(np.cumsum(chunks[0]), 1)\n offsets[0] = 0\n\n index2 = np.empty_like(index)\n index3 = np.empty_like(index)\n\n for slice_, offset in zip(slices, offsets):\n a = index[slice_]\n b = np.sort(a)\n c = offset + np.argsort(b.take(np.argsort(a)))\n index2[slice_] = b\n index3[slice_] = c\n\n return index2, index3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_shuffle_slice_shuffle_slice.with_warnings_catch_warni.return.x_index2_rechunk_chunks2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_shuffle_slice_shuffle_slice.with_warnings_catch_warni.return.x_index2_rechunk_chunks2", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1203, "end_line": 1225, "span_ids": ["shuffle_slice"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def shuffle_slice(x, index):\n \"\"\"A relatively efficient way to shuffle `x` according to `index`.\n\n Parameters\n ----------\n x : Array\n index : ndarray\n This should be an ndarray the same length as `x` containing\n each index position in ``range(0, len(x))``.\n\n Returns\n -------\n Array\n \"\"\"\n from .core import PerformanceWarning\n\n chunks1 = chunks2 = x.chunks\n if x.ndim > 1:\n chunks1 = (chunks1[0],)\n index2, index3 = make_block_sorted_slices(index, chunks1)\n with warnings.catch_warnings():\n warnings.simplefilter(\"ignore\", PerformanceWarning)\n return x[index2].rechunk(chunks2)[index3]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__HashIdWrapper__cumsum.if_initial_zero_.else_.return.tuple_accumulate_add_seq": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py__HashIdWrapper__cumsum.if_initial_zero_.else_.return.tuple_accumulate_add_seq", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1228, "end_line": 1255, "span_ids": ["_HashIdWrapper.__eq__", "_HashIdWrapper", "_HashIdWrapper.__ne__", "_cumsum", "_HashIdWrapper.__hash__", "_HashIdWrapper.__init__"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _HashIdWrapper(object):\n \"\"\"Hash and compare a wrapped object by identity instead of value\"\"\"\n\n def __init__(self, wrapped):\n self.wrapped = wrapped\n\n def __eq__(self, other):\n if not isinstance(other, _HashIdWrapper):\n return NotImplemented\n return self.wrapped is other.wrapped\n\n def __ne__(self, other):\n if not isinstance(other, _HashIdWrapper):\n return NotImplemented\n return self.wrapped is not other.wrapped\n\n def __hash__(self):\n return id(self.wrapped)\n\n\n@functools.lru_cache()\ndef _cumsum(seq, initial_zero):\n if isinstance(seq, _HashIdWrapper):\n seq = seq.wrapped\n if initial_zero:\n return tuple(accumulate(add, seq, 0))\n else:\n return tuple(accumulate(add, seq))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_cached_cumsum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/slicing.py_cached_cumsum_", "embedding": null, "metadata": {"file_path": "dask/array/slicing.py", "file_name": "slicing.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1258, "end_line": 1285, "span_ids": ["cached_cumsum"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def cached_cumsum(seq, initial_zero=False):\n \"\"\"Compute :meth:`toolz.accumulate` with caching.\n\n Caching is by the identify of `seq` rather than the value. It is thus\n important that `seq` is a tuple of immutable objects, and this function\n is intended for use where `seq` is a value that will persist (generally\n block sizes).\n\n Parameters\n ----------\n seq : tuple\n Values to cumulatively sum.\n initial_zero : bool, optional\n If true, the return value is prefixed with a zero.\n\n Returns\n -------\n tuple\n \"\"\"\n if isinstance(seq, tuple):\n # Look up by identity first, to avoid a linear-time __hash__\n # if we've seen this tuple object before.\n result = _cumsum(_HashIdWrapper(seq), initial_zero)\n else:\n # Construct a temporary tuple, and look up by value.\n result = _cumsum(tuple(seq), initial_zero)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_____all__._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_____all__._", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 69, "span_ids": ["docstring"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nStatistical functions and tests, following scipy.stats.\n\nSome differences\n\n- We don't handle missing values at all\n\n\"\"\"\n# This is lightly adapted from scipy.stats 0.19\n# https://github.com/scipy/scipy/blob/v0.19.0/scipy/stats/stats.py\nimport math\n\nimport numpy as np\nimport dask.array as da\nfrom dask.array.ufunc import wrap_elemwise\nfrom dask.utils import derived_from\nfrom dask import delayed\n\ntry:\n import scipy.stats\nexcept ImportError as e:\n raise ImportError(\"`dask.array.stats` requires `scipy` to be installed.\") from e\nfrom scipy.stats import distributions\nfrom scipy import special\nfrom scipy.stats.stats import (\n Ttest_indResult,\n Ttest_1sampResult,\n Ttest_relResult,\n Power_divergenceResult,\n NormaltestResult,\n SkewtestResult,\n KurtosistestResult,\n F_onewayResult,\n)\n\n\n__all__ = [\n \"ttest_ind\",\n \"ttest_1samp\",\n \"ttest_rel\",\n \"chisquare\",\n \"power_divergence\",\n \"skew\",\n \"skewtest\",\n \"kurtosis\",\n \"kurtosistest\",\n \"normaltest\",\n \"f_oneway\",\n \"moment\",\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_None_21_ttest_ind.return.delayed_Ttest_indResult_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_None_21_ttest_ind.return.delayed_Ttest_indResult_", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 90, "span_ids": ["ttest_ind", "docstring"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# -----------------\n# Statistical Tests\n# -----------------\n\n\n@derived_from(scipy.stats)\ndef ttest_ind(a, b, axis=0, equal_var=True):\n v1 = da.var(a, axis, ddof=1) # XXX: np -> da\n v2 = da.var(b, axis, ddof=1) # XXX: np -> da\n n1 = a.shape[axis]\n n2 = b.shape[axis]\n\n if equal_var:\n df, denom = _equal_var_ttest_denom(v1, n1, v2, n2)\n else:\n df, denom = _unequal_var_ttest_denom(v1, n1, v2, n2)\n\n res = _ttest_ind_from_stats(da.mean(a, axis), da.mean(b, axis), denom, df)\n\n return delayed(Ttest_indResult, nout=2)(*res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_1samp_ttest_1samp.return.delayed_Ttest_1sampResult": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_1samp_ttest_1samp.return.delayed_Ttest_1sampResult", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 109, "span_ids": ["ttest_1samp"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef ttest_1samp(a, popmean, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n n = a.shape[axis]\n df = n - 1\n\n d = da.mean(a, axis) - popmean\n v = da.var(a, axis, ddof=1)\n denom = da.sqrt(v / float(n))\n\n with np.errstate(divide=\"ignore\", invalid=\"ignore\"):\n t = da.divide(d, denom)\n t, prob = _ttest_finish(df, t)\n return delayed(Ttest_1sampResult, nout=2)(t, prob)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_rel_chisquare.return.power_divergence_f_obs_f": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_ttest_rel_chisquare.return.power_divergence_f_obs_f", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 136, "span_ids": ["chisquare", "ttest_rel"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef ttest_rel(a, b, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n\n n = a.shape[axis]\n df = float(n - 1)\n\n d = (a - b).astype(np.float64)\n v = da.var(d, axis, ddof=1)\n dm = da.mean(d, axis)\n denom = da.sqrt(v / float(n))\n\n with np.errstate(divide=\"ignore\", invalid=\"ignore\"):\n t = da.divide(dm, denom)\n t, prob = _ttest_finish(df, t)\n\n return delayed(Ttest_relResult, nout=2)(t, prob)\n\n\n@derived_from(scipy.stats)\ndef chisquare(f_obs, f_exp=None, ddof=0, axis=0):\n return power_divergence(f_obs, f_exp=f_exp, ddof=ddof, axis=axis, lambda_=\"pearson\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_power_divergence_power_divergence.return.delayed_Power_divergenceR": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_power_divergence_power_divergence.return.delayed_Power_divergenceR", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 139, "end_line": 183, "span_ids": ["power_divergence"], "tokens": 472}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef power_divergence(f_obs, f_exp=None, ddof=0, axis=0, lambda_=None):\n\n if isinstance(lambda_, str):\n # TODO: public api\n if lambda_ not in scipy.stats.stats._power_div_lambda_names:\n names = repr(list(scipy.stats.stats._power_div_lambda_names.keys()))[1:-1]\n raise ValueError(\n \"invalid string for lambda_: {0!r}. Valid strings \"\n \"are {1}\".format(lambda_, names)\n )\n lambda_ = scipy.stats.stats._power_div_lambda_names[lambda_]\n elif lambda_ is None:\n lambda_ = 1\n\n if f_exp is not None:\n # f_exp = np.atleast_1d(np.asanyarray(f_exp))\n pass\n else:\n f_exp = f_obs.mean(axis=axis, keepdims=True)\n\n # `terms` is the array of terms that are summed along `axis` to create\n # the test statistic. We use some specialized code for a few special\n # cases of lambda_.\n if lambda_ == 1:\n # Pearson's chi-squared statistic\n terms = (f_obs - f_exp) ** 2 / f_exp\n elif lambda_ == 0:\n # Log-likelihood ratio (i.e. G-test)\n terms = 2.0 * _xlogy(f_obs, f_obs / f_exp)\n elif lambda_ == -1:\n # Modified log-likelihood ratio\n terms = 2.0 * _xlogy(f_exp, f_exp / f_obs)\n else:\n # General Cressie-Read power divergence.\n terms = f_obs * ((f_obs / f_exp) ** lambda_ - 1)\n terms /= 0.5 * lambda_ * (lambda_ + 1)\n\n stat = terms.sum(axis=axis)\n\n num_obs = _count(terms, axis=axis)\n # ddof = asarray(ddof)\n p = delayed(distributions.chi2.sf)(stat, num_obs - 1 - ddof)\n\n return delayed(Power_divergenceResult, nout=2)(stat, p)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skew_skew.return.vals": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skew_skew.return.vals", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 186, "end_line": 210, "span_ids": ["skew"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef skew(a, axis=0, bias=True, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n\n n = a.shape[axis] # noqa; for bias\n m2 = moment(a, 2, axis)\n m3 = moment(a, 3, axis)\n zero = m2 == 0\n vals = da.where(~zero, m3 / m2 ** 1.5, 0.0)\n # vals = da.where(~zero, (m2, m3),\n # lambda m2, m3: m3 / m2**1.5,\n # 0.)\n if not bias:\n # Need a version of np.place\n raise NotImplementedError(\"bias=False is not implemented.\")\n\n if vals.ndim == 0:\n return vals\n # TODO: scalar\n # return vals.item()\n\n return vals", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skewtest_skewtest.return.delayed_SkewtestResult_n": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_skewtest_skewtest.return.delayed_SkewtestResult_n", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 213, "end_line": 241, "span_ids": ["skewtest"], "tokens": 340}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef skewtest(a, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n\n b2 = skew(a, axis)\n n = float(a.shape[axis])\n if n < 8:\n raise ValueError(\n \"skewtest is not valid with less than 8 samples; %i samples\"\n \" were given.\" % int(n)\n )\n y = b2 * math.sqrt(((n + 1) * (n + 3)) / (6.0 * (n - 2)))\n beta2 = (\n 3.0\n * (n ** 2 + 27 * n - 70)\n * (n + 1)\n * (n + 3)\n / ((n - 2.0) * (n + 5) * (n + 7) * (n + 9))\n )\n W2 = -1 + math.sqrt(2 * (beta2 - 1))\n delta = 1 / math.sqrt(0.5 * math.log(W2))\n alpha = math.sqrt(2.0 / (W2 - 1))\n y = np.where(y == 0, 1, y)\n Z = delta * np.log(y / alpha + np.sqrt((y / alpha) ** 2 + 1))\n\n return delayed(SkewtestResult, nout=2)(Z, 2 * distributions.norm.sf(np.abs(Z)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosis_kurtosis.if_fisher_.else_._TODO_scalar_vals_va": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosis_kurtosis.if_fisher_.else_._TODO_scalar_vals_va", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 244, "end_line": 268, "span_ids": ["kurtosis"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef kurtosis(a, axis=0, fisher=True, bias=True, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n n = a.shape[axis] # noqa; for bias\n m2 = moment(a, 2, axis)\n m4 = moment(a, 4, axis)\n zero = m2 == 0\n olderr = np.seterr(all=\"ignore\")\n try:\n vals = da.where(zero, 0, m4 / m2 ** 2.0)\n finally:\n np.seterr(**olderr)\n\n if not bias:\n # need a version of np.place\n raise NotImplementedError(\"bias=False is not implemented.\")\n\n if fisher:\n return vals - 3\n else:\n return vals\n # TODO: scalar; vals = vals.item() # array scalar", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosistest_kurtosistest.return.delayed_KurtosistestResul": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_kurtosistest_kurtosistest.return.delayed_KurtosistestResul", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 271, "end_line": 305, "span_ids": ["kurtosistest"], "tokens": 547}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef kurtosistest(a, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n\n n = float(a.shape[axis])\n b2 = kurtosis(a, axis, fisher=False)\n\n E = 3.0 * (n - 1) / (n + 1)\n varb2 = (\n 24.0 * n * (n - 2) * (n - 3) / ((n + 1) * (n + 1.0) * (n + 3) * (n + 5))\n ) # [1]_ Eq. 1\n x = (b2 - E) / np.sqrt(varb2) # [1]_ Eq. 4\n # [1]_ Eq. 2:\n sqrtbeta1 = (\n 6.0\n * (n * n - 5 * n + 2)\n / ((n + 7) * (n + 9))\n * np.sqrt((6.0 * (n + 3) * (n + 5)) / (n * (n - 2) * (n - 3)))\n )\n # [1]_ Eq. 3:\n A = 6.0 + 8.0 / sqrtbeta1 * (2.0 / sqrtbeta1 + np.sqrt(1 + 4.0 / (sqrtbeta1 ** 2)))\n term1 = 1 - 2 / (9.0 * A)\n denom = 1 + x * np.sqrt(2 / (A - 4.0))\n denom = np.where(denom < 0, 99, denom)\n term2 = np.where(denom < 0, term1, np.power((1 - 2.0 / A) / denom, 1 / 3.0))\n Z = (term1 - term2) / np.sqrt(2 / (9.0 * A)) # [1]_ Eq. 5\n Z = np.where(denom == 99, 0, Z)\n if Z.ndim == 0:\n Z = Z[()]\n\n # zprob uses upper tail, so Z needs to be positive\n return delayed(KurtosistestResult, nout=2)(Z, 2 * distributions.norm.sf(np.abs(Z)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_normaltest_normaltest.return.delayed_NormaltestResult_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_normaltest_normaltest.return.delayed_NormaltestResult_", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 308, "end_line": 318, "span_ids": ["normaltest"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef normaltest(a, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n\n s, _ = skewtest(a, axis)\n k, _ = kurtosistest(a, axis)\n k2 = s * s + k * k\n return delayed(NormaltestResult, nout=2)(k2, delayed(distributions.chi2.sf)(k2, 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_f_oneway_f_oneway.return.delayed_F_onewayResult_n": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_f_oneway_f_oneway.return.delayed_F_onewayResult_n", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 321, "end_line": 353, "span_ids": ["f_oneway"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef f_oneway(*args):\n # args = [np.asarray(arg, dtype=float) for arg in args]\n # ANOVA on N groups, each in its own array\n num_groups = len(args)\n alldata = da.concatenate(args)\n bign = len(alldata)\n\n # Determine the mean of the data, and subtract that from all inputs to a\n # variance (via sum_of_sq / sq_of_sum) calculation. Variance is invariance\n # to a shift in location, and centering all data around zero vastly\n # improves numerical stability.\n offset = alldata.mean()\n alldata -= offset\n\n sstot = _sum_of_squares(alldata) - (_square_of_sums(alldata) / float(bign))\n ssbn = 0\n for a in args:\n ssbn += _square_of_sums(a - offset) / float(len(a))\n\n # Naming: variables ending in bn/b are for \"between treatments\", wn/w are\n # for \"within treatments\"\n ssbn -= _square_of_sums(alldata) / float(bign)\n sswn = sstot - ssbn\n dfbn = num_groups - 1\n dfwn = bign - num_groups\n msb = ssbn / float(dfbn)\n msw = sswn / float(dfwn)\n f = msb / msw\n\n prob = _fdtrc(dfbn, dfwn, f) # equivalent to stats.f.sf\n\n return delayed(F_onewayResult, nout=2)(f, prob)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_moment__equal_var_ttest_denom.return.df_denom": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py_moment__equal_var_ttest_denom.return.df_denom", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 356, "end_line": 378, "span_ids": ["moment", "_equal_var_ttest_denom", "impl:6"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@derived_from(scipy.stats)\ndef moment(a, moment=1, axis=0, nan_policy=\"propagate\"):\n if nan_policy != \"propagate\":\n raise NotImplementedError(\n \"`nan_policy` other than 'propagate' have not been implemented.\"\n )\n return da.moment(a, moment, axis=axis)\n\n\n# -------\n# Helpers\n# -------\n# Don't really want to do all of scipy.special (or do we?)\n\n_xlogy = wrap_elemwise(special.xlogy, source=special)\n_fdtrc = wrap_elemwise(special.fdtrc, source=special)\n\n\ndef _equal_var_ttest_denom(v1, n1, v2, n2):\n df = n1 + n2 - 2.0\n svar = ((n1 - 1) * v1 + (n2 - 1) * v2) / df\n denom = da.sqrt(svar * (1.0 / n1 + 1.0 / n2)) # XXX: np -> da\n return df, denom", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__unequal_var_ttest_denom__unequal_var_ttest_denom.return.df_denom": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__unequal_var_ttest_denom__unequal_var_ttest_denom.return.df_denom", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 381, "end_line": 391, "span_ids": ["_unequal_var_ttest_denom"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _unequal_var_ttest_denom(v1, n1, v2, n2):\n vn1 = v1 / n1\n vn2 = v2 / n2\n with np.errstate(divide=\"ignore\", invalid=\"ignore\"):\n df = (vn1 + vn2) ** 2 / (vn1 ** 2 / (n1 - 1) + vn2 ** 2 / (n2 - 1))\n\n # If df is undefined, variances are zero (assumes n1 > 0 & n2 > 0).\n # Hence it doesn't matter what df is as long as it's not NaN.\n df = da.where(da.isnan(df), 1, df) # XXX: np -> da\n denom = da.sqrt(vn1 + vn2)\n return df, denom", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__ttest_ind_from_stats__count.if_axis_is_None_.else_.return.x_shape_axis_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__ttest_ind_from_stats__count.if_axis_is_None_.else_.return.x_shape_axis_", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 394, "end_line": 421, "span_ids": ["_ttest_finish", "_count", "_ttest_ind_from_stats"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _ttest_ind_from_stats(mean1, mean2, denom, df):\n\n d = mean1 - mean2\n with np.errstate(divide=\"ignore\", invalid=\"ignore\"):\n t = da.divide(d, denom)\n t, prob = _ttest_finish(df, t)\n\n return (t, prob)\n\n\ndef _ttest_finish(df, t):\n \"\"\"Common code between all 3 t-test functions.\"\"\"\n # XXX: np.abs -> da.absolute\n # XXX: delayed(distributions.t.sf)\n prob = (\n delayed(distributions.t.sf)(da.absolute(t), df) * 2\n ) # use np.abs to get upper tail\n if t.ndim == 0:\n t = t[()]\n\n return t, prob\n\n\ndef _count(x, axis=None):\n if axis is None:\n return x.size\n else:\n return x.shape[axis]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__sum_of_squares__sum_of_squares.return.da_sum_a_a_axis_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__sum_of_squares__sum_of_squares.return.da_sum_a_a_axis_", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 424, "end_line": 443, "span_ids": ["_sum_of_squares"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _sum_of_squares(a, axis=0):\n \"\"\"\n Squares each element of the input array, and returns the sum(s) of that.\n Parameters\n ----------\n a : array_like\n Input array.\n axis : int or None, optional\n Axis along which to calculate. Default is 0. If None, compute over\n the whole array `a`.\n Returns\n -------\n sum_of_squares : ndarray\n The sum along the given axis for (a**2).\n See also\n --------\n _square_of_sums : The square(s) of the sum(s) (the opposite of\n `_sum_of_squares`).\n \"\"\"\n return da.sum(a * a, axis)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__square_of_sums_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/stats.py__square_of_sums_", "embedding": null, "metadata": {"file_path": "dask/array/stats.py", "file_name": "stats.py", "file_type": "text/x-python", "category": "implementation", "start_line": 446, "end_line": 466, "span_ids": ["_square_of_sums"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _square_of_sums(a, axis=0):\n \"\"\"\n Sums elements of the input array, and returns the square(s) of that sum.\n Parameters\n ----------\n a : array_like\n Input array.\n axis : int or None, optional\n Axis along which to calculate. Default is 0. If None, compute over\n the whole array `a`.\n Returns\n -------\n square_of_sums : float or ndarray\n The square of the sum over `axis`.\n See also\n --------\n _sum_of_squares : The sum of squares (the opposite of `square_of_sums`).\n \"\"\"\n s = da.sum(a, axis)\n return s * s", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_math_text_style._font_size_1_0rem_font_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_math_text_style._font_size_1_0rem_font_", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["imports", "svg", "impl"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import math\nimport re\n\nimport numpy as np\n\n\ndef svg(chunks, size=200, **kwargs):\n \"\"\"Convert chunks from Dask Array into an SVG Image\n\n Parameters\n ----------\n chunks: tuple\n size: int\n Rough size of the image\n\n Returns\n -------\n text: An svg string depicting the array as a grid of chunks\n \"\"\"\n shape = tuple(map(sum, chunks))\n if np.isnan(shape).any(): # don't support unknown sizes\n raise NotImplementedError(\n \"Can't generate SVG with unknown chunk sizes.\\n\\n\"\n \" A possible solution is with x.compute_chunk_sizes()\"\n )\n if not all(shape):\n raise NotImplementedError(\"Can't generate SVG with 0-length dimensions\")\n if len(chunks) == 0:\n raise NotImplementedError(\"Can't generate SVG with 0 dimensions\")\n if len(chunks) == 1:\n return svg_1d(chunks, size=size, **kwargs)\n elif len(chunks) == 2:\n return svg_2d(chunks, size=size, **kwargs)\n elif len(chunks) == 3:\n return svg_3d(chunks, size=size, **kwargs)\n else:\n return svg_nd(chunks, size=size, **kwargs)\n\n\ntext_style = 'font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\"'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_2d_svg_2d.return.header_n_join_lines_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_2d_svg_2d.return.header_n_join_lines_", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 70, "span_ids": ["svg_2d"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_2d(chunks, offset=(0, 0), skew=(0, 0), size=200, sizes=None):\n shape = tuple(map(sum, chunks))\n sizes = sizes or draw_sizes(shape, size=size)\n y, x = grid_points(chunks, sizes)\n\n lines, (min_x, max_x, min_y, max_y) = svg_grid(x, y, offset=offset, skew=skew)\n\n header = (\n '\"\n\n if shape[0] >= 100:\n rotate = -90\n else:\n rotate = 0\n\n text = [\n \"\",\n \" \",\n ' %d'\n % (max_x / 2, max_y + 20, text_style, shape[1]),\n ' %d'\n % (max_x + 20, max_y / 2, text_style, rotate, max_x + 20, max_y / 2, shape[0]),\n ]\n\n return header + \"\\n\".join(lines + text) + footer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_3d_svg_3d.return.header_n_join_xy_z": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_3d_svg_3d.return.header_n_join_xy_z", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 73, "end_line": 125, "span_ids": ["svg_3d"], "tokens": 568}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_3d(chunks, size=200, sizes=None, offset=(0, 0)):\n shape = tuple(map(sum, chunks))\n sizes = sizes or draw_sizes(shape, size=size)\n x, y, z = grid_points(chunks, sizes)\n ox, oy = offset\n\n xy, (mnx, mxx, mny, mxy) = svg_grid(\n x / 1.7, y, offset=(ox + 10, oy + 0), skew=(1, 0)\n )\n\n zx, (_, _, _, max_x) = svg_grid(z, x / 1.7, offset=(ox + 10, oy + 0), skew=(0, 1))\n zy, (min_z, max_z, min_y, max_y) = svg_grid(\n z, y, offset=(ox + max_x + 10, oy + max_x), skew=(0, 0)\n )\n\n header = (\n '\"\n\n if shape[1] >= 100:\n rotate = -90\n else:\n rotate = 0\n\n text = [\n \"\",\n \" \",\n ' %d'\n % ((min_z + max_z) / 2, max_y + 20, text_style, shape[2]),\n ' %d'\n % (\n max_z + 20,\n (min_y + max_y) / 2,\n text_style,\n rotate,\n max_z + 20,\n (min_y + max_y) / 2,\n shape[1],\n ),\n ' %d'\n % (\n (mnx + mxx) / 2 - 10,\n mxy - (mxx - mnx) / 2 + 20,\n text_style,\n (mnx + mxx) / 2 - 10,\n mxy - (mxx - mnx) / 2 + 20,\n shape[0],\n ),\n ]\n\n return header + \"\\n\".join(xy + zx + zy + text) + footer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_nd_svg_nd.return.header_n_n_join_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_nd_svg_nd.return.header_n_n_join_out_", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 128, "end_line": 160, "span_ids": ["svg_nd"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_nd(chunks, size=200):\n if len(chunks) % 3 == 1:\n chunks = ((1,),) + chunks\n shape = tuple(map(sum, chunks))\n sizes = draw_sizes(shape, size=size)\n\n chunks2 = chunks\n sizes2 = sizes\n out = []\n left = 0\n total_height = 0\n while chunks2:\n n = len(chunks2) % 3 or 3\n o = svg(chunks2[:n], sizes=sizes2[:n], offset=(left, 0))\n chunks2 = chunks2[n:]\n sizes2 = sizes2[n:]\n\n lines = o.split(\"\\n\")\n header = lines[0]\n height = float(re.search(r'height=\"(\\d*\\.?\\d*)\"', header).groups()[0])\n total_height = max(total_height, height)\n width = float(re.search(r'width=\"(\\d*\\.?\\d*)\"', header).groups()[0])\n left += width + 10\n o = \"\\n\".join(lines[1:-1]) # remove header and footer\n\n out.append(o)\n\n header = (\n '\"\n return header + \"\\n\\n\".join(out) + footer", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_lines_svg_lines.return.lines": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_lines_svg_lines.return.lines", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 163, "end_line": 180, "span_ids": ["svg_lines"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_lines(x1, y1, x2, y2):\n \"\"\"Convert points into lines of text for an SVG plot\n\n Examples\n --------\n >>> svg_lines([0, 1], [0, 0], [10, 11], [1, 1]) # doctest: +NORMALIZE_WHITESPACE\n [' ',\n ' ']\n \"\"\"\n n = len(x1)\n lines = [\n ' ' % (x1[i], y1[i], x2[i], y2[i])\n for i in range(n)\n ]\n\n lines[0] = lines[0].replace(\" /\", ' style=\"stroke-width:2\" /')\n lines[-1] = lines[-1].replace(\" /\", ' style=\"stroke-width:2\" /')\n return lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_grid_svg_grid.return.h_lines_v_lines_rect_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_grid_svg_grid.return.h_lines_v_lines_rect_", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 183, "end_line": 234, "span_ids": ["svg_grid"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_grid(x, y, offset=(0, 0), skew=(0, 0)):\n \"\"\"Create lines of SVG text that show a grid\n\n Parameters\n ----------\n x: numpy.ndarray\n y: numpy.ndarray\n offset: tuple\n translational displacement of the grid in SVG coordinates\n skew: tuple\n \"\"\"\n # Horizontal lines\n x1 = np.zeros_like(y) + offset[0]\n y1 = y + offset[1]\n x2 = np.full_like(y, x[-1]) + offset[0]\n y2 = y + offset[1]\n\n if skew[0]:\n y2 += x.max() * skew[0]\n if skew[1]:\n x1 += skew[1] * y\n x2 += skew[1] * y\n\n min_x = min(x1.min(), x2.min())\n min_y = min(y1.min(), y2.min())\n max_x = max(x1.max(), x2.max())\n max_y = max(y1.max(), y2.max())\n\n h_lines = [\"\", \" \"] + svg_lines(x1, y1, x2, y2)\n\n # Vertical lines\n x1 = x + offset[0]\n y1 = np.zeros_like(x) + offset[1]\n x2 = x + offset[0]\n y2 = np.full_like(x, y[-1]) + offset[1]\n\n if skew[0]:\n y1 += skew[0] * x\n y2 += skew[0] * x\n if skew[1]:\n x2 += skew[1] * y.max()\n\n v_lines = [\"\", \" \"] + svg_lines(x1, y1, x2, y2)\n\n rect = [\n \"\",\n \" \",\n ' '\n % (x1[0], y1[0], x1[-1], y1[-1], x2[-1], y2[-1], x2[0], y2[0]),\n ]\n\n return h_lines + v_lines + rect, (min_x, max_x, min_y, max_y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_1d_draw_sizes.return.tuple_size_r_for_r_in_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_svg_1d_draw_sizes.return.tuple_size_r_for_r_in_r", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 237, "end_line": 252, "span_ids": ["grid_points", "svg_1d", "draw_sizes"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def svg_1d(chunks, sizes=None, **kwargs):\n return svg_2d(((1,),) + chunks, **kwargs)\n\n\ndef grid_points(chunks, sizes):\n cumchunks = [np.cumsum((0,) + c) for c in chunks]\n points = [x * size / x[-1] for x, size in zip(cumchunks, sizes)]\n return points\n\n\ndef draw_sizes(shape, size=200):\n \"\"\" Get size in pixels for all dimensions \"\"\"\n mx = max(shape)\n ratios = [mx / max(0.1, d) for d in shape]\n ratios = [ratio_response(r) for r in ratios]\n return tuple(size / r for r in ratios)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_ratio_response_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/svg.py_ratio_response_", "embedding": null, "metadata": {"file_path": "dask/array/svg.py", "file_name": "svg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 270, "span_ids": ["ratio_response"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ratio_response(x):\n \"\"\"How we display actual size ratios\n\n Common ratios in sizes span several orders of magnitude,\n which is hard for us to perceive.\n\n We keep ratios in the 1-3 range accurate, and then apply a logarithm to\n values up until about 100 or so, at which point we stop scaling.\n \"\"\"\n if x < math.e:\n return x\n elif x <= 100:\n return math.log(x + 12.4) # f(e) == e\n else:\n return math.log(100 + 12.4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_copy_from_numpy_import_nancums": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_copy_from_numpy_import_nancums", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 56, "span_ids": ["imports"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import copy\n\nimport pytest\n\nnp = pytest.importorskip(\"numpy\")\n\nimport os\nimport time\nfrom io import StringIO\nfrom distutils.version import LooseVersion\nimport operator\nfrom operator import add, sub, getitem\nfrom threading import Lock\nimport warnings\n\nfrom tlz import merge, countby, concat\nfrom tlz.curried import identity\n\nimport dask\nimport dask.array as da\nimport dask.dataframe\nfrom dask.base import tokenize, compute_as_if_collection\nfrom dask.delayed import Delayed, delayed\nfrom dask.utils import ignoring, tmpfile, tmpdir, key_split, apply\nfrom dask.utils_test import inc, dec\n\nfrom dask.array.core import (\n getem,\n getter,\n dotmany,\n concatenate3,\n Array,\n stack,\n concatenate,\n from_array,\n broadcast_shapes,\n broadcast_to,\n blockdims_from_blockshape,\n store,\n optimize,\n from_func,\n normalize_chunks,\n broadcast_chunks,\n from_delayed,\n common_blockdim,\n concatenate_axes,\n)\nfrom dask.blockwise import (\n make_blockwise_graph as top,\n broadcast_dimensions,\n optimize_blockwise,\n)\nfrom dask.array.utils import assert_eq, same_keys\nfrom dask.array.numpy_compat import _numpy_120\n\nfrom numpy import nancumsum, nancumprod", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getem_test_getem.assert_getem_X_2_3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getem_test_getem.assert_getem_X_2_3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 66, "span_ids": ["test_getem"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_getem():\n sol = {\n (\"X\", 0, 0): (getter, \"X\", (slice(0, 2), slice(0, 3))),\n (\"X\", 1, 0): (getter, \"X\", (slice(2, 4), slice(0, 3))),\n (\"X\", 1, 1): (getter, \"X\", (slice(2, 4), slice(3, 6))),\n (\"X\", 0, 1): (getter, \"X\", (slice(0, 2), slice(3, 6))),\n }\n assert getem(\"X\", (2, 3), shape=(4, 6)) == sol", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_test_top.assert_top_identity_z_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_test_top.assert_top_identity_z_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 97, "span_ids": ["test_top"], "tokens": 632}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_top():\n assert top(inc, \"z\", \"ij\", \"x\", \"ij\", numblocks={\"x\": (2, 2)}) == {\n (\"z\", 0, 0): (inc, (\"x\", 0, 0)),\n (\"z\", 0, 1): (inc, (\"x\", 0, 1)),\n (\"z\", 1, 0): (inc, (\"x\", 1, 0)),\n (\"z\", 1, 1): (inc, (\"x\", 1, 1)),\n }\n\n assert top(\n add, \"z\", \"ij\", \"x\", \"ij\", \"y\", \"ij\", numblocks={\"x\": (2, 2), \"y\": (2, 2)}\n ) == {\n (\"z\", 0, 0): (add, (\"x\", 0, 0), (\"y\", 0, 0)),\n (\"z\", 0, 1): (add, (\"x\", 0, 1), (\"y\", 0, 1)),\n (\"z\", 1, 0): (add, (\"x\", 1, 0), (\"y\", 1, 0)),\n (\"z\", 1, 1): (add, (\"x\", 1, 1), (\"y\", 1, 1)),\n }\n\n assert top(\n dotmany, \"z\", \"ik\", \"x\", \"ij\", \"y\", \"jk\", numblocks={\"x\": (2, 2), \"y\": (2, 2)}\n ) == {\n (\"z\", 0, 0): (dotmany, [(\"x\", 0, 0), (\"x\", 0, 1)], [(\"y\", 0, 0), (\"y\", 1, 0)]),\n (\"z\", 0, 1): (dotmany, [(\"x\", 0, 0), (\"x\", 0, 1)], [(\"y\", 0, 1), (\"y\", 1, 1)]),\n (\"z\", 1, 0): (dotmany, [(\"x\", 1, 0), (\"x\", 1, 1)], [(\"y\", 0, 0), (\"y\", 1, 0)]),\n (\"z\", 1, 1): (dotmany, [(\"x\", 1, 0), (\"x\", 1, 1)], [(\"y\", 0, 1), (\"y\", 1, 1)]),\n }\n\n assert top(identity, \"z\", \"\", \"x\", \"ij\", numblocks={\"x\": (2, 2)}) == {\n (\"z\",): (identity, [[(\"x\", 0, 0), (\"x\", 0, 1)], [(\"x\", 1, 0), (\"x\", 1, 1)]])\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_with_kwargs_test_top_supports_broadcasting_rules.assert_top_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_with_kwargs_test_top_supports_broadcasting_rules.assert_top_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 100, "end_line": 115, "span_ids": ["test_top_supports_broadcasting_rules", "test_top_with_kwargs"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_top_with_kwargs():\n assert top(add, \"z\", \"i\", \"x\", \"i\", numblocks={\"x\": (2, 0)}, b=100) == {\n (\"z\", 0): (apply, add, [(\"x\", 0)], {\"b\": 100}),\n (\"z\", 1): (apply, add, [(\"x\", 1)], {\"b\": 100}),\n }\n\n\ndef test_top_supports_broadcasting_rules():\n assert top(\n add, \"z\", \"ij\", \"x\", \"ij\", \"y\", \"ij\", numblocks={\"x\": (1, 2), \"y\": (2, 1)}\n ) == {\n (\"z\", 0, 0): (add, (\"x\", 0, 0), (\"y\", 0, 0)),\n (\"z\", 0, 1): (add, (\"x\", 0, 1), (\"y\", 0, 0)),\n (\"z\", 1, 0): (add, (\"x\", 0, 0), (\"y\", 1, 0)),\n (\"z\", 1, 1): (add, (\"x\", 0, 1), (\"y\", 1, 0)),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_literals_test_top_literals.assert_top_add_z_ij_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_top_literals_test_top_literals.assert_top_add_z_ij_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 124, "span_ids": ["test_top_literals"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_top_literals():\n assert top(add, \"z\", \"ij\", \"x\", \"ij\", 123, None, numblocks={\"x\": (2, 2)}) == {\n (\"z\", 0, 0): (add, (\"x\", 0, 0), 123),\n (\"z\", 0, 1): (add, (\"x\", 0, 1), 123),\n (\"z\", 1, 0): (add, (\"x\", 1, 0), 123),\n (\"z\", 1, 1): (add, (\"x\", 1, 1), 123),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_literals_test_blockwise_literals.assert_eq_z_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_literals_test_blockwise_literals.assert_eq_z_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 127, "end_line": 138, "span_ids": ["test_blockwise_literals"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_literals():\n x = da.ones((10, 10), chunks=(5, 5))\n z = da.blockwise(add, \"ij\", x, \"ij\", 100, None, dtype=x.dtype)\n assert_eq(z, x + 100)\n\n z = da.blockwise(\n lambda x, y, z: x * y + z, \"ij\", 2, None, x, \"ij\", 100, None, dtype=x.dtype\n )\n assert_eq(z, 2 * x + 100)\n\n z = da.blockwise(getitem, \"ij\", x, \"ij\", slice(None), None, dtype=x.dtype)\n assert_eq(z, x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_I_test_blockwise_1_in_shape_I.da_blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_I_test_blockwise_1_in_shape_I.da_blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 141, "end_line": 155, "span_ids": ["test_blockwise_1_in_shape_I"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_1_in_shape_I():\n def test_f(a, b):\n assert 1 in b.shape\n\n p, k, N = 7, 2, 5\n da.blockwise(\n test_f,\n \"x\",\n da.zeros((2 * p, 9, k * N), chunks=(p, 3, k)),\n \"xzt\",\n da.zeros((2 * p, 9, 1), chunks=(p, 3, -1)),\n \"xzt\",\n concatenate=True,\n dtype=float,\n ).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_II_test_blockwise_1_in_shape_II.da_blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_II_test_blockwise_1_in_shape_II.da_blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 158, "end_line": 172, "span_ids": ["test_blockwise_1_in_shape_II"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_1_in_shape_II():\n def test_f(a, b):\n assert 1 in b.shape\n\n p, k, N = 7, 2, 5\n da.blockwise(\n test_f,\n \"x\",\n da.zeros((2 * p, 9, k * N, 8), chunks=(p, 9, k, 4)),\n \"xztu\",\n da.zeros((2 * p, 9, 1, 8), chunks=(p, 9, -1, 4)),\n \"xztu\",\n concatenate=True,\n dtype=float,\n ).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_III_test_concatenate3_on_scalars.assert_eq_concatenate3_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_1_in_shape_III_test_concatenate3_on_scalars.assert_eq_concatenate3_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 175, "end_line": 193, "span_ids": ["test_concatenate3_on_scalars", "test_blockwise_1_in_shape_III"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_1_in_shape_III():\n def test_f(a, b):\n assert 1 in b.shape\n\n k, N = 2, 5\n da.blockwise(\n test_f,\n \"x\",\n da.zeros((k * N, 9, 8), chunks=(k, 3, 4)),\n \"xtu\",\n da.zeros((1, 9, 8), chunks=(-1, 3, 4)),\n \"xtu\",\n concatenate=True,\n dtype=float,\n ).compute()\n\n\ndef test_concatenate3_on_scalars():\n assert_eq(concatenate3([1, 2]), np.array([1, 2]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_dot_product_test_chunked_dot_product.assert_eq_np_dot_x_o_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_dot_product_test_chunked_dot_product.assert_eq_np_dot_x_o_c", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 196, "end_line": 212, "span_ids": ["test_chunked_dot_product"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_chunked_dot_product():\n x = np.arange(400).reshape((20, 20))\n o = np.ones((20, 20))\n\n d = {\"x\": x, \"o\": o}\n\n getx = getem(\"x\", (5, 5), shape=(20, 20))\n geto = getem(\"o\", (5, 5), shape=(20, 20))\n\n result = top(\n dotmany, \"out\", \"ik\", \"x\", \"ij\", \"o\", \"jk\", numblocks={\"x\": (4, 4), \"o\": (4, 4)}\n )\n\n dsk = merge(d, getx, geto, result)\n out = dask.get(dsk, [[(\"out\", i, j) for j in range(4)] for i in range(4)])\n\n assert_eq(np.dot(x, o), concatenate3(out))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_transpose_plus_one_test_chunked_transpose_plus_one.assert_eq_concatenate3_ou": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunked_transpose_plus_one_test_chunked_transpose_plus_one.assert_eq_concatenate3_ou", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 215, "end_line": 228, "span_ids": ["test_chunked_transpose_plus_one"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_chunked_transpose_plus_one():\n x = np.arange(400).reshape((20, 20))\n\n d = {\"x\": x}\n\n getx = getem(\"x\", (5, 5), shape=(20, 20))\n\n f = lambda x: x.T + 1\n comp = top(f, \"out\", \"ij\", \"x\", \"ji\", numblocks={\"x\": (4, 4)})\n\n dsk = merge(d, getx, comp)\n out = dask.get(dsk, [[(\"out\", i, j) for j in range(4)] for i in range(4)])\n\n assert_eq(concatenate3(out), x.T + 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_dimensions_works_with_singleton_dimensions_test_broadcast_dimensions.assert_broadcast_dimensio": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_dimensions_works_with_singleton_dimensions_test_broadcast_dimensions.assert_broadcast_dimensio", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 231, "end_line": 240, "span_ids": ["test_broadcast_dimensions", "test_broadcast_dimensions_works_with_singleton_dimensions"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_dimensions_works_with_singleton_dimensions():\n argpairs = [(\"x\", \"i\")]\n numblocks = {\"x\": ((1,),)}\n assert broadcast_dimensions(argpairs, numblocks) == {\"i\": (1,)}\n\n\ndef test_broadcast_dimensions():\n argpairs = [(\"x\", \"ij\"), (\"y\", \"ij\")]\n d = {\"x\": (\"Hello\", 1), \"y\": (1, (2, 3))}\n assert broadcast_dimensions(argpairs, d) == {\"i\": \"Hello\", \"j\": (2, 3)}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_test_Array.with_pytest_raises_TypeEr.Array_dsk_name_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_test_Array.with_pytest_raises_TypeEr.Array_dsk_name_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 243, "end_line": 263, "span_ids": ["test_Array"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_Array():\n shape = (1000, 1000)\n chunks = (100, 100)\n name = \"x\"\n dsk = merge({name: \"some-array\"}, getem(name, chunks, shape=shape))\n a = Array(dsk, name, chunks, shape=shape, dtype=\"f8\")\n\n assert a.numblocks == (10, 10)\n\n assert a.__dask_keys__() == [[(\"x\", i, j) for j in range(10)] for i in range(10)]\n\n assert a.chunks == ((100,) * 10, (100,) * 10)\n\n assert a.shape == shape\n\n assert len(a) == shape[0]\n\n with pytest.raises(ValueError):\n Array(dsk, name, chunks, shape=shape)\n with pytest.raises(TypeError):\n Array(dsk, name, chunks, shape=shape, dtype=\"f8\", meta=np.empty(0, 0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_test_numblocks_suppoorts_singleton_block_dims.assert_set_concat_a___das": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_test_numblocks_suppoorts_singleton_block_dims.assert_set_concat_a___das", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 266, "end_line": 278, "span_ids": ["test_numblocks_suppoorts_singleton_block_dims", "test_uneven_chunks"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_uneven_chunks():\n a = Array({}, \"x\", chunks=(3, 3), shape=(10, 10), dtype=\"f8\")\n assert a.chunks == ((3, 3, 3, 1), (3, 3, 3, 1))\n\n\ndef test_numblocks_suppoorts_singleton_block_dims():\n shape = (100, 10)\n chunks = (10, 10)\n name = \"x\"\n dsk = merge({name: \"some-array\"}, getem(name, shape=shape, chunks=chunks))\n a = Array(dsk, name, chunks, shape=shape, dtype=\"f8\")\n\n assert set(concat(a.__dask_keys__())) == {(\"x\", i, 0) for i in range(10)}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_keys_test_keys.assert_d___dask_keys___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_keys_test_keys.assert_d___dask_keys___", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 281, "end_line": 292, "span_ids": ["test_keys"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_keys():\n dsk = dict(((\"x\", i, j), ()) for i in range(5) for j in range(6))\n dx = Array(dsk, \"x\", chunks=(10, 10), shape=(50, 60), dtype=\"f8\")\n assert dx.__dask_keys__() == [[(dx.name, i, j) for j in range(6)] for i in range(5)]\n # Cache works\n assert dx.__dask_keys__() is dx.__dask_keys__()\n # Test mutating names clears key cache\n dx.dask = {(\"y\", i, j): () for i in range(5) for j in range(6)}\n dx.name = \"y\"\n assert dx.__dask_keys__() == [[(dx.name, i, j) for j in range(6)] for i in range(5)]\n d = Array({}, \"x\", (), shape=(), dtype=\"f8\")\n assert d.__dask_keys__() == [(\"x\",)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_computation_test_Array_numpy_gufunc_call__array_ufunc__01.assert_eq_ny_vy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_computation_test_Array_numpy_gufunc_call__array_ufunc__01.assert_eq_ny_vy_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 295, "end_line": 312, "span_ids": ["test_Array_computation", "test_Array_numpy_gufunc_call__array_ufunc__01"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_Array_computation():\n a = Array({(\"x\", 0, 0): np.eye(3)}, \"x\", shape=(3, 3), chunks=(3, 3), dtype=\"f8\")\n assert_eq(np.array(a), np.eye(3))\n assert isinstance(a.compute(), np.ndarray)\n assert float(a[0, 0]) == 1\n\n\n@pytest.mark.skipif(\n LooseVersion(np.__version__) < \"1.14.0\",\n reason=\"NumPy doesn't have `np.linalg._umath_linalg` yet\",\n)\ndef test_Array_numpy_gufunc_call__array_ufunc__01():\n x = da.random.normal(size=(3, 10, 10), chunks=(2, 10, 10))\n nx = x.compute()\n ny = np.linalg._umath_linalg.inv(nx)\n y = np.linalg._umath_linalg.inv(x, output_dtypes=float)\n vy = y.compute()\n assert_eq(ny, vy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_numpy_gufunc_call__array_ufunc__02_test_Array_numpy_gufunc_call__array_ufunc__02.assert_eq_nv_vv_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_Array_numpy_gufunc_call__array_ufunc__02_test_Array_numpy_gufunc_call__array_ufunc__02.assert_eq_nv_vv_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 315, "end_line": 327, "span_ids": ["test_Array_numpy_gufunc_call__array_ufunc__02"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n LooseVersion(np.__version__) < \"1.14.0\",\n reason=\"NumPy doesn't have `np.linalg._umath_linalg` yet\",\n)\ndef test_Array_numpy_gufunc_call__array_ufunc__02():\n x = da.random.normal(size=(3, 10, 10), chunks=(2, 10, 10))\n nx = x.compute()\n nw, nv = np.linalg._umath_linalg.eig(nx)\n w, v = np.linalg._umath_linalg.eig(x, output_dtypes=(float, float))\n vw = w.compute()\n vv = v.compute()\n assert_eq(nw, vw)\n assert_eq(nv, vv)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_test_stack.assert_stack_a_b_c_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_test_stack.assert_stack_a_b_c_a", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 330, "end_line": 374, "span_ids": ["test_stack"], "tokens": 668}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stack():\n a, b, c = [\n Array(\n getem(name, chunks=(2, 3), shape=(4, 6)),\n name,\n chunks=(2, 3),\n dtype=\"f8\",\n shape=(4, 6),\n )\n for name in \"ABC\"\n ]\n\n s = stack([a, b, c], axis=0)\n\n colon = slice(None, None, None)\n\n assert s.shape == (3, 4, 6)\n assert s.chunks == ((1, 1, 1), (2, 2), (3, 3))\n assert s.chunksize == (1, 2, 3)\n assert s.dask[(s.name, 0, 1, 0)] == (getitem, (\"A\", 1, 0), (None, colon, colon))\n assert s.dask[(s.name, 2, 1, 0)] == (getitem, (\"C\", 1, 0), (None, colon, colon))\n assert same_keys(s, stack([a, b, c], axis=0))\n\n s2 = stack([a, b, c], axis=1)\n assert s2.shape == (4, 3, 6)\n assert s2.chunks == ((2, 2), (1, 1, 1), (3, 3))\n assert s2.chunksize == (2, 1, 3)\n assert s2.dask[(s2.name, 0, 1, 0)] == (getitem, (\"B\", 0, 0), (colon, None, colon))\n assert s2.dask[(s2.name, 1, 1, 0)] == (getitem, (\"B\", 1, 0), (colon, None, colon))\n assert same_keys(s2, stack([a, b, c], axis=1))\n\n s2 = stack([a, b, c], axis=2)\n assert s2.shape == (4, 6, 3)\n assert s2.chunks == ((2, 2), (3, 3), (1, 1, 1))\n assert s2.chunksize == (2, 3, 1)\n assert s2.dask[(s2.name, 0, 1, 0)] == (getitem, (\"A\", 0, 1), (colon, colon, None))\n assert s2.dask[(s2.name, 1, 1, 2)] == (getitem, (\"C\", 1, 1), (colon, colon, None))\n assert same_keys(s2, stack([a, b, c], axis=2))\n\n pytest.raises(ValueError, lambda: stack([]))\n pytest.raises(ValueError, lambda: stack([a, b, c], axis=3))\n\n assert set(b.dask.keys()).issubset(s2.dask.keys())\n\n assert stack([a, b, c], axis=-1).chunks == stack([a, b, c], axis=2).chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_zero_size_test_stack_rechunk.assert_eq_z_np_stack_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_zero_size_test_stack_rechunk.assert_eq_z_np_stack_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 377, "end_line": 421, "span_ids": ["test_short_stack", "test_stack_rechunk", "test_stack_zero_size", "test_stack_scalars", "test_stack_promote_type"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stack_zero_size():\n x = np.empty((2, 0, 3))\n y = da.from_array(x, chunks=1)\n\n result_np = np.concatenate([x, x])\n result_da = da.concatenate([y, y])\n\n assert_eq(result_np, result_da)\n\n\ndef test_short_stack():\n x = np.array([1])\n d = da.from_array(x, chunks=(1,))\n s = da.stack([d])\n assert s.shape == (1, 1)\n chunks = compute_as_if_collection(Array, s.dask, s.__dask_keys__())\n assert chunks[0][0].shape == (1, 1)\n\n\ndef test_stack_scalars():\n d = da.arange(4, chunks=2)\n\n s = da.stack([d.mean(), d.sum()])\n\n assert s.compute().tolist() == [np.arange(4).mean(), np.arange(4).sum()]\n\n\ndef test_stack_promote_type():\n i = np.arange(10, dtype=\"i4\")\n f = np.arange(10, dtype=\"f4\")\n di = da.from_array(i, chunks=5)\n df = da.from_array(f, chunks=5)\n res = da.stack([di, df])\n assert_eq(res, np.stack([i, f]))\n\n\ndef test_stack_rechunk():\n x = da.random.random(10, chunks=5)\n y = da.random.random(10, chunks=4)\n\n z = da.stack([x, y], axis=0)\n assert z.shape == (2, 10)\n assert z.chunks == ((1, 1), (4, 1, 3, 2))\n\n assert_eq(z, np.stack([x.compute(), y.compute()], axis=0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_unknown_chunksizes_test_stack_unknown_chunksizes.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_unknown_chunksizes_test_stack_unknown_chunksizes.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 424, "end_line": 458, "span_ids": ["test_stack_unknown_chunksizes"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stack_unknown_chunksizes():\n dd = pytest.importorskip(\"dask.dataframe\")\n pd = pytest.importorskip(\"pandas\")\n\n a_df = pd.DataFrame({\"x\": np.arange(12)})\n b_df = pd.DataFrame({\"y\": np.arange(12) * 10})\n\n a_ddf = dd.from_pandas(a_df, sort=False, npartitions=3)\n b_ddf = dd.from_pandas(b_df, sort=False, npartitions=3)\n\n a_x = a_ddf.values\n b_x = b_ddf.values\n\n assert np.isnan(a_x.shape[0])\n assert np.isnan(b_x.shape[0])\n\n with pytest.raises(ValueError) as exc_info:\n da.stack([a_x, b_x], axis=0)\n\n assert \"shape\" in str(exc_info.value)\n assert \"nan\" in str(exc_info.value)\n\n c_x = da.stack([a_x, b_x], axis=0, allow_unknown_chunksizes=True)\n\n assert_eq(c_x, np.stack([a_df.values, b_df.values], axis=0))\n\n with pytest.raises(ValueError) as exc_info:\n da.stack([a_x, b_x], axis=1)\n\n assert \"shape\" in str(exc_info.value)\n assert \"nan\" in str(exc_info.value)\n\n c_x = da.stack([a_x, b_x], axis=1, allow_unknown_chunksizes=True)\n\n assert_eq(c_x, np.stack([a_df.values, b_df.values], axis=1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_test_concatenate.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_test_concatenate.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 461, "end_line": 503, "span_ids": ["test_concatenate"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_concatenate():\n a, b, c = [\n Array(\n getem(name, chunks=(2, 3), shape=(4, 6)),\n name,\n chunks=(2, 3),\n dtype=\"f8\",\n shape=(4, 6),\n )\n for name in \"ABC\"\n ]\n\n x = concatenate([a, b, c], axis=0)\n\n assert x.shape == (12, 6)\n assert x.chunks == ((2, 2, 2, 2, 2, 2), (3, 3))\n assert x.dask[(x.name, 0, 1)] == (\"A\", 0, 1)\n assert x.dask[(x.name, 5, 0)] == (\"C\", 1, 0)\n assert same_keys(x, concatenate([a, b, c], axis=0))\n\n y = concatenate([a, b, c], axis=1)\n\n assert y.shape == (4, 18)\n assert y.chunks == ((2, 2), (3, 3, 3, 3, 3, 3))\n assert y.dask[(y.name, 1, 0)] == (\"A\", 1, 0)\n assert y.dask[(y.name, 1, 5)] == (\"C\", 1, 1)\n assert same_keys(y, concatenate([a, b, c], axis=1))\n\n assert set(b.dask.keys()).issubset(y.dask.keys())\n\n z = concatenate([a], axis=0)\n\n assert z.shape == a.shape\n assert z.chunks == a.chunks\n assert z.dask == a.dask\n assert z is a\n\n assert (\n concatenate([a, b, c], axis=-1).chunks == concatenate([a, b, c], axis=1).chunks\n )\n\n pytest.raises(ValueError, lambda: concatenate([]))\n pytest.raises(ValueError, lambda: concatenate([a, b, c], axis=2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_types_test_concatenate_types.assert_x_dtype_dt_out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_types_test_concatenate_types.assert_x_dtype_dt_out", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 506, "end_line": 515, "span_ids": ["test_concatenate_types"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dtypes\", [((\">f8\", \">f8\"), \"float64\"), ((\" 5\n with pytest.warns(None): # ZeroDivisionWarning\n assert_eq(expr, (3 / x * y) ** 2 > 5)\n\n with pytest.warns(None): # OverflowWarning\n c = da.exp(a)\n assert_eq(c, np.exp(x))\n\n assert_eq(abs(-a), a)\n assert_eq(a, +x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_operator_dtype_promotion_test_field_access.assert_same_keys_y_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_operator_dtype_promotion_test_field_access.assert_same_keys_y_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 931, "end_line": 946, "span_ids": ["test_operator_dtype_promotion", "test_field_access"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_operator_dtype_promotion():\n x = np.arange(10, dtype=np.float32)\n y = np.array([1])\n a = from_array(x, chunks=(5,))\n\n assert_eq(x + 1, a + 1) # still float32\n assert_eq(x + 1e50, a + 1e50) # now float64\n assert_eq(x + y, a + y) # also float64\n\n\ndef test_field_access():\n x = np.array([(1, 1.0), (2, 2.0)], dtype=[(\"a\", \"i4\"), (\"b\", \"f4\")])\n y = from_array(x, chunks=(1,))\n assert_eq(y[\"a\"], x[\"a\"])\n assert_eq(y[[\"b\", \"a\"]], x[[\"b\", \"a\"]])\n assert same_keys(y[[\"b\", \"a\"]], y[[\"b\", \"a\"]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_field_access_with_shape_test_field_access_with_shape.assert_eq_x_col1_col": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_field_access_with_shape_test_field_access_with_shape.assert_eq_x_col1_col", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 949, "end_line": 956, "span_ids": ["test_field_access_with_shape"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_field_access_with_shape():\n dtype = [(\"col1\", (\"f4\", (3, 2))), (\"col2\", (\"f4\", 3))]\n data = np.ones((100, 50), dtype=dtype)\n x = da.from_array(data, 10)\n assert_eq(x[\"col1\"], data[\"col1\"])\n assert_eq(x[[\"col1\"]], data[[\"col1\"]])\n assert_eq(x[\"col2\"], data[\"col2\"])\n assert_eq(x[[\"col1\", \"col2\"]], data[[\"col1\", \"col2\"]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_test_matmul.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_test_matmul.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 959, "end_line": 973, "span_ids": ["test_matmul"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_matmul():\n x = np.random.random((5, 5))\n y = np.random.random((5, 2))\n a = from_array(x, chunks=(1, 5))\n b = from_array(y, chunks=(5, 1))\n assert_eq(operator.matmul(a, b), a.dot(b))\n assert_eq(operator.matmul(a, b), operator.matmul(x, y))\n assert_eq(operator.matmul(a, y), operator.matmul(x, b))\n list_vec = list(range(1, 6))\n assert_eq(operator.matmul(list_vec, b), operator.matmul(list_vec, y))\n assert_eq(operator.matmul(x, list_vec), operator.matmul(a, list_vec))\n z = np.random.random((5, 5, 5))\n c = from_array(z, chunks=(1, 5, 1))\n assert_eq(operator.matmul(a, z), operator.matmul(x, c))\n assert_eq(operator.matmul(z, a), operator.matmul(c, x))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_array_ufunc_test_T.assert_eq_x_T_a_T_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_matmul_array_ufunc_test_T.assert_eq_x_T_a_T_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 976, "end_line": 990, "span_ids": ["test_matmul_array_ufunc", "test_T"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_matmul_array_ufunc():\n # regression test for https://github.com/dask/dask/issues/4353\n x = np.random.random((5, 5))\n y = np.random.random((5, 2))\n a = from_array(x, chunks=(1, 5))\n b = from_array(y, chunks=(5, 1))\n result = b.__array_ufunc__(np.matmul, \"__call__\", a, b)\n assert_eq(result, x.dot(y))\n\n\ndef test_T():\n x = np.arange(400).reshape((20, 20))\n a = from_array(x, chunks=(5, 5))\n\n assert_eq(x.T, a.T)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_test_broadcast_to.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_test_broadcast_to.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 993, "end_line": 1007, "span_ids": ["test_broadcast_to"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_to():\n x = np.random.randint(10, size=(5, 1, 6))\n a = from_array(x, chunks=(3, 1, 3))\n\n for shape in [a.shape, (5, 0, 6), (5, 4, 6), (2, 5, 1, 6), (3, 4, 5, 4, 6)]:\n xb = np.broadcast_to(x, shape)\n ab = broadcast_to(a, shape)\n\n assert_eq(xb, ab)\n\n if a.shape == ab.shape:\n assert a is ab\n\n pytest.raises(ValueError, lambda: broadcast_to(a, (2, 1, 6)))\n pytest.raises(ValueError, lambda: broadcast_to(a, (3,)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_array_test_broadcast_to_scalar.for_shape_in_tuple_0.assert_eq_a_d_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_array_test_broadcast_to_scalar.for_shape_in_tuple_0.assert_eq_a_d_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1010, "end_line": 1027, "span_ids": ["test_broadcast_to_scalar", "test_broadcast_to_array"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_to_array():\n x = np.random.randint(10, size=(5, 1, 6))\n\n for shape in [(5, 0, 6), (5, 4, 6), (2, 5, 1, 6), (3, 4, 5, 4, 6)]:\n a = np.broadcast_to(x, shape)\n d = broadcast_to(x, shape)\n\n assert_eq(a, d)\n\n\ndef test_broadcast_to_scalar():\n x = 5\n\n for shape in [tuple(), (0,), (2, 3), (5, 4, 6), (2, 5, 1, 6), (3, 4, 5, 4, 6)]:\n a = np.broadcast_to(x, shape)\n d = broadcast_to(x, shape)\n\n assert_eq(a, d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_chunks_test_broadcast_to_chunks.None_3.broadcast_to_a_5_2_6_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_to_chunks_test_broadcast_to_chunks.None_3.broadcast_to_a_5_2_6_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1030, "end_line": 1049, "span_ids": ["test_broadcast_to_chunks"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_to_chunks():\n x = np.random.randint(10, size=(5, 1, 6))\n a = from_array(x, chunks=(3, 1, 3))\n\n for shape, chunks, expected_chunks in [\n ((5, 3, 6), (3, -1, 3), ((3, 2), (3,), (3, 3))),\n ((5, 3, 6), (3, 1, 3), ((3, 2), (1, 1, 1), (3, 3))),\n ((2, 5, 3, 6), (1, 3, 1, 3), ((1, 1), (3, 2), (1, 1, 1), (3, 3))),\n ]:\n xb = np.broadcast_to(x, shape)\n ab = broadcast_to(a, shape, chunks=chunks)\n assert_eq(xb, ab)\n assert ab.chunks == expected_chunks\n\n with pytest.raises(ValueError):\n broadcast_to(a, a.shape, chunks=((2, 3), (1,), (3, 3)))\n with pytest.raises(ValueError):\n broadcast_to(a, a.shape, chunks=((3, 2), (3,), (3, 3)))\n with pytest.raises(ValueError):\n broadcast_to(a, (5, 2, 6), chunks=((3, 2), (3,), (3, 3)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_arrays_test_broadcast_arrays_uneven_chunks.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_arrays_test_broadcast_arrays_uneven_chunks.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1052, "end_line": 1085, "span_ids": ["test_broadcast_arrays", "test_broadcast_arrays_uneven_chunks"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_arrays():\n assert np.broadcast_arrays() == da.broadcast_arrays()\n\n a = np.arange(4)\n d_a = da.from_array(a, chunks=tuple(s // 2 for s in a.shape))\n\n a_0 = np.arange(4)[None, :]\n a_1 = np.arange(4)[:, None]\n\n d_a_0 = d_a[None, :]\n d_a_1 = d_a[:, None]\n\n a_r = np.broadcast_arrays(a_0, a_1)\n d_r = da.broadcast_arrays(d_a_0, d_a_1)\n\n assert isinstance(d_r, list)\n assert len(a_r) == len(d_r)\n\n for e_a_r, e_d_r in zip(a_r, d_r):\n assert_eq(e_a_r, e_d_r)\n\n\ndef test_broadcast_arrays_uneven_chunks():\n x = da.ones(30, chunks=(3,))\n y = da.ones(30, chunks=(5,))\n z = np.broadcast_arrays(x, y)\n\n assert_eq(z, z)\n\n x = da.ones((1, 30), chunks=(1, 3))\n y = da.ones(30, chunks=(5,))\n z = np.broadcast_arrays(x, y)\n\n assert_eq(z, z)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_operator_test_broadcast_operator.assert_eq_w_d_w_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_operator_test_broadcast_operator.assert_eq_w_d_w_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1088, "end_line": 1110, "span_ids": ["test_broadcast_operator"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"u_shape, v_shape\",\n [\n [tuple(), (2, 3)],\n [(1,), (2, 3)],\n [(1, 1), (2, 3)],\n [(0, 3), (1, 3)],\n [(2, 0), (2, 1)],\n [(1, 0), (2, 1)],\n [(0, 1), (1, 3)],\n ],\n)\ndef test_broadcast_operator(u_shape, v_shape):\n u = np.random.random(u_shape)\n v = np.random.random(v_shape)\n\n d_u = from_array(u, chunks=1)\n d_v = from_array(v, chunks=1)\n\n w = u * v\n d_w = d_u * d_v\n\n assert_eq(w, d_w)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_test_reshape.assert_eq_xr_ar_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_test_reshape.assert_eq_xr_ar_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1113, "end_line": 1163, "span_ids": ["test_reshape"], "tokens": 777}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"original_shape,new_shape,chunks\",\n [\n ((10,), (10,), (3, 3, 4)),\n ((10,), (10, 1, 1), 5),\n ((10,), (1, 10), 5),\n ((24,), (2, 3, 4), 12),\n ((1, 24), (2, 3, 4), 12),\n ((2, 3, 4), (24,), (1, 3, 4)),\n ((2, 3, 4), (24,), 4),\n ((2, 3, 4), (24, 1), 4),\n ((2, 3, 4), (1, 24), 4),\n ((4, 4, 1), (4, 4), 2),\n ((4, 4), (4, 4, 1), 2),\n ((1, 4, 4), (4, 4), 2),\n ((1, 4, 4), (4, 4, 1), 2),\n ((1, 4, 4), (1, 1, 4, 4), 2),\n ((4, 4), (1, 4, 4, 1), 2),\n ((4, 4), (1, 4, 4), 2),\n ((2, 3), (2, 3), (1, 2)),\n ((2, 3), (3, 2), 3),\n ((4, 2, 3), (4, 6), 4),\n ((3, 4, 5, 6), (3, 4, 5, 6), (2, 3, 4, 5)),\n ((), (1,), 1),\n ((1,), (), 1),\n ((24,), (3, 8), 24),\n ((24,), (4, 6), 6),\n ((24,), (4, 3, 2), 6),\n ((24,), (4, 6, 1), 6),\n ((24,), (4, 6), (6, 12, 6)),\n ((64, 4), (8, 8, 4), (16, 2)),\n ((4, 64), (4, 8, 4, 2), (2, 16)),\n ((4, 8, 4, 2), (2, 1, 2, 32, 2), (2, 4, 2, 2)),\n ((4, 1, 4), (4, 4), (2, 1, 2)),\n ((0, 10), (0, 5, 2), (5, 5)),\n ((5, 0, 2), (0, 10), (5, 2, 2)),\n ((0,), (2, 0, 2), (4,)),\n ((2, 0, 2), (0,), (4, 4, 4)),\n ],\n)\ndef test_reshape(original_shape, new_shape, chunks):\n x = np.random.randint(10, size=original_shape)\n a = from_array(x, chunks=chunks)\n\n xr = x.reshape(new_shape)\n ar = a.reshape(new_shape)\n\n if a.shape == new_shape:\n assert a is ar\n\n assert_eq(xr, ar)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_exceptions_test_reshape_fails_for_dask_only.for_original_shape_new_s.with_pytest_raises_ValueE.da_reshape_a_new_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_exceptions_test_reshape_fails_for_dask_only.for_original_shape_new_s.with_pytest_raises_ValueE.da_reshape_a_new_shape_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1166, "end_line": 1185, "span_ids": ["test_reshape_fails_for_dask_only", "test_reshape_splat", "test_reshape_exceptions"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reshape_exceptions():\n x = np.random.randint(10, size=(5,))\n a = from_array(x, chunks=(2,))\n with pytest.raises(ValueError):\n da.reshape(a, (100,))\n\n\ndef test_reshape_splat():\n x = da.ones((5, 5), chunks=(2, 2))\n assert_eq(x.reshape((25,)), x.reshape(25))\n\n\ndef test_reshape_fails_for_dask_only():\n cases = [((3, 4), (4, 3), 2)]\n for original_shape, new_shape, chunks in cases:\n x = np.random.randint(10, size=original_shape)\n a = from_array(x, chunks=chunks)\n assert x.reshape(new_shape).shape == new_shape\n with pytest.raises(ValueError):\n da.reshape(a, new_shape)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_unknown_dimensions_test_full.assert_eq_d_np_full_3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_reshape_unknown_dimensions_test_full.assert_eq_d_np_full_3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1188, "end_line": 1201, "span_ids": ["test_reshape_unknown_dimensions", "test_full"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reshape_unknown_dimensions():\n for original_shape in [(24,), (2, 12), (2, 3, 4)]:\n for new_shape in [(-1,), (2, -1), (-1, 3, 4)]:\n x = np.random.randint(10, size=original_shape)\n a = from_array(x, 24)\n assert_eq(x.reshape(new_shape), a.reshape(new_shape))\n\n pytest.raises(ValueError, lambda: da.reshape(a, (-1, -1)))\n\n\ndef test_full():\n d = da.full((3, 4), 2, chunks=((2, 1), (2, 2)))\n assert d.chunks == ((2, 1), (2, 2))\n assert_eq(d, np.full((3, 4), 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_test_map_blocks.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_test_map_blocks.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1204, "end_line": 1229, "span_ids": ["test_map_blocks"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks():\n x = np.arange(400).reshape((20, 20))\n d = from_array(x, chunks=(7, 7))\n\n e = d.map_blocks(inc, dtype=d.dtype)\n\n assert d.chunks == e.chunks\n assert_eq(e, x + 1)\n\n e = d.map_blocks(inc, name=\"increment\")\n assert e.name.startswith(\"increment-\")\n\n assert d.map_blocks(inc, name=\"foo\").name != d.map_blocks(dec, name=\"foo\").name\n\n d = from_array(x, chunks=(10, 10))\n e = d.map_blocks(lambda x: x[::2, ::2], chunks=(5, 5), dtype=d.dtype)\n\n assert e.chunks == ((5, 5), (5, 5))\n assert_eq(e, x[::2, ::2])\n\n d = from_array(x, chunks=(8, 8))\n e = d.map_blocks(\n lambda x: x[::2, ::2], chunks=((4, 4, 2), (4, 4, 2)), dtype=d.dtype\n )\n\n assert_eq(e, x[::2, ::2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks2_test_map_blocks2.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks2_test_map_blocks2.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1232, "end_line": 1249, "span_ids": ["test_map_blocks2"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks2():\n x = np.arange(10, dtype=\"i8\")\n d = from_array(x, chunks=(2,))\n\n def func(block, block_id=None, c=0):\n return np.ones_like(block) * sum(block_id) + c\n\n out = d.map_blocks(func, dtype=\"i8\")\n expected = np.array([0, 0, 1, 1, 2, 2, 3, 3, 4, 4], dtype=\"i8\")\n\n assert_eq(out, expected)\n assert same_keys(d.map_blocks(func, dtype=\"i8\"), out)\n\n out = d.map_blocks(func, dtype=\"i8\", c=1)\n expected = expected + 1\n\n assert_eq(out, expected)\n assert same_keys(d.map_blocks(func, dtype=\"i8\", c=1), out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_test_map_blocks_block_info.assert_eq_z_x_x_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_test_map_blocks_block_info.assert_eq_z_x_x_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1252, "end_line": 1271, "span_ids": ["test_map_blocks_block_info"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_block_info():\n x = da.arange(50, chunks=10)\n\n def func(a, b, c, block_info=None):\n for idx in [0, 2, None]: # positions in args\n assert block_info[idx][\"shape\"] == (50,)\n assert block_info[idx][\"num-chunks\"] == (5,)\n start, stop = block_info[idx][\"array-location\"][0]\n assert stop - start == 10\n assert 0 <= start <= 40\n assert 10 <= stop <= 50\n\n assert 0 <= block_info[idx][\"chunk-location\"][0] <= 4\n assert block_info[None][\"chunk-shape\"] == (10,)\n assert block_info[None][\"dtype\"] == x.dtype\n\n return a + b + c\n\n z = da.map_blocks(func, x, 100, x + 1, dtype=x.dtype)\n assert_eq(z, x + x + 1 + 100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_new_axis_test_map_blocks_block_info_with_new_axis.assert_eq_z_np_ones_4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_new_axis_test_map_blocks_block_info_with_new_axis.assert_eq_z_np_ones_4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1274, "end_line": 1301, "span_ids": ["test_map_blocks_block_info_with_new_axis"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_block_info_with_new_axis():\n # https://github.com/dask/dask/issues/4298\n values = da.from_array(np.array([\"a\", \"a\", \"b\", \"c\"]), 2)\n\n def func(x, block_info=None):\n assert set(block_info.keys()) == {0, None}\n assert block_info[0][\"shape\"] == (4,)\n assert block_info[0][\"num-chunks\"] == (2,)\n assert block_info[None][\"shape\"] == (4, 3)\n assert block_info[None][\"num-chunks\"] == (2, 1)\n assert block_info[None][\"chunk-shape\"] == (2, 3)\n assert block_info[None][\"dtype\"] == np.dtype(\"f8\")\n\n assert block_info[0][\"chunk-location\"] in {(0,), (1,)}\n\n if block_info[0][\"chunk-location\"] == (0,):\n assert block_info[0][\"array-location\"] == [(0, 2)]\n assert block_info[None][\"chunk-location\"] == (0, 0)\n assert block_info[None][\"array-location\"] == [(0, 2), (0, 3)]\n elif block_info[0][\"chunk-location\"] == (1,):\n assert block_info[0][\"array-location\"] == [(2, 4)]\n assert block_info[None][\"chunk-location\"] == (1, 0)\n assert block_info[None][\"array-location\"] == [(2, 4), (0, 3)]\n\n return np.ones((len(x), 3))\n\n z = values.map_blocks(func, chunks=((2, 2), 3), new_axis=1, dtype=\"f8\")\n assert_eq(z, np.ones((4, 3), dtype=\"f8\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_drop_axis_test_map_blocks_block_info_with_drop_axis.assert_eq_z_np_array_7_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_drop_axis_test_map_blocks_block_info_with_drop_axis.assert_eq_z_np_array_7_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1304, "end_line": 1337, "span_ids": ["test_map_blocks_block_info_with_drop_axis"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_block_info_with_drop_axis():\n # https://github.com/dask/dask/issues/4584\n values = da.from_array(\n np.array(\n [[1, 2, 4], [8, 16, 32], [64, 128, 256], [1024, 2048, 4096]], dtype=\"u4\"\n ),\n (2, 1),\n )\n\n def func(x, block_info=None):\n assert set(block_info.keys()) == {0, None}\n assert block_info[0][\"shape\"] == (4, 3)\n # drop_axis concatenates along the dropped dimension, hence not (2, 3)\n assert block_info[0][\"num-chunks\"] == (2, 1)\n assert block_info[None][\"shape\"] == (4,)\n assert block_info[None][\"num-chunks\"] == (2,)\n assert block_info[None][\"chunk-shape\"] == (2,)\n assert block_info[None][\"dtype\"] == np.dtype(\"u4\")\n\n assert block_info[0][\"chunk-location\"] in {(0, 0), (1, 0)}\n\n if block_info[0][\"chunk-location\"] == (0, 0):\n assert block_info[0][\"array-location\"] == [(0, 2), (0, 3)]\n assert block_info[None][\"chunk-location\"] == (0,)\n assert block_info[None][\"array-location\"] == [(0, 2)]\n elif block_info[0][\"chunk-location\"] == (1, 0):\n assert block_info[0][\"array-location\"] == [(2, 4), (0, 3)]\n assert block_info[None][\"chunk-location\"] == (1,)\n assert block_info[None][\"array-location\"] == [(2, 4)]\n\n return np.sum(x, axis=1, dtype=\"u4\")\n\n z = values.map_blocks(func, drop_axis=1, dtype=\"u4\")\n assert_eq(z, np.array([7, 56, 448, 7168], dtype=\"u4\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast_test_map_blocks_block_info_with_broadcast.expected2._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast_test_map_blocks_block_info_with_broadcast.expected2._", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1340, "end_line": 1382, "span_ids": ["test_map_blocks_block_info_with_broadcast"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_block_info_with_broadcast():\n expected0 = [\n {\n \"shape\": (3, 4),\n \"num-chunks\": (1, 2),\n \"array-location\": [(0, 3), (0, 2)],\n \"chunk-location\": (0, 0),\n },\n {\n \"shape\": (3, 4),\n \"num-chunks\": (1, 2),\n \"array-location\": [(0, 3), (2, 4)],\n \"chunk-location\": (0, 1),\n },\n ]\n expected1 = [\n {\n \"shape\": (6, 2),\n \"num-chunks\": (2, 1),\n \"array-location\": [(0, 3), (0, 2)],\n \"chunk-location\": (0, 0),\n },\n {\n \"shape\": (6, 2),\n \"num-chunks\": (2, 1),\n \"array-location\": [(3, 6), (0, 2)],\n \"chunk-location\": (1, 0),\n },\n ]\n expected2 = [\n {\n \"shape\": (4,),\n \"num-chunks\": (2,),\n \"array-location\": [(0, 2)],\n \"chunk-location\": (0,),\n },\n {\n \"shape\": (4,),\n \"num-chunks\": (2,),\n \"array-location\": [(2, 4)],\n \"chunk-location\": (1,),\n },\n ]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast.expected_test_map_blocks_block_info_with_broadcast.assert_eq_d_3_np_ones_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_block_info_with_broadcast.expected_test_map_blocks_block_info_with_broadcast.assert_eq_d_3_np_ones_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1383, "end_line": 1452, "span_ids": ["test_map_blocks_block_info_with_broadcast"], "tokens": 620}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_block_info_with_broadcast():\n # ... other code\n expected = [\n {\n 0: expected0[0],\n 1: expected1[0],\n 2: expected2[0],\n None: {\n \"shape\": (6, 4),\n \"num-chunks\": (2, 2),\n \"dtype\": np.float_,\n \"chunk-shape\": (3, 2),\n \"array-location\": [(0, 3), (0, 2)],\n \"chunk-location\": (0, 0),\n },\n },\n {\n 0: expected0[1],\n 1: expected1[0],\n 2: expected2[1],\n None: {\n \"shape\": (6, 4),\n \"num-chunks\": (2, 2),\n \"dtype\": np.float_,\n \"chunk-shape\": (3, 2),\n \"array-location\": [(0, 3), (2, 4)],\n \"chunk-location\": (0, 1),\n },\n },\n {\n 0: expected0[0],\n 1: expected1[1],\n 2: expected2[0],\n None: {\n \"shape\": (6, 4),\n \"num-chunks\": (2, 2),\n \"dtype\": np.float_,\n \"chunk-shape\": (3, 2),\n \"array-location\": [(3, 6), (0, 2)],\n \"chunk-location\": (1, 0),\n },\n },\n {\n 0: expected0[1],\n 1: expected1[1],\n 2: expected2[1],\n None: {\n \"shape\": (6, 4),\n \"num-chunks\": (2, 2),\n \"dtype\": np.float_,\n \"chunk-shape\": (3, 2),\n \"array-location\": [(3, 6), (2, 4)],\n \"chunk-location\": (1, 1),\n },\n },\n ]\n\n def func(x, y, z, block_info=None):\n for info in expected:\n if block_info[None][\"chunk-location\"] == info[None][\"chunk-location\"]:\n assert block_info == info\n break\n else:\n assert False\n return x + y + z\n\n a = da.ones((3, 4), chunks=(3, 2))\n b = da.ones((6, 2), chunks=(3, 2))\n c = da.ones((4,), chunks=(2,))\n d = da.map_blocks(func, a, b, c, chunks=((3, 3), (2, 2)), dtype=a.dtype)\n assert d.chunks == ((3, 3), (2, 2))\n assert_eq(d, 3 * np.ones((6, 4)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_constants_test_map_blocks_with_kwargs.assert_eq_result_np_arra": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_constants_test_map_blocks_with_kwargs.assert_eq_result_np_arra", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1455, "end_line": 1470, "span_ids": ["test_map_blocks_with_constants", "test_map_blocks_with_kwargs"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_with_constants():\n d = da.arange(10, chunks=3)\n e = d.map_blocks(add, 100, dtype=d.dtype)\n\n assert_eq(e, np.arange(10) + 100)\n\n assert_eq(da.map_blocks(sub, d, 10, dtype=d.dtype), np.arange(10) - 10)\n assert_eq(da.map_blocks(sub, 10, d, dtype=d.dtype), 10 - np.arange(10))\n\n\ndef test_map_blocks_with_kwargs():\n d = da.arange(10, chunks=5)\n\n result = d.map_blocks(np.max, axis=0, keepdims=True, dtype=d.dtype, chunks=(1,))\n\n assert_eq(result, np.array([4, 9]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_chunks_broadcast_test_map_blocks_with_chunks.assert_eq_dz_np_ones_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_chunks_broadcast_test_map_blocks_with_chunks.assert_eq_dz_np_ones_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1473, "end_line": 1485, "span_ids": ["test_map_blocks_infer_chunks_broadcast", "test_map_blocks_with_chunks"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_infer_chunks_broadcast():\n dx = da.from_array([[1, 2, 3, 4]], chunks=((1,), (2, 2)))\n dy = da.from_array([[10, 20], [30, 40]], chunks=((1, 1), (2,)))\n result = da.map_blocks(lambda x, y: x + y, dx, dy)\n assert result.chunks == ((1, 1), (2, 2))\n assert_eq(result, np.array([[11, 22, 13, 24], [31, 42, 33, 44]]))\n\n\ndef test_map_blocks_with_chunks():\n dx = da.ones((5, 3), chunks=(2, 2))\n dy = da.ones((5, 3), chunks=(2, 2))\n dz = da.map_blocks(np.add, dx, dy, chunks=dx.chunks)\n assert_eq(dz, np.ones((5, 3)) * 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_dtype_inference_test_map_blocks_dtype_inference.assert_RuntimeError_in_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_dtype_inference_test_map_blocks_dtype_inference.assert_RuntimeError_in_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1488, "end_line": 1513, "span_ids": ["test_map_blocks_dtype_inference"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_dtype_inference():\n x = np.arange(50).reshape((5, 10))\n y = np.arange(10)\n dx = da.from_array(x, chunks=5)\n dy = da.from_array(y, chunks=5)\n\n def foo(x, *args, **kwargs):\n cast = kwargs.pop(\"cast\", \"i8\")\n return (x + sum(args)).astype(cast)\n\n assert_eq(dx.map_blocks(foo, dy, 1), foo(dx, dy, 1))\n assert_eq(dx.map_blocks(foo, dy, 1, cast=\"f8\"), foo(dx, dy, 1, cast=\"f8\"))\n assert_eq(\n dx.map_blocks(foo, dy, 1, cast=\"f8\", dtype=\"f8\"),\n foo(dx, dy, 1, cast=\"f8\", dtype=\"f8\"),\n )\n\n def foo(x):\n raise RuntimeError(\"Woops\")\n\n with pytest.raises(ValueError) as e:\n dx.map_blocks(foo)\n msg = str(e.value)\n assert msg.startswith(\"`dtype` inference failed\")\n assert \"Please specify the dtype explicitly\" in msg\n assert \"RuntimeError\" in msg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_newaxis_test_map_blocks_no_array_args.assert_eq_x_np_arange_8_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_infer_newaxis_test_map_blocks_no_array_args.assert_eq_x_np_arange_8_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1516, "end_line": 1529, "span_ids": ["test_map_blocks_infer_newaxis", "test_map_blocks_no_array_args"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_infer_newaxis():\n x = da.ones((5, 3), chunks=(2, 2))\n y = da.map_blocks(lambda x: x[None], x, chunks=((1,), (2, 2, 1), (2, 1)))\n assert_eq(y, da.ones((1, 5, 3)))\n\n\ndef test_map_blocks_no_array_args():\n def func(dtype, block_info=None):\n loc = block_info[None][\"array-location\"]\n return np.arange(loc[0][0], loc[0][1], dtype=dtype)\n\n x = da.map_blocks(func, np.float32, chunks=((5, 3),), dtype=np.float32)\n assert x.chunks == ((5, 3),)\n assert_eq(x, np.arange(8, dtype=np.float32))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_optimize_blockwise_test_map_blocks_optimize_blockwise.assert_len_optimized_laye": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_optimize_blockwise_test_map_blocks_optimize_blockwise.assert_len_optimized_laye", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1532, "end_line": 1542, "span_ids": ["test_map_blocks_optimize_blockwise"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", [lambda x, y: x + y, lambda x, y, block_info: x + y])\ndef test_map_blocks_optimize_blockwise(func):\n # Check that map_blocks layers can merge with elementwise layers\n base = [da.full((1,), i, chunks=1) for i in range(4)]\n a = base[0] + base[1]\n b = da.map_blocks(func, a, base[2], dtype=np.int8)\n c = b + base[3]\n dsk = c.__dask_graph__()\n optimized = optimize_blockwise(dsk)\n # The two additions and the map_blocks should be fused together\n assert len(optimized.layers) == len(dsk.layers) - 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_repr_test_dtype._no_shape": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_repr_test_dtype._no_shape", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1545, "end_line": 1594, "span_ids": ["test_repr_meta", "test_dtype", "test_repr", "test_slicing_with_ellipsis", "test_slicing_flexible_type", "test_slicing_with_ndarray"], "tokens": 474}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repr():\n d = da.ones((4, 4), chunks=(2, 2))\n assert key_split(d.name) in repr(d)\n assert str(d.shape) in repr(d)\n assert str(d.dtype) in repr(d)\n d = da.ones((4000, 4), chunks=(4, 2))\n assert len(str(d)) < 1000\n\n\ndef test_repr_meta():\n d = da.ones((4, 4), chunks=(2, 2))\n assert \"chunktype=numpy.ndarray\" in repr(d)\n\n # Test non-numpy meta\n sparse = pytest.importorskip(\"sparse\")\n s = d.map_blocks(sparse.COO)\n assert \"chunktype=sparse.COO\" in repr(s)\n\n\ndef test_slicing_with_ellipsis():\n x = np.arange(256).reshape((4, 4, 4, 4))\n d = da.from_array(x, chunks=((2, 2, 2, 2)))\n\n assert_eq(d[..., 1], x[..., 1])\n assert_eq(d[0, ..., 1], x[0, ..., 1])\n\n\ndef test_slicing_with_ndarray():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=((4, 4)))\n\n assert_eq(d[np.arange(8)], x)\n assert_eq(d[np.ones(8, dtype=bool)], x)\n assert_eq(d[np.array([1])], x[[1]])\n assert_eq(d[np.array([True, False, True] + [False] * 5)], x[[0, 2]])\n\n\ndef test_slicing_flexible_type():\n a = np.array([[\"a\", \"b\"], [\"c\", \"d\"]])\n b = da.from_array(a, 2)\n\n assert_eq(a[:, 0], b[:, 0])\n\n\ndef test_dtype():\n d = da.ones((4, 4), chunks=(2, 2))\n\n assert d.dtype == d.compute().dtype\n assert (d * 1.0).dtype == (d + 1.0).compute().dtype\n assert d.sum().dtype == d.sum().compute().dtype # no shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockdims_from_blockshape_test_blockdims_from_blockshape.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockdims_from_blockshape_test_blockdims_from_blockshape.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1597, "end_line": 1601, "span_ids": ["test_blockdims_from_blockshape"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockdims_from_blockshape():\n assert blockdims_from_blockshape((10, 10), (4, 3)) == ((4, 4, 2), (3, 3, 3, 1))\n pytest.raises(TypeError, lambda: blockdims_from_blockshape((10,), None))\n assert blockdims_from_blockshape((1e2, 3), [1e1, 3]) == ((10,) * 10, (3,))\n assert blockdims_from_blockshape((np.int8(10),), (5,)) == ((5, 5),)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_coerce_test_bool.with_pytest_raises_ValueE.bool_darr_darr_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_coerce_test_bool.with_pytest_raises_ValueE.bool_darr_darr_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1604, "end_line": 1625, "span_ids": ["test_bool", "test_coerce"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_coerce():\n d0 = da.from_array(np.array(1), chunks=(1,))\n d1 = da.from_array(np.array([1]), chunks=(1,))\n with dask.config.set(scheduler=\"sync\"):\n for d in d0, d1:\n assert bool(d) is True\n assert int(d) == 1\n assert float(d) == 1.0\n assert complex(d) == complex(1)\n\n a2 = np.arange(2)\n d2 = da.from_array(a2, chunks=(2,))\n for func in (int, float, complex):\n pytest.raises(TypeError, lambda: func(d2))\n\n\ndef test_bool():\n arr = np.arange(100).reshape((10, 10))\n darr = da.from_array(arr, chunks=(10, 10))\n with pytest.raises(ValueError):\n bool(darr)\n bool(darr == darr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_kwargs_test_store_kwargs.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_kwargs_test_store_kwargs.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1628, "end_line": 1653, "span_ids": ["test_store_kwargs"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_kwargs():\n d = da.ones((10, 10), chunks=(2, 2))\n a = d + 1\n\n called = [False]\n\n def get_func(*args, **kwargs):\n assert kwargs.pop(\"foo\") == \"test kwarg\"\n r = dask.get(*args, **kwargs)\n called[0] = True\n return r\n\n called[0] = False\n at = np.zeros(shape=(10, 10))\n store([a], [at], scheduler=get_func, foo=\"test kwarg\")\n assert called[0]\n\n called[0] = False\n at = np.zeros(shape=(10, 10))\n a.store(at, scheduler=get_func, foo=\"test kwarg\")\n assert called[0]\n\n called[0] = False\n at = np.zeros(shape=(10, 10))\n store([a], [at], scheduler=get_func, return_stored=True, foo=\"test kwarg\")\n assert called[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_delayed_target_test_store_delayed_target.for_st_compute_in_False_.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_delayed_target_test_store_delayed_target.for_st_compute_in_False_.None_7", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1656, "end_line": 1707, "span_ids": ["test_store_delayed_target"], "tokens": 388}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_delayed_target():\n from dask.delayed import delayed\n\n d = da.ones((4, 4), chunks=(2, 2))\n a, b = d + 1, d + 2\n\n # empty buffers to be used as targets\n targs = {}\n\n def make_target(key):\n a = np.empty((4, 4))\n targs[key] = a\n return a\n\n # delayed calls to these targets\n atd = delayed(make_target)(\"at\")\n btd = delayed(make_target)(\"bt\")\n\n # test not keeping result\n st = store([a, b], [atd, btd])\n\n at = targs[\"at\"]\n bt = targs[\"bt\"]\n\n assert st is None\n assert_eq(at, a)\n assert_eq(bt, b)\n\n # test keeping result\n for st_compute in [False, True]:\n targs.clear()\n\n st = store([a, b], [atd, btd], return_stored=True, compute=st_compute)\n if st_compute:\n assert all(not any(dask.core.get_deps(e.dask)[0].values()) for e in st)\n\n st = dask.compute(*st)\n\n at = targs[\"at\"]\n bt = targs[\"bt\"]\n\n assert st is not None\n assert isinstance(st, tuple)\n assert all([isinstance(v, np.ndarray) for v in st])\n assert_eq(at, a)\n assert_eq(bt, b)\n assert_eq(st[0], a)\n assert_eq(st[1], b)\n\n pytest.raises(ValueError, lambda: store([a], [at, bt]))\n pytest.raises(ValueError, lambda: store(at, at))\n pytest.raises(ValueError, lambda: store([at, bt], [at, bt]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_test_store.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_test_store.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1710, "end_line": 1724, "span_ids": ["test_store"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store():\n d = da.ones((4, 4), chunks=(2, 2))\n a, b = d + 1, d + 2\n\n at = np.empty(shape=(4, 4))\n bt = np.empty(shape=(4, 4))\n\n st = store([a, b], [at, bt])\n assert st is None\n assert (at == 2).all()\n assert (bt == 3).all()\n\n pytest.raises(ValueError, lambda: store([a], [at, bt]))\n pytest.raises(ValueError, lambda: store(at, at))\n pytest.raises(ValueError, lambda: store([at, bt], [at, bt]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions_test_store_regions._Multiple_regions_keep_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions_test_store_regions._Multiple_regions_keep_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1727, "end_line": 1785, "span_ids": ["test_store_regions"], "tokens": 747}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_regions():\n d = da.ones((4, 4, 4), dtype=int, chunks=(2, 2, 2))\n a, b = d + 1, d + 2\n a = a[:, 1:, :].astype(float)\n\n region = (slice(None, None, 2), slice(None), [1, 2, 4, 5])\n\n # Single region:\n at = np.zeros(shape=(8, 3, 6))\n bt = np.zeros(shape=(8, 4, 6))\n v = store([a, b], [at, bt], regions=region, compute=False)\n assert isinstance(v, Delayed)\n assert (at == 0).all() and (bt[region] == 0).all()\n assert all([ev is None for ev in v.compute()])\n assert (at[region] == 2).all() and (bt[region] == 3).all()\n assert not (bt == 3).all() and not (bt == 0).all()\n assert not (at == 2).all() and not (at == 0).all()\n\n # Multiple regions:\n at = np.zeros(shape=(8, 3, 6))\n bt = np.zeros(shape=(8, 4, 6))\n v = store([a, b], [at, bt], regions=[region, region], compute=False)\n assert isinstance(v, Delayed)\n assert (at == 0).all() and (bt[region] == 0).all()\n assert all([ev is None for ev in v.compute()])\n assert (at[region] == 2).all() and (bt[region] == 3).all()\n assert not (bt == 3).all() and not (bt == 0).all()\n assert not (at == 2).all() and not (at == 0).all()\n\n # Single region (keep result):\n for st_compute in [False, True]:\n at = np.zeros(shape=(8, 3, 6))\n bt = np.zeros(shape=(8, 4, 6))\n v = store(\n [a, b], [at, bt], regions=region, compute=st_compute, return_stored=True\n )\n assert isinstance(v, tuple)\n assert all([isinstance(e, da.Array) for e in v])\n if st_compute:\n assert all(not any(dask.core.get_deps(e.dask)[0].values()) for e in v)\n else:\n assert (at == 0).all() and (bt[region] == 0).all()\n\n ar, br = v\n assert ar.dtype == a.dtype\n assert br.dtype == b.dtype\n assert ar.shape == a.shape\n assert br.shape == b.shape\n assert ar.chunks == a.chunks\n assert br.chunks == b.chunks\n\n ar, br = da.compute(ar, br)\n assert (at[region] == 2).all() and (bt[region] == 3).all()\n assert not (bt == 3).all() and not (bt == 0).all()\n assert not (at == 2).all() and not (at == 0).all()\n assert (br == 3).all()\n assert (ar == 2).all()\n\n # Multiple regions (keep result):\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions.None_1_test_store_regions.None_1.assert_ar_2_all_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_regions.None_1_test_store_regions.None_1.assert_ar_2_all_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1786, "end_line": 1816, "span_ids": ["test_store_regions"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_regions():\n # ... other code\n for st_compute in [False, True]:\n at = np.zeros(shape=(8, 3, 6))\n bt = np.zeros(shape=(8, 4, 6))\n v = store(\n [a, b],\n [at, bt],\n regions=[region, region],\n compute=st_compute,\n return_stored=True,\n )\n assert isinstance(v, tuple)\n assert all([isinstance(e, da.Array) for e in v])\n if st_compute:\n assert all(not any(dask.core.get_deps(e.dask)[0].values()) for e in v)\n else:\n assert (at == 0).all() and (bt[region] == 0).all()\n\n ar, br = v\n assert ar.dtype == a.dtype\n assert br.dtype == b.dtype\n assert ar.shape == a.shape\n assert br.shape == b.shape\n assert ar.chunks == a.chunks\n assert br.chunks == b.chunks\n\n ar, br = da.compute(ar, br)\n assert (at[region] == 2).all() and (bt[region] == 3).all()\n assert not (bt == 3).all() and not (bt == 0).all()\n assert not (at == 2).all() and not (at == 0).all()\n assert (br == 3).all()\n assert (ar == 2).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_compute_false_test_store_compute_false.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_compute_false_test_store_compute_false.None_9", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1819, "end_line": 1839, "span_ids": ["test_store_compute_false"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_compute_false():\n d = da.ones((4, 4), chunks=(2, 2))\n a, b = d + 1, d + 2\n\n at = np.zeros(shape=(4, 4))\n bt = np.zeros(shape=(4, 4))\n\n v = store([a, b], [at, bt], compute=False)\n assert isinstance(v, Delayed)\n assert (at == 0).all() and (bt == 0).all()\n assert all([ev is None for ev in v.compute()])\n assert (at == 2).all() and (bt == 3).all()\n\n at = np.zeros(shape=(4, 4))\n bt = np.zeros(shape=(4, 4))\n\n dat, dbt = store([a, b], [at, bt], compute=False, return_stored=True)\n assert isinstance(dat, Array) and isinstance(dbt, Array)\n assert (at == 0).all() and (bt == 0).all()\n assert (dat.compute() == at).all() and (dbt.compute() == bt).all()\n assert (at == 2).all() and (bt == 3).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_nocompute_regions_CounterLock.release.return.self_lock_release_args_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_nocompute_regions_CounterLock.release.return.self_lock_release_args_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1842, "end_line": 1891, "span_ids": ["NonthreadSafeStore.__init__", "CounterLock.acquire", "NonthreadSafeStore.__setitem__", "ThreadSafeStore.__setitem__", "NonthreadSafeStore", "test_store_nocompute_regions", "ThreadSafeStore.__init__", "CounterLock", "CounterLock.release", "ThreadSafetyError", "CounterLock.__init__", "ThreadSafeStore"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_nocompute_regions():\n x = da.ones(10, chunks=1)\n y = np.zeros((2, 10))\n d1 = da.store(x, y, regions=(0,), compute=False)\n d2 = da.store(x, y, regions=(1,), compute=False)\n assert d1.key != d2.key\n\n\nclass ThreadSafetyError(Exception):\n pass\n\n\nclass NonthreadSafeStore(object):\n def __init__(self):\n self.in_use = False\n\n def __setitem__(self, key, value):\n if self.in_use:\n raise ThreadSafetyError()\n self.in_use = True\n time.sleep(0.001)\n self.in_use = False\n\n\nclass ThreadSafeStore(object):\n def __init__(self):\n self.concurrent_uses = 0\n self.max_concurrent_uses = 0\n\n def __setitem__(self, key, value):\n self.concurrent_uses += 1\n self.max_concurrent_uses = max(self.concurrent_uses, self.max_concurrent_uses)\n time.sleep(0.01)\n self.concurrent_uses -= 1\n\n\nclass CounterLock(object):\n def __init__(self, *args, **kwargs):\n self.lock = Lock(*args, **kwargs)\n\n self.acquire_count = 0\n self.release_count = 0\n\n def acquire(self, *args, **kwargs):\n self.acquire_count += 1\n return self.lock.acquire(*args, **kwargs)\n\n def release(self, *args, **kwargs):\n self.release_count += 1\n return self.lock.release(*args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_locks_test_store_locks.for_c_in_False_True_.if_c_.else_.assert_lock_acquire_count": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_locks_test_store_locks.for_c_in_False_True_.if_c_.else_.assert_lock_acquire_count", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1894, "end_line": 1948, "span_ids": ["test_store_locks"], "tokens": 522}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_locks():\n _Lock = type(Lock())\n d = da.ones((10, 10), chunks=(2, 2))\n a, b = d + 1, d + 2\n\n at = np.zeros(shape=(10, 10))\n bt = np.zeros(shape=(10, 10))\n\n lock = Lock()\n v = store([a, b], [at, bt], compute=False, lock=lock)\n assert isinstance(v, Delayed)\n dsk = v.dask\n locks = set(vv for v in dsk.values() for vv in v if isinstance(vv, _Lock))\n assert locks == set([lock])\n\n # Ensure same lock applies over multiple stores\n at = NonthreadSafeStore()\n v = store([a, b], [at, at], lock=lock, scheduler=\"threads\", num_workers=10)\n assert v is None\n\n # Don't assume thread safety by default\n at = NonthreadSafeStore()\n assert store(a, at, scheduler=\"threads\", num_workers=10) is None\n assert a.store(at, scheduler=\"threads\", num_workers=10) is None\n\n # Ensure locks can be removed\n at = ThreadSafeStore()\n for i in range(10):\n st = a.store(at, lock=False, scheduler=\"threads\", num_workers=10)\n assert st is None\n if at.max_concurrent_uses > 1:\n break\n if i == 9:\n assert False\n\n # Verify number of lock calls\n nchunks = np.sum([np.prod([len(c) for c in e.chunks]) for e in [a, b]])\n for c in (False, True):\n at = np.zeros(shape=(10, 10))\n bt = np.zeros(shape=(10, 10))\n lock = CounterLock()\n\n v = store([a, b], [at, bt], lock=lock, compute=c, return_stored=True)\n assert all(isinstance(e, Array) for e in v)\n\n da.compute(v)\n\n # When `return_stored=True` and `compute=False`,\n # the lock should be acquired only once for store and load steps\n # as they are fused together into one step.\n assert lock.acquire_count == lock.release_count\n if c:\n assert lock.acquire_count == 2 * nchunks\n else:\n assert lock.acquire_count == nchunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_method_return_test_store_multiprocessing_lock.assert_st_is_None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_store_method_return_test_store_multiprocessing_lock.assert_st_is_None", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1951, "end_line": 1977, "span_ids": ["test_store_multiprocessing_lock", "test_store_method_return"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_store_method_return():\n d = da.ones((10, 10), chunks=(2, 2))\n a = d + 1\n\n for compute in [False, True]:\n for return_stored in [False, True]:\n at = np.zeros(shape=(10, 10))\n r = a.store(\n at, scheduler=\"threads\", compute=compute, return_stored=return_stored\n )\n\n if return_stored:\n assert isinstance(r, Array)\n elif compute:\n assert r is None\n else:\n assert isinstance(r, Delayed)\n\n\n@pytest.mark.xfail(reason=\"can't lock with multiprocessing\")\ndef test_store_multiprocessing_lock():\n d = da.ones((10, 10), chunks=(2, 2))\n a = d + 1\n\n at = np.zeros(shape=(10, 10))\n st = a.store(at, scheduler=\"processes\", num_workers=10)\n assert st is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_hdf5_test_to_hdf5.None_3.with_h5py_File_fn_mode_.assert_f_y_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_hdf5_test_to_hdf5.None_3.with_h5py_File_fn_mode_.assert_f_y_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 1980, "end_line": 2016, "span_ids": ["test_to_hdf5"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_hdf5():\n h5py = pytest.importorskip(\"h5py\")\n x = da.ones((4, 4), chunks=(2, 2))\n y = da.ones(4, chunks=2, dtype=\"i4\")\n\n with tmpfile(\".hdf5\") as fn:\n x.to_hdf5(fn, \"/x\")\n with h5py.File(fn, mode=\"r+\") as f:\n d = f[\"/x\"]\n\n assert_eq(d[:], x)\n assert d.chunks == (2, 2)\n\n with tmpfile(\".hdf5\") as fn:\n x.to_hdf5(fn, \"/x\", chunks=None)\n with h5py.File(fn, mode=\"r+\") as f:\n d = f[\"/x\"]\n\n assert_eq(d[:], x)\n assert d.chunks is None\n\n with tmpfile(\".hdf5\") as fn:\n x.to_hdf5(fn, \"/x\", chunks=(1, 1))\n with h5py.File(fn, mode=\"r+\") as f:\n d = f[\"/x\"]\n\n assert_eq(d[:], x)\n assert d.chunks == (1, 1)\n\n with tmpfile(\".hdf5\") as fn:\n da.to_hdf5(fn, {\"/x\": x, \"/y\": y})\n\n with h5py.File(fn, mode=\"r+\") as f:\n assert_eq(f[\"/x\"][:], x)\n assert f[\"/x\"].chunks == (2, 2)\n assert_eq(f[\"/y\"][:], y)\n assert f[\"/y\"].chunks == (2,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_dask_dataframe_test_np_array_with_zero_dimensions.assert_eq_np_array_d_sum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_dask_dataframe_test_np_array_with_zero_dimensions.assert_eq_np_array_d_sum_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2019, "end_line": 2032, "span_ids": ["test_np_array_with_zero_dimensions", "test_to_dask_dataframe"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_dask_dataframe():\n dd = pytest.importorskip(\"dask.dataframe\")\n a = da.ones((4,), chunks=(2,))\n d = a.to_dask_dataframe()\n assert isinstance(d, dd.Series)\n\n a = da.ones((4, 4), chunks=(2, 2))\n d = a.to_dask_dataframe()\n assert isinstance(d, dd.DataFrame)\n\n\ndef test_np_array_with_zero_dimensions():\n d = da.ones((4, 4), chunks=(2, 2))\n assert_eq(np.array(d.sum()), np.array(d.compute().sum()))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dtype_complex_test_dtype_complex.assert_eq_d_numbers_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dtype_complex_test_dtype_complex.assert_eq_d_numbers_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2035, "end_line": 2077, "span_ids": ["test_dtype_complex"], "tokens": 527}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dtype_complex():\n x = np.arange(24).reshape((4, 6)).astype(\"f4\")\n y = np.arange(24).reshape((4, 6)).astype(\"i8\")\n z = np.arange(24).reshape((4, 6)).astype(\"i2\")\n\n a = da.from_array(x, chunks=(2, 3))\n b = da.from_array(y, chunks=(2, 3))\n c = da.from_array(z, chunks=(2, 3))\n\n def assert_eq(a, b):\n return isinstance(a, np.dtype) and isinstance(b, np.dtype) and str(a) == str(b)\n\n assert_eq(a.dtype, x.dtype)\n assert_eq(b.dtype, y.dtype)\n\n assert_eq((a + 1).dtype, (x + 1).dtype)\n assert_eq((a + b).dtype, (x + y).dtype)\n assert_eq(a.T.dtype, x.T.dtype)\n assert_eq(a[:3].dtype, x[:3].dtype)\n assert_eq((a.dot(b.T)).dtype, (x.dot(y.T)).dtype)\n\n assert_eq(stack([a, b]).dtype, np.vstack([x, y]).dtype)\n assert_eq(concatenate([a, b]).dtype, np.concatenate([x, y]).dtype)\n\n assert_eq(b.std().dtype, y.std().dtype)\n assert_eq(c.sum().dtype, z.sum().dtype)\n assert_eq(a.min().dtype, a.min().dtype)\n assert_eq(b.std().dtype, b.std().dtype)\n assert_eq(a.argmin(axis=0).dtype, a.argmin(axis=0).dtype)\n\n assert_eq(da.sin(c).dtype, np.sin(z).dtype)\n assert_eq(da.exp(b).dtype, np.exp(y).dtype)\n assert_eq(da.floor(a).dtype, np.floor(x).dtype)\n assert_eq(da.isnan(b).dtype, np.isnan(y).dtype)\n with ignoring(ImportError):\n assert da.isnull(b).dtype == \"bool\"\n assert da.notnull(b).dtype == \"bool\"\n\n x = np.array([(\"a\", 1)], dtype=[(\"text\", \"S1\"), (\"numbers\", \"i4\")])\n d = da.from_array(x, chunks=(1,))\n\n assert_eq(d[\"text\"].dtype, x[\"text\"].dtype)\n assert_eq(d[[\"numbers\", \"text\"]].dtype, x[[\"numbers\", \"text\"]].dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_astype_test_astype.assert_d_astype_f8_is_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_astype_test_astype.assert_d_astype_f8_is_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2080, "end_line": 2098, "span_ids": ["test_astype"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_astype():\n x = np.ones((5, 5), dtype=\"f8\")\n d = da.from_array(x, chunks=(2, 2))\n\n assert d.astype(\"i8\").dtype == \"i8\"\n assert_eq(d.astype(\"i8\"), x.astype(\"i8\"))\n assert same_keys(d.astype(\"i8\"), d.astype(\"i8\"))\n\n with pytest.raises(TypeError):\n d.astype(\"i8\", casting=\"safe\")\n\n with pytest.raises(TypeError):\n d.astype(\"i8\", not_a_real_kwarg=\"foo\")\n\n # smoketest with kwargs\n assert_eq(d.astype(\"i8\", copy=False), x.astype(\"i8\", copy=False))\n\n # Check it's a noop\n assert d.astype(\"f8\") is d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic_test_arithmetic.assert_eq_da_log10_a_np": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic_test_arithmetic.assert_eq_da_log10_a_np", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2101, "end_line": 2169, "span_ids": ["test_arithmetic"], "tokens": 882}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_arithmetic():\n x = np.arange(5).astype(\"f4\") + 2\n y = np.arange(5).astype(\"i8\") + 2\n z = np.arange(5).astype(\"i4\") + 2\n a = da.from_array(x, chunks=(2,))\n b = da.from_array(y, chunks=(2,))\n c = da.from_array(z, chunks=(2,))\n assert_eq(a + b, x + y)\n assert_eq(a * b, x * y)\n assert_eq(a - b, x - y)\n assert_eq(a / b, x / y)\n assert_eq(b & b, y & y)\n assert_eq(b | b, y | y)\n assert_eq(b ^ b, y ^ y)\n assert_eq(a // b, x // y)\n assert_eq(a ** b, x ** y)\n assert_eq(a % b, x % y)\n assert_eq(a > b, x > y)\n assert_eq(a < b, x < y)\n assert_eq(a >= b, x >= y)\n assert_eq(a <= b, x <= y)\n assert_eq(a == b, x == y)\n assert_eq(a != b, x != y)\n\n assert_eq(a + 2, x + 2)\n assert_eq(a * 2, x * 2)\n assert_eq(a - 2, x - 2)\n assert_eq(a / 2, x / 2)\n assert_eq(b & True, y & True)\n assert_eq(b | True, y | True)\n assert_eq(b ^ True, y ^ True)\n assert_eq(a // 2, x // 2)\n assert_eq(a ** 2, x ** 2)\n assert_eq(a % 2, x % 2)\n assert_eq(a > 2, x > 2)\n assert_eq(a < 2, x < 2)\n assert_eq(a >= 2, x >= 2)\n assert_eq(a <= 2, x <= 2)\n assert_eq(a == 2, x == 2)\n assert_eq(a != 2, x != 2)\n\n assert_eq(2 + b, 2 + y)\n assert_eq(2 * b, 2 * y)\n assert_eq(2 - b, 2 - y)\n assert_eq(2 / b, 2 / y)\n assert_eq(True & b, True & y)\n assert_eq(True | b, True | y)\n assert_eq(True ^ b, True ^ y)\n assert_eq(2 // b, 2 // y)\n assert_eq(2 ** b, 2 ** y)\n assert_eq(2 % b, 2 % y)\n assert_eq(2 > b, 2 > y)\n assert_eq(2 < b, 2 < y)\n assert_eq(2 >= b, 2 >= y)\n assert_eq(2 <= b, 2 <= y)\n assert_eq(2 == b, 2 == y)\n assert_eq(2 != b, 2 != y)\n\n assert_eq(-a, -x)\n assert_eq(abs(a), abs(x))\n assert_eq(~(a == b), ~(x == y))\n assert_eq(~(a == b), ~(x == y))\n\n assert_eq(da.logaddexp(a, b), np.logaddexp(x, y))\n assert_eq(da.logaddexp2(a, b), np.logaddexp2(x, y))\n with pytest.warns(None): # Overflow warning\n assert_eq(da.exp(b), np.exp(y))\n assert_eq(da.log(a), np.log(x))\n assert_eq(da.log10(a), np.log10(x))\n # ... other code\n with pytest.warns(None): # Overflow warning\n # ... other code\n # ... other code\n with pytest.warns(None): # Overflow warning\n # ... other code\n # ... other code\n with pytest.warns(None): # overflow warning\n # ... other code\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_log1p_a_np_test_arithmetic.assert_eq_da_ceil_a_np_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_log1p_a_np_test_arithmetic.assert_eq_da_ceil_a_np_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2170, "end_line": 2215, "span_ids": ["test_arithmetic"], "tokens": 841}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_arithmetic():\n # ... other code\n assert_eq(a * b, x * y)\n assert_eq(a - b, x - y)\n assert_eq(a / b, x / y)\n # ... other code\n assert_eq(da.log1p(a), np.log1p(x))\n with pytest.warns(None): # Overflow warning\n assert_eq(da.expm1(b), np.expm1(y))\n assert_eq(da.sqrt(a), np.sqrt(x))\n assert_eq(da.square(a), np.square(x))\n\n assert_eq(da.sin(a), np.sin(x))\n assert_eq(da.cos(b), np.cos(y))\n assert_eq(da.tan(a), np.tan(x))\n assert_eq(da.arcsin(b / 10), np.arcsin(y / 10))\n assert_eq(da.arccos(b / 10), np.arccos(y / 10))\n assert_eq(da.arctan(b / 10), np.arctan(y / 10))\n assert_eq(da.arctan2(b * 10, a), np.arctan2(y * 10, x))\n assert_eq(da.hypot(b, a), np.hypot(y, x))\n assert_eq(da.sinh(a), np.sinh(x))\n with pytest.warns(None): # Overflow warning\n assert_eq(da.cosh(b), np.cosh(y))\n assert_eq(da.tanh(a), np.tanh(x))\n assert_eq(da.arcsinh(b * 10), np.arcsinh(y * 10))\n assert_eq(da.arccosh(b * 10), np.arccosh(y * 10))\n assert_eq(da.arctanh(b / 10), np.arctanh(y / 10))\n assert_eq(da.deg2rad(a), np.deg2rad(x))\n assert_eq(da.rad2deg(a), np.rad2deg(x))\n\n assert_eq(da.logical_and(a < 1, b < 4), np.logical_and(x < 1, y < 4))\n assert_eq(da.logical_or(a < 1, b < 4), np.logical_or(x < 1, y < 4))\n assert_eq(da.logical_xor(a < 1, b < 4), np.logical_xor(x < 1, y < 4))\n assert_eq(da.logical_not(a < 1), np.logical_not(x < 1))\n assert_eq(da.maximum(a, 5 - a), np.maximum(a, 5 - a))\n assert_eq(da.minimum(a, 5 - a), np.minimum(a, 5 - a))\n assert_eq(da.fmax(a, 5 - a), np.fmax(a, 5 - a))\n assert_eq(da.fmin(a, 5 - a), np.fmin(a, 5 - a))\n\n assert_eq(da.isreal(a + 1j * b), np.isreal(x + 1j * y))\n assert_eq(da.iscomplex(a + 1j * b), np.iscomplex(x + 1j * y))\n assert_eq(da.isfinite(a), np.isfinite(x))\n assert_eq(da.isinf(a), np.isinf(x))\n assert_eq(da.isnan(a), np.isnan(x))\n assert_eq(da.signbit(a - 3), np.signbit(x - 3))\n assert_eq(da.copysign(a - 3, b), np.copysign(x - 3, y))\n assert_eq(da.nextafter(a - 3, b), np.nextafter(x - 3, y))\n with pytest.warns(None): # overflow warning\n assert_eq(da.ldexp(c, c), np.ldexp(z, z))\n assert_eq(da.fmod(a * 12, b), np.fmod(x * 12, y))\n assert_eq(da.floor(a * 0.5), np.floor(x * 0.5))\n assert_eq(da.ceil(a), np.ceil(x))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_trunc_a_2__test_arithmetic.assert_eq_da_around_a_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_arithmetic.assert_eq_da_trunc_a_2__test_arithmetic.assert_eq_da_around_a_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2216, "end_line": 2249, "span_ids": ["test_arithmetic"], "tokens": 462}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_arithmetic():\n # ... other code\n assert_eq(da.trunc(a / 2), np.trunc(x / 2))\n\n assert_eq(da.degrees(b), np.degrees(y))\n assert_eq(da.radians(a), np.radians(x))\n\n assert_eq(da.rint(a + 0.3), np.rint(x + 0.3))\n assert_eq(da.fix(a - 2.5), np.fix(x - 2.5))\n\n assert_eq(da.angle(a + 1j), np.angle(x + 1j))\n assert_eq(da.real(a + 1j), np.real(x + 1j))\n assert_eq((a + 1j).real, np.real(x + 1j))\n assert_eq(da.imag(a + 1j), np.imag(x + 1j))\n assert_eq((a + 1j).imag, np.imag(x + 1j))\n assert_eq(da.conj(a + 1j * b), np.conj(x + 1j * y))\n assert_eq((a + 1j * b).conj(), (x + 1j * y).conj())\n\n assert_eq(da.clip(b, 1, 4), np.clip(y, 1, 4))\n assert_eq(b.clip(1, 4), y.clip(1, 4))\n assert_eq(da.fabs(b), np.fabs(y))\n assert_eq(da.sign(b - 2), np.sign(y - 2))\n assert_eq(da.absolute(b - 2), np.absolute(y - 2))\n assert_eq(da.absolute(b - 2 + 1j), np.absolute(y - 2 + 1j))\n\n l1, l2 = da.frexp(a)\n r1, r2 = np.frexp(x)\n assert_eq(l1, r1)\n assert_eq(l2, r2)\n\n l1, l2 = da.modf(a)\n r1, r2 = np.modf(x)\n assert_eq(l1, r1)\n assert_eq(l2, r2)\n\n assert_eq(da.around(a, -1), np.around(x, -1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_consistent_names_test_optimize.assert_all_key_in_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_consistent_names_test_optimize.assert_all_key_in_result_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2252, "end_line": 2268, "span_ids": ["test_elemwise_consistent_names", "test_optimize"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_elemwise_consistent_names():\n a = da.from_array(np.arange(5, dtype=\"f4\"), chunks=(2,))\n b = da.from_array(np.arange(5, dtype=\"f4\"), chunks=(2,))\n assert same_keys(a + b, a + b)\n assert same_keys(a + 2, a + 2)\n assert same_keys(da.exp(a), da.exp(a))\n assert same_keys(da.exp(a, dtype=\"f8\"), da.exp(a, dtype=\"f8\"))\n assert same_keys(da.maximum(a, b), da.maximum(a, b))\n\n\ndef test_optimize():\n x = np.arange(5).astype(\"f4\")\n a = da.from_array(x, chunks=(2,))\n expr = a[1:4] + 1\n result = optimize(expr.dask, expr.__dask_keys__())\n assert isinstance(result, dict)\n assert all(key in result for key in expr.__dask_keys__())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slicing_with_non_ndarrays_test_slicing_with_non_ndarrays.assert_eq_x_1_sum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slicing_with_non_ndarrays_test_slicing_with_non_ndarrays.assert_eq_x_1_sum_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2271, "end_line": 2299, "span_ids": ["test_slicing_with_non_ndarrays"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_with_non_ndarrays():\n class ARangeSlice(object):\n dtype = np.dtype(\"i8\")\n ndim = 1\n\n def __init__(self, start, stop):\n self.start = start\n self.stop = stop\n\n def __array__(self):\n return np.arange(self.start, self.stop)\n\n class ARangeSlicable(object):\n dtype = np.dtype(\"i8\")\n ndim = 1\n\n def __init__(self, n):\n self.n = n\n\n @property\n def shape(self):\n return (self.n,)\n\n def __getitem__(self, key):\n return ARangeSlice(key[0].start, key[0].stop)\n\n x = da.from_array(ARangeSlicable(10), chunks=(4,))\n\n assert_eq((x + 1).sum(), (np.arange(10, dtype=x.dtype) + 1).sum())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getter_test_getter.assert_eq_getter_np_arang": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_getter_test_getter.assert_eq_getter_np_arang", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2302, "end_line": 2308, "span_ids": ["test_getter"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.filterwarnings(\"ignore:the matrix subclass\")\ndef test_getter():\n assert type(getter(np.matrix([[1]]), 0)) is np.ndarray\n assert type(getter(np.matrix([[1]]), 0, asarray=False)) is np.matrix\n assert_eq(getter([1, 2, 3, 4, 5], slice(1, 4)), np.array([2, 3, 4]))\n\n assert_eq(getter(np.arange(5), (None, slice(None, None))), np.arange(5)[None, :])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_size_test_Array_normalizes_dtype.assert_isinstance_x_dtype": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_size_test_Array_normalizes_dtype.assert_isinstance_x_dtype", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2311, "end_line": 2329, "span_ids": ["test_itemsize", "test_size", "test_Array_normalizes_dtype", "test_nbytes"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_size():\n x = da.ones((10, 2), chunks=(3, 1))\n assert x.size == np.array(x).size\n assert isinstance(x.size, int)\n\n\ndef test_nbytes():\n x = da.ones((10, 2), chunks=(3, 1))\n assert x.nbytes == np.array(x).nbytes\n\n\ndef test_itemsize():\n x = da.ones((10, 2), chunks=(3, 1))\n assert x.itemsize == 8\n\n\ndef test_Array_normalizes_dtype():\n x = da.ones((3,), chunks=(1,), dtype=int)\n assert isinstance(x.dtype, np.dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_with_lock_test_from_array_with_lock.assert_eq_e_f_x_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_with_lock_test_from_array_with_lock.assert_eq_e_f_x_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2332, "end_line": 2347, "span_ids": ["test_from_array_with_lock"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_array_with_lock():\n x = np.arange(10)\n d = da.from_array(x, chunks=5, lock=True)\n\n tasks = [v for k, v in d.dask.items() if k[0] == d.name]\n\n assert hasattr(tasks[0][4], \"acquire\")\n assert len(set(task[4] for task in tasks)) == 1\n\n assert_eq(d, x)\n\n lock = Lock()\n e = da.from_array(x, chunks=5, lock=lock)\n f = da.from_array(x, chunks=5, lock=lock)\n\n assert_eq(e + f, x + x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_MyArray_test_from_array_tasks_always_call_getter.assert_eq_x_dx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_MyArray_test_from_array_tasks_always_call_getter.assert_eq_x_dx_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2350, "end_line": 2372, "span_ids": ["MyArray", "test_from_array_tasks_always_call_getter", "MyArray.__getitem__", "MyArray.__init__"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MyArray(object):\n def __init__(self, x):\n self.x = x\n self.dtype = x.dtype\n self.shape = x.shape\n self.ndim = len(x.shape)\n\n def __getitem__(self, i):\n return self.x[i]\n\n\n@pytest.mark.parametrize(\n \"x,chunks\",\n [\n (np.arange(25).reshape((5, 5)), (5, 5)),\n (np.arange(25).reshape((5, 5)), -1),\n (np.array([[1]]), 1),\n (np.array(1), 1),\n ],\n)\ndef test_from_array_tasks_always_call_getter(x, chunks):\n dx = da.from_array(MyArray(x), chunks=chunks, asarray=False)\n assert_eq(x, dx)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_ndarray_onechunk_test_from_array_ndarray_getitem.assert_dx_dask_dx_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_ndarray_onechunk_test_from_array_ndarray_getitem.assert_dx_dask_dx_name_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2375, "end_line": 2390, "span_ids": ["test_from_array_ndarray_onechunk", "test_from_array_ndarray_getitem"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_array_ndarray_onechunk():\n \"\"\"ndarray with a single chunk produces a minimal single key dict\"\"\"\n x = np.array([[1, 2], [3, 4]])\n dx = da.from_array(x, chunks=-1)\n assert_eq(x, dx)\n assert len(dx.dask) == 1\n assert dx.dask[dx.name, 0, 0] is x\n\n\ndef test_from_array_ndarray_getitem():\n \"\"\"For ndarray, don't use getter / getter_nofancy; use the cleaner\n operator.getitem\"\"\"\n x = np.array([[1, 2], [3, 4]])\n dx = da.from_array(x, chunks=(1, 2))\n assert_eq(x, dx)\n assert (dx.dask[dx.name, 0, 0] == np.array([[1, 2]])).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_list_test_from_array_list.assert_dx_dask_dx_name_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_list_test_from_array_list.assert_dx_dask_dx_name_0", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2393, "end_line": 2402, "span_ids": ["test_from_array_list"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"x\", [[1, 2], (1, 2), memoryview(b\"abc\")])\ndef test_from_array_list(x):\n \"\"\"Lists, tuples, and memoryviews are automatically converted to ndarray\"\"\"\n dx = da.from_array(x, chunks=-1)\n assert_eq(np.array(x), dx)\n assert isinstance(dx.dask[dx.name, 0], np.ndarray)\n\n dx = da.from_array(x, chunks=1)\n assert_eq(np.array(x), dx)\n assert dx.dask[dx.name, 0][0] == x[0]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_scalar_test_from_array_scalar.assert_isinstance_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_scalar_test_from_array_scalar.assert_isinstance_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2405, "end_line": 2420, "span_ids": ["test_from_array_scalar"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"type_\", [t for t in np.ScalarType if t is not memoryview])\ndef test_from_array_scalar(type_):\n \"\"\"Python and numpy scalars are automatically converted to ndarray\"\"\"\n if type_ == np.datetime64:\n x = np.datetime64(\"2000-01-01\")\n else:\n x = type_(1)\n\n dx = da.from_array(x, chunks=-1)\n assert_eq(np.array(x), dx)\n assert isinstance(\n dx.dask[\n dx.name,\n ],\n np.ndarray,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_no_asarray_test_from_array_no_asarray.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_no_asarray_test_from_array_no_asarray.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2423, "end_line": 2435, "span_ids": ["test_from_array_no_asarray"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"asarray,cls\", [(True, np.ndarray), (False, np.matrix)])\n@pytest.mark.filterwarnings(\"ignore:the matrix subclass\")\ndef test_from_array_no_asarray(asarray, cls):\n def assert_chunks_are_of_type(x):\n chunks = compute_as_if_collection(Array, x.dask, x.__dask_keys__())\n for c in concat(chunks):\n assert type(c) is cls\n\n x = np.matrix(np.arange(100).reshape((10, 10)))\n dx = da.from_array(x, chunks=(5, 5), asarray=asarray)\n assert_chunks_are_of_type(dx)\n assert_chunks_are_of_type(dx[0:5])\n assert_chunks_are_of_type(dx[0:5][:, 0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_getitem_test_asarray.assert_eq_asarray_y_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_getitem_test_asarray.assert_eq_asarray_y_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2438, "end_line": 2499, "span_ids": ["test_from_array_minus_one", "test_asarray", "test_from_array_dask_collection_warns", "test_from_array_dask_array", "test_from_array_copy", "test_from_array_getitem"], "tokens": 435}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_array_getitem():\n x = np.arange(10)\n\n def my_getitem(x, ind):\n return x[ind]\n\n y = da.from_array(x, chunks=(5,), getitem=my_getitem)\n\n for k, v in y.dask.items():\n if isinstance(v, tuple):\n assert v[0] is my_getitem\n\n assert_eq(x, y)\n\n\ndef test_from_array_minus_one():\n x = np.arange(10)\n y = da.from_array(x, -1)\n assert y.chunks == ((10,),)\n assert_eq(x, y)\n\n\ndef test_from_array_copy():\n # Regression test for https://github.com/dask/dask/issues/3751\n x = np.arange(10)\n y = da.from_array(x, -1)\n assert y.npartitions == 1\n y_c = y.copy()\n assert y is not y_c\n assert y.compute() is not y_c.compute()\n\n\ndef test_from_array_dask_array():\n x = np.array([[1, 2], [3, 4]])\n dx = da.from_array(x, chunks=(1, 2))\n with pytest.raises(ValueError):\n da.from_array(dx)\n\n\ndef test_from_array_dask_collection_warns():\n class CustomCollection(np.ndarray):\n def __dask_graph__(self):\n return {\"bar\": 1}\n\n x = CustomCollection([1, 2, 3])\n with pytest.warns(UserWarning):\n da.from_array(x)\n\n # Ensure da.array warns too\n with pytest.warns(UserWarning):\n da.array(x)\n\n\n@pytest.mark.parametrize(\"asarray\", [da.asarray, da.asanyarray])\ndef test_asarray(asarray):\n assert_eq(asarray([1, 2, 3]), np.asarray([1, 2, 3]))\n\n x = asarray([1, 2, 3])\n assert asarray(x) is x\n\n y = [x[0], 2, x[2]]\n assert_eq(asarray(y), x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_dask_dataframe_test_asarray_dask_dataframe.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_dask_dataframe_test_asarray_dask_dataframe.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2502, "end_line": 2516, "span_ids": ["test_asarray_dask_dataframe"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"asarray\", [da.asarray, da.asanyarray])\ndef test_asarray_dask_dataframe(asarray):\n # https://github.com/dask/dask/issues/3885\n dd = pytest.importorskip(\"dask.dataframe\")\n import pandas as pd\n\n s = dd.from_pandas(pd.Series([1, 2, 3, 4]), 2)\n result = asarray(s)\n expected = s.values\n assert_eq(result, expected)\n\n df = s.to_frame(name=\"s\")\n result = asarray(df)\n expected = df.values\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_h5py_test_asarray_h5py.with_tmpfile_hdf5_as_.with_h5py_File_fn_mode_.assert_not_any_isinstance": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_h5py_test_asarray_h5py.with_tmpfile_hdf5_as_.with_h5py_File_fn_mode_.assert_not_any_isinstance", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2519, "end_line": 2528, "span_ids": ["test_asarray_h5py"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"asarray\", [da.asarray, da.asanyarray])\ndef test_asarray_h5py(asarray):\n h5py = pytest.importorskip(\"h5py\")\n\n with tmpfile(\".hdf5\") as fn:\n with h5py.File(fn, mode=\"a\") as f:\n d = f.create_dataset(\"/x\", shape=(2, 2), dtype=float)\n x = asarray(d)\n assert d in x.dask.values()\n assert not any(isinstance(v, np.ndarray) for v in x.dask.values())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_chunks_test_asanyarray.assert_da_asanyarray_dx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asarray_chunks_test_asanyarray.assert_da_asanyarray_dx_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2531, "end_line": 2545, "span_ids": ["test_asanyarray", "test_asarray_chunks"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_asarray_chunks():\n with dask.config.set({\"array.chunk-size\": \"100 B\"}):\n x = np.ones(1000)\n d = da.asarray(x)\n assert d.npartitions > 1\n\n\n@pytest.mark.filterwarnings(\"ignore:the matrix subclass\")\ndef test_asanyarray():\n x = np.matrix([1, 2, 3])\n dx = da.asanyarray(x)\n assert dx.numblocks == (1, 1)\n chunks = compute_as_if_collection(Array, dx.dask, dx.__dask_keys__())\n assert isinstance(chunks[0][0], np.matrix)\n assert da.asanyarray(dx) is dx", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_dataframe_test_asanyarray_dataframe.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_dataframe_test_asanyarray_dataframe.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2548, "end_line": 2565, "span_ids": ["test_asanyarray_dataframe"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_asanyarray_dataframe():\n pd = pytest.importorskip(\"pandas\")\n dd = pytest.importorskip(\"dask.dataframe\")\n\n df = pd.DataFrame({\"x\": [1, 2, 3]})\n ddf = dd.from_pandas(df, npartitions=2)\n\n x = np.asanyarray(df)\n dx = da.asanyarray(ddf)\n assert isinstance(dx, da.Array)\n\n assert_eq(x, dx)\n\n x = np.asanyarray(df.x)\n dx = da.asanyarray(ddf.x)\n assert isinstance(dx, da.Array)\n\n assert_eq(x, dx)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_datetime64_test_from_func.assert_same_keys_d_from_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_asanyarray_datetime64_test_from_func.assert_same_keys_d_from_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2568, "end_line": 2583, "span_ids": ["test_asanyarray_datetime64", "test_from_func"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_asanyarray_datetime64():\n x = np.array([\"2000-01-01\"], dtype=\"datetime64\")\n dx = da.asanyarray(x)\n assert isinstance(dx, da.Array)\n assert_eq(x, dx)\n\n\ndef test_from_func():\n x = np.arange(10)\n f = lambda n: n * x\n d = from_func(f, (10,), x.dtype, kwargs={\"n\": 2})\n\n assert d.shape == x.shape\n assert d.dtype == x.dtype\n assert_eq(d.compute(), 2 * x)\n assert same_keys(d, from_func(f, (10,), x.dtype, kwargs={\"n\": 2}))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate3_2_test_concatenate3_2.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate3_2_test_concatenate3_2.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2586, "end_line": 2632, "span_ids": ["test_concatenate3_2"], "tokens": 723}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_concatenate3_2():\n x = np.array([1, 2])\n assert_eq(concatenate3([x, x, x]), np.array([1, 2, 1, 2, 1, 2]))\n\n x = np.array([[1, 2]])\n assert (\n concatenate3([[x, x, x], [x, x, x]])\n == np.array([[1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2]])\n ).all()\n\n assert (\n concatenate3([[x, x], [x, x], [x, x]])\n == np.array([[1, 2, 1, 2], [1, 2, 1, 2], [1, 2, 1, 2]])\n ).all()\n\n x = np.arange(12).reshape((2, 2, 3))\n assert_eq(\n concatenate3([[[x, x, x], [x, x, x]], [[x, x, x], [x, x, x]]]),\n np.array(\n [\n [\n [0, 1, 2, 0, 1, 2, 0, 1, 2],\n [3, 4, 5, 3, 4, 5, 3, 4, 5],\n [0, 1, 2, 0, 1, 2, 0, 1, 2],\n [3, 4, 5, 3, 4, 5, 3, 4, 5],\n ],\n [\n [6, 7, 8, 6, 7, 8, 6, 7, 8],\n [9, 10, 11, 9, 10, 11, 9, 10, 11],\n [6, 7, 8, 6, 7, 8, 6, 7, 8],\n [9, 10, 11, 9, 10, 11, 9, 10, 11],\n ],\n [\n [0, 1, 2, 0, 1, 2, 0, 1, 2],\n [3, 4, 5, 3, 4, 5, 3, 4, 5],\n [0, 1, 2, 0, 1, 2, 0, 1, 2],\n [3, 4, 5, 3, 4, 5, 3, 4, 5],\n ],\n [\n [6, 7, 8, 6, 7, 8, 6, 7, 8],\n [9, 10, 11, 9, 10, 11, 9, 10, 11],\n [6, 7, 8, 6, 7, 8, 6, 7, 8],\n [9, 10, 11, 9, 10, 11, 9, 10, 11],\n ],\n ]\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks3_test_from_array_with_missing_chunks.assert_d_chunks_da_fro": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks3_test_from_array_with_missing_chunks.assert_d_chunks_da_fro", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2635, "end_line": 2660, "span_ids": ["test_from_array_with_missing_chunks", "test_map_blocks3"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks3():\n x = np.arange(10)\n y = np.arange(10) * 2\n\n d = da.from_array(x, chunks=5)\n e = da.from_array(y, chunks=5)\n\n assert_eq(\n da.core.map_blocks(lambda a, b: a + 2 * b, d, e, dtype=d.dtype), x + 2 * y\n )\n\n z = np.arange(100).reshape((10, 10))\n f = da.from_array(z, chunks=5)\n\n func = lambda a, b: a + 2 * b\n res = da.core.map_blocks(func, d, f, dtype=d.dtype)\n assert_eq(res, x + 2 * z)\n assert same_keys(da.core.map_blocks(func, d, f, dtype=d.dtype), res)\n\n assert_eq(da.map_blocks(func, f, d, dtype=d.dtype), z + 2 * x)\n\n\ndef test_from_array_with_missing_chunks():\n x = np.random.randn(2, 4, 3)\n d = da.from_array(x, chunks=(None, 2, None))\n assert d.chunks == da.from_array(x, chunks=(2, 2, 3)).chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_test_normalize_chunks.None_1.normalize_chunks_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_test_normalize_chunks.None_1.normalize_chunks_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2663, "end_line": 2684, "span_ids": ["test_normalize_chunks"], "tokens": 405}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_normalize_chunks():\n assert normalize_chunks(3, (4, 6)) == ((3, 1), (3, 3))\n assert normalize_chunks(((3, 3), (8,)), (6, 8)) == ((3, 3), (8,))\n assert normalize_chunks((4, 5), (9,)) == ((4, 5),)\n assert normalize_chunks((4, 5), (9, 9)) == ((4, 4, 1), (5, 4))\n assert normalize_chunks(-1, (5, 5)) == ((5,), (5,))\n assert normalize_chunks((3, -1), (5, 5)) == ((3, 2), (5,))\n assert normalize_chunks((3, None), (5, 5)) == ((3, 2), (5,))\n assert normalize_chunks({0: 3}, (5, 5)) == ((3, 2), (5,))\n assert normalize_chunks([[2, 2], [3, 3]]) == ((2, 2), (3, 3))\n assert normalize_chunks(10, (30, 5)) == ((10, 10, 10), (5,))\n assert normalize_chunks((), (0, 0)) == ((0,), (0,))\n assert normalize_chunks(-1, (0, 3)) == ((0,), (3,))\n assert normalize_chunks(\"auto\", shape=(20,), limit=5, dtype=\"uint8\") == (\n (5, 5, 5, 5),\n )\n assert normalize_chunks((\"auto\", None), (5, 5), dtype=int) == ((5,), (5,))\n\n with pytest.raises(ValueError):\n normalize_chunks(((10,),), (11,))\n with pytest.raises(ValueError):\n normalize_chunks(((5,), (5,)), (5,))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_align_chunks_to_previous_chunks_test_align_chunks_to_previous_chunks.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_align_chunks_to_previous_chunks_test_align_chunks_to_previous_chunks.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2687, "end_line": 2712, "span_ids": ["test_align_chunks_to_previous_chunks"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_align_chunks_to_previous_chunks():\n chunks = normalize_chunks(\n \"auto\", shape=(2000,), previous_chunks=(512,), limit=\"600 B\", dtype=np.uint8\n )\n assert chunks == ((512, 512, 512, 2000 - 512 * 3),)\n\n chunks = normalize_chunks(\n \"auto\", shape=(2000,), previous_chunks=(128,), limit=\"600 B\", dtype=np.uint8\n )\n assert chunks == ((512, 512, 512, 2000 - 512 * 3),)\n\n chunks = normalize_chunks(\n \"auto\", shape=(2000,), previous_chunks=(512,), limit=\"1200 B\", dtype=np.uint8\n )\n assert chunks == ((1024, 2000 - 1024),)\n\n chunks = normalize_chunks(\n \"auto\",\n shape=(3, 10211, 10376),\n previous_chunks=(1, 512, 512),\n limit=\"1MiB\",\n dtype=np.float32,\n )\n assert chunks[0] == (1, 1, 1)\n assert all(c % 512 == 0 for c in chunks[1][:-1])\n assert all(c % 512 == 0 for c in chunks[2][:-1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_on_no_chunks_test_long_slice.assert_eq_d_8000_8200_x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_on_no_chunks_test_long_slice.assert_eq_d_8000_8200_x", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2715, "end_line": 2747, "span_ids": ["test_raise_on_bad_kwargs", "test_raise_on_no_chunks", "test_long_slice", "test_chunks_is_immutable"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_raise_on_no_chunks():\n x = da.ones(6, chunks=3)\n try:\n Array(x.dask, x.name, chunks=None, dtype=x.dtype, shape=None)\n assert False\n except ValueError as e:\n assert \"dask\" in str(e)\n assert \".org\" in str(e)\n\n\ndef test_chunks_is_immutable():\n x = da.ones(6, chunks=3)\n try:\n x.chunks = 2\n assert False\n except TypeError as e:\n assert \"rechunk(2)\" in str(e)\n\n\ndef test_raise_on_bad_kwargs():\n x = da.ones(5, chunks=3)\n try:\n da.minimum(x, foo=None)\n except TypeError as e:\n assert \"minimum\" in str(e)\n assert \"foo\" in str(e)\n\n\ndef test_long_slice():\n x = np.arange(10000)\n d = da.from_array(x, chunks=1)\n\n assert_eq(d[8000:8200], x[8000:8200])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_h5py_newaxis_test_ellipsis_slicing.assert_eq_da_ones_4_chun": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_h5py_newaxis_test_ellipsis_slicing.assert_eq_da_ones_4_chun", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2750, "end_line": 2764, "span_ids": ["test_ellipsis_slicing", "test_h5py_newaxis"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_h5py_newaxis():\n h5py = pytest.importorskip(\"h5py\")\n\n with tmpfile(\"h5\") as fn:\n with h5py.File(fn, mode=\"a\") as f:\n x = f.create_dataset(\"/x\", shape=(10, 10), dtype=\"f8\")\n d = da.from_array(x, chunks=(5, 5))\n assert d[None, :, :].compute(scheduler=\"sync\").shape == (1, 10, 10)\n assert d[:, None, :].compute(scheduler=\"sync\").shape == (10, 1, 10)\n assert d[:, :, None].compute(scheduler=\"sync\").shape == (10, 10, 1)\n assert same_keys(d[:, :, None], d[:, :, None])\n\n\ndef test_ellipsis_slicing():\n assert_eq(da.ones(4, chunks=2)[...], np.ones(4))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_test_point_slicing.assert_same_keys_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_test_point_slicing.assert_same_keys_result_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2767, "end_line": 2776, "span_ids": ["test_point_slicing"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_point_slicing():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(3, 4))\n\n result = d.vindex[[1, 2, 5, 5], [3, 1, 6, 1]]\n assert_eq(result, x[[1, 2, 5, 5], [3, 1, 6, 1]])\n\n result = d.vindex[[0, 1, 6, 0], [0, 1, 0, 7]]\n assert_eq(result, x[[0, 1, 6, 0], [0, 1, 0, 7]])\n assert same_keys(result, d.vindex[[0, 1, 6, 0], [0, 1, 0, 7]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_with_full_slice_test_point_slicing_with_full_slice.for_ind_in_inds_.assert_result_shape_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_point_slicing_with_full_slice_test_point_slicing_with_full_slice.for_ind_in_inds_.assert_result_shape_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2779, "end_line": 2810, "span_ids": ["test_point_slicing_with_full_slice"], "tokens": 404}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_point_slicing_with_full_slice():\n from dask.array.core import _vindex_transpose, _get_axis\n\n x = np.arange(4 * 5 * 6 * 7).reshape((4, 5, 6, 7))\n d = da.from_array(x, chunks=(2, 3, 3, 4))\n\n inds = [\n [[1, 2, 3], None, [3, 2, 1], [5, 3, 4]],\n [[1, 2, 3], None, [4, 3, 2], None],\n [[1, 2, 3], [3, 2, 1]],\n [[1, 2, 3], [3, 2, 1], [3, 2, 1], [5, 3, 4]],\n [[], [], [], None],\n [np.array([1, 2, 3]), None, np.array([4, 3, 2]), None],\n [None, None, [1, 2, 3], [4, 3, 2]],\n [None, [0, 2, 3], None, [0, 3, 2]],\n ]\n\n for ind in inds:\n slc = [\n i if isinstance(i, (np.ndarray, list)) else slice(None, None) for i in ind\n ]\n result = d.vindex[tuple(slc)]\n\n # Rotate the expected result accordingly\n axis = _get_axis(ind)\n expected = _vindex_transpose(x[tuple(slc)], axis)\n\n assert_eq(result, expected)\n\n # Always have the first axis be the length of the points\n k = len(next(i for i in ind if isinstance(i, (np.ndarray, list))))\n assert result.shape[0] == k", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_with_floats_test_slice_with_integer_types.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_with_floats_test_slice_with_integer_types.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2813, "end_line": 2832, "span_ids": ["test_slice_with_floats", "test_slice_with_integer_types"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_with_floats():\n d = da.ones((5,), chunks=(3,))\n with pytest.raises(IndexError):\n d[1.5]\n with pytest.raises(IndexError):\n d[0:1.5]\n with pytest.raises(IndexError):\n d[[1, 1.5]]\n\n\ndef test_slice_with_integer_types():\n x = np.arange(10)\n dx = da.from_array(x, chunks=5)\n inds = np.array([0, 3, 6], dtype=\"u8\")\n assert_eq(dx[inds], x[inds])\n assert_eq(dx[inds.astype(\"u4\")], x[inds.astype(\"u4\")])\n\n inds = np.array([0, 3, 6], dtype=np.int64)\n assert_eq(dx[inds], x[inds])\n assert_eq(dx[inds.astype(\"u4\")], x[inds.astype(\"u4\")])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_with_integer_types_test_vindex_basic.assert_eq_result_x_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_with_integer_types_test_vindex_basic.assert_eq_result_x_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2835, "end_line": 2857, "span_ids": ["test_vindex_basic", "test_index_with_integer_types"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_index_with_integer_types():\n x = np.arange(10)\n dx = da.from_array(x, chunks=5)\n inds = int(3)\n assert_eq(dx[inds], x[inds])\n\n inds = np.int64(3)\n assert_eq(dx[inds], x[inds])\n\n\ndef test_vindex_basic():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(3, 4))\n\n # cases where basic and advanced indexing coincide\n result = d.vindex[0]\n assert_eq(result, x[0])\n\n result = d.vindex[0, 1]\n assert_eq(result, x[0, 1])\n\n result = d.vindex[[0, 1], ::-1] # slices last\n assert_eq(result, x[:2, ::-1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_nd_test_vindex_nd.assert_eq_result_x_T_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_nd_test_vindex_nd.assert_eq_result_x_T_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2860, "end_line": 2871, "span_ids": ["test_vindex_nd"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_vindex_nd():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(3, 4))\n\n result = d.vindex[[[0, 1], [6, 0]], [[0, 1], [0, 7]]]\n assert_eq(result, x[[[0, 1], [6, 0]], [[0, 1], [0, 7]]])\n\n result = d.vindex[np.arange(7)[:, None], np.arange(8)[None, :]]\n assert_eq(result, x)\n\n result = d.vindex[np.arange(7)[None, :], np.arange(8)[:, None]]\n assert_eq(result, x.T)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_negative_test_vindex_errors.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_negative_test_vindex_errors.None_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2874, "end_line": 2888, "span_ids": ["test_vindex_negative", "test_vindex_errors"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_vindex_negative():\n x = np.arange(10)\n d = da.from_array(x, chunks=(5, 5))\n\n result = d.vindex[np.array([0, -1])]\n assert_eq(result, x[np.array([0, -1])])\n\n\ndef test_vindex_errors():\n d = da.ones((5, 5, 5), chunks=(3, 3, 3))\n pytest.raises(IndexError, lambda: d.vindex[np.newaxis])\n pytest.raises(IndexError, lambda: d.vindex[[1, 2], [1, 2, 3]])\n pytest.raises(IndexError, lambda: d.vindex[[True] * 5])\n pytest.raises(IndexError, lambda: d.vindex[[0], [5]])\n pytest.raises(IndexError, lambda: d.vindex[[0], [-6]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_merge_test_vindex_merge.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_merge_test_vindex_merge.assert_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2891, "end_line": 2900, "span_ids": ["test_vindex_merge"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_vindex_merge():\n from dask.array.core import _vindex_merge\n\n locations = [1], [2, 0]\n values = [np.array([[1, 2, 3]]), np.array([[10, 20, 30], [40, 50, 60]])]\n\n assert (\n _vindex_merge(locations, values)\n == np.array([[40, 50, 60], [1, 2, 3], [10, 20, 30]])\n ).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_identity_test_vindex_identity.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_vindex_identity_test_vindex_identity.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2903, "end_line": 2919, "span_ids": ["test_vindex_identity"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_vindex_identity():\n rng = da.random.RandomState(42)\n a, b = 10, 20\n\n x = rng.random(a, chunks=a // 2)\n assert x is x.vindex[:]\n assert x is x.vindex[:a]\n pytest.raises(IndexError, lambda: x.vindex[: a - 1])\n pytest.raises(IndexError, lambda: x.vindex[1:])\n pytest.raises(IndexError, lambda: x.vindex[0:a:2])\n\n x = rng.random((a, b), chunks=(a // 2, b // 2))\n assert x is x.vindex[:, :]\n assert x is x.vindex[:a, :b]\n pytest.raises(IndexError, lambda: x.vindex[:, : b - 1])\n pytest.raises(IndexError, lambda: x.vindex[:, 1:])\n pytest.raises(IndexError, lambda: x.vindex[:, 0:b:2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_empty_array_test_memmap.with_tmpfile_npy_as_fn.with_tmpfile_npy_as_fn.try_.finally_.target__mmap_close_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_empty_array_test_memmap.with_tmpfile_npy_as_fn.with_tmpfile_npy_as_fn.try_.finally_.target__mmap_close_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2922, "end_line": 2941, "span_ids": ["test_memmap", "test_empty_array"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_empty_array():\n assert_eq(np.arange(0), da.arange(0, chunks=5))\n\n\ndef test_memmap():\n with tmpfile(\"npy\") as fn_1:\n with tmpfile(\"npy\") as fn_2:\n try:\n x = da.arange(100, chunks=15)\n target = np.memmap(fn_1, shape=x.shape, mode=\"w+\", dtype=x.dtype)\n\n x.store(target)\n\n assert_eq(target, x)\n\n np.save(fn_2, target)\n\n assert_eq(np.load(fn_2, mmap_mode=\"r\"), x)\n finally:\n target._mmap.close()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_npy_stack_test_to_npy_stack.with_tmpdir_as_dirname_.assert_eq_d_e_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_npy_stack_test_to_npy_stack.with_tmpdir_as_dirname_.assert_eq_d_e_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2944, "end_line": 2955, "span_ids": ["test_to_npy_stack"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_npy_stack():\n x = np.arange(5 * 10 * 10).reshape((5, 10, 10))\n d = da.from_array(x, chunks=(2, 4, 4))\n\n with tmpdir() as dirname:\n stackdir = os.path.join(dirname, \"test\")\n da.to_npy_stack(stackdir, d, axis=0)\n assert os.path.exists(os.path.join(stackdir, \"0.npy\"))\n assert (np.load(os.path.join(stackdir, \"1.npy\")) == x[2:4]).all()\n\n e = da.from_npy_stack(stackdir)\n assert_eq(d, e)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_test_view.None_1.d_view_i4_order_asdf_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_test_view.None_1.d_view_i4_order_asdf_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2958, "end_line": 2977, "span_ids": ["test_view"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_view():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(2, 3))\n\n assert_eq(x.view(), d.view())\n assert_eq(x.view(\"i4\"), d.view(\"i4\"))\n assert_eq(x.view(\"i2\"), d.view(\"i2\"))\n assert all(isinstance(s, int) for s in d.shape)\n\n x = np.arange(8, dtype=\"i1\")\n d = da.from_array(x, chunks=(4,))\n assert_eq(x.view(\"i4\"), d.view(\"i4\"))\n\n with pytest.raises(ValueError):\n x = np.arange(8, dtype=\"i1\")\n d = da.from_array(x, chunks=(3,))\n d.view(\"i4\")\n\n with pytest.raises(ValueError):\n d.view(\"i4\", order=\"asdf\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_fortran_test_h5py_tokenize.with_tmpfile_hdf5_as_f.with_tmpfile_hdf5_as_f.assert_tokenize_x1_to": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_view_fortran_test_h5py_tokenize.with_tmpfile_hdf5_as_f.with_tmpfile_hdf5_as_f.assert_tokenize_x1_to", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 2980, "end_line": 3000, "span_ids": ["test_h5py_tokenize", "test_view_fortran"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_view_fortran():\n x = np.asfortranarray(np.arange(64).reshape((8, 8)))\n d = da.from_array(x, chunks=(2, 3))\n assert_eq(x.T.view(\"i4\").T, d.view(\"i4\", order=\"F\"))\n assert_eq(x.T.view(\"i2\").T, d.view(\"i2\", order=\"F\"))\n\n\ndef test_h5py_tokenize():\n h5py = pytest.importorskip(\"h5py\")\n with tmpfile(\"hdf5\") as fn1:\n with tmpfile(\"hdf5\") as fn2:\n f = h5py.File(fn1, mode=\"a\")\n g = h5py.File(fn2, mode=\"a\")\n\n f[\"x\"] = np.arange(10).astype(float)\n g[\"x\"] = np.ones(10).astype(float)\n\n x1 = f[\"x\"]\n x2 = g[\"x\"]\n\n assert tokenize(x1) != tokenize(x2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_test_map_blocks_with_changed_dimension.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_test_map_blocks_with_changed_dimension.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3003, "end_line": 3064, "span_ids": ["test_map_blocks_with_changed_dimension"], "tokens": 663}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_with_changed_dimension():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(7, 4))\n\n e = d.map_blocks(lambda b: b.sum(axis=0), chunks=(4,), drop_axis=0, dtype=d.dtype)\n assert e.chunks == ((4, 4),)\n assert_eq(e, x.sum(axis=0))\n\n # Provided chunks have wrong shape\n with pytest.raises(ValueError):\n d.map_blocks(lambda b: b.sum(axis=0), chunks=(), drop_axis=0)\n\n with pytest.raises(ValueError):\n d.map_blocks(lambda b: b.sum(axis=0), chunks=((4, 4, 4),), drop_axis=0)\n\n with pytest.raises(ValueError):\n d.map_blocks(lambda b: b.sum(axis=1), chunks=((3, 4),), drop_axis=1)\n\n d = da.from_array(x, chunks=(4, 8))\n e = d.map_blocks(lambda b: b.sum(axis=1), drop_axis=1, dtype=d.dtype)\n assert e.chunks == ((4, 3),)\n assert_eq(e, x.sum(axis=1))\n\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n e = d.map_blocks(\n lambda b: b[None, :, :, None],\n chunks=(1, 4, 4, 1),\n new_axis=[0, 3],\n dtype=d.dtype,\n )\n assert e.chunks == ((1,), (4, 4), (4, 4), (1,))\n assert_eq(e, x[None, :, :, None])\n\n e = d.map_blocks(lambda b: b[None, :, :, None], new_axis=[0, 3], dtype=d.dtype)\n assert e.chunks == ((1,), (4, 4), (4, 4), (1,))\n assert_eq(e, x[None, :, :, None])\n\n # Adding axis with a gap\n with pytest.raises(ValueError):\n d.map_blocks(lambda b: b, new_axis=(3, 4))\n\n # Both new_axis and drop_axis\n d = da.from_array(x, chunks=(8, 4))\n e = d.map_blocks(\n lambda b: b.sum(axis=0)[:, None, None],\n drop_axis=0,\n new_axis=(1, 2),\n dtype=d.dtype,\n )\n assert e.chunks == ((4, 4), (1,), (1,))\n assert_eq(e, x.sum(axis=0)[:, None, None])\n\n d = da.from_array(x, chunks=(4, 8))\n e = d.map_blocks(\n lambda b: b.sum(axis=1)[:, None, None],\n drop_axis=1,\n new_axis=(1, 2),\n dtype=d.dtype,\n )\n assert e.chunks == ((4, 4), (1,), (1,))\n assert_eq(e, x.sum(axis=1)[:, None, None])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_and_broadcast_chunks_test_map_blocks_with_changed_dimension_and_broadcast_chunks.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_map_blocks_with_changed_dimension_and_broadcast_chunks_test_map_blocks_with_changed_dimension_and_broadcast_chunks.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3067, "end_line": 3073, "span_ids": ["test_map_blocks_with_changed_dimension_and_broadcast_chunks"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_blocks_with_changed_dimension_and_broadcast_chunks():\n # https://github.com/dask/dask/issues/4299\n a = da.from_array([1, 2, 3], 3)\n b = da.from_array(np.array([0, 1, 2, 0, 1, 2]), chunks=3)\n result = da.map_blocks(operator.add, a, b, chunks=b.chunks)\n expected = da.from_array(np.array([1, 3, 5, 1, 3, 5]), chunks=3)\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_chunks_test_broadcast_chunks.None_1.broadcast_chunks_a_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_chunks_test_broadcast_chunks.None_1.broadcast_chunks_a_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3076, "end_line": 3114, "span_ids": ["test_broadcast_chunks"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_chunks():\n assert broadcast_chunks() == ()\n\n assert broadcast_chunks(((2, 3),)) == ((2, 3),)\n\n assert broadcast_chunks(((5, 5),), ((5, 5),)) == ((5, 5),)\n\n a = ((10, 10, 10), (5, 5))\n b = ((5, 5),)\n assert broadcast_chunks(a, b) == ((10, 10, 10), (5, 5))\n assert broadcast_chunks(b, a) == ((10, 10, 10), (5, 5))\n\n a = ((10, 10, 10), (5, 5))\n b = ((1,), (5, 5))\n assert broadcast_chunks(a, b) == ((10, 10, 10), (5, 5))\n\n a = ((10, 10, 10), (5, 5))\n b = ((3, 3), (5, 5))\n with pytest.raises(ValueError):\n broadcast_chunks(a, b)\n\n a = ((1,), (5, 5))\n b = ((1,), (5, 5))\n assert broadcast_chunks(a, b) == a\n\n a = ((1,), (np.nan, np.nan, np.nan))\n b = ((3, 3), (1,))\n r = broadcast_chunks(a, b)\n assert r[0] == b[0] and np.allclose(r[1], a[1], equal_nan=True)\n\n a = ((3, 3), (1,))\n b = ((1,), (np.nan, np.nan, np.nan))\n r = broadcast_chunks(a, b)\n assert r[0] == a[0] and np.allclose(r[1], b[1], equal_nan=True)\n\n a = ((3, 3), (5, 5))\n b = ((1,), (np.nan, np.nan, np.nan))\n with pytest.raises(ValueError):\n broadcast_chunks(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunks_error_test_dont_fuse_outputs.assert_eq_a_np_array_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_chunks_error_test_dont_fuse_outputs.assert_eq_a_np_array_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3117, "end_line": 3132, "span_ids": ["test_chunks_error", "test_dont_fuse_outputs", "test_array_compute_forward_kwargs"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_chunks_error():\n x = np.ones((10, 10))\n with pytest.raises(ValueError):\n da.from_array(x, chunks=(5,))\n\n\ndef test_array_compute_forward_kwargs():\n x = da.arange(10, chunks=2).sum()\n x.compute(bogus_keyword=10)\n\n\ndef test_dont_fuse_outputs():\n dsk = {(\"x\", 0): np.array([1, 2]), (\"x\", 1): (inc, (\"x\", 0))}\n\n a = da.Array(dsk, \"x\", chunks=(2,), shape=(4,), dtype=np.array([1]).dtype)\n assert_eq(a, np.array([1, 2, 2, 3], dtype=a.dtype))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dont_dealias_outputs_test_dont_dealias_outputs.assert_eq_a_np_ones_4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dont_dealias_outputs_test_dont_dealias_outputs.assert_eq_a_np_ones_4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3135, "end_line": 3144, "span_ids": ["test_dont_dealias_outputs"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dont_dealias_outputs():\n dsk = {\n (\"x\", 0, 0): np.ones((2, 2)),\n (\"x\", 0, 1): np.ones((2, 2)),\n (\"x\", 1, 0): np.ones((2, 2)),\n (\"x\", 1, 1): (\"x\", 0, 0),\n }\n\n a = da.Array(dsk, \"x\", chunks=(2, 2), shape=(4, 4), dtype=np.ones(1).dtype)\n assert_eq(a, np.ones((4, 4)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_timedelta_op_test_to_delayed.assert_a_compute_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_timedelta_op_test_to_delayed.assert_a_compute_s", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3147, "end_line": 3164, "span_ids": ["test_timedelta_op", "test_to_delayed"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_timedelta_op():\n x = np.array([np.timedelta64(10, \"h\")])\n y = np.timedelta64(1, \"h\")\n a = da.from_array(x, chunks=(1,)) / y\n assert a.compute() == x / y\n\n\ndef test_to_delayed():\n x = da.random.random((4, 4), chunks=(2, 2))\n y = x + 10\n\n [[a, b], [c, d]] = y.to_delayed()\n assert_eq(a.compute(), y[:2, :2])\n\n s = 2\n x = da.from_array(np.array(s), chunks=0)\n a = x.to_delayed()[tuple()]\n assert a.compute() == s", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_delayed_optimize_graph_test_to_delayed_optimize_graph.assert_d_compute_d2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_delayed_optimize_graph_test_to_delayed_optimize_graph.assert_d_compute_d2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3167, "end_line": 3179, "span_ids": ["test_to_delayed_optimize_graph"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_delayed_optimize_graph():\n x = da.ones((4, 4), chunks=(2, 2))\n y = x[1:][1:][1:][:, 1:][:, 1:][:, 1:]\n\n # optimizations\n d = y.to_delayed().flatten().tolist()[0]\n assert len([k for k in d.dask if k[0].startswith(\"getitem\")]) == 1\n\n # no optimizations\n d2 = y.to_delayed(optimize_graph=False).flatten().tolist()[0]\n assert dict(d2.dask) == dict(y.dask)\n\n assert (d.compute() == d2.compute()).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_cumulative_test_cumulative.None_3.x_cumsum_axis_4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_cumulative_test_cumulative.None_3.x_cumsum_axis_4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3182, "end_line": 3239, "span_ids": ["test_cumulative"], "tokens": 829}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cumulative():\n x = da.arange(20, chunks=5)\n assert_eq(x.cumsum(axis=0), np.arange(20).cumsum())\n assert_eq(x.cumprod(axis=0), np.arange(20).cumprod())\n\n assert_eq(da.nancumsum(x, axis=0), nancumsum(np.arange(20)))\n assert_eq(da.nancumprod(x, axis=0), nancumprod(np.arange(20)))\n\n a = np.random.random(20)\n rs = np.random.RandomState(0)\n a[rs.rand(*a.shape) < 0.5] = np.nan\n x = da.from_array(a, chunks=5)\n assert_eq(da.nancumsum(x, axis=0), nancumsum(a))\n assert_eq(da.nancumprod(x, axis=0), nancumprod(a))\n\n a = np.random.random((20, 24))\n x = da.from_array(a, chunks=(6, 5))\n assert_eq(x.cumsum(axis=0), a.cumsum(axis=0))\n assert_eq(x.cumsum(axis=1), a.cumsum(axis=1))\n assert_eq(x.cumprod(axis=0), a.cumprod(axis=0))\n assert_eq(x.cumprod(axis=1), a.cumprod(axis=1))\n\n assert_eq(da.nancumsum(x, axis=0), nancumsum(a, axis=0))\n assert_eq(da.nancumsum(x, axis=1), nancumsum(a, axis=1))\n assert_eq(da.nancumprod(x, axis=0), nancumprod(a, axis=0))\n assert_eq(da.nancumprod(x, axis=1), nancumprod(a, axis=1))\n\n a = np.random.random((20, 24))\n rs = np.random.RandomState(0)\n a[rs.rand(*a.shape) < 0.5] = np.nan\n x = da.from_array(a, chunks=(6, 5))\n assert_eq(da.nancumsum(x, axis=0), nancumsum(a, axis=0))\n assert_eq(da.nancumsum(x, axis=1), nancumsum(a, axis=1))\n assert_eq(da.nancumprod(x, axis=0), nancumprod(a, axis=0))\n assert_eq(da.nancumprod(x, axis=1), nancumprod(a, axis=1))\n\n a = np.random.random((20, 24, 13))\n x = da.from_array(a, chunks=(6, 5, 4))\n for axis in [0, 1, 2, -1, -2, -3]:\n assert_eq(x.cumsum(axis=axis), a.cumsum(axis=axis))\n assert_eq(x.cumprod(axis=axis), a.cumprod(axis=axis))\n\n assert_eq(da.nancumsum(x, axis=axis), nancumsum(a, axis=axis))\n assert_eq(da.nancumprod(x, axis=axis), nancumprod(a, axis=axis))\n\n a = np.random.random((20, 24, 13))\n rs = np.random.RandomState(0)\n a[rs.rand(*a.shape) < 0.5] = np.nan\n x = da.from_array(a, chunks=(6, 5, 4))\n for axis in [0, 1, 2, -1, -2, -3]:\n assert_eq(da.nancumsum(x, axis=axis), nancumsum(a, axis=axis))\n assert_eq(da.nancumprod(x, axis=axis), nancumprod(a, axis=axis))\n\n with pytest.raises(ValueError):\n x.cumsum(axis=3)\n\n with pytest.raises(ValueError):\n x.cumsum(axis=-4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_delayed_test_A_property.assert_x_A_is_x": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_delayed_test_A_property.assert_x_A_is_x", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3242, "end_line": 3258, "span_ids": ["test_from_delayed_meta", "test_from_delayed", "test_A_property"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_delayed():\n v = delayed(np.ones)((5, 3))\n x = from_delayed(v, shape=(5, 3), dtype=np.ones(0).dtype)\n assert isinstance(x, Array)\n assert_eq(x, np.ones((5, 3)))\n\n\ndef test_from_delayed_meta():\n v = delayed(np.ones)((5, 3))\n x = from_delayed(v, shape=(5, 3), meta=np.ones(0))\n assert isinstance(x, Array)\n assert isinstance(x._meta, np.ndarray)\n\n\ndef test_A_property():\n x = da.ones(5, chunks=(2,))\n assert x.A is x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_copy_mutate_test_copy_mutate.assert_memo_id_x_is_y2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_copy_mutate_test_copy_mutate.assert_memo_id_x_is_y2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3261, "end_line": 3274, "span_ids": ["test_copy_mutate"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_copy_mutate():\n x = da.arange(5, chunks=(2,))\n y = x.copy()\n memo = {}\n y2 = copy.deepcopy(x, memo=memo)\n x[x % 2 == 0] = -1\n\n xx = np.arange(5)\n xx[xx % 2 == 0] = -1\n assert_eq(x, xx)\n\n assert_eq(y, np.arange(5))\n assert_eq(y2, np.arange(5))\n assert memo[id(x)] is y2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_npartitions_test_from_array_raises_on_bad_chunks.None_1.da_from_array_x_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_npartitions_test_from_array_raises_on_bad_chunks.None_1.da_from_array_x_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3277, "end_line": 3330, "span_ids": ["test_from_array_names", "test_elemwise_name", "test_map_blocks_name", "test_from_array_raises_on_bad_chunks", "test_array_picklable", "test_npartitions", "test_astype_gh1151"], "tokens": 360}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_npartitions():\n assert da.ones(5, chunks=(2,)).npartitions == 3\n assert da.ones((5, 5), chunks=(2, 3)).npartitions == 6\n\n\ndef test_astype_gh1151():\n a = np.arange(5).astype(np.int32)\n b = da.from_array(a, (1,))\n assert_eq(a.astype(np.int16), b.astype(np.int16))\n\n\ndef test_elemwise_name():\n assert (da.ones(5, chunks=2) + 1).name.startswith(\"add-\")\n\n\ndef test_map_blocks_name():\n assert da.ones(5, chunks=2).map_blocks(inc).name.startswith(\"inc-\")\n\n\ndef test_from_array_names():\n pytest.importorskip(\"distributed\")\n\n x = np.ones(10)\n d = da.from_array(x, chunks=2)\n\n names = countby(key_split, d.dask)\n assert set(names.values()) == set([5])\n\n\n@pytest.mark.parametrize(\n \"array\",\n [\n da.arange(100, chunks=25),\n da.ones((10, 10), chunks=25),\n ],\n)\ndef test_array_picklable(array):\n from pickle import loads, dumps\n\n a2 = loads(dumps(array))\n assert_eq(array, a2)\n\n\ndef test_from_array_raises_on_bad_chunks():\n x = np.ones(10)\n\n with pytest.raises(ValueError):\n da.from_array(x, chunks=(5, 5, 5))\n\n # with pytest.raises(ValueError):\n # da.from_array(x, chunks=100)\n\n with pytest.raises(ValueError):\n da.from_array(x, chunks=((5, 5, 5),))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_axes_test_concatenate_axes.None_1._too_many_axes": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_axes_test_concatenate_axes.None_1._too_many_axes", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3333, "end_line": 3348, "span_ids": ["test_concatenate_axes"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_concatenate_axes():\n x = np.ones((2, 2, 2))\n\n assert_eq(concatenate_axes([x, x], axes=[0]), np.ones((4, 2, 2)))\n assert_eq(concatenate_axes([x, x, x], axes=[0]), np.ones((6, 2, 2)))\n assert_eq(concatenate_axes([x, x], axes=[1]), np.ones((2, 4, 2)))\n assert_eq(concatenate_axes([[x, x], [x, x]], axes=[0, 1]), np.ones((4, 4, 2)))\n assert_eq(concatenate_axes([[x, x], [x, x]], axes=[0, 2]), np.ones((4, 2, 4)))\n assert_eq(concatenate_axes([[x, x, x], [x, x, x]], axes=[1, 2]), np.ones((2, 4, 6)))\n\n with pytest.raises(ValueError):\n concatenate_axes(\n [[x, x], [x, x]], axes=[0]\n ) # not all nested lists accounted for\n with pytest.raises(ValueError):\n concatenate_axes([x, x], axes=[0, 1, 2, 3]) # too many axes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_concatenate_test_blockwise_concatenate.assert_eq_z_np_ones_10_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_concatenate_test_blockwise_concatenate.assert_eq_z_np_ones_10_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3351, "end_line": 3384, "span_ids": ["test_blockwise_concatenate"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_concatenate():\n x = da.ones((4, 4, 4), chunks=(2, 2, 2))\n y = da.ones((4, 4), chunks=(2, 2))\n\n def f(a, b):\n assert isinstance(a, np.ndarray)\n assert isinstance(b, np.ndarray)\n\n assert a.shape == (2, 4, 4)\n assert b.shape == (4, 4)\n\n return (a + b).sum(axis=(1, 2))\n\n z = da.blockwise(f, \"i\", x, \"ijk\", y, \"jk\", concatenate=True, dtype=x.dtype)\n assert_eq(z, np.ones(4) * 32)\n\n z = da.blockwise(add, \"ij\", y, \"ij\", y, \"ij\", concatenate=True, dtype=x.dtype)\n assert_eq(z, np.ones((4, 4)) * 2)\n\n def f(a, b, c):\n assert isinstance(a, np.ndarray)\n assert isinstance(b, np.ndarray)\n assert isinstance(c, np.ndarray)\n\n assert a.shape == (4, 2, 4)\n assert b.shape == (4, 4)\n assert c.shape == (4, 2)\n\n return np.ones(5)\n\n z = da.blockwise(\n f, \"j\", x, \"ijk\", y, \"ki\", y, \"ij\", concatenate=True, dtype=x.dtype\n )\n assert_eq(z, np.ones(10), check_shape=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_common_blockdim_test_common_blockdim.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_common_blockdim_test_common_blockdim.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3387, "end_line": 3395, "span_ids": ["test_common_blockdim"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_common_blockdim():\n assert common_blockdim([(5,), (5,)]) == (5,)\n assert common_blockdim([(5,), (2, 3)]) == (2, 3)\n assert common_blockdim([(5, 5), (2, 3, 5)]) == (2, 3, 5)\n assert common_blockdim([(5, 5), (2, 3, 5)]) == (2, 3, 5)\n assert common_blockdim([(5, 2, 3), (2, 3, 5)]) == (2, 3, 2, 3)\n\n assert common_blockdim([(1, 2), (2, 1)]) == (1, 1, 1)\n assert common_blockdim([(1, 2, 2), (2, 1, 2), (2, 2, 1)]) == (1, 1, 1, 1, 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_that_fit_neatly_test_elemwise_uneven_chunks.assert_z_chunks_2_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_that_fit_neatly_test_elemwise_uneven_chunks.assert_z_chunks_2_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3398, "end_line": 3422, "span_ids": ["test_elemwise_uneven_chunks", "test_uneven_chunks_that_fit_neatly"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_uneven_chunks_that_fit_neatly():\n x = da.arange(10, chunks=((5, 5),))\n y = da.ones(10, chunks=((5, 2, 3),))\n\n assert_eq(x + y, np.arange(10) + np.ones(10))\n\n z = x + y\n assert z.chunks == ((5, 2, 3),)\n\n\ndef test_elemwise_uneven_chunks():\n x = da.arange(10, chunks=((4, 6),))\n y = da.ones(10, chunks=((6, 4),))\n\n assert_eq(x + y, np.arange(10) + np.ones(10))\n\n z = x + y\n assert z.chunks == ((4, 2, 4),)\n\n x = da.random.random((10, 10), chunks=((4, 6), (5, 2, 3)))\n y = da.random.random((4, 10, 10), chunks=((2, 2), (6, 4), (2, 3, 5)))\n\n z = x + y\n assert_eq(x + y, x.compute() + y.compute())\n assert z.chunks == ((2, 2), (4, 2, 4), (2, 3, 2, 3))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_blockwise_test_uneven_chunks_blockwise.assert_eq_z_x_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_uneven_chunks_blockwise_test_uneven_chunks_blockwise.assert_eq_z_x_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3425, "end_line": 3431, "span_ids": ["test_uneven_chunks_blockwise"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_uneven_chunks_blockwise():\n x = da.random.random((10, 10), chunks=((2, 3, 2, 3), (5, 5)))\n y = da.random.random((10, 10), chunks=((4, 4, 2), (4, 2, 4)))\n z = da.blockwise(np.dot, \"ik\", x, \"ij\", y, \"jk\", dtype=x.dtype, concatenate=True)\n assert z.chunks == (x.chunks[0], y.chunks[1])\n\n assert_eq(z, x.compute().dot(y))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_warn_bad_rechunking_test_map_blocks_delayed.assert_yy_key_in_zz_dask": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_warn_bad_rechunking_test_map_blocks_delayed.assert_yy_key_in_zz_dask", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3434, "end_line": 3463, "span_ids": ["test_warn_bad_rechunking", "test_map_blocks_delayed", "test_concatenate_stack_dont_warn"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_warn_bad_rechunking():\n x = da.ones((20, 20), chunks=(20, 1))\n y = da.ones((20, 20), chunks=(1, 20))\n\n with pytest.warns(da.core.PerformanceWarning, match=\"factor of 20\"):\n x + y\n\n\ndef test_concatenate_stack_dont_warn():\n with warnings.catch_warnings(record=True) as record:\n da.concatenate([da.ones(2, chunks=1)] * 62)\n assert not record\n\n with warnings.catch_warnings(record=True) as record:\n da.stack([da.ones(2, chunks=1)] * 62)\n assert not record\n\n\ndef test_map_blocks_delayed():\n x = da.ones((10, 10), chunks=(5, 5))\n y = np.ones((5, 5))\n\n z = x.map_blocks(add, y, dtype=x.dtype)\n\n yy = delayed(y)\n zz = x.map_blocks(add, yy, dtype=x.dtype)\n\n assert_eq(z, zz)\n\n assert yy.key in zz.dask", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_test_no_chunks.assert_eq_x_x_std_kee": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_test_no_chunks.assert_eq_x_x_std_kee", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3466, "end_line": 3474, "span_ids": ["test_no_chunks"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_chunks():\n X = np.arange(11)\n dsk = {(\"x\", 0): np.arange(5), (\"x\", 1): np.arange(5, 11)}\n x = Array(dsk, \"x\", ((np.nan, np.nan),), np.arange(1).dtype)\n assert_eq(x + 1, X + 1)\n assert_eq(x.sum(), X.sum())\n assert_eq((x + 1).std(), (X + 1).std())\n assert_eq((x + x).std(), (X + X).std())\n assert_eq((x + x).std(keepdims=True), (X + X).std(keepdims=True))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_2d_test_no_chunks_2d.assert_eq_x_dot_x_T_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_2d_test_no_chunks_2d.assert_eq_x_dot_x_T_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3477, "end_line": 3487, "span_ids": ["test_no_chunks_2d"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_chunks_2d():\n X = np.arange(24).reshape((4, 6))\n x = da.from_array(X, chunks=(2, 2))\n x._chunks = ((np.nan, np.nan), (np.nan, np.nan, np.nan))\n\n with pytest.warns(None): # zero division warning\n assert_eq(da.log(x), np.log(X))\n assert_eq(x.T, X.T)\n assert_eq(x.sum(axis=0, keepdims=True), X.sum(axis=0, keepdims=True))\n assert_eq(x.sum(axis=1, keepdims=True), X.sum(axis=1, keepdims=True))\n assert_eq(x.dot(x.T + 1), X.dot(X.T + 1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_yes_chunks_test_no_chunks_yes_chunks.assert_x_dot_x_T_chunk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_yes_chunks_test_no_chunks_yes_chunks.assert_x_dot_x_T_chunk", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3490, "end_line": 3497, "span_ids": ["test_no_chunks_yes_chunks"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_chunks_yes_chunks():\n X = np.arange(24).reshape((4, 6))\n x = da.from_array(X, chunks=(2, 2))\n x._chunks = ((2, 2), (np.nan, np.nan, np.nan))\n\n assert (x + 1).chunks == ((2, 2), (np.nan, np.nan, np.nan))\n assert (x.T).chunks == ((np.nan, np.nan, np.nan), (2, 2))\n assert (x.dot(x.T)).chunks == ((2, 2), (2, 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_informative_errors_no_chunks_test_raise_informative_errors_no_chunks.for_op_in_.if_chunk_not_in_str_e_v.op_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_raise_informative_errors_no_chunks_test_raise_informative_errors_no_chunks.for_op_in_.if_chunk_not_in_str_e_v.op_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3500, "end_line": 3519, "span_ids": ["test_raise_informative_errors_no_chunks"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_raise_informative_errors_no_chunks():\n X = np.arange(10)\n a = da.from_array(X, chunks=(5, 5))\n a._chunks = ((np.nan, np.nan),)\n\n b = da.from_array(X, chunks=(4, 4, 2))\n b._chunks = ((np.nan, np.nan, np.nan),)\n\n for op in [\n lambda: a + b,\n lambda: a[1],\n lambda: a[::2],\n lambda: a[-5],\n lambda: a.rechunk(3),\n lambda: a.reshape(2, 5),\n ]:\n with pytest.raises(ValueError) as e:\n op()\n if \"chunk\" not in str(e.value) or \"unknown\" not in str(e.value):\n op()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_slicing_2d_test_no_chunks_slicing_2d.for_op_in_lambda_x_4.with_pytest_raises_ValueE.op_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_chunks_slicing_2d_test_no_chunks_slicing_2d.for_op_in_lambda_x_4.with_pytest_raises_ValueE.op_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3522, "end_line": 3531, "span_ids": ["test_no_chunks_slicing_2d"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_chunks_slicing_2d():\n X = np.arange(24).reshape((4, 6))\n x = da.from_array(X, chunks=(2, 2))\n x._chunks = ((2, 2), (np.nan, np.nan, np.nan))\n\n assert_eq(x[0], X[0])\n\n for op in [lambda: x[:, 4], lambda: x[:, ::2], lambda: x[0, 2:4]]:\n with pytest.raises(ValueError, match=\"chunk sizes are unknown\"):\n op()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_1d_test_index_array_with_array_1d.with_pytest_raises_ValueE.dx_dy_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_1d_test_index_array_with_array_1d.with_pytest_raises_ValueE.dx_dy_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3534, "end_line": 3545, "span_ids": ["test_index_array_with_array_1d"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_index_array_with_array_1d():\n x = np.arange(10)\n dx = da.from_array(x, chunks=(5,))\n dx._chunks = ((np.nan, np.nan),)\n\n assert_eq(x[x > 6], dx[dx > 6])\n assert_eq(x[x % 2 == 0], dx[dx % 2 == 0])\n\n dy = da.ones(11, chunks=(3,))\n\n with pytest.raises(ValueError):\n dx[dy > 5]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_2d_test_index_array_with_array_2d.assert_len_record_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_2d_test_index_array_with_array_2d.assert_len_record_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3548, "end_line": 3564, "span_ids": ["test_index_array_with_array_2d"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_index_array_with_array_2d():\n x = np.arange(24).reshape((4, 6))\n dx = da.from_array(x, chunks=(2, 2))\n\n assert_eq(x[x > 6], dx[dx > 6])\n assert_eq(x[x % 2 == 0], dx[dx % 2 == 0])\n\n # Test with unknown chunks\n dx._chunks = ((2, 2), (np.nan, np.nan, np.nan))\n\n with pytest.warns(UserWarning, match=\"different ordering\") as record:\n assert sorted(x[x % 2 == 0].tolist()) == sorted(\n dx[dx % 2 == 0].compute().tolist()\n )\n assert sorted(x[x > 6].tolist()) == sorted(dx[dx > 6].compute().tolist())\n\n assert len(record) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_3d_2d_test_index_array_with_array_3d_2d.assert_eq_x_ind_dx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_index_array_with_array_3d_2d_test_index_array_with_array_3d_2d.assert_eq_x_ind_dx_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3567, "end_line": 3577, "span_ids": ["test_index_array_with_array_3d_2d"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"Chunking does not align well\")\ndef test_index_array_with_array_3d_2d():\n x = np.arange(4 ** 3).reshape((4, 4, 4))\n dx = da.from_array(x, chunks=(2, 2, 2))\n\n ind = np.random.random((4, 4)) > 0.5\n ind = np.arange(4 ** 2).reshape((4, 4)) % 2 == 0\n dind = da.from_array(ind, (2, 2))\n\n assert_eq(x[ind], dx[dind])\n assert_eq(x[:, ind], dx[:, dind])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_setitem_1d_test_blockwise_zero_shape_new_axes.da_blockwise_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_setitem_1d_test_blockwise_zero_shape_new_axes.da_blockwise_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3580, "end_line": 3651, "span_ids": ["test_blockwise_zero_shape", "test_zero_sized_array_rechunk", "test_setitem_errs", "test_blockwise_zero_shape_new_axes", "test_zero_slice_dtypes", "test_setitem_1d", "test_setitem_2d"], "tokens": 502}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_setitem_1d():\n x = np.arange(10)\n dx = da.from_array(x.copy(), chunks=(5,))\n\n x[x > 6] = -1\n x[x % 2 == 0] = -2\n\n dx[dx > 6] = -1\n dx[dx % 2 == 0] = -2\n\n assert_eq(x, dx)\n\n\ndef test_setitem_2d():\n x = np.arange(24).reshape((4, 6))\n dx = da.from_array(x.copy(), chunks=(2, 2))\n\n x[x > 6] = -1\n x[x % 2 == 0] = -2\n\n dx[dx > 6] = -1\n dx[dx % 2 == 0] = -2\n\n assert_eq(x, dx)\n\n\ndef test_setitem_errs():\n x = da.ones((4, 4), chunks=(2, 2))\n\n with pytest.raises(ValueError):\n x[x > 1] = x\n\n\ndef test_zero_slice_dtypes():\n x = da.arange(5, chunks=1)\n y = x[[]]\n assert y.dtype == x.dtype\n assert y.shape == (0,)\n assert_eq(x[[]], np.arange(5)[[]])\n\n\ndef test_zero_sized_array_rechunk():\n x = da.arange(5, chunks=1)[:0]\n y = da.blockwise(identity, \"i\", x, \"i\", dtype=x.dtype)\n assert_eq(x, y)\n\n\ndef test_blockwise_zero_shape():\n da.blockwise(\n lambda x: x,\n \"i\",\n da.arange(10, chunks=10),\n \"i\",\n da.from_array(np.ones((0, 2)), ((0,), 2)),\n \"ab\",\n da.from_array(np.ones((0,)), ((0,),)),\n \"a\",\n dtype=\"float64\",\n )\n\n\ndef test_blockwise_zero_shape_new_axes():\n da.blockwise(\n lambda x: np.ones(42),\n \"i\",\n da.from_array(np.ones((0, 2)), ((0,), 2)),\n \"ab\",\n da.from_array(np.ones((0,)), ((0,),)),\n \"a\",\n dtype=\"float64\",\n new_axes={\"i\": 42},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_against_zero_shape_test_broadcast_against_zero_shape.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_broadcast_against_zero_shape_test_broadcast_against_zero_shape.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3654, "end_line": 3660, "span_ids": ["test_broadcast_against_zero_shape"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_broadcast_against_zero_shape():\n assert_eq(da.arange(1, chunks=1)[:0] + 0, np.arange(1)[:0] + 0)\n assert_eq(da.arange(1, chunks=1)[:0] + 0.1, np.arange(1)[:0] + 0.1)\n assert_eq(da.ones((5, 5), chunks=(2, 3))[:0] + 0, np.ones((5, 5))[:0] + 0)\n assert_eq(da.ones((5, 5), chunks=(2, 3))[:0] + 0.1, np.ones((5, 5))[:0] + 0.1)\n assert_eq(da.ones((5, 5), chunks=(2, 3))[:, :0] + 0, np.ones((5, 5))[:, :0] + 0)\n assert_eq(da.ones((5, 5), chunks=(2, 3))[:, :0] + 0.1, np.ones((5, 5))[:, :0] + 0.1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_name_test_from_array_name.assert_dx2_name_dx3_na": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_name_test_from_array_name.assert_dx2_name_dx3_na", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3663, "end_line": 3677, "span_ids": ["test_from_array_name"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_array_name():\n x = np.array([1, 2, 3, 4, 5])\n chunks = x.shape\n # Default is tokenize the array\n dx = da.from_array(x, chunks=chunks)\n hashed_name = dx.name\n assert da.from_array(x, chunks=chunks).name == hashed_name\n # Specify name directly\n assert da.from_array(x, chunks=chunks, name=\"x\").name == \"x\"\n # False gives a random name\n dx2 = da.from_array(x, chunks=chunks, name=False)\n dx3 = da.from_array(x, chunks=chunks, name=False)\n assert dx2.name != hashed_name\n assert dx3.name != hashed_name\n assert dx2.name != dx3.name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_errs_test_concatenate_errs.None_1.da_concatenate_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_concatenate_errs_test_concatenate_errs.None_1.da_concatenate_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3680, "end_line": 3689, "span_ids": ["test_concatenate_errs"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_concatenate_errs():\n with pytest.raises(ValueError, match=r\"Shapes.*\\(2, 1\\)\"):\n da.concatenate(\n [da.zeros((2, 1), chunks=(2, 1)), da.zeros((2, 3), chunks=(2, 3))]\n )\n\n with pytest.raises(ValueError):\n da.concatenate(\n [da.zeros((1, 2), chunks=(1, 2)), da.zeros((3, 2), chunks=(3, 2))], axis=1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_errs_test_blockwise_with_numpy_arrays.assert_any_x_is_v_for_v_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_stack_errs_test_blockwise_with_numpy_arrays.assert_any_x_is_v_for_v_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3692, "end_line": 3710, "span_ids": ["test_stack_errs", "test_blockwise_with_numpy_arrays"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stack_errs():\n with pytest.raises(ValueError) as e:\n da.stack([da.zeros((2,), chunks=2)] * 10 + [da.zeros((3,), chunks=3)] * 10)\n\n assert (\n str(e.value)\n == \"Stacked arrays must have the same shape. The first array had shape (2,), while array 11 has shape (3,).\"\n )\n assert len(str(e.value)) < 105\n\n\ndef test_blockwise_with_numpy_arrays():\n x = np.ones(10)\n y = da.ones(10, chunks=(5,))\n\n assert_eq(x + y, x + x)\n\n s = da.sum(x)\n assert any(x is v for v in s.dask.values())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_with_lists_test_elemwise_with_lists.assert_eq_x3_d3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_elemwise_with_lists_test_elemwise_with_lists.assert_eq_x3_d3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3713, "end_line": 3727, "span_ids": ["test_elemwise_with_lists"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", (100, 6))\n@pytest.mark.parametrize(\"other\", [[0, 0, 1], [2, 1, 3], (0, 0, 1)])\ndef test_elemwise_with_lists(chunks, other):\n x = np.arange(12).reshape((4, 3))\n d = da.arange(12, chunks=chunks).reshape((4, 3))\n\n x2 = np.vstack([x[:, 0], x[:, 1], x[:, 2]]).T\n d2 = da.vstack([d[:, 0], d[:, 1], d[:, 2]]).T\n\n assert_eq(x2, d2)\n\n x3 = x2 * other\n d3 = d2 * other\n\n assert_eq(x3, d3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructor_plugin_test_constructor_plugin.assert_len_L_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructor_plugin_test_constructor_plugin.assert_len_L_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3730, "end_line": 3744, "span_ids": ["test_constructor_plugin"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_constructor_plugin():\n L = []\n L2 = []\n with dask.config.set(array_plugins=[L.append, L2.append]):\n x = da.ones(10, chunks=5)\n y = x + 1\n\n assert L == L2 == [x, y]\n\n with dask.config.set(array_plugins=[lambda x: x.compute()]):\n x = da.ones(10, chunks=5)\n y = x + 1\n\n assert isinstance(y, np.ndarray)\n assert len(L) == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_on_metadata_test_meta.assert_a_nbytes_1000": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_on_metadata_test_meta.assert_a_nbytes_1000", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3747, "end_line": 3776, "span_ids": ["test_no_warnings_on_metadata", "test_delayed_array_key_hygeine", "test_meta", "test_empty_chunks_in_array_len"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_warnings_on_metadata():\n x = da.ones(5, chunks=3)\n with warnings.catch_warnings(record=True) as record:\n da.arccos(x)\n\n assert not record\n\n\ndef test_delayed_array_key_hygeine():\n a = da.zeros((1,), chunks=(1,))\n d = delayed(identity)(a)\n b = da.from_delayed(d, shape=a.shape, dtype=a.dtype)\n assert_eq(a, b)\n\n\ndef test_empty_chunks_in_array_len():\n x = da.ones((), chunks=())\n with pytest.raises(TypeError) as exc_info:\n len(x)\n\n err_msg = \"len() of unsized object\"\n assert err_msg in str(exc_info.value)\n\n\n@pytest.mark.parametrize(\"dtype\", [None, [(\"a\", \"f4\"), (\"b\", object)]])\ndef test_meta(dtype):\n a = da.zeros((1,), chunks=(1,))\n assert a._meta.dtype == a.dtype\n assert isinstance(a._meta, np.ndarray)\n assert a.nbytes < 1000", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_1d_test_normalize_chunks_auto_1d.assert_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_1d_test_normalize_chunks_auto_1d.assert_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3779, "end_line": 3792, "span_ids": ["test_normalize_chunks_auto_1d"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape,limit,expected\",\n [\n (100, 10, (10,) * 10),\n (20, 10, (10, 10)),\n (20, 5, (5, 5, 5, 5)),\n (24, 5, (4, 4, 4, 4, 4, 4)), # common factor is close, use it\n (23, 5, (5, 5, 5, 5, 3)), # relatively prime, don't use 1s\n (1000, 167, (125,) * 8), # find close value\n ],\n)\ndef test_normalize_chunks_auto_1d(shape, limit, expected):\n result = normalize_chunks(\"auto\", (shape,), limit=limit, dtype=np.uint8)\n assert result == (expected,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_2d_test_normalize_chunks_auto_2d.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_2d_test_normalize_chunks_auto_2d.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3795, "end_line": 3810, "span_ids": ["test_normalize_chunks_auto_2d"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape,chunks,limit,expected\",\n [\n ((20, 20), (\"auto\", 2), 20, ((10, 10), (2,) * 10)),\n (\n (20, 20),\n (\"auto\", (2, 2, 2, 2, 2, 5, 5)),\n 20,\n ((4, 4, 4, 4, 4), (2, 2, 2, 2, 2, 5, 5)),\n ),\n ((1, 20), \"auto\", 10, ((1,), (10, 10))),\n ],\n)\ndef test_normalize_chunks_auto_2d(shape, chunks, limit, expected):\n result = normalize_chunks(chunks, shape, limit=limit, dtype=\"uint8\")\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_3d_test_normalize_chunks_auto_3d.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_normalize_chunks_auto_3d_test_normalize_chunks_auto_3d.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3813, "end_line": 3822, "span_ids": ["test_normalize_chunks_auto_3d"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_normalize_chunks_auto_3d():\n result = normalize_chunks(\n (\"auto\", \"auto\", 2), (20, 20, 20), limit=200, dtype=\"uint8\"\n )\n expected = ((10, 10), (10, 10), (2,) * 10)\n assert result == expected\n\n result = normalize_chunks(\"auto\", (20, 20, 20), limit=8, dtype=\"uint8\")\n expected = ((2,) * 10,) * 3\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructors_chunks_dict_test_zarr_return_stored.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_constructors_chunks_dict_test_zarr_return_stored.with_tmpdir_as_d_.assert_a2_chunks_a_chu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3825, "end_line": 3895, "span_ids": ["test_from_array_chunks_dict", "test_from_zarr_name", "test_normalize_chunks_object_dtype", "test_normalize_chunks_nan", "test_zarr_return_stored", "test_zarr_roundtrip", "test_from_zarr_unique_name", "test_constructors_chunks_dict", "test_normalize_chunks_tuples_of_tuples"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_constructors_chunks_dict():\n x = da.ones((20, 20), chunks={0: 10, 1: 5})\n assert x.chunks == ((10, 10), (5, 5, 5, 5))\n\n x = da.ones((20, 20), chunks={0: 10, 1: \"auto\"})\n assert x.chunks == ((10, 10), (20,))\n\n\ndef test_from_array_chunks_dict():\n with dask.config.set({\"array.chunk-size\": \"128kiB\"}):\n x = np.empty((100, 100, 100))\n y = da.from_array(x, chunks={0: 10, 1: -1, 2: \"auto\"})\n z = da.from_array(x, chunks=(10, 100, 10))\n assert y.chunks == z.chunks\n\n\n@pytest.mark.parametrize(\"dtype\", [object, [(\"a\", object), (\"b\", int)]])\ndef test_normalize_chunks_object_dtype(dtype):\n x = np.array([\"a\", \"abc\"], dtype=object)\n with pytest.raises(NotImplementedError):\n da.from_array(x, chunks=\"auto\")\n\n\ndef test_normalize_chunks_tuples_of_tuples():\n result = normalize_chunks(((2, 3, 5), \"auto\"), (10, 10), limit=10, dtype=np.uint8)\n expected = ((2, 3, 5), (2, 2, 2, 2, 2))\n assert result == expected\n\n\ndef test_normalize_chunks_nan():\n with pytest.raises(ValueError) as info:\n normalize_chunks(\"auto\", (np.nan,), limit=10, dtype=np.uint8)\n assert \"auto\" in str(info.value)\n with pytest.raises(ValueError) as info:\n normalize_chunks(((np.nan, np.nan), \"auto\"), (10, 10), limit=10, dtype=np.uint8)\n assert \"auto\" in str(info.value)\n\n\ndef test_from_zarr_unique_name():\n zarr = pytest.importorskip(\"zarr\")\n a = zarr.array([1, 2, 3])\n b = zarr.array([4, 5, 6])\n\n assert da.from_zarr(a).name != da.from_zarr(b).name\n\n\ndef test_from_zarr_name():\n zarr = pytest.importorskip(\"zarr\")\n a = zarr.array([1, 2, 3])\n assert da.from_zarr(a, name=\"foo\").name == \"foo\"\n\n\ndef test_zarr_roundtrip():\n pytest.importorskip(\"zarr\")\n with tmpdir() as d:\n a = da.zeros((3, 3), chunks=(1, 1))\n a.to_zarr(d)\n a2 = da.from_zarr(d)\n assert_eq(a, a2)\n assert a2.chunks == a.chunks\n\n\n@pytest.mark.parametrize(\"compute\", [False, True])\ndef test_zarr_return_stored(compute):\n pytest.importorskip(\"zarr\")\n with tmpdir() as d:\n a = da.zeros((3, 3), chunks=(1, 1))\n a2 = a.to_zarr(d, compute=compute, return_stored=True)\n assert isinstance(a2, Array)\n assert_eq(a, a2, check_graph=False)\n assert a2.chunks == a.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_zarr_delayed_creates_no_metadata_test_zarr_pass_mapper.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_to_zarr_delayed_creates_no_metadata_test_zarr_pass_mapper.with_tmpdir_as_d_.assert_a2_chunks_a_chu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3898, "end_line": 3948, "span_ids": ["test_zarr_existing_array", "test_read_zarr_chunks", "test_to_zarr_delayed_creates_no_metadata", "test_to_zarr_unknown_chunks_raises", "test_zarr_pass_mapper"], "tokens": 411}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_zarr_delayed_creates_no_metadata():\n pytest.importorskip(\"zarr\")\n with tmpdir() as d:\n a = da.from_array([42])\n result = a.to_zarr(d, compute=False)\n assert not os.listdir(d) # No .zarray file\n # Verify array still created upon compute.\n result.compute()\n a2 = da.from_zarr(d)\n assert_eq(a, a2)\n\n\ndef test_zarr_existing_array():\n zarr = pytest.importorskip(\"zarr\")\n c = (1, 1)\n a = da.ones((3, 3), chunks=c)\n z = zarr.zeros_like(a, chunks=c)\n a.to_zarr(z)\n a2 = da.from_zarr(z)\n assert_eq(a, a2)\n assert a2.chunks == a.chunks\n\n\ndef test_to_zarr_unknown_chunks_raises():\n pytest.importorskip(\"zarr\")\n a = da.random.random((10,), chunks=(3,))\n a = a[a > 0.5]\n with pytest.raises(ValueError, match=\"unknown chunk sizes\"):\n a.to_zarr({})\n\n\ndef test_read_zarr_chunks():\n pytest.importorskip(\"zarr\")\n a = da.zeros((9,), chunks=(3,))\n with tmpdir() as d:\n a.to_zarr(d)\n arr = da.from_zarr(d, chunks=(5,))\n assert arr.chunks == ((5, 4),)\n\n\ndef test_zarr_pass_mapper():\n pytest.importorskip(\"zarr\")\n import zarr.storage\n\n with tmpdir() as d:\n mapper = zarr.storage.DirectoryStore(d)\n a = da.zeros((3, 3), chunks=(1, 1))\n a.to_zarr(mapper)\n a2 = da.from_zarr(mapper)\n assert_eq(a, a2)\n assert a2.chunks == a.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_zarr_group_test_zarr_group.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_zarr_group_test_zarr_group.with_tmpdir_as_d_.assert_a2_chunks_a_chu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3951, "end_line": 3969, "span_ids": ["test_zarr_group"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_zarr_group():\n zarr = pytest.importorskip(\"zarr\")\n with tmpdir() as d:\n a = da.zeros((3, 3), chunks=(1, 1))\n a.to_zarr(d, component=\"test\")\n with pytest.raises((OSError, ValueError)):\n a.to_zarr(d, component=\"test\", overwrite=False)\n a.to_zarr(d, component=\"test\", overwrite=True)\n\n # second time is fine, group exists\n a.to_zarr(d, component=\"test2\", overwrite=False)\n a.to_zarr(d, component=\"nested/test\", overwrite=False)\n group = zarr.open_group(d, mode=\"r\")\n assert list(group) == [\"nested\", \"test\", \"test2\"]\n assert \"test\" in group[\"nested\"]\n\n a2 = da.from_zarr(d, component=\"test\")\n assert_eq(a, a2)\n assert a2.chunks == a.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_regular_chunks_test_zarr_nocompute.with_tmpdir_as_d_.assert_a2_chunks_a_chu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_regular_chunks_test_zarr_nocompute.with_tmpdir_as_d_.assert_a2_chunks_a_chu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 3972, "end_line": 3999, "span_ids": ["test_regular_chunks", "test_zarr_nocompute"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"data\",\n [\n [(), True],\n [((1,),), True],\n [((1, 1, 1),), True],\n [((1,), (1,)), True],\n [((2, 2, 1),), True],\n [((2, 2, 3),), False],\n [((1, 1, 1), (2, 2, 3)), False],\n [((1, 2, 1),), False],\n ],\n)\ndef test_regular_chunks(data):\n chunkset, expected = data\n assert da.core._check_regular_chunks(chunkset) == expected\n\n\ndef test_zarr_nocompute():\n pytest.importorskip(\"zarr\")\n with tmpdir() as d:\n a = da.zeros((3, 3), chunks=(1, 1))\n out = a.to_zarr(d, compute=False)\n assert isinstance(out, Delayed)\n dask.compute(out)\n a2 = da.from_zarr(d)\n assert_eq(a, a2)\n assert a2.chunks == a.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_roundtrip_test_tiledb_roundtrip.None_2.assert_a_chunks_tdb_ch": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_roundtrip_test_tiledb_roundtrip.None_2.assert_a_chunks_tdb_ch", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4002, "end_line": 4032, "span_ids": ["test_tiledb_roundtrip"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tiledb_roundtrip():\n tiledb = pytest.importorskip(\"tiledb\")\n # 1) load with default chunking\n # 2) load from existing tiledb.DenseArray\n # 3) write to existing tiledb.DenseArray\n a = da.random.random((3, 3))\n with tmpdir() as uri:\n da.to_tiledb(a, uri)\n tdb = da.from_tiledb(uri)\n\n assert_eq(a, tdb)\n assert a.chunks == tdb.chunks\n\n # from tiledb.array\n with tiledb.open(uri) as t:\n tdb2 = da.from_tiledb(t)\n assert_eq(a, tdb2)\n\n with tmpdir() as uri2:\n with tiledb.empty_like(uri2, a) as t:\n a.to_tiledb(t)\n assert_eq(da.from_tiledb(uri2), a)\n\n # specific chunking\n with tmpdir() as uri:\n a = da.random.random((3, 3), chunks=(1, 1))\n a.to_tiledb(uri)\n tdb = da.from_tiledb(uri)\n\n assert_eq(a, tdb)\n assert a.chunks == tdb.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_multiattr_test_tiledb_multiattr.with_tmpdir_as_uri_.assert_eq_np_mean_ar2_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_tiledb_multiattr_test_tiledb_multiattr.with_tmpdir_as_uri_.assert_eq_np_mean_ar2_d", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4035, "end_line": 4060, "span_ids": ["test_tiledb_multiattr"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tiledb_multiattr():\n tiledb = pytest.importorskip(\"tiledb\")\n dom = tiledb.Domain(\n tiledb.Dim(\"x\", (0, 1000), tile=100), tiledb.Dim(\"y\", (0, 1000), tile=100)\n )\n schema = tiledb.ArraySchema(\n attrs=(tiledb.Attr(\"attr1\"), tiledb.Attr(\"attr2\")), domain=dom\n )\n\n with tmpdir() as uri:\n tiledb.DenseArray.create(uri, schema)\n tdb = tiledb.DenseArray(uri, \"w\")\n\n ar1 = np.random.randn(*tdb.schema.shape)\n ar2 = np.random.randn(*tdb.schema.shape)\n\n tdb[:] = {\"attr1\": ar1, \"attr2\": ar2}\n tdb = tiledb.DenseArray(uri, \"r\")\n\n # basic round-trip from dask.array\n d = da.from_tiledb(uri, attribute=\"attr2\")\n assert_eq(d, ar2)\n\n # smoke-test computation directly on the TileDB view\n d = da.from_tiledb(uri, attribute=\"attr2\")\n assert_eq(np.mean(ar2), d.mean().compute(scheduler=\"threads\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blocks_indexer_test_blocks_indexer.with_pytest_raises_IndexE.x_blocks_100_100_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blocks_indexer_test_blocks_indexer.with_pytest_raises_IndexE.x_blocks_100_100_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4063, "end_line": 4094, "span_ids": ["test_blocks_indexer"], "tokens": 381}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blocks_indexer():\n x = da.arange(10, chunks=2)\n\n assert isinstance(x.blocks[0], da.Array)\n\n assert_eq(x.blocks[0], x[:2])\n assert_eq(x.blocks[-1], x[-2:])\n assert_eq(x.blocks[:3], x[:6])\n assert_eq(x.blocks[[0, 1, 2]], x[:6])\n assert_eq(x.blocks[[3, 0, 2]], np.array([6, 7, 0, 1, 4, 5]))\n\n x = da.random.random((20, 20), chunks=(4, 5))\n assert_eq(x.blocks[0], x[:4])\n assert_eq(x.blocks[0, :3], x[:4, :15])\n assert_eq(x.blocks[:, :3], x[:, :15])\n\n x = da.ones((40, 40, 40), chunks=(10, 10, 10))\n assert_eq(x.blocks[0, :, 0], np.ones((10, 40, 10)))\n\n x = da.ones((2, 2), chunks=1)\n with pytest.raises(ValueError):\n x.blocks[[0, 1], [0, 1]]\n with pytest.raises(ValueError):\n x.blocks[np.array([0, 1]), [0, 1]]\n with pytest.raises(ValueError) as info:\n x.blocks[np.array([0, 1]), np.array([0, 1])]\n assert \"list\" in str(info.value)\n with pytest.raises(ValueError) as info:\n x.blocks[None, :, :]\n assert \"newaxis\" in str(info.value) and \"not supported\" in str(info.value)\n with pytest.raises(IndexError) as info:\n x.blocks[100, 100]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_partitions_indexer_test_partitions_indexer.with_pytest_raises_IndexE.x_partitions_100_100_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_partitions_indexer_test_partitions_indexer.with_pytest_raises_IndexE.x_partitions_100_100_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4097, "end_line": 4129, "span_ids": ["test_partitions_indexer"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_partitions_indexer():\n # .partitions is an alias of .blocks for dask arrays\n x = da.arange(10, chunks=2)\n\n assert isinstance(x.partitions[0], da.Array)\n\n assert_eq(x.partitions[0], x[:2])\n assert_eq(x.partitions[-1], x[-2:])\n assert_eq(x.partitions[:3], x[:6])\n assert_eq(x.partitions[[0, 1, 2]], x[:6])\n assert_eq(x.partitions[[3, 0, 2]], np.array([6, 7, 0, 1, 4, 5]))\n\n x = da.random.random((20, 20), chunks=(4, 5))\n assert_eq(x.partitions[0], x[:4])\n assert_eq(x.partitions[0, :3], x[:4, :15])\n assert_eq(x.partitions[:, :3], x[:, :15])\n\n x = da.ones((40, 40, 40), chunks=(10, 10, 10))\n assert_eq(x.partitions[0, :, 0], np.ones((10, 40, 10)))\n\n x = da.ones((2, 2), chunks=1)\n with pytest.raises(ValueError):\n x.partitions[[0, 1], [0, 1]]\n with pytest.raises(ValueError):\n x.partitions[np.array([0, 1]), [0, 1]]\n with pytest.raises(ValueError) as info:\n x.partitions[np.array([0, 1]), np.array([0, 1])]\n assert \"list\" in str(info.value)\n with pytest.raises(ValueError) as info:\n x.partitions[None, :, :]\n assert \"newaxis\" in str(info.value) and \"not supported\" in str(info.value)\n with pytest.raises(IndexError) as info:\n x.partitions[100, 100]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dask_array_holds_scipy_sparse_containers_test_dask_array_holds_scipy_sparse_containers.assert_zz_xx_T_all_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_dask_array_holds_scipy_sparse_containers_test_dask_array_holds_scipy_sparse_containers.assert_zz_xx_T_all_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4132, "end_line": 4153, "span_ids": ["test_dask_array_holds_scipy_sparse_containers"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.filterwarnings(\"ignore:the matrix subclass:PendingDeprecationWarning\")\ndef test_dask_array_holds_scipy_sparse_containers():\n pytest.importorskip(\"scipy.sparse\")\n import scipy.sparse\n\n x = da.random.random((1000, 10), chunks=(100, 10))\n x[x < 0.9] = 0\n xx = x.compute()\n y = x.map_blocks(scipy.sparse.csr_matrix)\n\n vs = y.to_delayed().flatten().tolist()\n values = dask.compute(*vs, scheduler=\"single-threaded\")\n assert all(isinstance(v, scipy.sparse.csr_matrix) for v in values)\n\n yy = y.compute(scheduler=\"single-threaded\")\n assert isinstance(yy, scipy.sparse.spmatrix)\n assert (yy == xx).all()\n\n z = x.T.map_blocks(scipy.sparse.csr_matrix)\n zz = z.compute(scheduler=\"single-threaded\")\n assert isinstance(zz, scipy.sparse.spmatrix)\n assert (zz == xx.T).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_scipy_sparse_concatenate_test_scipy_sparse_concatenate.assert_z_z_expected_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_scipy_sparse_concatenate_test_scipy_sparse_concatenate.assert_z_z_expected_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4156, "end_line": 4180, "span_ids": ["test_scipy_sparse_concatenate"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axis\", [0, 1])\ndef test_scipy_sparse_concatenate(axis):\n pytest.importorskip(\"scipy.sparse\")\n import scipy.sparse\n\n rs = da.random.RandomState(RandomState=np.random.RandomState)\n\n xs = []\n ys = []\n for i in range(2):\n x = rs.random((1000, 10), chunks=(100, 10))\n x[x < 0.9] = 0\n xs.append(x)\n ys.append(x.map_blocks(scipy.sparse.csr_matrix))\n\n z = da.concatenate(ys, axis=axis)\n z = z.compute()\n\n if axis == 0:\n sp_concatenate = scipy.sparse.vstack\n elif axis == 1:\n sp_concatenate = scipy.sparse.hstack\n z_expected = sp_concatenate([scipy.sparse.csr_matrix(e.compute()) for e in xs])\n\n assert (z != z_expected).nnz == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_3851_test_map_blocks_large_inputs_delayed.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_3851_test_map_blocks_large_inputs_delayed.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4183, "end_line": 4207, "span_ids": ["test_map_blocks_large_inputs_delayed", "test_3925", "test_3851"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_3851():\n with warnings.catch_warnings() as record:\n Y = da.random.random((10, 10), chunks=\"auto\")\n da.argmax(Y, axis=0).compute()\n\n assert not record\n\n\ndef test_3925():\n x = da.from_array(np.array([\"a\", \"b\", \"c\"], dtype=object), chunks=-1)\n assert (x[0] == x[0]).compute(scheduler=\"sync\")\n\n\ndef test_map_blocks_large_inputs_delayed():\n a = da.ones(10, chunks=(5,))\n b = np.ones(1000000)\n\n c = a.map_blocks(add, b)\n assert any(b is v for v in c.dask.values())\n assert repr(dict(c.dask)).count(repr(b)[:10]) == 1 # only one occurrence\n\n d = a.map_blocks(lambda x, y: x + y.sum(), y=b)\n assert_eq(d, d)\n assert any(b is v for v in d.dask.values())\n assert repr(dict(c.dask)).count(repr(b)[:10]) == 1 # only one occurrence", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_large_inputs_delayed_test_blockwise_large_inputs_delayed.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_blockwise_large_inputs_delayed_test_blockwise_large_inputs_delayed.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4210, "end_line": 4220, "span_ids": ["test_blockwise_large_inputs_delayed"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_large_inputs_delayed():\n a = da.ones(10, chunks=(5,))\n b = np.ones(1000000)\n\n c = da.blockwise(add, \"i\", a, \"i\", b, None, dtype=a.dtype)\n assert any(b is v for v in c.dask.values())\n assert repr(dict(c.dask)).count(repr(b)[:10]) == 1 # only one occurrence\n\n d = da.blockwise(lambda x, y: x + y, \"i\", a, \"i\", y=b, dtype=a.dtype)\n assert any(b is v for v in d.dask.values())\n assert repr(dict(c.dask)).count(repr(b)[:10]) == 1 # only one occurrence", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_reversed_test_map_blocks_chunks.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_slice_reversed_test_map_blocks_chunks.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4223, "end_line": 4240, "span_ids": ["test_slice_reversed", "test_map_blocks_chunks"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_reversed():\n x = da.ones(10, chunks=-1)\n y = x[6:3]\n\n assert_eq(y, np.ones(0))\n\n\ndef test_map_blocks_chunks():\n x = da.arange(400, chunks=(100,))\n y = da.arange(40, chunks=(10,))\n\n def func(a, b):\n return np.array([a.max(), b.max()])\n\n assert_eq(\n da.map_blocks(func, x, y, chunks=(2,), dtype=x.dtype),\n np.array([99, 9, 199, 19, 299, 29, 399, 39]),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_nbytes_auto_test_nbytes_auto.None_3.normalize_chunks_10B_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_nbytes_auto_test_nbytes_auto.None_3.normalize_chunks_10B_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4243, "end_line": 4262, "span_ids": ["test_nbytes_auto"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nbytes_auto():\n chunks = normalize_chunks(\"800B\", shape=(500,), dtype=\"float64\")\n assert chunks == ((100, 100, 100, 100, 100),)\n chunks = normalize_chunks(\"200B\", shape=(10, 10), dtype=\"float64\")\n assert chunks == ((5, 5), (5, 5))\n chunks = normalize_chunks((5, \"200B\"), shape=(10, 10), dtype=\"float64\")\n assert chunks == ((5, 5), (5, 5))\n chunks = normalize_chunks(\"33B\", shape=(10, 10), dtype=\"float64\")\n assert chunks == ((2, 2, 2, 2, 2), (2, 2, 2, 2, 2))\n chunks = normalize_chunks(\"1800B\", shape=(10, 20, 30), dtype=\"float64\")\n assert chunks == ((5, 5), (5, 5, 5, 5), (6, 6, 6, 6, 6))\n\n with pytest.raises(ValueError):\n normalize_chunks(\"10B\", shape=(10,), limit=20, dtype=\"float64\")\n with pytest.raises(ValueError):\n normalize_chunks(\"100B\", shape=(10, 10), limit=20, dtype=\"float64\")\n with pytest.raises(ValueError):\n normalize_chunks((\"100B\", \"10B\"), shape=(10, 10), dtype=\"float64\")\n with pytest.raises(ValueError):\n normalize_chunks((\"10B\", \"10B\"), shape=(10, 10), limit=20, dtype=\"float64\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_auto_chunks_h5py_test_auto_chunks_h5py.with_tmpfile_hdf5_as_.None_1.with_dask_config_set_ar.assert_x_chunks_256_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_auto_chunks_h5py_test_auto_chunks_h5py.with_tmpfile_hdf5_as_.None_1.with_dask_config_set_ar.assert_x_chunks_256_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4265, "end_line": 4280, "span_ids": ["test_auto_chunks_h5py"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_auto_chunks_h5py():\n h5py = pytest.importorskip(\"h5py\")\n\n with tmpfile(\".hdf5\") as fn:\n with h5py.File(fn, mode=\"a\") as f:\n d = f.create_dataset(\n \"/x\", shape=(1000, 1000), chunks=(32, 64), dtype=\"float64\"\n )\n d[:] = 1\n\n with h5py.File(fn, mode=\"a\") as f:\n d = f[\"x\"]\n with dask.config.set({\"array.chunk-size\": \"1 MiB\"}):\n x = da.from_array(d)\n assert isinstance(x._meta, np.ndarray)\n assert x.chunks == ((256, 256, 256, 232), (512, 488))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_from_blockwise_test_no_warnings_from_blockwise.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_no_warnings_from_blockwise_test_no_warnings_from_blockwise.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4283, "end_line": 4297, "span_ids": ["test_no_warnings_from_blockwise"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_warnings_from_blockwise():\n with pytest.warns(None) as record:\n x = da.ones((3, 10, 10), chunks=(3, 2, 2))\n da.map_blocks(lambda y: np.mean(y, axis=0), x, dtype=x.dtype, drop_axis=0)\n assert not record\n\n with pytest.warns(None) as record:\n x = da.ones((15, 15), chunks=(5, 5))\n (x.dot(x.T + 1) - x.mean(axis=0)).std()\n assert not record\n\n with pytest.warns(None) as record:\n x = da.ones((1,), chunks=(1,))\n 1 / x[0]\n assert not record", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_meta_test_compute_chunk_sizes.assert_isinstance_z_chunk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_from_array_meta_test_compute_chunk_sizes.assert_isinstance_z_chunk", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4300, "end_line": 4321, "span_ids": ["test_from_array_meta", "test_compute_chunk_sizes"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(_numpy_120, reason=\"https://github.com/pydata/sparse/issues/383\")\ndef test_from_array_meta():\n sparse = pytest.importorskip(\"sparse\")\n x = np.ones(10)\n meta = sparse.COO.from_numpy(x)\n y = da.from_array(x, meta=meta)\n assert isinstance(y._meta, sparse.COO)\n\n\ndef test_compute_chunk_sizes():\n x = da.from_array(np.linspace(-1, 1, num=50), chunks=10)\n y = x[x < 0]\n assert np.isnan(y.shape[0])\n assert y.chunks == ((np.nan,) * 5,)\n\n z = y.compute_chunk_sizes()\n assert y is z\n assert z.chunks == ((10, 10, 5, 0, 0),)\n assert len(z) == 25\n\n # check that dtype of chunk dimensions is `int`\n assert isinstance(z.chunks[0][0], int)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_2d_array_test_compute_chunk_sizes_2d_array.assert_Z_shape_4_4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_2d_array_test_compute_chunk_sizes_2d_array.assert_Z_shape_4_4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4324, "end_line": 4337, "span_ids": ["test_compute_chunk_sizes_2d_array"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_compute_chunk_sizes_2d_array():\n X = np.linspace(-1, 1, num=9 * 4).reshape(9, 4)\n X = da.from_array(X, chunks=(3, 4))\n idx = X.sum(axis=1) > 0\n Y = X[idx]\n\n # This is very similar to the DataFrame->Array conversion\n assert np.isnan(Y.shape[0]) and Y.shape[1] == 4\n assert Y.chunks == ((np.nan, np.nan, np.nan), (4,))\n\n Z = Y.compute_chunk_sizes()\n assert Y is Z\n assert Z.chunks == ((0, 1, 3), (4,))\n assert Z.shape == (4, 4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_3d_array_test_compute_chunk_sizes_3d_array.assert_Z_chunks_4_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py_test_compute_chunk_sizes_3d_array_test_compute_chunk_sizes_3d_array.assert_Z_chunks_4_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4340, "end_line": 4359, "span_ids": ["test_compute_chunk_sizes_3d_array"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_compute_chunk_sizes_3d_array(N=8):\n X = np.linspace(-1, 2, num=8 * 8 * 8).reshape(8, 8, 8)\n X = da.from_array(X, chunks=(4, 4, 4))\n idx = X.sum(axis=0).sum(axis=0) > 0\n Y = X[idx]\n idx = X.sum(axis=1).sum(axis=1) < 0\n Y = Y[:, idx]\n idx = X.sum(axis=2).sum(axis=1) > 0.1\n Y = Y[:, :, idx]\n\n # Checking to make sure shapes are different on outputs\n assert Y.compute().shape == (8, 3, 5)\n assert X.compute().shape == (8, 8, 8)\n\n assert Y.chunks == ((np.nan, np.nan),) * 3\n assert all(np.isnan(s) for s in Y.shape)\n Z = Y.compute_chunk_sizes()\n assert Z is Y\n assert Z.shape == (8, 3, 5)\n assert Z.chunks == ((4, 4), (3, 0), (1, 4))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py__known_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_core.py__known_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_core.py", "file_name": "test_array_core.py", "file_type": "text/x-python", "category": "test", "start_line": 4362, "end_line": 4445, "span_ids": ["test_compute_chunk_sizes_warning_fixes_to_zarr", "_known", "test_rechunk_auto", "test_compute_chunk_sizes_warning_fixes_concatenate", "unknown", "test_compute_chunk_sizes_warning_fixes_reduction", "test_compute_chunk_sizes_warning_fixes_rechunk", "test_compute_chunk_sizes_warning_fixes_slicing", "test_compute_chunk_sizes_warning_fixes_reshape", "test_compute_chunk_sizes_warning_fixes_to_svg"], "tokens": 571}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _known(num=50):\n return da.from_array(np.linspace(-1, 1, num=num), chunks=10)\n\n\n@pytest.fixture()\ndef unknown():\n x = _known()\n y = x[x < 0]\n assert y.chunks == ((np.nan,) * 5,)\n return y\n\n\ndef test_compute_chunk_sizes_warning_fixes_rechunk(unknown):\n y = unknown\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n y.rechunk(\"auto\")\n y.compute_chunk_sizes()\n y.rechunk(\"auto\")\n\n\ndef test_compute_chunk_sizes_warning_fixes_to_zarr(unknown):\n pytest.importorskip(\"zarr\")\n y = unknown\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n with StringIO() as f:\n y.to_zarr(f)\n y.compute_chunk_sizes()\n\n with pytest.raises(ValueError, match=\"irregular chunking\"):\n with StringIO() as f:\n y.to_zarr(f)\n\n\ndef test_compute_chunk_sizes_warning_fixes_to_svg(unknown):\n y = unknown\n with pytest.raises(NotImplementedError, match=\"compute_chunk_sizes\"):\n y.to_svg()\n y.compute_chunk_sizes()\n y.to_svg()\n\n\ndef test_compute_chunk_sizes_warning_fixes_concatenate():\n x = _known(num=100).reshape(10, 10)\n idx = x.sum(axis=0) > 0\n y1 = x[idx]\n y2 = x[idx]\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n da.concatenate((y1, y2), axis=1)\n y1.compute_chunk_sizes()\n y2.compute_chunk_sizes()\n da.concatenate((y1, y2), axis=1)\n\n\ndef test_compute_chunk_sizes_warning_fixes_reduction(unknown):\n y = unknown\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n da.argmin(y)\n y.compute_chunk_sizes()\n da.argmin(y)\n\n\ndef test_compute_chunk_sizes_warning_fixes_reshape(unknown):\n y = unknown\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n da.reshape(y, (5, 5))\n y.compute_chunk_sizes()\n da.reshape(y, (5, 5))\n\n\ndef test_compute_chunk_sizes_warning_fixes_slicing():\n x = _known(num=100).reshape(10, 10)\n y = x[x.sum(axis=0) < 0]\n with pytest.raises(ValueError, match=\"compute_chunk_sizes\"):\n y[:3, :]\n y.compute_chunk_sizes()\n y[:3, :]\n\n\ndef test_rechunk_auto():\n x = da.ones(10, chunks=(1,))\n y = x.rechunk()\n\n assert y.npartitions == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_pytest_test_array_function_dask.assert_eq_res_y_res_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_pytest_test_array_function_dask.assert_eq_res_y_res_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 45, "span_ids": ["test_array_function_dask", "imports"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nimport numpy as np\n\nimport dask.array as da\nfrom dask.array.utils import assert_eq, IS_NEP18_ACTIVE\nfrom dask.array.numpy_compat import _numpy_120\n\nfrom .test_dispatch import EncapsulateNDArray, WrappedArray\n\n\nmissing_arrfunc_cond = not IS_NEP18_ACTIVE\nmissing_arrfunc_reason = \"NEP-18 support is not available in NumPy\"\n\n\n@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\n \"func\",\n [\n lambda x: np.concatenate([x, x, x]),\n lambda x: np.cov(x, x),\n lambda x: np.dot(x, x),\n lambda x: np.dstack(x),\n lambda x: np.flip(x, axis=0),\n lambda x: np.hstack(x),\n lambda x: np.matmul(x, x),\n lambda x: np.mean(x),\n lambda x: np.stack([x, x]),\n lambda x: np.block([x, x]),\n lambda x: np.sum(x),\n lambda x: np.var(x),\n lambda x: np.vstack(x),\n lambda x: np.linalg.norm(x),\n lambda x: np.min(x),\n lambda x: np.amin(x),\n lambda x: np.round(x),\n ],\n)\ndef test_array_function_dask(func):\n x = np.random.random((100, 100))\n y = da.from_array(x, chunks=(50, 50))\n res_x = func(x)\n res_y = func(y)\n\n assert isinstance(res_y, da.Array)\n assert_eq(res_y, res_x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_fft_test_array_function_fft.assert_eq_res_y_res_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_fft_test_array_function_fft.assert_eq_res_y_res_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 58, "span_ids": ["test_array_function_fft"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\"func\", [np.fft.fft, np.fft.fft2])\ndef test_array_function_fft(func):\n x = np.random.random((100, 100))\n y = da.from_array(x, chunks=(100, 100))\n res_x = func(x)\n res_y = func(y)\n\n if func.__module__ != \"mkl_fft._numpy_fft\":\n assert isinstance(res_y, da.Array)\n assert_eq(res_y, res_x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_notimpl_function_dask_test_array_notimpl_function_dask.with_pytest_warns_.func_y_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_notimpl_function_dask_test_array_notimpl_function_dask.with_pytest_warns_.func_y_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 77, "span_ids": ["test_array_notimpl_function_dask"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\n \"func\",\n [\n lambda x: np.min_scalar_type(x),\n lambda x: np.linalg.det(x),\n lambda x: np.linalg.eigvals(x),\n ],\n)\ndef test_array_notimpl_function_dask(func):\n x = np.random.random((100, 100))\n y = da.from_array(x, chunks=(50, 50))\n\n with pytest.warns(\n FutureWarning, match=\"The `.*` function is not implemented by Dask\"\n ):\n func(y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_test_array_function_sparse.assert_eq_func_x_func_y": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_test_array_function_sparse.assert_eq_func_x_func_y", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 80, "end_line": 91, "span_ids": ["test_array_function_sparse"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\n \"func\", [lambda x: np.real(x), lambda x: np.imag(x), lambda x: np.transpose(x)]\n)\ndef test_array_function_sparse(func):\n sparse = pytest.importorskip(\"sparse\")\n x = da.random.random((500, 500), chunks=(100, 100))\n x[x < 0.9] = 0\n\n y = x.map_blocks(sparse.COO)\n\n assert_eq(func(x), func(y))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_tensordot_test_array_function_sparse_tensordot.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_sparse_tensordot_test_array_function_sparse_tensordot.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 108, "span_ids": ["test_array_function_sparse_tensordot"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.xfail(_numpy_120, reason=\"sparse-383\")\ndef test_array_function_sparse_tensordot():\n sparse = pytest.importorskip(\"sparse\")\n x = np.random.random((2, 3, 4))\n x[x < 0.9] = 0\n y = np.random.random((4, 3, 2))\n y[y < 0.9] = 0\n\n xx = sparse.COO(x)\n yy = sparse.COO(y)\n\n assert_eq(\n np.tensordot(x, y, axes=(2, 0)), np.tensordot(xx, yy, axes=(2, 0)).todense()\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_cupy_svd_test_array_function_cupy_svd.assert_eq_v_v_base_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_array_function_cupy_svd_test_array_function_cupy_svd.assert_eq_v_v_base_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 111, "end_line": 123, "span_ids": ["test_array_function_cupy_svd"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\ndef test_array_function_cupy_svd():\n cupy = pytest.importorskip(\"cupy\")\n x = cupy.random.random((500, 100))\n\n y = da.from_array(x, chunks=(100, 100), asarray=False)\n\n u_base, s_base, v_base = da.linalg.svd(y)\n u, s, v = np.linalg.svd(y)\n\n assert_eq(u, u_base)\n assert_eq(s, s_base)\n assert_eq(v, v_base)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_unregistered_func_test_unregistered_func.assert_eq_xx_yy_check_m": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_unregistered_func_test_unregistered_func.assert_eq_xx_yy_check_m", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 126, "end_line": 164, "span_ids": ["test_unregistered_func"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\n \"func\",\n [\n lambda x: np.concatenate([x, x, x]),\n lambda x: np.cov(x, x),\n lambda x: np.dot(x, x),\n lambda x: np.dstack(x),\n lambda x: np.flip(x, axis=0),\n lambda x: np.hstack(x),\n lambda x: np.matmul(x, x),\n lambda x: np.mean(x),\n lambda x: np.stack([x, x]),\n lambda x: np.sum(x),\n lambda x: np.var(x),\n lambda x: np.vstack(x),\n lambda x: np.linalg.norm(x),\n ],\n)\ndef test_unregistered_func(func):\n # Wrap a procol-based encapsulated ndarray\n x = EncapsulateNDArray(np.random.random((100, 100)))\n\n # See if Dask holds the array fine\n y = da.from_array(x, chunks=(50, 50))\n\n # Check if it's an equivalent array\n assert_eq(x, y, check_meta=False)\n\n # Perform two NumPy functions, one on the\n # Encapsulated array\n xx = func(x)\n\n # And one on the Dask array holding these\n # encapsulated arrays\n yy = func(y)\n\n # Check that they are equivalent arrays.\n assert_eq(xx, yy, check_meta=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_non_existent_func_test_non_existent_func.if_IS_NEP18_ACTIVE_.else_.assert_list_np_sort_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_non_existent_func_test_non_existent_func.if_IS_NEP18_ACTIVE_.else_.assert_list_np_sort_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 167, "end_line": 177, "span_ids": ["test_non_existent_func"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_non_existent_func():\n # Regression test for __array_function__ becoming default in numpy 1.17\n # dask has no sort function, so ensure that this still calls np.sort\n x = da.from_array(np.array([1, 2, 4, 3]), chunks=(2,))\n if IS_NEP18_ACTIVE:\n with pytest.warns(\n FutureWarning, match=\"The `numpy.sort` function is not implemented by Dask\"\n ):\n assert list(np.sort(x)) == [1, 2, 3, 4]\n else:\n assert list(np.sort(x)) == [1, 2, 3, 4]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_binary_function_type_precedence_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_function.py_test_binary_function_type_precedence_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_function.py", "file_name": "test_array_function.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 214, "span_ids": ["test_binary_function_type_precedence"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(missing_arrfunc_cond, reason=missing_arrfunc_reason)\n@pytest.mark.parametrize(\n \"func\",\n [\n np.equal,\n np.matmul,\n np.dot,\n lambda x, y: np.stack([x, y]),\n ],\n)\n@pytest.mark.parametrize(\n \"arr_upcast, arr_downcast\",\n [\n (\n WrappedArray(np.random.random((10, 10))),\n da.random.random((10, 10), chunks=(5, 5)),\n ),\n (\n da.random.random((10, 10), chunks=(5, 5)),\n EncapsulateNDArray(np.random.random((10, 10))),\n ),\n (\n WrappedArray(np.random.random((10, 10))),\n EncapsulateNDArray(np.random.random((10, 10))),\n ),\n ],\n)\ndef test_binary_function_type_precedence(func, arr_upcast, arr_downcast):\n \"\"\" Test proper dispatch on binary NumPy functions\"\"\"\n assert (\n type(func(arr_upcast, arr_downcast))\n == type(func(arr_downcast, arr_upcast))\n == type(arr_upcast)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_np_test_meta_from_array.assert_meta_from_array_np": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_np_test_meta_from_array.assert_meta_from_array_np", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_utils.py", "file_name": "test_array_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 49, "span_ids": ["imports", "test_meta_from_array"], "tokens": 359}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pytest\n\nimport dask.array as da\nfrom dask.array.numpy_compat import _numpy_120\nfrom dask.array.utils import meta_from_array, assert_eq\n\nasarrays = [np.asarray]\n\ntry:\n import sparse\n\n asarrays.append(sparse.COO.from_numpy)\nexcept ImportError:\n pass\n\ntry:\n import cupy\n\n asarrays.append(cupy.asarray)\nexcept ImportError:\n pass\n\n\n@pytest.mark.parametrize(\"asarray\", asarrays)\ndef test_meta_from_array(asarray):\n if \"COO.from_numpy\" in str(asarray) and _numpy_120:\n raise pytest.xfail(reason=\"sparse-383\")\n\n x = np.array(1)\n assert meta_from_array(x, ndim=1).shape == (0,)\n\n x = np.ones((1, 2, 3), dtype=\"float32\")\n x = asarray(x)\n\n assert meta_from_array(x).shape == (0, 0, 0)\n assert meta_from_array(x).dtype == \"float32\"\n assert type(meta_from_array(x)) is type(x)\n\n assert meta_from_array(x, ndim=2).shape == (0, 0)\n assert meta_from_array(x, ndim=4).shape == (0, 0, 0, 0)\n assert meta_from_array(x, dtype=\"float64\").dtype == \"float64\"\n\n x = da.ones((1,))\n assert isinstance(meta_from_array(x), np.ndarray)\n\n assert meta_from_array(123) == 123\n assert meta_from_array(\"foo\") == \"foo\"\n assert meta_from_array(np.dtype(\"float32\")) == np.dtype(\"float32\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_test_meta_from_array_type_inputs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_array_utils.py_test_meta_from_array_type_inputs_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_array_utils.py", "file_name": "test_array_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 69, "span_ids": ["test_meta_from_array_type_inputs"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_meta_from_array_type_inputs():\n x = meta_from_array(np.ndarray, ndim=2, dtype=np.float32)\n assert isinstance(x, np.ndarray)\n assert x.ndim == 2\n assert x.dtype == np.float32\n\n x = da.Array(\n {(\"x\", 0, 0): (np.ones, (5, 5))},\n name=\"x\",\n chunks=(5, 5),\n shape=(5, 5),\n meta=np.ndarray,\n dtype=float,\n )\n assert_eq(x, x)\n\n assert da.from_array(np.ones(5).astype(np.int32), meta=np.ndarray).dtype == np.int32", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_collections_test_optimize_blockwise.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_collections_test_optimize_blockwise.assert_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 202, "span_ids": ["imports", "test_optimize_blockwise", "test_index_subs"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import collections\nimport warnings\nfrom operator import add\n\nimport pytest\nimport numpy as np\n\nimport dask\nimport dask.array as da\nfrom dask.highlevelgraph import HighLevelGraph\nfrom dask.blockwise import Blockwise, rewrite_blockwise, optimize_blockwise, index_subs\nfrom dask.array.utils import assert_eq\nfrom dask.array.numpy_compat import _numpy_116\nfrom dask.utils_test import inc, dec\n\na, b, c, d, e, f, g = \"abcdefg\"\n_0, _1, _2, _3, _4, _5, _6, _7, _8, _9 = [\"_%d\" % i for i in range(10)]\ni, j, k = \"ijk\"\n\n\ndef test_index_subs():\n assert index_subs(tuple(\"ij\"), {\"i\": \"j\", \"j\": \"i\"}) == tuple(\"ji\")\n\n\ndef test_optimize_blockwise():\n x = da.ones(10, chunks=(5,))\n y = (((x + 1) + 2) + 3) + 4\n\n dsk = da.optimization.optimize_blockwise(y.dask)\n\n assert isinstance(dsk, HighLevelGraph)\n\n assert (\n len([layer for layer in dsk.dicts.values() if isinstance(layer, Blockwise)])\n == 1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_diamond_fusion_test_blockwise_diamond_fusion.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_diamond_fusion_test_blockwise_diamond_fusion.assert_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 219, "span_ids": ["test_blockwise_diamond_fusion"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_diamond_fusion():\n x = da.ones(10, chunks=(5,))\n y = ((x + 1) + 2) + 3\n a = y * 2\n b = y * 3\n c = a + b\n d = ((c + 1) + 2) + 3\n\n dsk = da.optimization.optimize_blockwise(d.dask)\n assert isinstance(dsk, HighLevelGraph)\n\n assert (\n len([layer for layer in dsk.dicts.values() if isinstance(layer, Blockwise)])\n == 1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_non_blockwise_output_test_blockwise_non_blockwise_output.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_non_blockwise_output_test_blockwise_non_blockwise_output.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 222, "end_line": 248, "span_ids": ["test_blockwise_non_blockwise_output"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_non_blockwise_output():\n x = da.ones(10, chunks=(5,))\n y = ((x + 1) + 2) + 3\n w = y.sum()\n z = ((y * 2) * 3) * 4\n\n z_top_before = tuple(z.dask.dicts[z.name].indices)\n (zz,) = dask.optimize(z)\n z_top_after = tuple(z.dask.dicts[z.name].indices)\n assert z_top_before == z_top_after, \"z_top mutated\"\n\n dsk = optimize_blockwise(z.dask, keys=list(dask.core.flatten(z.__dask_keys__())))\n assert isinstance(dsk, HighLevelGraph)\n assert (\n len([layer for layer in dsk.dicts.values() if isinstance(layer, Blockwise)])\n == 1\n )\n\n dsk = optimize_blockwise(\n HighLevelGraph.merge(w.dask, z.dask),\n keys=list(dask.core.flatten([w.__dask_keys__(), z.__dask_keys__()])),\n )\n assert isinstance(dsk, HighLevelGraph)\n assert (\n len([layer for layer in z.dask.dicts.values() if isinstance(layer, Blockwise)])\n >= 1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_top_len_test_blockwise_names.assert_y_name_startswith_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_top_len_test_blockwise_names.assert_y_name_startswith_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 251, "end_line": 294, "span_ids": ["test_common_token_names_args", "test_inner_compute", "test_top_len", "test_common_token_names_kwargs", "test_blockwise_names"], "tokens": 371}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_top_len():\n x = da.ones(10, chunks=(5,))\n y = x[:, None] * x[None, :]\n\n d = y.dask.dicts[y.name]\n assert len(d) == 4\n\n\ndef test_inner_compute():\n x = da.ones(10, chunks=(5,)) + 1 + 2 + 3\n a = x.sum()\n y = x * 2 * 3 * 4\n b = y.sum()\n z = x * 2 * 3\n\n dask.compute(x, a, y, b, z)\n\n\n@pytest.mark.parametrize(\"name\", [\"_\", \"_0\", \"_1\", \".\", \".0\"])\ndef test_common_token_names_args(name):\n x = np.array([\"a\", \"bb\", \"ccc\"], dtype=object)\n d = da.from_array(x, chunks=2)\n\n result = da.blockwise(add, \"i\", d, \"i\", name, None, dtype=object)\n expected = x + name\n\n assert_eq(result, expected)\n\n\n@pytest.mark.parametrize(\"name\", [\"_0\", \"_1\", \".\", \".0\", \"_\"])\ndef test_common_token_names_kwargs(name):\n x = np.array([\"a\", \"bb\", \"ccc\"], dtype=object)\n d = da.from_array(x, chunks=2)\n\n result = da.blockwise(lambda x, y: x + y, \"i\", d, \"i\", y=name, dtype=object)\n expected = x + name\n\n assert_eq(result, expected)\n\n\ndef test_blockwise_names():\n x = da.ones(5, chunks=(2,))\n y = da.blockwise(add, \"i\", x, \"i\", dtype=x.dtype)\n assert y.name.startswith(\"add\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_test_blockwise_new_axes.assert_eq_y_np_ones_4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_test_blockwise_new_axes.assert_eq_y_np_ones_4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 297, "end_line": 327, "span_ids": ["test_blockwise_new_axes"], "tokens": 318}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_new_axes():\n def f(x):\n return x[:, None] * np.ones((1, 7))\n\n x = da.ones(5, chunks=2)\n y = da.blockwise(\n f, \"aq\", x, \"a\", new_axes={\"q\": 7}, concatenate=True, dtype=x.dtype\n )\n assert y.chunks == ((2, 2, 1), (7,))\n assert_eq(y, np.ones((5, 7)))\n\n def f(x):\n return x[None, :] * np.ones((7, 1))\n\n x = da.ones(5, chunks=2)\n y = da.blockwise(\n f, \"qa\", x, \"a\", new_axes={\"q\": 7}, concatenate=True, dtype=x.dtype\n )\n assert y.chunks == ((7,), (2, 2, 1))\n assert_eq(y, np.ones((7, 5)))\n\n def f(x):\n y = x.sum(axis=1)\n return y[:, None] * np.ones((1, 5))\n\n x = da.ones((4, 6), chunks=(2, 2))\n y = da.blockwise(\n f, \"aq\", x, \"ab\", new_axes={\"q\": 5}, concatenate=True, dtype=x.dtype\n )\n assert y.chunks == ((2, 2), (5,))\n assert_eq(y, np.ones((4, 5)) * 6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_2_test_blockwise_stacked_new_axes.assert_eq_z_np_ones_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_2_test_blockwise_stacked_new_axes.assert_eq_z_np_ones_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 330, "end_line": 362, "span_ids": ["test_blockwise_stacked_new_axes", "test_blockwise_new_axes_2"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_new_axes_2():\n x = da.ones((2, 2), chunks=(1, 1))\n\n def func(x):\n return np.stack([x, -x], axis=-1)\n\n y = da.blockwise(\n func,\n (\"x\", \"y\", \"sign\"),\n x,\n (\"x\", \"y\"),\n dtype=x.dtype,\n concatenate=True,\n new_axes={\"sign\": 2},\n )\n\n assert_eq(y, y)\n\n\n@pytest.mark.parametrize(\"concatenate\", [True, False])\ndef test_blockwise_stacked_new_axes(concatenate):\n def f(x):\n return x[..., None] * np.ones((1, 7))\n\n x = da.ones(5, chunks=2)\n y = da.blockwise(\n f, \"aq\", x, \"a\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n z = da.blockwise(\n f, \"abq\", y, \"ab\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n assert z.chunks == ((2, 2, 1), (7,), (7,))\n assert_eq(z, np.ones((5, 7, 7)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_front_test_blockwise_stacked_new_axes_front.assert_eq_w_np_ones_7_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_front_test_blockwise_stacked_new_axes_front.assert_eq_w_np_ones_7_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 386, "span_ids": ["test_blockwise_stacked_new_axes_front"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"concatenate\", [True, False])\ndef test_blockwise_stacked_new_axes_front(concatenate):\n def f(x):\n if isinstance(x, list):\n x = np.concatenate(x)\n return x[None, ...] * np.ones(7)[(slice(None),) + (None,) * x.ndim]\n\n x = da.ones(5, chunks=2)\n y = da.blockwise(\n f, \"qa\", x, \"a\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n z = da.blockwise(\n f, \"qab\", y, \"ab\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n assert z.chunks == ((7,), (7,), (2, 2, 1))\n assert_eq(z, np.ones((7, 7, 5)))\n\n w = da.blockwise(\n lambda x: x[:, 0, 0], \"a\", z, \"abc\", dtype=x.dtype, concatenate=True\n )\n assert w.chunks == ((7,),)\n assert_eq(w, np.ones((7,)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_same_dim_test_blockwise_stacked_new_axes_same_dim.assert_eq_c_np_ones_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_stacked_new_axes_same_dim_test_blockwise_stacked_new_axes_same_dim.assert_eq_c_np_ones_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 389, "end_line": 404, "span_ids": ["test_blockwise_stacked_new_axes_same_dim"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"concatenate\", [True, False])\ndef test_blockwise_stacked_new_axes_same_dim(concatenate):\n def f(x):\n return x[..., None] * np.ones((1, 7))\n\n x = da.ones(5, chunks=2)\n y = da.zeros(5, chunks=2)\n a = da.blockwise(\n f, \"aq\", x, \"a\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n b = da.blockwise(\n f, \"aq\", y, \"a\", new_axes={\"q\": 7}, concatenate=concatenate, dtype=x.dtype\n )\n c = a + b\n assert c.chunks == ((2, 2, 1), (7,))\n assert_eq(c, np.ones((5, 7)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_chunked_test_blockwise_new_axes_chunked.assert_eq_y_np_array_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_new_axes_chunked_test_blockwise_new_axes_chunked.assert_eq_y_np_array_0", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 407, "end_line": 414, "span_ids": ["test_blockwise_new_axes_chunked"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_new_axes_chunked():\n def f(x):\n return x[None, :] * 2\n\n x = da.arange(0, 6, 1, chunks=2, dtype=np.int32)\n y = da.blockwise(f, \"qa\", x, \"a\", new_axes={\"q\": (1, 1)}, dtype=x.dtype)\n assert y.chunks == ((1, 1), (2, 2, 2))\n assert_eq(y, np.array([[0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 8, 10]], np.int32))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_no_args_test_blockwise_kwargs.assert_eq_y_np_ones_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_no_args_test_blockwise_kwargs.assert_eq_y_np_ones_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 417, "end_line": 443, "span_ids": ["test_blockwise_no_args", "test_blockwise_no_array_args", "test_blockwise_kwargs"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_no_args():\n def f():\n return np.ones((2, 3), np.float32)\n\n x = da.blockwise(f, \"ab\", new_axes={\"a\": 2, \"b\": (3, 3)}, dtype=np.float32)\n assert x.chunks == ((2,), (3, 3))\n assert_eq(x, np.ones((2, 6), np.float32))\n\n\ndef test_blockwise_no_array_args():\n def f(dtype):\n return np.ones((2, 3), dtype)\n\n x = da.blockwise(\n f, \"ab\", np.float32, None, new_axes={\"a\": 2, \"b\": (3, 3)}, dtype=np.float32\n )\n assert x.chunks == ((2,), (3, 3))\n assert_eq(x, np.ones((2, 6), np.float32))\n\n\ndef test_blockwise_kwargs():\n def f(a, b=0):\n return a + b\n\n x = da.ones(5, chunks=(2,))\n y = da.blockwise(f, \"i\", x, \"i\", b=10, dtype=x.dtype)\n assert_eq(y, np.ones(5) + 10)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_chunks_test_blockwise_chunks.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_chunks_test_blockwise_chunks.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 446, "end_line": 487, "span_ids": ["test_blockwise_chunks"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_chunks():\n x = da.ones((5, 5), chunks=((2, 1, 2), (3, 2)))\n\n def double(a, axis=0):\n return np.concatenate([a, a], axis=axis)\n\n y = da.blockwise(\n double,\n \"ij\",\n x,\n \"ij\",\n adjust_chunks={\"i\": lambda n: 2 * n},\n axis=0,\n dtype=x.dtype,\n )\n assert y.chunks == ((4, 2, 4), (3, 2))\n assert_eq(y, np.ones((10, 5)))\n\n y = da.blockwise(\n double,\n \"ij\",\n x,\n \"ij\",\n adjust_chunks={\"j\": lambda n: 2 * n},\n axis=1,\n dtype=x.dtype,\n )\n assert y.chunks == ((2, 1, 2), (6, 4))\n assert_eq(y, np.ones((5, 10)))\n\n x = da.ones((10, 10), chunks=(5, 5))\n y = da.blockwise(\n double, \"ij\", x, \"ij\", axis=0, adjust_chunks={\"i\": 10}, dtype=x.dtype\n )\n assert y.chunks == ((10, 10), (5, 5))\n assert_eq(y, np.ones((20, 10)))\n\n y = da.blockwise(\n double, \"ij\", x, \"ij\", axis=0, adjust_chunks={\"i\": (10, 10)}, dtype=x.dtype\n )\n assert y.chunks == ((10, 10), (5, 5))\n assert_eq(y, np.ones((20, 10)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_numpy_arg_test_blockwise_numpy_arg.with_warnings_catch_warni.assert_eq_x_np_arange_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_blockwise_numpy_arg_test_blockwise_numpy_arg.with_warnings_catch_warni.assert_eq_x_np_arange_10", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 490, "end_line": 507, "span_ids": ["test_blockwise_numpy_arg"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_blockwise_numpy_arg():\n with warnings.catch_warnings():\n if not _numpy_116:\n # Not sure why, but this DeprecationWarning is no longer\n # showing up for NumPy >=1.16. So we only filter here\n # for 1.15 and earlier\n warnings.simplefilter(\"ignore\", DeprecationWarning)\n\n x = da.arange(10, chunks=(5,))\n y = np.arange(1000)\n\n x = x.map_blocks(lambda x, y: x, 1.0)\n x = x.map_blocks(lambda x, y: x, \"abc\")\n x = x.map_blocks(lambda x, y: x, y)\n x = x.map_blocks(lambda x, y: x, \"abc\")\n x = x.map_blocks(lambda x, y: x, 1.0)\n x = x.map_blocks(lambda x, y, z: x, \"abc\", np.array([\"a\", \"b\"], dtype=object))\n assert_eq(x, np.arange(10))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_bag_array_conversion_test_svd.assert_eq_z_z_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_bag_array_conversion_test_svd.assert_eq_z_z_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 510, "end_line": 525, "span_ids": ["test_bag_array_conversion", "test_svd"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bag_array_conversion():\n import dask.bag as db\n\n b = db.range(10, npartitions=1)\n (x,) = b.map_partitions(np.asarray).to_delayed()\n (x,) = [da.from_delayed(a, shape=(10,), dtype=int) for a in [x]]\n z = da.concatenate([x])\n assert_eq(z, np.arange(10), check_graph=False)\n\n\ndef test_svd():\n x = da.ones((1, 1), chunks=(1, 1))\n y = x * 2\n u, s, v = da.linalg.svd(y)\n z = y + u\n assert_eq(z, z)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_args_delayed_test_args_delayed.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_args_delayed_test_args_delayed.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 528, "end_line": 536, "span_ids": ["test_args_delayed"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_args_delayed():\n x = da.arange(10, chunks=(5,))\n y = dask.delayed(lambda: 100)()\n\n z = da.blockwise(add, \"i\", x, \"i\", y, None, dtype=x.dtype)\n assert_eq(z, np.arange(10) + 100)\n\n z = da.blockwise(lambda x, y: x + y, \"i\", x, \"i\", y=y, dtype=x.dtype)\n assert_eq(z, np.arange(10) + 100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_namedtuple_test_namedtuple.assert_eq_A_B_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_namedtuple_test_namedtuple.assert_eq_A_B_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 539, "end_line": 550, "span_ids": ["test_namedtuple"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"tup\", [(1, 2), collections.namedtuple(\"foo\", [\"a\", \"b\"])(1, 2)]\n)\ndef test_namedtuple(tup):\n A = da.random.random((20, 20), chunks=(10, 10))\n\n def f(data, x):\n return data\n\n B = da.blockwise(f, (\"d1\", \"d2\"), A, (\"d1\", \"d2\"), x=tup, dtype=A.dtype)\n\n assert_eq(A, B)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_validate_top_inputs_test_validate_top_inputs.assert_i_in_str_info_va": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_validate_top_inputs_test_validate_top_inputs.assert_i_in_str_info_va", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 553, "end_line": 567, "span_ids": ["test_validate_top_inputs"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_validate_top_inputs():\n A = da.random.random((20, 20), chunks=(10, 10))\n\n with pytest.raises(ValueError) as info:\n da.blockwise(inc, \"jk\", A, \"ij\", dtype=A.dtype)\n\n assert \"unknown dimension\" in str(info.value).lower()\n assert \"k\" in str(info.value)\n assert \"j\" not in str(info.value)\n\n with pytest.raises(ValueError) as info:\n da.blockwise(inc, \"ii\", A, \"ij\", dtype=A.dtype)\n\n assert \"repeated\" in str(info.value).lower()\n assert \"i\" in str(info.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_dont_merge_before_reductions_test_dont_merge_before_reductions.z_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_dont_merge_before_reductions_test_dont_merge_before_reductions.z_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 570, "end_line": 580, "span_ids": ["test_dont_merge_before_reductions"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dont_merge_before_reductions():\n x = da.ones(10, chunks=(5,))\n y = da.blockwise(inc, \"i\", x, \"i\", dtype=x.dtype)\n z = da.blockwise(sum, \"\", y, \"i\", dtype=y.dtype)\n w = da.blockwise(sum, \"\", z, \"\", dtype=y.dtype)\n\n dsk = optimize_blockwise(w.dask)\n\n assert len([d for d in dsk.dicts.values() if isinstance(d, Blockwise)]) == 2\n\n z.compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_atop_legacy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_atop.py_test_atop_legacy_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_atop.py", "file_name": "test_atop.py", "file_type": "text/x-python", "category": "test", "start_line": 583, "end_line": 599, "span_ids": ["test_non_hlg", "test_atop_legacy"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_atop_legacy():\n x = da.ones(10, chunks=(5,))\n with pytest.warns(None):\n y = da.atop(inc, \"i\", x, \"i\", dtype=x.dtype)\n z = da.blockwise(inc, \"i\", x, \"i\", dtype=x.dtype)\n assert_eq(y, z)\n assert y.name == z.name\n\n\ndef test_non_hlg():\n # Regression test for https://github.com/dask/dask/issues/5850\n a = da.from_array(np.ones(1, np.float64), chunks=(1,))\n a.dask = dict(a.dask) # Convert from HighLevelGraph to plain dict\n b = da.from_array(np.zeros(1, np.float64), chunks=(1,))\n x = a + b\n assert_eq(x, a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_pytest_test_keepdims_wrapper_no_axis.assert_rwf_276": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_pytest_test_keepdims_wrapper_no_axis.assert_rwf_276", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_chunk.py", "file_name": "test_chunk.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["imports", "test_keepdims_wrapper_no_axis"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\n\nfrom dask.array.chunk import coarsen, keepdims_wrapper\nimport dask.array as da\n\n\ndef test_keepdims_wrapper_no_axis():\n def summer(a, axis=None):\n return a.sum(axis=axis)\n\n summer_wrapped = keepdims_wrapper(summer)\n\n assert summer_wrapped != summer\n\n a = np.arange(24).reshape(1, 2, 3, 4)\n\n r = summer(a)\n rw = summer_wrapped(a, keepdims=True)\n rwf = summer_wrapped(a, keepdims=False)\n\n assert r.ndim == 0\n assert r.shape == tuple()\n assert r == 276\n\n assert rw.ndim == 4\n assert rw.shape == (1, 1, 1, 1)\n assert (rw == 276).all()\n\n assert rwf.ndim == 0\n assert rwf.shape == tuple()\n assert rwf == 276", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_one_axis_test_keepdims_wrapper_one_axis.assert_rwf_np_array_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_one_axis_test_keepdims_wrapper_one_axis.assert_rwf_np_array_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_chunk.py", "file_name": "test_chunk.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 62, "span_ids": ["test_keepdims_wrapper_one_axis"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_keepdims_wrapper_one_axis():\n def summer(a, axis=None):\n return a.sum(axis=axis)\n\n summer_wrapped = keepdims_wrapper(summer)\n\n assert summer_wrapped != summer\n\n a = np.arange(24).reshape(1, 2, 3, 4)\n\n r = summer(a, axis=2)\n rw = summer_wrapped(a, axis=2, keepdims=True)\n rwf = summer_wrapped(a, axis=2, keepdims=False)\n\n assert r.ndim == 3\n assert r.shape == (1, 2, 4)\n assert (r == np.array([[[12, 15, 18, 21], [48, 51, 54, 57]]])).all()\n\n assert rw.ndim == 4\n assert rw.shape == (1, 2, 1, 4)\n assert (rw == np.array([[[[12, 15, 18, 21]], [[48, 51, 54, 57]]]])).all()\n\n assert rwf.ndim == 3\n assert rwf.shape == (1, 2, 4)\n assert (rwf == np.array([[[12, 15, 18, 21], [48, 51, 54, 57]]])).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_two_axes_test_keepdims_wrapper_two_axes.assert_rwf_np_array_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_keepdims_wrapper_two_axes_test_keepdims_wrapper_two_axes.assert_rwf_np_array_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_chunk.py", "file_name": "test_chunk.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 89, "span_ids": ["test_keepdims_wrapper_two_axes"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_keepdims_wrapper_two_axes():\n def summer(a, axis=None):\n return a.sum(axis=axis)\n\n summer_wrapped = keepdims_wrapper(summer)\n\n assert summer_wrapped != summer\n\n a = np.arange(24).reshape(1, 2, 3, 4)\n\n r = summer(a, axis=(1, 3))\n rw = summer_wrapped(a, axis=(1, 3), keepdims=True)\n rwf = summer_wrapped(a, axis=(1, 3), keepdims=False)\n\n assert r.ndim == 2\n assert r.shape == (1, 3)\n assert (r == np.array([[60, 92, 124]])).all()\n\n assert rw.ndim == 4\n assert rw.shape == (1, 1, 3, 1)\n assert (rw == np.array([[[[60], [92], [124]]]])).all()\n\n assert rwf.ndim == 2\n assert rwf.shape == (1, 3)\n assert (rwf == np.array([[60, 92, 124]])).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_coarsen_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_chunk.py_test_coarsen_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_chunk.py", "file_name": "test_chunk.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 111, "span_ids": ["test_integer_input", "test_coarsen"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_coarsen():\n x = np.random.randint(10, size=(24, 24))\n y = coarsen(np.sum, x, {0: 2, 1: 4})\n assert y.shape == (12, 6)\n assert y[0, 0] == np.sum(x[:2, :4])\n\n\n\"\"\"\ndef test_coarsen_on_uneven_shape():\n x = np.random.randint(10, size=(23, 24))\n y = coarsen(np.sum, x, {0: 2, 1: 4})\n assert y.shape == (12, 6)\n assert y[0, 0] == np.sum(x[:2, :4])\n assert eq(y[11, :], x[23, :])\n\"\"\"\n\n\ndef test_integer_input():\n assert da.zeros((4, 6), chunks=2).rechunk(3).chunks == ((3, 1), (3, 3))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_pytest_test_arr_like.if_order_F_.else_.assert_not_np_isfortran_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_pytest_test_arr_like.if_order_F_.else_.assert_not_np_isfortran_d", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 73, "span_ids": ["imports", "test_arr_like"], "tokens": 559}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\nimport pytest\nfrom tlz import concat\n\nimport dask\nimport dask.array as da\nfrom dask.array.core import normalize_chunks\nfrom dask.array.utils import assert_eq, same_keys, AxisError\nfrom dask.array.numpy_compat import _numpy_117, _numpy_118\n\n\n@pytest.mark.parametrize(\n \"funcname\",\n [\n \"empty_like\",\n \"empty\",\n \"ones_like\",\n \"ones\",\n \"zeros_like\",\n \"zeros\",\n \"full_like\",\n \"full\",\n ],\n)\n@pytest.mark.parametrize(\"cast_shape\", [tuple, list, np.asarray])\n@pytest.mark.parametrize(\"cast_chunks\", [tuple, list, np.asarray])\n@pytest.mark.parametrize(\"shape, chunks\", [((10, 10), (4, 4))])\n@pytest.mark.parametrize(\"name\", [None, \"my-name\"])\n@pytest.mark.parametrize(\"order\", [\"C\", \"F\"])\n@pytest.mark.parametrize(\"dtype\", [\"i4\"])\ndef test_arr_like(funcname, shape, cast_shape, dtype, cast_chunks, chunks, name, order):\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n shape = cast_shape(shape)\n chunks = cast_chunks(chunks)\n\n if \"full\" in funcname:\n old_np_func = np_func\n old_da_func = da_func\n\n np_func = lambda *a, **k: old_np_func(*a, fill_value=5, **k)\n da_func = lambda *a, **k: old_da_func(*a, fill_value=5, **k)\n\n dtype = np.dtype(dtype)\n\n if \"like\" in funcname:\n a = np.random.randint(0, 10, shape).astype(dtype)\n\n np_r = np_func(a, order=order)\n da_r = da_func(a, order=order, chunks=chunks, name=name)\n else:\n np_r = np_func(shape, order=order, dtype=dtype)\n da_r = da_func(shape, order=order, dtype=dtype, chunks=chunks, name=name)\n\n assert np_r.shape == da_r.shape\n assert np_r.dtype == da_r.dtype\n\n if \"empty\" not in funcname:\n assert (np_r == np.asarray(da_r)).all()\n\n if name is None:\n assert funcname.split(\"_\")[0] in da_r.name\n else:\n assert da_r.name == name\n\n if \"order\" == \"F\":\n assert np.isfortran(da_r.compute())\n else:\n assert not np.isfortran(da_r.compute())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arr_like_shape_test_arr_like_shape.if_empty_not_in_funcnam.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arr_like_shape_test_arr_like_shape.if_empty_not_in_funcnam.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 113, "span_ids": ["test_arr_like_shape"], "tokens": 423}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not _numpy_117, reason=\"requires NumPy>=1.17 for shape argument support\"\n)\n@pytest.mark.parametrize(\n \"funcname, kwargs\",\n [\n (\"empty_like\", {}),\n (\"ones_like\", {}),\n (\"zeros_like\", {}),\n (\"full_like\", {\"fill_value\": 5}),\n ],\n)\n@pytest.mark.parametrize(\n \"shape, chunks, out_shape\",\n [\n ((10, 10), (4, 4), None),\n ((10, 10), (4, 4), (20, 3)),\n ((10, 10), (4), (20)),\n ((10, 10, 10), (4, 2), (5, 5)),\n ((2, 3, 5, 7), None, (3, 5, 7)),\n ((2, 3, 5, 7), (2, 5, 3), (3, 5, 7)),\n ((2, 3, 5, 7), (2, 5, 3, \"auto\", 3), (11,) + (2, 3, 5, 7)),\n ((2, 3, 5, 7), \"auto\", (3, 5, 7)),\n ],\n)\n@pytest.mark.parametrize(\"dtype\", [\"i4\"])\ndef test_arr_like_shape(funcname, kwargs, shape, dtype, chunks, out_shape):\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n a = np.random.randint(0, 10, shape).astype(dtype)\n np_r = np_func(a, shape=out_shape, **kwargs)\n da_r = da_func(a, chunks=chunks, shape=out_shape, **kwargs)\n\n assert np_r.shape == da_r.shape\n assert np_r.dtype == da_r.dtype\n\n if \"empty\" not in funcname:\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_linspace_test_linspace.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_linspace_test_linspace.None_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 143, "span_ids": ["test_linspace"], "tokens": 427}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"endpoint\", [True, False])\ndef test_linspace(endpoint):\n darr = da.linspace(6, 49, endpoint=endpoint, chunks=5)\n nparr = np.linspace(6, 49, endpoint=endpoint)\n assert_eq(darr, nparr)\n\n darr = da.linspace(1.4, 4.9, endpoint=endpoint, chunks=5, num=13)\n nparr = np.linspace(1.4, 4.9, endpoint=endpoint, num=13)\n assert_eq(darr, nparr)\n\n darr = da.linspace(6, 49, endpoint=endpoint, chunks=5, dtype=float)\n nparr = np.linspace(6, 49, endpoint=endpoint, dtype=float)\n assert_eq(darr, nparr)\n\n darr, dstep = da.linspace(6, 49, endpoint=endpoint, chunks=5, retstep=True)\n nparr, npstep = np.linspace(6, 49, endpoint=endpoint, retstep=True)\n assert np.allclose(dstep, npstep)\n assert_eq(darr, nparr)\n\n darr = da.linspace(1.4, 4.9, endpoint=endpoint, chunks=5, num=13, dtype=int)\n nparr = np.linspace(1.4, 4.9, num=13, endpoint=endpoint, dtype=int)\n assert_eq(darr, nparr)\n assert sorted(\n da.linspace(1.4, 4.9, endpoint=endpoint, chunks=5, num=13).dask\n ) == sorted(da.linspace(1.4, 4.9, endpoint=endpoint, chunks=5, num=13).dask)\n assert sorted(\n da.linspace(6, 49, endpoint=endpoint, chunks=5, dtype=float).dask\n ) == sorted(da.linspace(6, 49, endpoint=endpoint, chunks=5, dtype=float).dask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_test_arange.assert_da_arange_10_chun": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_test_arange.assert_da_arange_10_chun", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 191, "span_ids": ["test_arange"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_arange():\n darr = da.arange(77, chunks=13)\n nparr = np.arange(77)\n assert_eq(darr, nparr)\n\n darr = da.arange(2, 13, chunks=5)\n nparr = np.arange(2, 13)\n assert_eq(darr, nparr)\n\n darr = da.arange(4, 21, 9, chunks=13)\n nparr = np.arange(4, 21, 9)\n assert_eq(darr, nparr)\n\n # negative steps\n darr = da.arange(53, 5, -3, chunks=5)\n nparr = np.arange(53, 5, -3)\n assert_eq(darr, nparr)\n\n darr = da.arange(77, chunks=13, dtype=float)\n nparr = np.arange(77, dtype=float)\n assert_eq(darr, nparr)\n\n darr = da.arange(2, 13, chunks=5, dtype=int)\n nparr = np.arange(2, 13, dtype=int)\n assert_eq(darr, nparr)\n assert sorted(da.arange(2, 13, chunks=5).dask) == sorted(\n da.arange(2, 13, chunks=5).dask\n )\n assert sorted(da.arange(77, chunks=13, dtype=float).dask) == sorted(\n da.arange(77, chunks=13, dtype=float).dask\n )\n\n # 0 size output\n darr = da.arange(0, 1, -0.5, chunks=20)\n nparr = np.arange(0, 1, -0.5)\n assert_eq(darr, nparr)\n\n darr = da.arange(0, -1, 0.5, chunks=20)\n nparr = np.arange(0, -1, 0.5)\n assert_eq(darr, nparr)\n\n # Unexpected or missing kwargs\n with pytest.raises(TypeError, match=\"whatsthis\"):\n da.arange(10, chunks=-1, whatsthis=1)\n\n assert da.arange(10).chunks == ((10,),)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_dtypes_test_arange_dtypes.assert_eq_a_np_a_da_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_dtypes_test_arange_dtypes.assert_eq_a_np_a_da_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 218, "span_ids": ["test_arange_dtypes"], "tokens": 403}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"start,stop,step,dtype\",\n [\n (0, 1, 1, None), # int64\n (1.5, 2, 1, None), # float64\n (1, 2.5, 1, None), # float64\n (1, 2, 0.5, None), # float64\n (np.float32(1), np.float32(2), np.float32(1), None), # promoted to float64\n (np.int32(1), np.int32(2), np.int32(1), None), # promoted to int64\n (np.uint32(1), np.uint32(2), np.uint32(1), None), # promoted to int64\n (np.uint64(1), np.uint64(2), np.uint64(1), None), # promoted to float64\n (np.uint32(1), np.uint32(2), np.uint32(1), np.uint32),\n (np.uint64(1), np.uint64(2), np.uint64(1), np.uint64),\n # numpy.arange gives unexpected results\n # https://github.com/numpy/numpy/issues/11505\n # (1j, 2, 1, None),\n # (1, 2j, 1, None),\n # (1, 2, 1j, None),\n # (1+2j, 2+3j, 1+.1j, None),\n ],\n)\ndef test_arange_dtypes(start, stop, step, dtype):\n a_np = np.arange(start, stop, step, dtype=dtype)\n a_da = da.arange(start, stop, step, dtype=dtype, chunks=-1)\n assert_eq(a_np, a_da)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_cast_float_int_step_test_arange_cast_float_int_step.assert_eq_darr_nparr_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_cast_float_int_step_test_arange_cast_float_int_step.assert_eq_darr_nparr_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 228, "span_ids": ["test_arange_cast_float_int_step"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(\n reason=\"Casting floats to ints is not supported since edge\"\n \"behavior is not specified or guaranteed by NumPy.\"\n)\ndef test_arange_cast_float_int_step():\n darr = da.arange(3.3, -9.1, -0.25, chunks=3, dtype=\"i8\")\n nparr = np.arange(3.3, -9.1, -0.25, dtype=\"i8\")\n assert_eq(darr, nparr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_float_step_test_arange_float_step.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_arange_float_step_test_arange_float_step.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 231, "end_line": 246, "span_ids": ["test_arange_float_step"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_arange_float_step():\n darr = da.arange(2.0, 13.0, 0.3, chunks=4)\n nparr = np.arange(2.0, 13.0, 0.3)\n assert_eq(darr, nparr)\n\n darr = da.arange(7.7, 1.5, -0.8, chunks=3)\n nparr = np.arange(7.7, 1.5, -0.8)\n assert_eq(darr, nparr)\n\n darr = da.arange(0, 1, 0.01, chunks=20)\n nparr = np.arange(0, 1, 0.01)\n assert_eq(darr, nparr)\n\n darr = da.arange(0, 1, 0.03, chunks=20)\n nparr = np.arange(0, 1, 0.03)\n assert_eq(darr, nparr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indices_wrong_chunks_test_indices_dimensions_chunks.with_dask_config_set_ar.assert_expected_actual": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indices_wrong_chunks_test_indices_dimensions_chunks.with_dask_config_set_ar.assert_expected_actual", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 249, "end_line": 265, "span_ids": ["test_indices_wrong_chunks", "test_indices_dimensions_chunks"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_indices_wrong_chunks():\n with pytest.raises(ValueError):\n da.indices((1,), chunks=tuple())\n\n\ndef test_indices_dimensions_chunks():\n chunks = ((1, 4, 2, 3), (5, 5))\n darr = da.indices((10, 10), chunks=chunks)\n assert darr.chunks == ((1, 1),) + chunks\n\n with dask.config.set({\"array.chunk-size\": \"50 MiB\"}):\n shape = (10000, 10000)\n expected = normalize_chunks(\"auto\", shape=shape, dtype=int)\n result = da.indices(shape, chunks=\"auto\")\n # indices prepends a dimension\n actual = result.chunks[1:]\n assert expected == actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_empty_indicies_test_empty_indicies.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_empty_indicies_test_empty_indicies.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 268, "end_line": 291, "span_ids": ["test_empty_indicies"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_empty_indicies():\n darr = da.indices(tuple(), chunks=tuple())\n nparr = np.indices(tuple())\n assert darr.shape == nparr.shape\n assert darr.dtype == nparr.dtype\n assert_eq(darr, nparr)\n\n darr = da.indices(tuple(), float, chunks=tuple())\n nparr = np.indices(tuple(), float)\n assert darr.shape == nparr.shape\n assert darr.dtype == nparr.dtype\n assert_eq(darr, nparr)\n\n darr = da.indices((0,), float, chunks=(1,))\n nparr = np.indices((0,), float)\n assert darr.shape == nparr.shape\n assert darr.dtype == nparr.dtype\n assert_eq(darr, nparr)\n\n darr = da.indices((0, 1, 2), float, chunks=(1, 1, 2))\n nparr = np.indices((0, 1, 2), float)\n assert darr.shape == nparr.shape\n assert darr.dtype == nparr.dtype\n assert_eq(darr, nparr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indicies_test_indicies.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_indicies_test_indicies.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 294, "end_line": 309, "span_ids": ["test_indicies"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_indicies():\n darr = da.indices((1,), chunks=(1,))\n nparr = np.indices((1,))\n assert_eq(darr, nparr)\n\n darr = da.indices((1,), float, chunks=(1,))\n nparr = np.indices((1,), float)\n assert_eq(darr, nparr)\n\n darr = da.indices((2, 1), chunks=(2, 1))\n nparr = np.indices((2, 1))\n assert_eq(darr, nparr)\n\n darr = da.indices((2, 3), chunks=(1, 2))\n nparr = np.indices((2, 3))\n assert_eq(darr, nparr)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_test_meshgrid.for_e_r_a_e_r_d_i_in_zi.if_sparse_.else_.assert_e_r_d_chunks_xi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_test_meshgrid.for_e_r_a_e_r_d_i_in_zi.if_sparse_.else_.assert_e_r_d_chunks_xi", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 312, "end_line": 352, "span_ids": ["test_meshgrid"], "tokens": 441}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shapes, chunks\",\n [\n ([()], [()]),\n ([(0,)], [(0,)]),\n ([(2,), (3,)], [(1,), (2,)]),\n ([(2,), (3,), (4,)], [(1,), (2,), (3,)]),\n ([(2,), (3,), (4,), (5,)], [(1,), (2,), (3,), (4,)]),\n ([(2, 3), (4,)], [(1, 2), (3,)]),\n ],\n)\n@pytest.mark.parametrize(\"indexing\", [\"ij\", \"xy\"])\n@pytest.mark.parametrize(\"sparse\", [False, True])\ndef test_meshgrid(shapes, chunks, indexing, sparse):\n xi_a = []\n xi_d = []\n xi_dc = []\n for each_shape, each_chunk in zip(shapes, chunks):\n xi_a.append(np.random.random(each_shape))\n xi_d_e = da.from_array(xi_a[-1], chunks=each_chunk)\n xi_d.append(xi_d_e)\n xi_d_ef = xi_d_e.flatten()\n xi_dc.append(xi_d_ef.chunks[0])\n do = list(range(len(xi_dc)))\n if indexing == \"xy\" and len(xi_dc) > 1:\n do[0], do[1] = do[1], do[0]\n xi_dc[0], xi_dc[1] = xi_dc[1], xi_dc[0]\n xi_dc = tuple(xi_dc)\n\n r_a = np.meshgrid(*xi_a, indexing=indexing, sparse=sparse)\n r_d = da.meshgrid(*xi_d, indexing=indexing, sparse=sparse)\n\n assert isinstance(r_d, list)\n assert len(r_a) == len(r_d)\n\n for e_r_a, e_r_d, i in zip(r_a, r_d, do):\n assert_eq(e_r_a, e_r_d)\n if sparse:\n assert e_r_d.chunks[i] == xi_dc[i]\n else:\n assert e_r_d.chunks == xi_dc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_inputcoercion_test_meshgrid_inputcoercion.assert_eq_z_z_d_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_meshgrid_inputcoercion_test_meshgrid_inputcoercion.assert_eq_z_z_d_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 365, "span_ids": ["test_meshgrid_inputcoercion"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_meshgrid_inputcoercion():\n a = [1, 2, 3]\n b = np.array([4, 5, 6, 7])\n x, y = np.meshgrid(a, b, indexing=\"ij\")\n z = x * y\n\n x_d, y_d = da.meshgrid(a, b, indexing=\"ij\")\n z_d = x_d * y_d\n\n assert z_d.shape == (len(a), len(b))\n assert_eq(z, z_d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 368, "end_line": 401, "span_ids": ["test_tril_triu"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tril_triu():\n A = np.random.randn(20, 20)\n for chk in [5, 4]:\n dA = da.from_array(A, (chk, chk))\n\n assert np.allclose(da.triu(dA).compute(), np.triu(A))\n assert np.allclose(da.tril(dA).compute(), np.tril(A))\n\n for k in [\n -25,\n -20,\n -19,\n -15,\n -14,\n -9,\n -8,\n -6,\n -5,\n -1,\n 1,\n 4,\n 5,\n 6,\n 8,\n 10,\n 11,\n 15,\n 16,\n 19,\n 20,\n 21,\n ]:\n assert np.allclose(da.triu(dA, k).compute(), np.triu(A, k))\n assert np.allclose(da.tril(dA, k).compute(), np.tril(A, k))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_errors_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tril_triu_errors_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 404, "end_line": 414, "span_ids": ["test_tril_triu_non_square_arrays", "test_tril_triu_errors"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tril_triu_errors():\n A = np.random.randint(0, 11, (10, 10, 10))\n dA = da.from_array(A, chunks=(5, 5, 5))\n pytest.raises(ValueError, lambda: da.triu(dA))\n\n\ndef test_tril_triu_non_square_arrays():\n A = np.random.randint(0, 11, (30, 35))\n dA = da.from_array(A, chunks=(5, 5))\n assert_eq(da.triu(dA), np.triu(A))\n assert_eq(da.tril(dA), np.tril(A))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_eye_test_eye.with_dask_config_set_ar.assert_4_x_npartitions_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_eye_test_eye.with_dask_config_set_ar.assert_4_x_npartitions_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 417, "end_line": 437, "span_ids": ["test_eye"], "tokens": 420}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_eye():\n assert_eq(da.eye(9, chunks=3), np.eye(9))\n assert_eq(da.eye(9), np.eye(9))\n assert_eq(da.eye(10, chunks=3), np.eye(10))\n assert_eq(da.eye(9, chunks=3, M=11), np.eye(9, M=11))\n assert_eq(da.eye(11, chunks=3, M=9), np.eye(11, M=9))\n assert_eq(da.eye(7, chunks=3, M=11), np.eye(7, M=11))\n assert_eq(da.eye(11, chunks=3, M=7), np.eye(11, M=7))\n assert_eq(da.eye(9, chunks=3, k=2), np.eye(9, k=2))\n assert_eq(da.eye(9, chunks=3, k=-2), np.eye(9, k=-2))\n assert_eq(da.eye(7, chunks=3, M=11, k=5), np.eye(7, M=11, k=5))\n assert_eq(da.eye(11, chunks=3, M=7, k=-6), np.eye(11, M=7, k=-6))\n assert_eq(da.eye(6, chunks=3, M=9, k=7), np.eye(6, M=9, k=7))\n assert_eq(da.eye(12, chunks=3, M=6, k=-3), np.eye(12, M=6, k=-3))\n\n assert_eq(da.eye(9, chunks=3, dtype=int), np.eye(9, dtype=int))\n assert_eq(da.eye(10, chunks=3, dtype=int), np.eye(10, dtype=int))\n\n with dask.config.set({\"array.chunk-size\": \"50 MiB\"}):\n x = da.eye(10000, \"auto\")\n assert 4 < x.npartitions < 32", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diag_test_diag.assert_eq_da_diag_d_np_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diag_test_diag.assert_eq_da_diag_d_np_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 440, "end_line": 465, "span_ids": ["test_diag"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diag():\n v = np.arange(11)\n assert_eq(da.diag(v), np.diag(v))\n\n v = da.arange(11, chunks=3)\n darr = da.diag(v)\n nparr = np.diag(v)\n assert_eq(darr, nparr)\n assert sorted(da.diag(v).dask) == sorted(da.diag(v).dask)\n\n v = v + v + 3\n darr = da.diag(v)\n nparr = np.diag(v)\n assert_eq(darr, nparr)\n\n v = da.arange(11, chunks=11)\n darr = da.diag(v)\n nparr = np.diag(v)\n assert_eq(darr, nparr)\n assert sorted(da.diag(v).dask) == sorted(da.diag(v).dask)\n\n x = np.arange(64).reshape((8, 8))\n assert_eq(da.diag(x), np.diag(x))\n\n d = da.from_array(x, chunks=(4, 4))\n assert_eq(da.diag(d), np.diag(x))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal_test_diagonal.None_14": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal_test_diagonal.None_14", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 468, "end_line": 532, "span_ids": ["test_diagonal"], "tokens": 749}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diagonal():\n v = np.arange(11)\n with pytest.raises(ValueError):\n da.diagonal(v)\n\n v = np.arange(4).reshape((2, 2))\n with pytest.raises(ValueError):\n da.diagonal(v, axis1=0, axis2=0)\n\n with pytest.raises(AxisError):\n da.diagonal(v, axis1=-4)\n\n with pytest.raises(AxisError):\n da.diagonal(v, axis2=-4)\n\n v = np.arange(4 * 5 * 6).reshape((4, 5, 6))\n v = da.from_array(v, chunks=2)\n assert_eq(da.diagonal(v), np.diagonal(v))\n # Empty diagonal.\n assert_eq(da.diagonal(v, offset=10), np.diagonal(v, offset=10))\n assert_eq(da.diagonal(v, offset=-10), np.diagonal(v, offset=-10))\n\n with pytest.raises(ValueError):\n da.diagonal(v, axis1=-2)\n\n # Negative axis.\n assert_eq(da.diagonal(v, axis1=-1), np.diagonal(v, axis1=-1))\n assert_eq(da.diagonal(v, offset=1, axis1=-1), np.diagonal(v, offset=1, axis1=-1))\n\n # Heterogenous chunks.\n v = np.arange(2 * 3 * 4 * 5 * 6).reshape((2, 3, 4, 5, 6))\n v = da.from_array(v, chunks=(1, (1, 2), (1, 2, 1), (2, 1, 2), (5, 1)))\n\n assert_eq(da.diagonal(v), np.diagonal(v))\n assert_eq(\n da.diagonal(v, offset=2, axis1=3, axis2=1),\n np.diagonal(v, offset=2, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-2, axis1=3, axis2=1),\n np.diagonal(v, offset=-2, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-2, axis1=3, axis2=4),\n np.diagonal(v, offset=-2, axis1=3, axis2=4),\n )\n\n assert_eq(da.diagonal(v, 1), np.diagonal(v, 1))\n assert_eq(da.diagonal(v, -1), np.diagonal(v, -1))\n # Positional arguments\n assert_eq(da.diagonal(v, 1, 2, 1), np.diagonal(v, 1, 2, 1))\n\n v = np.arange(2 * 3 * 4 * 5 * 6).reshape((2, 3, 4, 5, 6))\n assert_eq(da.diagonal(v, axis1=1, axis2=3), np.diagonal(v, axis1=1, axis2=3))\n assert_eq(\n da.diagonal(v, offset=1, axis1=1, axis2=3),\n np.diagonal(v, offset=1, axis1=1, axis2=3),\n )\n\n assert_eq(\n da.diagonal(v, offset=1, axis1=3, axis2=1),\n np.diagonal(v, offset=1, axis1=3, axis2=1),\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal.None_15_test_diagonal.None_22": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_diagonal.None_15_test_diagonal.None_22", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 534, "end_line": 568, "span_ids": ["test_diagonal"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diagonal():\n # ... other code\n\n assert_eq(\n da.diagonal(v, offset=-5, axis1=3, axis2=1),\n np.diagonal(v, offset=-5, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-6, axis1=3, axis2=1),\n np.diagonal(v, offset=-6, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-6, axis1=-3, axis2=1),\n np.diagonal(v, offset=-6, axis1=-3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-6, axis1=-3, axis2=1),\n np.diagonal(v, offset=-6, axis1=-3, axis2=1),\n )\n\n v = da.from_array(v, chunks=2)\n assert_eq(\n da.diagonal(v, offset=1, axis1=3, axis2=1),\n np.diagonal(v, offset=1, axis1=3, axis2=1),\n )\n assert_eq(\n da.diagonal(v, offset=-1, axis1=3, axis2=1),\n np.diagonal(v, offset=-1, axis1=3, axis2=1),\n )\n\n v = np.arange(384).reshape((8, 8, 6))\n assert_eq(da.diagonal(v, offset=-1, axis1=2), np.diagonal(v, offset=-1, axis1=2))\n\n v = da.from_array(v, chunks=(4, 4, 2))\n assert_eq(da.diagonal(v, offset=-1, axis1=2), np.diagonal(v, offset=-1, axis1=2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_fromfunction_test_fromfunction.assert_same_keys_d_d2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_fromfunction_test_fromfunction.assert_same_keys_d_d2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 571, "end_line": 588, "span_ids": ["test_fromfunction"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dtype\", [None, \"f8\", \"i8\"])\n@pytest.mark.parametrize(\n \"func, kwargs\",\n [\n (lambda x, y: x + y, {}),\n (lambda x, y, c=1: x + c * y, {}),\n (lambda x, y, c=1: x + c * y, {\"c\": 3}),\n ],\n)\ndef test_fromfunction(func, dtype, kwargs):\n a = np.fromfunction(func, shape=(5, 5), dtype=dtype, **kwargs)\n d = da.fromfunction(func, shape=(5, 5), chunks=(2, 2), dtype=dtype, **kwargs)\n\n assert_eq(d, a)\n\n d2 = da.fromfunction(func, shape=(5, 5), chunks=(2, 2), dtype=dtype, **kwargs)\n\n assert same_keys(d, d2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_repeat_test_repeat.for_r_in_1_2_3_4_.assert_all_concat_d_repea": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_repeat_test_repeat.for_r_in_1_2_3_4_.assert_all_concat_d_repea", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 591, "end_line": 623, "span_ids": ["test_repeat"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repeat():\n x = np.random.random((10, 11, 13))\n d = da.from_array(x, chunks=(4, 5, 3))\n\n repeats = [0, 1, 2, 5]\n axes = [-3, -2, -1, 0, 1, 2]\n\n for r in repeats:\n for a in axes:\n assert_eq(x.repeat(r, axis=a), d.repeat(r, axis=a))\n\n assert_eq(d.repeat(2, 0), da.repeat(d, 2, 0))\n\n with pytest.raises(NotImplementedError):\n da.repeat(d, np.arange(10))\n\n with pytest.raises(NotImplementedError):\n da.repeat(d, 2, None)\n\n with pytest.raises(NotImplementedError):\n da.repeat(d, 2)\n\n for invalid_axis in [3, -4]:\n with pytest.raises(ValueError):\n da.repeat(d, 2, axis=invalid_axis)\n\n x = np.arange(5)\n d = da.arange(5, chunks=(2,))\n\n assert_eq(x.repeat(3), d.repeat(3))\n\n for r in [1, 2, 3, 4]:\n assert all(concat(d.repeat(r).chunks))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_basic_test_tile_basic.assert_eq_np_tile_b_reps": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_basic_test_tile_basic.assert_eq_np_tile_b_reps", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 626, "end_line": 632, "span_ids": ["test_tile_basic"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"reps\", [2, (2, 2), (1, 2), (2, 1), (2, 3, 4, 0)])\ndef test_tile_basic(reps):\n a = da.asarray([0, 1, 2])\n b = [[1, 2], [3, 4]]\n\n assert_eq(np.tile(a.compute(), reps), da.tile(a, reps))\n assert_eq(np.tile(b, reps), da.tile(b, reps))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_chunks_test_tile_neg_reps.with_pytest_raises_ValueE.da_tile_d_reps_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_chunks_test_tile_neg_reps.with_pytest_raises_ValueE.da_tile_d_reps_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 635, "end_line": 651, "span_ids": ["test_tile_neg_reps", "test_tile_chunks"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape, chunks\", [((10,), (1,)), ((10, 11, 13), (4, 5, 3))])\n@pytest.mark.parametrize(\"reps\", [0, 1, 2, 3, 5, (1,), (1, 2)])\ndef test_tile_chunks(shape, chunks, reps):\n x = np.random.random(shape)\n d = da.from_array(x, chunks=chunks)\n\n assert_eq(np.tile(x, reps), da.tile(d, reps))\n\n\n@pytest.mark.parametrize(\"shape, chunks\", [((10,), (1,)), ((10, 11, 13), (4, 5, 3))])\n@pytest.mark.parametrize(\"reps\", [-1, -5])\ndef test_tile_neg_reps(shape, chunks, reps):\n x = np.random.random(shape)\n d = da.from_array(x, chunks=chunks)\n\n with pytest.raises(ValueError):\n da.tile(d, reps)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_zero_reps_test_tile_zero_reps.assert_eq_np_tile_x_reps": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_zero_reps_test_tile_zero_reps.assert_eq_np_tile_x_reps", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 654, "end_line": 660, "span_ids": ["test_tile_zero_reps"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape, chunks\", [((10,), (1,)), ((10, 11, 13), (4, 5, 3))])\n@pytest.mark.parametrize(\"reps\", [0, (0,), (2, 0), (0, 3, 0, 4)])\ndef test_tile_zero_reps(shape, chunks, reps):\n x = np.random.random(shape)\n d = da.from_array(x, chunks=chunks)\n\n assert_eq(np.tile(x, reps), da.tile(d, reps))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_empty_array_test_tile_empty_array.assert_eq_np_tile_x_reps": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_empty_array_test_tile_empty_array.assert_eq_np_tile_x_reps", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 663, "end_line": 669, "span_ids": ["test_tile_empty_array"], "tokens": 104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape, chunks\", [((1, 1, 0), (1, 1, 0)), ((2, 0), (1, 0))])\n@pytest.mark.parametrize(\"reps\", [2, (3, 2, 5)])\ndef test_tile_empty_array(shape, chunks, reps):\n x = np.empty(shape)\n d = da.from_array(x, chunks=chunks)\n\n assert_eq(np.tile(x, reps), da.tile(d, reps))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_np_kroncompare_examples_skip_stat_length.pytest_mark_xfail__numpy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_tile_np_kroncompare_examples_skip_stat_length.pytest_mark_xfail__numpy_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 672, "end_line": 683, "span_ids": ["impl:2", "test_tile_np_kroncompare_examples"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape\", [(3,), (2, 3), (3, 4, 3), (3, 2, 3), (4, 3, 2, 4), (2, 2)]\n)\n@pytest.mark.parametrize(\"reps\", [(2,), (1, 2), (2, 1), (2, 2), (2, 3, 2), (3, 2)])\ndef test_tile_np_kroncompare_examples(shape, reps):\n x = np.random.random(shape)\n d = da.asarray(x)\n\n assert_eq(np.tile(x, reps), da.tile(d, reps))\n\n\nskip_stat_length = pytest.mark.xfail(_numpy_117, reason=\"numpy-14061\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_0_width_test_pad_0_width.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_0_width_test_pad_0_width.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 686, "end_line": 716, "span_ids": ["test_pad_0_width"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, pad_width, mode, kwargs\",\n [\n ((10, 11), (4, 5), 0, \"constant\", {\"constant_values\": 2}),\n ((10, 11), (4, 5), 0, \"edge\", {}),\n ((10, 11), (4, 5), 0, \"linear_ramp\", {\"end_values\": 2}),\n ((10, 11), (4, 5), 0, \"reflect\", {}),\n ((10, 11), (4, 5), 0, \"symmetric\", {}),\n ((10, 11), (4, 5), 0, \"wrap\", {}),\n pytest.param(\n (10, 11),\n (4, 5),\n 0,\n \"empty\",\n {},\n marks=pytest.mark.skipif(\n not _numpy_117, reason=\"requires NumPy>=1.17 for empty mode support\"\n ),\n ),\n ],\n)\ndef test_pad_0_width(shape, chunks, pad_width, mode, kwargs):\n np_a = np.random.random(shape)\n da_a = da.from_array(np_a, chunks=chunks)\n\n np_r = np.pad(np_a, pad_width, mode, **kwargs)\n da_r = da.pad(da_a, pad_width, mode, **kwargs)\n\n assert da_r is da_a\n\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_test_pad.if_mode_empty_.else_.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_test_pad.if_mode_empty_.else_.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 719, "end_line": 771, "span_ids": ["test_pad"], "tokens": 611}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, pad_width, mode, kwargs\",\n [\n ((10,), (3,), 1, \"constant\", {}),\n ((10,), (3,), 2, \"constant\", {\"constant_values\": -1}),\n ((10,), (3,), ((2, 3)), \"constant\", {\"constant_values\": (-1, -2)}),\n (\n (10, 11),\n (4, 5),\n ((1, 4), (2, 3)),\n \"constant\",\n {\"constant_values\": ((-1, -2), (2, 1))},\n ),\n ((10,), (3,), 3, \"edge\", {}),\n ((10,), (3,), 3, \"linear_ramp\", {}),\n ((10,), (3,), 3, \"linear_ramp\", {\"end_values\": 0}),\n (\n (10, 11),\n (4, 5),\n ((1, 4), (2, 3)),\n \"linear_ramp\",\n {\"end_values\": ((-1, -2), (4, 3))},\n ),\n ((10, 11), (4, 5), ((1, 4), (2, 3)), \"reflect\", {}),\n ((10, 11), (4, 5), ((1, 4), (2, 3)), \"symmetric\", {}),\n ((10, 11), (4, 5), ((1, 4), (2, 3)), \"wrap\", {}),\n ((10,), (3,), ((2, 3)), \"maximum\", {\"stat_length\": (1, 2)}),\n ((10, 11), (4, 5), ((1, 4), (2, 3)), \"mean\", {\"stat_length\": ((3, 4), (2, 1))}),\n ((10,), (3,), ((2, 3)), \"minimum\", {\"stat_length\": (2, 3)}),\n pytest.param(\n (10,),\n (3,),\n 1,\n \"empty\",\n {},\n marks=pytest.mark.skipif(\n not _numpy_117, reason=\"requires NumPy>=1.17 for empty mode support\"\n ),\n ),\n ],\n)\ndef test_pad(shape, chunks, pad_width, mode, kwargs):\n np_a = np.random.random(shape)\n da_a = da.from_array(np_a, chunks=chunks)\n\n np_r = np.pad(np_a, pad_width, mode, **kwargs)\n da_r = da.pad(da_a, pad_width, mode, **kwargs)\n\n if mode == \"empty\":\n # empty pads lead to undefined values which may be different\n assert_eq(np_r[pad_width:-pad_width], da_r[pad_width:-pad_width])\n else:\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_3d_data_test_pad_3d_data.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_3d_data_test_pad_3d_data.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 774, "end_line": 829, "span_ids": ["test_pad_3d_data"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dtype\", [np.uint8, np.int16, np.float32, bool])\n@pytest.mark.parametrize(\n \"pad_widths\", [2, (2,), (2, 3), ((2, 3),), ((3, 1), (0, 0), (2, 0))]\n)\n@pytest.mark.parametrize(\n \"mode\",\n [\n \"constant\",\n \"edge\",\n pytest.param(\n \"linear_ramp\",\n marks=pytest.mark.skipif(\n not _numpy_118, reason=\"numpy changed pad behaviour\"\n ),\n ),\n \"maximum\",\n \"mean\",\n \"minimum\",\n pytest.param(\n \"reflect\",\n marks=pytest.mark.skip(\n reason=\"Bug when pad_width is larger than dimension: https://github.com/dask/dask/issues/5303\"\n ),\n ),\n pytest.param(\n \"symmetric\",\n marks=pytest.mark.skip(\n reason=\"Bug when pad_width is larger than dimension: https://github.com/dask/dask/issues/5303\"\n ),\n ),\n pytest.param(\n \"wrap\",\n marks=pytest.mark.skip(\n reason=\"Bug when pad_width is larger than dimension: https://github.com/dask/dask/issues/5303\"\n ),\n ),\n pytest.param(\n \"median\",\n marks=pytest.mark.skip(reason=\"Not implemented\"),\n ),\n pytest.param(\n \"empty\",\n marks=pytest.mark.skip(\n reason=\"Empty leads to undefined values, which may be different\"\n ),\n ),\n ],\n)\ndef test_pad_3d_data(dtype, pad_widths, mode):\n np_a = np.arange(2 * 3 * 4).reshape(2, 3, 4).astype(dtype)\n da_a = da.from_array(np_a, chunks=\"auto\")\n\n np_r = np.pad(np_a, pad_widths, mode=mode)\n da_r = da.pad(da_a, pad_widths, mode=mode)\n\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_udf_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_creation.py_test_pad_udf_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_creation.py", "file_name": "test_creation.py", "file_type": "text/x-python", "category": "test", "start_line": 832, "end_line": 858, "span_ids": ["test_pad_udf", "test_auto_chunks"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"kwargs\", [{}, {\"scaler\": 2}])\ndef test_pad_udf(kwargs):\n def udf_pad(vector, pad_width, iaxis, inner_kwargs):\n assert kwargs == inner_kwargs\n scaler = inner_kwargs.get(\"scaler\", 1)\n vector[: pad_width[0]] = -scaler * pad_width[0]\n vector[-pad_width[1] :] = scaler * pad_width[1]\n return vector\n\n shape = (10, 11)\n chunks = (4, 5)\n pad_width = ((1, 2), (2, 3))\n\n np_a = np.random.random(shape)\n da_a = da.from_array(np_a, chunks=chunks)\n\n np_r = np.pad(np_a, pad_width, udf_pad, **kwargs)\n da_r = da.pad(da_a, pad_width, udf_pad, **kwargs)\n\n assert_eq(np_r, da_r)\n\n\ndef test_auto_chunks():\n with dask.config.set({\"array.chunk-size\": \"50 MiB\"}):\n x = da.ones((10000, 10000))\n assert 4 < x.npartitions < 32", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_np_functions._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_np_functions._", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 135, "span_ids": ["imports"], "tokens": 1217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import numpy as np\nimport pytest\n\nimport dask.array as da\nfrom dask.array.utils import assert_eq, same_keys, AxisError, IS_NEP18_ACTIVE\nfrom dask.array.gufunc import apply_gufunc\nfrom dask.sizeof import sizeof\n\ncupy = pytest.importorskip(\"cupy\")\ncupyx = pytest.importorskip(\"cupyx\")\n\n\nfunctions = [\n lambda x: x,\n lambda x: da.expm1(x),\n lambda x: 2 * x,\n lambda x: x / 2,\n lambda x: x ** 2,\n lambda x: x + x,\n lambda x: x * x,\n lambda x: x[0],\n lambda x: x[:, 1],\n lambda x: x[:1, None, 1:3],\n lambda x: x.T,\n lambda x: da.transpose(x, (1, 2, 0)),\n lambda x: x.sum(),\n pytest.param(\n lambda x: x.mean(),\n marks=pytest.mark.xfail(\n reason=\"requires NumPy>=1.17 and CuPy support for shape argument in *_like functions.\"\n ),\n ),\n pytest.param(\n lambda x: x.moment(order=0),\n marks=pytest.mark.xfail(reason=\"see https://github.com/dask/dask/issues/4875\"),\n ),\n lambda x: x.moment(order=2),\n pytest.param(\n lambda x: x.std(),\n marks=pytest.mark.xfail(\n reason=\"requires NumPy>=1.17 and CuPy support for shape argument in *_like functions.\"\n ),\n ),\n pytest.param(\n lambda x: x.var(),\n marks=pytest.mark.xfail(\n reason=\"requires NumPy>=1.17 and CuPy support for shape argument in *_like functions.\"\n ),\n ),\n pytest.param(\n lambda x: x.dot(np.arange(x.shape[-1])),\n marks=pytest.mark.xfail(reason=\"cupy.dot(numpy) fails\"),\n ),\n pytest.param(\n lambda x: x.dot(np.eye(x.shape[-1])),\n marks=pytest.mark.xfail(reason=\"cupy.dot(numpy) fails\"),\n ),\n pytest.param(\n lambda x: da.tensordot(x, np.ones(x.shape[:2]), axes=[(0, 1), (0, 1)]),\n marks=pytest.mark.xfail(reason=\"cupy.dot(numpy) fails\"),\n ),\n lambda x: x.sum(axis=0),\n lambda x: x.max(axis=0),\n lambda x: x.sum(axis=(1, 2)),\n lambda x: x.astype(np.complex128),\n lambda x: x.map_blocks(lambda x: x * 2),\n pytest.param(\n lambda x: x.round(1),\n marks=pytest.mark.xfail(reason=\"cupy doesn't support round\"),\n ),\n lambda x: x.reshape((x.shape[0] * x.shape[1], x.shape[2])),\n # Rechunking here is required, see https://github.com/dask/dask/issues/2561\n lambda x: (x.rechunk(x.shape)).reshape((x.shape[1], x.shape[0], x.shape[2])),\n lambda x: x.reshape((x.shape[0], x.shape[1], x.shape[2] / 2, x.shape[2] / 2)),\n lambda x: abs(x),\n lambda x: x > 0.5,\n lambda x: x.rechunk((4, 4, 4)),\n lambda x: x.rechunk((2, 2, 1)),\n pytest.param(\n lambda x: da.einsum(\"ijk,ijk\", x, x),\n marks=pytest.mark.xfail(\n reason=\"depends on resolution of https://github.com/numpy/numpy/issues/12974\"\n ),\n ),\n lambda x: np.isneginf(x),\n lambda x: np.isposinf(x),\n pytest.param(\n lambda x: np.isreal(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.iscomplex(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.real(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.imag(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.fix(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.i0(x.reshape((24,))),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.sinc(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n pytest.param(\n lambda x: np.nan_to_num(x),\n marks=pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n ),\n ),\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_basic_test_sizeof.assert_sizeof_c_c_nby": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_basic_test_sizeof.assert_sizeof_c_c_nby", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 158, "span_ids": ["test_sizeof", "test_basic"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", functions)\ndef test_basic(func):\n c = cupy.random.random((2, 3, 4))\n n = c.get()\n dc = da.from_array(c, chunks=(1, 2, 2), asarray=False)\n dn = da.from_array(n, chunks=(1, 2, 2))\n\n ddc = func(dc)\n ddn = func(dn)\n\n assert type(ddc._meta) == cupy.core.core.ndarray\n assert_eq(ddc, ddc) # Check that _meta and computed arrays match types\n\n assert_eq(ddc, ddn)\n\n\n@pytest.mark.parametrize(\"dtype\", [\"f4\", \"f8\"])\ndef test_sizeof(dtype):\n c = cupy.random.random((2, 3, 4), dtype=dtype)\n\n assert sizeof(c) == c.nbytes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diag_test_diag.assert_eq_da_diag_dx_cu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diag_test_diag.assert_eq_da_diag_dx_cu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 161, "end_line": 183, "span_ids": ["test_diag"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_diag():\n v = cupy.arange(11)\n dv = da.from_array(v, chunks=(4,), asarray=False)\n assert type(dv._meta) == cupy.core.core.ndarray\n assert_eq(dv, dv) # Check that _meta and computed arrays match types\n assert_eq(da.diag(dv), cupy.diag(v))\n\n v = v + v + 3\n dv = dv + dv + 3\n darr = da.diag(dv)\n cupyarr = cupy.diag(v)\n assert type(darr._meta) == cupy.core.core.ndarray\n assert_eq(darr, darr) # Check that _meta and computed arrays match types\n assert_eq(darr, cupyarr)\n\n x = cupy.arange(64).reshape((8, 8))\n dx = da.from_array(x, chunks=(4, 4), asarray=False)\n assert type(dx._meta) == cupy.core.core.ndarray\n assert_eq(dx, dx) # Check that _meta and computed arrays match types\n assert_eq(da.diag(dx), cupy.diag(x))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diagonal_test_diagonal.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_diagonal_test_diagonal.None_11", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 244, "span_ids": ["test_diagonal"], "tokens": 643}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_diagonal():\n v = cupy.arange(11)\n with pytest.raises(ValueError):\n da.diagonal(v)\n\n v = cupy.arange(4).reshape((2, 2))\n with pytest.raises(ValueError):\n da.diagonal(v, axis1=0, axis2=0)\n\n with pytest.raises(AxisError):\n da.diagonal(v, axis1=-4)\n\n with pytest.raises(AxisError):\n da.diagonal(v, axis2=-4)\n\n v = cupy.arange(4 * 5 * 6).reshape((4, 5, 6))\n v = da.from_array(v, chunks=2, asarray=False)\n assert_eq(da.diagonal(v), np.diagonal(v))\n # Empty diagonal.\n assert_eq(da.diagonal(v, offset=10), np.diagonal(v, offset=10))\n assert_eq(da.diagonal(v, offset=-10), np.diagonal(v, offset=-10))\n assert isinstance(da.diagonal(v).compute(), cupy.core.core.ndarray)\n\n with pytest.raises(ValueError):\n da.diagonal(v, axis1=-2)\n\n # Negative axis.\n assert_eq(da.diagonal(v, axis1=-1), np.diagonal(v, axis1=-1))\n assert_eq(da.diagonal(v, offset=1, axis1=-1), np.diagonal(v, offset=1, axis1=-1))\n\n # Heterogenous chunks.\n v = cupy.arange(2 * 3 * 4 * 5 * 6).reshape((2, 3, 4, 5, 6))\n v = da.from_array(\n v, chunks=(1, (1, 2), (1, 2, 1), (2, 1, 2), (5, 1)), asarray=False\n )\n\n assert_eq(da.diagonal(v), np.diagonal(v))\n assert_eq(\n da.diagonal(v, offset=2, axis1=3, axis2=1),\n np.diagonal(v, offset=2, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-2, axis1=3, axis2=1),\n np.diagonal(v, offset=-2, axis1=3, axis2=1),\n )\n\n assert_eq(\n da.diagonal(v, offset=-2, axis1=3, axis2=4),\n np.diagonal(v, offset=-2, axis1=3, axis2=4),\n )\n\n assert_eq(da.diagonal(v, 1), np.diagonal(v, 1))\n assert_eq(da.diagonal(v, -1), np.diagonal(v, -1))\n # Positional arguments\n assert_eq(da.diagonal(v, 1, 2, 1), np.diagonal(v, 1, 2, 1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_25_20_9_.assert_eq_da_tril_dA_k_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_test_tril_triu.for_chk_in_5_4_.for_k_in_25_20_9_.assert_eq_da_tril_dA_k_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 264, "span_ids": ["test_tril_triu"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"no shape argument support *_like functions on CuPy yet\")\n@pytest.mark.skipif(\n np.__version__ < \"1.17\", reason=\"no shape argument for *_like functions\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_tril_triu():\n A = cupy.random.randn(20, 20)\n for chk in [5, 4]:\n dA = da.from_array(A, (chk, chk), asarray=False)\n\n assert_eq(da.triu(dA), np.triu(A))\n assert_eq(da.tril(dA), np.tril(A))\n\n for k in [-25, -20, -9, -1, 1, 8, 19, 21]:\n assert_eq(da.triu(dA, k), np.triu(A, k))\n assert_eq(da.tril(dA, k), np.tril(A, k))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_non_square_arrays_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tril_triu_non_square_arrays_test_tril_triu_non_square_arrays.assert_eq_da_tril_dA_np", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 267, "end_line": 278, "span_ids": ["test_tril_triu_non_square_arrays"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"no shape argument support *_like functions on CuPy yet\")\n@pytest.mark.skipif(\n np.__version__ < \"1.17\", reason=\"no shape argument for *_like functions\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_tril_triu_non_square_arrays():\n A = cupy.random.randint(0, 11, (30, 35))\n dA = da.from_array(A, chunks=(5, 5), asarray=False)\n assert_eq(da.triu(dA), np.triu(A))\n assert_eq(da.tril(dA), np.tril(A))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_apply_gufunc_axis_test_apply_gufunc_axis.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_apply_gufunc_axis_test_apply_gufunc_axis.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 281, "end_line": 295, "span_ids": ["test_apply_gufunc_axis"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_apply_gufunc_axis():\n def mydiff(x):\n return np.diff(x)\n\n a = cupy.random.randn(3, 6, 4)\n da_ = da.from_array(a, chunks=2, asarray=False)\n\n m = np.diff(a, axis=1)\n dm = apply_gufunc(\n mydiff, \"(i)->(i)\", da_, axis=1, output_sizes={\"i\": 5}, allow_rechunk=True\n )\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_overlap_internal_test_overlap_internal.assert_same_keys_da_overl": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_overlap_internal_test_overlap_internal.assert_same_keys_da_overl", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 298, "end_line": 323, "span_ids": ["test_overlap_internal"], "tokens": 498}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_internal():\n x = cupy.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4), asarray=False)\n\n g = da.overlap.overlap_internal(d, {0: 2, 1: 1})\n assert g.chunks == ((6, 6), (5, 5))\n\n expected = np.array(\n [\n [0, 1, 2, 3, 4, 3, 4, 5, 6, 7],\n [8, 9, 10, 11, 12, 11, 12, 13, 14, 15],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [48, 49, 50, 51, 52, 51, 52, 53, 54, 55],\n [56, 57, 58, 59, 60, 59, 60, 61, 62, 63],\n ]\n )\n\n assert_eq(g, expected)\n assert same_keys(da.overlap.overlap_internal(d, {0: 2, 1: 1}), g)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 326, "end_line": 346, "span_ids": ["test_periodic", "test_trim_internal"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_trim_internal():\n x = cupy.ones((40, 60))\n d = da.from_array(x, chunks=(10, 10), asarray=False)\n e = da.overlap.trim_internal(d, axes={0: 1, 1: 2})\n\n assert e.chunks == ((8, 8, 8, 8), (6, 6, 6, 6, 6, 6))\n\n\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_periodic():\n x = cupy.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4), asarray=False)\n\n e = da.overlap.periodic(d, axis=0, depth=2)\n assert e.shape[0] == d.shape[0] + 4\n assert e.shape[1] == d.shape[1]\n\n assert_eq(e[1, :], d[-1, :])\n assert_eq(e[0, :], d[-2, :])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_reflect_test_reflect.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_reflect_test_reflect.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 349, "end_line": 362, "span_ids": ["test_reflect"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_reflect():\n x = cupy.arange(10)\n d = da.from_array(x, chunks=(5, 5), asarray=False)\n\n e = da.overlap.reflect(d, axis=0, depth=2)\n expected = np.array([1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8])\n assert_eq(e, expected)\n\n e = da.overlap.reflect(d, axis=0, depth=1)\n expected = np.array([0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9])\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_nearest_test_nearest.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_nearest_test_nearest.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 378, "span_ids": ["test_nearest"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_nearest():\n x = cupy.arange(10)\n d = da.from_array(x, chunks=(5, 5), asarray=False)\n\n e = da.overlap.nearest(d, axis=0, depth=2)\n expected = np.array([0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9])\n assert_eq(e, expected)\n\n e = da.overlap.nearest(d, axis=0, depth=1)\n expected = np.array([0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9])\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_constant_test_constant.assert_eq_e_1_np_on": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_constant_test_constant.assert_eq_e_1_np_on", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 381, "end_line": 397, "span_ids": ["test_constant"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"no shape argument support *_like functions on CuPy yet\")\n@pytest.mark.skipif(\n np.__version__ < \"1.17\", reason=\"no shape argument for *_like functions\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_constant():\n x = cupy.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4), asarray=False)\n\n e = da.overlap.constant(d, axis=0, depth=2, value=10)\n assert e.shape[0] == d.shape[0] + 4\n assert e.shape[1] == d.shape[1]\n\n assert_eq(e[1, :], np.ones(8, dtype=x.dtype) * 10)\n assert_eq(e[-1, :], np.ones(8, dtype=x.dtype) * 10)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_boundaries_test_boundaries.assert_eq_e_expected_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_boundaries_test_boundaries.assert_eq_e_expected_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 400, "end_line": 429, "span_ids": ["test_boundaries"], "tokens": 541}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"no shape argument support *_like functions on CuPy yet\")\n@pytest.mark.skipif(\n np.__version__ < \"1.17\", reason=\"no shape argument for *_like functions\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_boundaries():\n x = cupy.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4), asarray=False)\n\n e = da.overlap.boundaries(d, {0: 2, 1: 1}, {0: 0, 1: \"periodic\"})\n\n expected = np.array(\n [\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [7, 0, 1, 2, 3, 4, 5, 6, 7, 0],\n [15, 8, 9, 10, 11, 12, 13, 14, 15, 8],\n [23, 16, 17, 18, 19, 20, 21, 22, 23, 16],\n [31, 24, 25, 26, 27, 28, 29, 30, 31, 24],\n [39, 32, 33, 34, 35, 36, 37, 38, 39, 32],\n [47, 40, 41, 42, 43, 44, 45, 46, 47, 40],\n [55, 48, 49, 50, 51, 52, 53, 54, 55, 48],\n [63, 56, 57, 58, 59, 60, 61, 62, 63, 56],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n ]\n )\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_all_test_random_all.rnd_test_rs_standard_t_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_all_test_random_all.rnd_test_rs_standard_t_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 432, "end_line": 479, "span_ids": ["test_random_all"], "tokens": 747}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_random_all():\n def rnd_test(func, *args, **kwargs):\n a = func(*args, **kwargs)\n assert type(a._meta) == cupy.core.core.ndarray\n assert_eq(a, a) # Check that _meta and computed arrays match types\n\n rs = da.random.RandomState(RandomState=cupy.random.RandomState)\n\n rnd_test(rs.beta, 1, 2, size=5, chunks=3)\n rnd_test(rs.binomial, 10, 0.5, size=5, chunks=3)\n rnd_test(rs.chisquare, 1, size=5, chunks=3)\n rnd_test(rs.exponential, 1, size=5, chunks=3)\n rnd_test(rs.f, 1, 2, size=5, chunks=3)\n rnd_test(rs.gamma, 5, 1, size=5, chunks=3)\n rnd_test(rs.geometric, 1, size=5, chunks=3)\n rnd_test(rs.gumbel, 1, size=5, chunks=3)\n rnd_test(rs.hypergeometric, 1, 2, 3, size=5, chunks=3)\n rnd_test(rs.laplace, size=5, chunks=3)\n rnd_test(rs.logistic, size=5, chunks=3)\n rnd_test(rs.lognormal, size=5, chunks=3)\n rnd_test(rs.logseries, 0.5, size=5, chunks=3)\n # No RandomState for multinomial in CuPy\n # rnd_test(rs.multinomial, 20, [1 / 6.] * 6, size=5, chunks=3)\n rnd_test(rs.negative_binomial, 5, 0.5, size=5, chunks=3)\n rnd_test(rs.noncentral_chisquare, 2, 2, size=5, chunks=3)\n\n rnd_test(rs.noncentral_f, 2, 2, 3, size=5, chunks=3)\n rnd_test(rs.normal, 2, 2, size=5, chunks=3)\n rnd_test(rs.pareto, 1, size=5, chunks=3)\n rnd_test(rs.poisson, size=5, chunks=3)\n\n rnd_test(rs.power, 1, size=5, chunks=3)\n rnd_test(rs.rayleigh, size=5, chunks=3)\n rnd_test(rs.random_sample, size=5, chunks=3)\n\n rnd_test(rs.triangular, 1, 2, 3, size=5, chunks=3)\n rnd_test(rs.uniform, size=5, chunks=3)\n rnd_test(rs.vonmises, 2, 3, size=5, chunks=3)\n rnd_test(rs.wald, 1, 2, size=5, chunks=3)\n\n rnd_test(rs.weibull, 2, size=5, chunks=3)\n rnd_test(rs.zipf, 2, size=5, chunks=3)\n\n rnd_test(rs.standard_cauchy, size=5, chunks=3)\n rnd_test(rs.standard_exponential, size=5, chunks=3)\n rnd_test(rs.standard_gamma, 2, size=5, chunks=3)\n rnd_test(rs.standard_normal, size=5, chunks=3)\n rnd_test(rs.standard_t, 2, size=5, chunks=3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_shapes_test_random_shapes.assert_x_shape_shape": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_random_shapes_test_random_shapes.assert_x_shape_shape", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 482, "end_line": 490, "span_ids": ["test_random_shapes"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape\", [(2, 3), (2, 3, 4), (2, 3, 4, 2)])\ndef test_random_shapes(shape):\n rs = da.random.RandomState(RandomState=cupy.random.RandomState)\n\n x = rs.poisson(size=shape, chunks=3)\n assert type(x._meta) == cupy.core.core.ndarray\n assert_eq(x, x) # Check that _meta and computed arrays match types\n assert x._meta.shape == (0,) * len(shape)\n assert x.shape == shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_test_tsqr._full_matrix_returned": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_test_tsqr._full_matrix_returned", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 493, "end_line": 558, "span_ids": ["test_tsqr"], "tokens": 751}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(\n reason=\"CuPy division by zero on tensordot(), https://github.com/cupy/cupy/pull/2209\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\n@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, None), # tall-skinny regular blocks\n (20, 10, (3, 10), None), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), None), # tall-skinny irregular fat layers\n (40, 10, ((15, 5, 5, 8, 7), 10), None), # tall-skinny non-uniform chunks (why?)\n (128, 2, (16, 2), None), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (300, 10, (40, 10), None), # tall-skinny regular thin layers; recursion_depth=2\n (300, 10, (30, 10), None), # tall-skinny regular thin layers; recursion_depth=3\n (300, 10, (20, 10), None), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), ValueError), # short-fat regular blocks\n (10, 40, (10, 15), ValueError), # short-fat irregular blocks\n (\n 10,\n 40,\n (10, (15, 5, 5, 8, 7)),\n ValueError,\n ), # short-fat non-uniform chunks (why?)\n (20, 20, 10, ValueError), # 2x2 regular blocks\n ],\n)\ndef test_tsqr(m, n, chunks, error_type):\n mat = cupy.random.rand(m, n)\n data = da.from_array(mat, chunks=chunks, name=\"A\", asarray=False)\n\n # qr\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n\n # svd\n m_u = m\n n_u = min(m, n)\n n_s = n_q\n m_vh = n_q\n n_vh = n\n d_vh = max(m_vh, n_vh) # full matrix returned\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr.if_error_type_is_None__test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr.if_error_type_is_None__test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 560, "end_line": 583, "span_ids": ["test_tsqr"], "tokens": 988}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(\n reason=\"CuPy division by zero on tensordot(), https://github.com/cupy/cupy/pull/2209\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\n@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, None), # tall-skinny regular blocks\n (20, 10, (3, 10), None), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), None), # tall-skinny irregular fat layers\n (40, 10, ((15, 5, 5, 8, 7), 10), None), # tall-skinny non-uniform chunks (why?)\n (128, 2, (16, 2), None), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (300, 10, (40, 10), None), # tall-skinny regular thin layers; recursion_depth=2\n (300, 10, (30, 10), None), # tall-skinny regular thin layers; recursion_depth=3\n (300, 10, (20, 10), None), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), ValueError), # short-fat regular blocks\n (10, 40, (10, 15), ValueError), # short-fat irregular blocks\n (\n 10,\n 40,\n (10, (15, 5, 5, 8, 7)),\n ValueError,\n ), # short-fat non-uniform chunks (why?)\n (20, 20, 10, ValueError), # 2x2 regular blocks\n ],\n)\ndef test_tsqr(m, n, chunks, error_type):\n # ... other code\n\n if error_type is None:\n # test QR\n q, r = da.linalg.tsqr(data)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(cupy.eye(n_q, n_q), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, np.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n\n # test SVD\n u, s, vh = da.linalg.tsqr(data, compute_svd=True)\n s_exact = np.linalg.svd(mat)[1]\n assert_eq(s, s_exact) # s must contain the singular values\n assert_eq((m_u, n_u), u.shape) # shape check\n assert_eq((n_s,), s.shape) # shape check\n assert_eq((d_vh, d_vh), vh.shape) # shape check\n assert_eq(np.eye(n_u, n_u), da.dot(u.T, u)) # u must be orthonormal\n assert_eq(np.eye(d_vh, d_vh), da.dot(vh, vh.T)) # vh must be orthonormal\n assert_eq(mat, da.dot(da.dot(u, da.diag(s)), vh[:n_q])) # accuracy check\n else:\n with pytest.raises(error_type):\n q, r = da.linalg.tsqr(data)\n with pytest.raises(error_type):\n u, s, vh = da.linalg.tsqr(data, compute_svd=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain_test_tsqr_uncertain.data.da_from_array_mat_chunks": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain_test_tsqr_uncertain.data.da_from_array_mat_chunks", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 586, "end_line": 680, "span_ids": ["test_tsqr_uncertain"], "tokens": 749}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\n@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n mat = cupy.random.rand(m_min * 2, n_max)\n m, n = m_min * 2, n_max\n mat[0:m_min, 0] += 1\n _c0 = mat[:, 0]\n _r0 = mat[0, :]\n c0 = da.from_array(_c0, chunks=m_min, name=\"c\", asarray=False)\n r0 = da.from_array(_r0, chunks=n_max, name=\"r\", asarray=False)\n data = da.from_array(mat, chunks=chunks, name=\"A\", asarray=False)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_vary_rows__test_tsqr_uncertain._full_matrix_returned": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_vary_rows__test_tsqr_uncertain._full_matrix_returned", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 681, "end_line": 702, "span_ids": ["test_tsqr_uncertain"], "tokens": 799}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\n@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n # ... other code\n if vary_rows:\n data = data[c0 > 0.5, :]\n mat = mat[_c0 > 0.5, :]\n m = mat.shape[0]\n if vary_cols:\n data = data[:, r0 > 0.5]\n mat = mat[:, _r0 > 0.5]\n n = mat.shape[1]\n\n # qr\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n\n # svd\n m_u = m\n n_u = min(m, n)\n n_s = n_q\n m_vh = n_q\n n_vh = n\n d_vh = max(m_vh, n_vh) # full matrix returned\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_da_linalg_tsqr", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 704, "end_line": 732, "span_ids": ["test_tsqr_uncertain"], "tokens": 1014}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\n@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n # ... other code\n\n if error_type is None:\n # test QR\n q, r = da.linalg.tsqr(data)\n q = q.compute() # because uncertainty\n r = r.compute()\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, np.dot(q, r)) # accuracy check\n assert_eq(np.eye(n_q, n_q), np.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, np.triu(r)) # r must be upper triangular\n\n # test SVD\n u, s, vh = da.linalg.tsqr(data, compute_svd=True)\n u = u.compute() # because uncertainty\n s = s.compute()\n vh = vh.compute()\n s_exact = np.linalg.svd(mat)[1]\n assert_eq(s, s_exact) # s must contain the singular values\n assert_eq((m_u, n_u), u.shape) # shape check\n assert_eq((n_s,), s.shape) # shape check\n assert_eq((d_vh, d_vh), vh.shape) # shape check\n assert_eq(np.eye(n_u, n_u), np.dot(u.T, u)) # u must be orthonormal\n assert_eq(np.eye(d_vh, d_vh), np.dot(vh, vh.T)) # vh must be orthonormal\n assert_eq(mat, np.dot(np.dot(u, np.diag(s)), vh[:n_q])) # accuracy check\n else:\n with pytest.raises(error_type):\n q, r = da.linalg.tsqr(data)\n with pytest.raises(error_type):\n u, s, vh = da.linalg.tsqr(data, compute_svd=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_da_linalg_sfqr_dat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_da_linalg_sfqr_dat", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 735, "end_line": 816, "span_ids": ["test_sfqr"], "tokens": 797}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, ValueError), # tall-skinny regular blocks\n (20, 10, (3, 10), ValueError), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), ValueError), # tall-skinny irregular fat layers\n (\n 40,\n 10,\n ((15, 5, 5, 8, 7), 10),\n ValueError,\n ), # tall-skinny non-uniform chunks (why?)\n (\n 128,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 300,\n 10,\n (40, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), None), # short-fat regular blocks\n (10, 40, (10, 15), None), # short-fat irregular blocks\n (10, 40, (10, (15, 5, 5, 8, 7)), None), # short-fat non-uniform chunks (why?)\n (20, 20, 10, ValueError), # 2x2 regular blocks\n ],\n)\ndef test_sfqr(m, n, chunks, error_type):\n mat = np.random.rand(m, n)\n data = da.from_array(mat, chunks=chunks, name=\"A\")\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n m_qtq = n_q\n\n if error_type is None:\n q, r = da.linalg.sfqr(data)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(np.eye(m_qtq, m_qtq), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, da.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n else:\n with pytest.raises(error_type):\n q, r = da.linalg.sfqr(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sparse_hstack_vstack_csr_test_sparse_hstack_vstack_csr.assert_eq_x_y_todense_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_sparse_hstack_vstack_csr_test_sparse_hstack_vstack_csr.assert_eq_x_y_todense_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 819, "end_line": 829, "span_ids": ["test_sparse_hstack_vstack_csr"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_sparse_hstack_vstack_csr():\n pytest.importorskip(\"cupyx\")\n x = cupy.arange(24, dtype=cupy.float32).reshape(4, 6)\n\n sp = da.from_array(x, chunks=(2, 3), asarray=False, fancy=False)\n sp = sp.map_blocks(cupyx.scipy.sparse.csr_matrix, dtype=cupy.float32)\n\n y = sp.compute()\n\n assert cupyx.scipy.sparse.isspmatrix(y)\n assert_eq(x, y.todense())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_cupy_sparse_concatenate_test_cupy_sparse_concatenate.assert_z_toarray_z_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_cupy_sparse_concatenate_test_cupy_sparse_concatenate.assert_z_toarray_z_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 832, "end_line": 858, "span_ids": ["test_cupy_sparse_concatenate"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axis\", [0, 1])\ndef test_cupy_sparse_concatenate(axis):\n pytest.importorskip(\"cupyx\")\n\n rs = da.random.RandomState(RandomState=cupy.random.RandomState)\n meta = cupyx.scipy.sparse.csr_matrix((0, 0))\n\n xs = []\n ys = []\n for i in range(2):\n x = rs.random((1000, 10), chunks=(100, 10))\n x[x < 0.9] = 0\n xs.append(x)\n ys.append(x.map_blocks(cupyx.scipy.sparse.csr_matrix, meta=meta))\n\n z = da.concatenate(ys, axis=axis)\n z = z.compute()\n\n if axis == 0:\n sp_concatenate = cupyx.scipy.sparse.vstack\n elif axis == 1:\n sp_concatenate = cupyx.scipy.sparse.hstack\n z_expected = sp_concatenate(\n [cupyx.scipy.sparse.csr_matrix(e.compute()) for e in xs]\n )\n\n assert (z.toarray() == z_expected.toarray()).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_bincount_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_cupy.py_test_bincount_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_cupy.py", "file_name": "test_cupy.py", "file_type": "text/x-python", "category": "test", "start_line": 861, "end_line": 877, "span_ids": ["test_bincount"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"no shape argument support *_like functions on CuPy yet\")\n@pytest.mark.skipif(\n np.__version__ < \"1.17\", reason=\"no shape argument for *_like functions\"\n)\n@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP-18 support is not available in NumPy\"\n)\ndef test_bincount():\n x = cupy.array([2, 1, 5, 2, 1])\n d = da.from_array(x, chunks=2, asarray=False)\n e = da.bincount(d, minlength=6)\n assert_eq(e, np.bincount(x, minlength=6))\n assert same_keys(da.bincount(d, minlength=6), e)\n\n assert da.bincount(d, minlength=6).name != da.bincount(d, minlength=7).name\n assert da.bincount(d, minlength=6).name == da.bincount(d, minlength=6).name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_operator_dispatch_property.return.wrapped": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_operator_dispatch_property.return.wrapped", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "wrap", "dispatch_property"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import operator\n\nimport pytest\nimport numpy as np\n\nimport dask.array as da\nfrom dask.array.chunk_types import is_valid_array_chunk, is_valid_chunk_type\nfrom dask.array.utils import assert_eq\n\n\ndef wrap(func_name):\n \"\"\"\n Wrap a function.\n \"\"\"\n\n def wrapped(self, *a, **kw):\n a = getattr(self.arr, func_name)(*a, **kw)\n return a if not isinstance(a, np.ndarray) else type(self)(a)\n\n return wrapped\n\n\ndef dispatch_property(prop_name):\n \"\"\"\n Wrap a simple property.\n \"\"\"\n\n @property\n def wrapped(self, *a, **kw):\n return getattr(self.arr, prop_name)\n\n return wrapped", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray_EncapsulateNDArray.__array__.return.np_asarray_self_arr_arg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray_EncapsulateNDArray.__array__.return.np_asarray_self_arr_arg", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 51, "span_ids": ["EncapsulateNDArray.__array__", "EncapsulateNDArray.__init__", "EncapsulateNDArray"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EncapsulateNDArray(np.lib.mixins.NDArrayOperatorsMixin):\n \"\"\"\n A class that \"mocks\" ndarray by encapsulating an ndarray and using\n protocols to \"look like\" an ndarray. Basically tests whether Dask\n works fine with something that is essentially an array but uses\n protocols instead of being an actual array. Must be manually\n registered as a valid chunk type to be considered a downcast type\n of Dask array in the type casting hierarchy.\n \"\"\"\n\n __array_priority__ = 20\n\n def __init__(self, arr):\n self.arr = arr\n\n def __array__(self, *args, **kwargs):\n return np.asarray(self.arr, *args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_function___EncapsulateNDArray.__setitem__.wrap___setitem___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_function___EncapsulateNDArray.__setitem__.wrap___setitem___", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 68, "span_ids": ["EncapsulateNDArray.__array_function__", "EncapsulateNDArray:5"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EncapsulateNDArray(np.lib.mixins.NDArrayOperatorsMixin):\n\n def __array_function__(self, f, t, arrs, kw):\n if not all(\n issubclass(ti, (type(self), np.ndarray) + np.ScalarType) for ti in t\n ):\n return NotImplemented\n arrs = tuple(\n arr if not isinstance(arr, type(self)) else arr.arr for arr in arrs\n )\n t = tuple(ti for ti in t if not issubclass(ti, type(self)))\n print(t)\n a = self.arr.__array_function__(f, t, arrs, kw)\n return a if not isinstance(a, np.ndarray) else type(self)(a)\n\n __getitem__ = wrap(\"__getitem__\")\n\n __setitem__ = wrap(\"__setitem__\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_ufunc___da_register_chunk_type_En": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_EncapsulateNDArray.__array_ufunc___da_register_chunk_type_En", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 88, "span_ids": ["EncapsulateNDArray.__array_ufunc__", "EncapsulateNDArray:9", "impl"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class EncapsulateNDArray(np.lib.mixins.NDArrayOperatorsMixin):\n\n def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):\n if not all(\n isinstance(i, (type(self), np.ndarray) + np.ScalarType) for i in inputs\n ):\n return NotImplemented\n inputs = tuple(i if not isinstance(i, type(self)) else i.arr for i in inputs)\n a = getattr(ufunc, method)(*inputs, **kwargs)\n return a if not isinstance(a, np.ndarray) else type(self)(a)\n\n shape = dispatch_property(\"shape\")\n ndim = dispatch_property(\"ndim\")\n dtype = dispatch_property(\"dtype\")\n\n astype = wrap(\"astype\")\n sum = wrap(\"sum\")\n prod = wrap(\"prod\")\n\n\nda.register_chunk_type(EncapsulateNDArray)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_WrappedArray_WrappedArray.__setitem__.self_arr_key_value": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_WrappedArray_WrappedArray.__setitem__.self_arr_key_value", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 131, "span_ids": ["WrappedArray.__array_function__", "WrappedArray.__array_ufunc__", "WrappedArray", "WrappedArray._downcast_args", "WrappedArray.__array__", "WrappedArray.__init__", "WrappedArray.__getitem__", "WrappedArray:3", "WrappedArray.__setitem__"], "tokens": 349}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WrappedArray(np.lib.mixins.NDArrayOperatorsMixin):\n \"\"\"\n Another mock duck array class (like EncapsulateNDArray), but\n designed to be above Dask in the type casting hierarchy (that is,\n WrappedArray wraps Dask Array) and be even more minimal in API.\n Tests that Dask defers properly to upcast types.\n \"\"\"\n\n def __init__(self, arr, **attrs):\n self.arr = arr\n self.attrs = attrs\n\n def __array__(self, *args, **kwargs):\n return np.asarray(self.arr, *args, **kwargs)\n\n def _downcast_args(self, args):\n for arg in args:\n if isinstance(arg, type(self)):\n yield arg.arr\n elif isinstance(arg, (tuple, list)):\n yield type(arg)(self._downcast_args(arg))\n else:\n yield arg\n\n def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):\n inputs = tuple(self._downcast_args(inputs))\n return type(self)(getattr(ufunc, method)(*inputs, **kwargs), **self.attrs)\n\n def __array_function__(self, func, types, args, kwargs):\n args = tuple(self._downcast_args(args))\n return type(self)(func(*args, **kwargs), **self.attrs)\n\n shape = dispatch_property(\"shape\")\n ndim = dispatch_property(\"ndim\")\n dtype = dispatch_property(\"dtype\")\n\n def __getitem__(self, key):\n return type(self)(self.arr[key], **self.attrs)\n\n def __setitem__(self, key, value):\n self.arr[key] = value", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_binary_operation_type_precedence_test_binary_operation_type_precedence.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_binary_operation_type_precedence_test_binary_operation_type_precedence.assert_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 134, "end_line": 177, "span_ids": ["test_binary_operation_type_precedence"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"op\",\n [\n operator.add,\n operator.eq,\n operator.gt,\n operator.ge,\n operator.lt,\n operator.le,\n operator.mod,\n operator.mul,\n operator.ne,\n operator.pow,\n operator.sub,\n operator.truediv,\n operator.floordiv,\n np.add,\n np.subtract,\n ],\n)\n@pytest.mark.parametrize(\n \"arr_upcast, arr_downcast\",\n [\n (\n WrappedArray(np.random.random((10, 10))),\n da.random.random((10, 10), chunks=(5, 5)),\n ),\n (\n da.random.random((10, 10), chunks=(5, 5)),\n EncapsulateNDArray(np.random.random((10, 10))),\n ),\n (\n WrappedArray(np.random.random((10, 10))),\n EncapsulateNDArray(np.random.random((10, 10))),\n ),\n ],\n)\ndef test_binary_operation_type_precedence(op, arr_upcast, arr_downcast):\n \"\"\" Test proper dispatch on binary operators and NumPy ufuncs\"\"\"\n assert (\n type(op(arr_upcast, arr_downcast))\n == type(op(arr_downcast, arr_upcast))\n == type(arr_upcast)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_array_chunk_test_is_valid_array_chunk.assert_is_valid_array_chu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_array_chunk_test_is_valid_array_chunk.assert_is_valid_array_chu", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 195, "span_ids": ["test_is_valid_array_chunk"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"arr, result\",\n [\n (WrappedArray(np.arange(4)), False),\n (da.from_array(np.arange(4)), False),\n (EncapsulateNDArray(np.arange(4)), True),\n (np.ma.masked_array(np.arange(4), [True, False, True, False]), True),\n (np.arange(4), True),\n (0.0, True),\n (0, True),\n (None, True),\n ],\n)\ndef test_is_valid_array_chunk(arr, result):\n \"\"\" Test is_valid_array_chunk for correctness\"\"\"\n assert is_valid_array_chunk(arr) is result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_chunk_type_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_dispatch.py_test_is_valid_chunk_type_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_dispatch.py", "file_name": "test_dispatch.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 223, "span_ids": ["test_is_valid_chunk_type", "test_direct_deferral_wrapping_override"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"arr_type, result\",\n [\n (WrappedArray, False),\n (da.Array, False),\n (EncapsulateNDArray, True),\n (np.ma.MaskedArray, True),\n (np.ndarray, True),\n (float, False),\n (int, False),\n ],\n)\ndef test_is_valid_chunk_type(arr_type, result):\n \"\"\" Test is_valid_chunk_type for correctness\"\"\"\n assert is_valid_chunk_type(arr_type) is result\n\n\ndef test_direct_deferral_wrapping_override():\n \"\"\" Directly test Dask defering to an upcast type and the ability to still wrap it.\"\"\"\n a = da.from_array(np.arange(4))\n b = WrappedArray(np.arange(4))\n assert a.__add__(b) is NotImplemented\n res = a + da.from_array(b)\n assert isinstance(res, da.Array)\n assert_eq(res, 2 * np.arange(4))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_from_itertools_import_com_test_fft.assert_eq_da_fft_darr_n": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_from_itertools_import_com_test_fft.assert_eq_da_fft_darr_n", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 49, "span_ids": ["test_cant_fft_chunked_axis", "imports", "test_fft"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import combinations_with_replacement\n\nimport numpy as np\n\nimport pytest\n\nimport dask.array as da\nimport dask.array.fft\nfrom dask.array.fft import fft_wrap\nfrom dask.array.utils import assert_eq, same_keys\n\nfrom dask.array.core import normalize_chunks\n\n\nall_1d_funcnames = [\"fft\", \"ifft\", \"rfft\", \"irfft\", \"hfft\", \"ihfft\"]\n\nall_nd_funcnames = [\n \"fft2\",\n \"ifft2\",\n \"fftn\",\n \"ifftn\",\n \"rfft2\",\n \"irfft2\",\n \"rfftn\",\n \"irfftn\",\n]\n\nnparr = np.arange(100).reshape(10, 10)\ndarr = da.from_array(nparr, chunks=(1, 10))\ndarr2 = da.from_array(nparr, chunks=(10, 1))\ndarr3 = da.from_array(nparr, chunks=(10, 10))\n\n\n@pytest.mark.parametrize(\"funcname\", all_1d_funcnames)\ndef test_cant_fft_chunked_axis(funcname):\n da_fft = getattr(da.fft, funcname)\n\n bad_darr = da.from_array(nparr, chunks=(5, 5))\n for i in range(bad_darr.ndim):\n with pytest.raises(ValueError):\n da_fft(bad_darr, axis=i)\n\n\n@pytest.mark.parametrize(\"funcname\", all_1d_funcnames)\ndef test_fft(funcname):\n da_fft = getattr(da.fft, funcname)\n np_fft = getattr(np.fft, funcname)\n\n assert_eq(da_fft(darr), np_fft(nparr))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft2n_shapes_test_fft2n_shapes.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft2n_shapes_test_fft2n_shapes.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 61, "span_ids": ["test_fft2n_shapes"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", all_nd_funcnames)\ndef test_fft2n_shapes(funcname):\n da_fft = getattr(dask.array.fft, funcname)\n np_fft = getattr(np.fft, funcname)\n assert_eq(da_fft(darr3), np_fft(nparr))\n assert_eq(da_fft(darr3, (8, 9)), np_fft(nparr, (8, 9)))\n assert_eq(da_fft(darr3, (8, 9), axes=(1, 0)), np_fft(nparr, (8, 9), axes=(1, 0)))\n assert_eq(\n da_fft(darr3, (12, 11), axes=(1, 0)), np_fft(nparr, (12, 11), axes=(1, 0))\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_n_kwarg_test_fft_n_kwarg.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_n_kwarg_test_fft_n_kwarg.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 74, "span_ids": ["test_fft_n_kwarg"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", all_1d_funcnames)\ndef test_fft_n_kwarg(funcname):\n da_fft = getattr(da.fft, funcname)\n np_fft = getattr(np.fft, funcname)\n\n assert_eq(da_fft(darr, 5), np_fft(nparr, 5))\n assert_eq(da_fft(darr, 13), np_fft(nparr, 13))\n assert_eq(da_fft(darr2, axis=0), np_fft(nparr, axis=0))\n assert_eq(da_fft(darr2, 5, axis=0), np_fft(nparr, 5, axis=0))\n assert_eq(da_fft(darr2, 13, axis=0), np_fft(nparr, 13, axis=0))\n assert_eq(da_fft(darr2, 12, axis=0), np_fft(nparr, 12, axis=0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_consistent_names_test_wrap_bad_kind.with_pytest_raises_ValueE.fft_wrap_np_ones_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fft_consistent_names_test_wrap_bad_kind.with_pytest_raises_ValueE.fft_wrap_np_ones_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 88, "span_ids": ["test_fft_consistent_names", "test_wrap_bad_kind"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", all_1d_funcnames)\ndef test_fft_consistent_names(funcname):\n da_fft = getattr(da.fft, funcname)\n\n assert same_keys(da_fft(darr, 5), da_fft(darr, 5))\n assert same_keys(da_fft(darr2, 5, axis=0), da_fft(darr2, 5, axis=0))\n assert not same_keys(da_fft(darr, 5), da_fft(darr, 13))\n\n\ndef test_wrap_bad_kind():\n with pytest.raises(ValueError):\n fft_wrap(np.ones)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_nd_ffts_axes_test_nd_ffts_axes.for_num_axes_in_range_1_.for_axes_in_combinations_.if_len_set_axes_len_a.else_.assert_eq_r_er_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_nd_ffts_axes_test_nd_ffts_axes.for_num_axes_in_range_1_.for_axes_in_combinations_.if_len_set_axes_len_a.else_.assert_eq_r_er_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 116, "span_ids": ["test_nd_ffts_axes"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", all_nd_funcnames)\n@pytest.mark.parametrize(\"dtype\", [\"float32\", \"float64\"])\ndef test_nd_ffts_axes(funcname, dtype):\n np_fft = getattr(np.fft, funcname)\n da_fft = getattr(da.fft, funcname)\n\n shape = (7, 8, 9)\n chunk_size = (3, 3, 3)\n a = np.arange(np.prod(shape), dtype=dtype).reshape(shape)\n d = da.from_array(a, chunks=chunk_size)\n\n for num_axes in range(1, d.ndim):\n for axes in combinations_with_replacement(range(d.ndim), num_axes):\n cs = list(chunk_size)\n for i in axes:\n cs[i] = shape[i]\n d2 = d.rechunk(cs)\n if len(set(axes)) < len(axes):\n with pytest.raises(ValueError):\n da_fft(d2, axes=axes)\n else:\n r = da_fft(d2, axes=axes)\n er = np_fft(a, axes=axes)\n assert r.dtype == er.dtype\n assert r.shape == er.shape\n assert_eq(r, er)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_ffts_test_wrap_ffts.if_modname_scipy_fftp.else_.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_ffts_test_wrap_ffts.if_modname_scipy_fftp.else_.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 151, "span_ids": ["test_wrap_ffts"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"modname\", [\"numpy.fft\", \"scipy.fftpack\"])\n@pytest.mark.parametrize(\"funcname\", all_1d_funcnames)\n@pytest.mark.parametrize(\"dtype\", [\"float32\", \"float64\"])\ndef test_wrap_ffts(modname, funcname, dtype):\n fft_mod = pytest.importorskip(modname)\n try:\n func = getattr(fft_mod, funcname)\n except AttributeError:\n pytest.skip(\"`%s` missing function `%s`.\" % (modname, funcname))\n\n darrc = darr.astype(dtype)\n darr2c = darr2.astype(dtype)\n nparrc = nparr.astype(dtype)\n\n if modname == \"scipy.fftpack\" and \"rfft\" in funcname:\n with pytest.raises(ValueError):\n fft_wrap(func)\n else:\n wfunc = fft_wrap(func)\n assert wfunc(darrc).dtype == func(nparrc).dtype\n assert wfunc(darrc).shape == func(nparrc).shape\n assert_eq(wfunc(darrc), func(nparrc))\n assert_eq(wfunc(darrc, axis=1), func(nparrc, axis=1))\n assert_eq(wfunc(darr2c, axis=0), func(nparrc, axis=0))\n assert_eq(wfunc(darrc, n=len(darrc) - 1), func(nparrc, n=len(darrc) - 1))\n assert_eq(\n wfunc(darrc, axis=1, n=darrc.shape[1] - 1),\n func(nparrc, n=darrc.shape[1] - 1),\n )\n assert_eq(\n wfunc(darr2c, axis=0, n=darr2c.shape[0] - 1),\n func(nparrc, axis=0, n=darr2c.shape[0] - 1),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_fftns_test_wrap_fftns.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_wrap_fftns_test_wrap_fftns.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 177, "span_ids": ["test_wrap_fftns"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"modname\", [\"numpy.fft\", \"scipy.fftpack\"])\n@pytest.mark.parametrize(\"funcname\", all_nd_funcnames)\n@pytest.mark.parametrize(\"dtype\", [\"float32\", \"float64\"])\ndef test_wrap_fftns(modname, funcname, dtype):\n fft_mod = pytest.importorskip(modname)\n try:\n func = getattr(fft_mod, funcname)\n except AttributeError:\n pytest.skip(\"`%s` missing function `%s`.\" % (modname, funcname))\n\n darrc = darr.astype(dtype).rechunk(darr.shape)\n darr2c = darr2.astype(dtype).rechunk(darr2.shape)\n nparrc = nparr.astype(dtype)\n\n wfunc = fft_wrap(func)\n assert wfunc(darrc).dtype == func(nparrc).dtype\n assert wfunc(darrc).shape == func(nparrc).shape\n assert_eq(wfunc(darrc), func(nparrc))\n assert_eq(wfunc(darrc, axes=(1, 0)), func(nparrc, axes=(1, 0)))\n assert_eq(wfunc(darr2c, axes=(0, 1)), func(nparrc, axes=(0, 1)))\n assert_eq(\n wfunc(darr2c, (darr2c.shape[0] - 1, darr2c.shape[1] - 1), (0, 1)),\n func(nparrc, (nparrc.shape[0] - 1, nparrc.shape[1] - 1), (0, 1)),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftfreq_test_fftfreq.assert_eq_r1_r2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftfreq_test_fftfreq.assert_eq_r1_r2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 191, "span_ids": ["test_fftfreq"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"n\", [1, 2, 3, 6, 7])\n@pytest.mark.parametrize(\"d\", [1.0, 0.5, 2 * np.pi])\n@pytest.mark.parametrize(\"c\", [lambda m: m, lambda m: (1, m - 1)])\ndef test_fftfreq(n, d, c):\n c = c(n)\n\n r1 = np.fft.fftfreq(n, d)\n r2 = da.fft.fftfreq(n, d, chunks=c)\n\n assert normalize_chunks(c, r2.shape) == r2.chunks\n\n assert_eq(r1, r2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_rfftfreq_test_rfftfreq.assert_eq_r1_r2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_rfftfreq_test_rfftfreq.assert_eq_r1_r2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 205, "span_ids": ["test_rfftfreq"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"n\", [1, 2, 3, 6, 7])\n@pytest.mark.parametrize(\"d\", [1.0, 0.5, 2 * np.pi])\n@pytest.mark.parametrize(\"c\", [lambda m: (m // 2 + 1,), lambda m: (1, m // 2)])\ndef test_rfftfreq(n, d, c):\n c = [ci for ci in c(n) if ci != 0]\n\n r1 = np.fft.rfftfreq(n, d)\n r2 = da.fft.rfftfreq(n, d, chunks=c)\n\n assert normalize_chunks(c, r2.shape) == r2.chunks\n\n assert_eq(r1, r2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_test_fftshift.assert_eq_d_r_a_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_test_fftshift.assert_eq_d_r_a_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 208, "end_line": 231, "span_ids": ["test_fftshift"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", [\"fftshift\", \"ifftshift\"])\n@pytest.mark.parametrize(\"axes\", [None, 0, 1, 2, (0, 1), (1, 2), (0, 2), (0, 1, 2)])\n@pytest.mark.parametrize(\n \"shape, chunks\",\n [[(5, 6, 7), (2, 3, 4)], [(5, 6, 7), (2, 6, 4)], [(5, 6, 7), (5, 6, 7)]],\n)\ndef test_fftshift(funcname, shape, chunks, axes):\n np_func = getattr(np.fft, funcname)\n da_func = getattr(da.fft, funcname)\n\n a = np.arange(np.prod(shape)).reshape(shape)\n d = da.from_array(a, chunks=chunks)\n\n a_r = np_func(a, axes)\n d_r = da_func(d, axes)\n\n for each_d_chunks, each_d_r_chunks in zip(d.chunks, d_r.chunks):\n if len(each_d_chunks) == 1:\n assert len(each_d_r_chunks) == 1\n assert each_d_r_chunks == each_d_chunks\n else:\n assert len(each_d_r_chunks) != 1\n\n assert_eq(d_r, a_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_identity_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_fft.py_test_fftshift_identity_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_fft.py", "file_name": "test_fft.py", "file_type": "text/x-python", "category": "test", "start_line": 234, "end_line": 259, "span_ids": ["test_fftshift_identity"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"funcname1, funcname2\", [(\"fftshift\", \"ifftshift\"), (\"ifftshift\", \"fftshift\")]\n)\n@pytest.mark.parametrize(\"axes\", [None, 0, 1, 2, (0, 1), (1, 2), (0, 2), (0, 1, 2)])\n@pytest.mark.parametrize(\n \"shape, chunks\",\n [[(5, 6, 7), (2, 3, 4)], [(5, 6, 7), (2, 6, 4)], [(5, 6, 7), (5, 6, 7)]],\n)\ndef test_fftshift_identity(funcname1, funcname2, shape, chunks, axes):\n da_func1 = getattr(da.fft, funcname1)\n da_func2 = getattr(da.fft, funcname2)\n\n a = np.arange(np.prod(shape)).reshape(shape)\n d = da.from_array(a, chunks=chunks)\n\n d_r = da_func1(da_func2(d, axes), axes)\n\n for each_d_chunks, each_d_r_chunks in zip(d.chunks, d_r.chunks):\n if len(each_d_chunks) == 1:\n assert len(each_d_r_chunks) == 1\n assert each_d_r_chunks == each_d_chunks\n else:\n assert len(each_d_r_chunks) != 1\n\n assert_eq(d_r, d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_pytest_test__parse_gufunc_signature.None_3._parse_gufunc_signature_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_pytest_test__parse_gufunc_signature.None_3._parse_gufunc_signature_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["imports", "test__parse_gufunc_signature"], "tokens": 379}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nfrom numpy.testing import assert_equal\nimport dask.array as da\nfrom dask.array.utils import assert_eq\nimport numpy as np\n\nfrom dask.array.core import Array\nfrom dask.array.gufunc import (\n _parse_gufunc_signature,\n _validate_normalize_axes,\n apply_gufunc,\n gufunc,\n as_gufunc,\n)\nfrom dask.array.numpy_compat import _numpy_120\nfrom dask.array.utils import IS_NEP18_ACTIVE\n\n\n# Copied from `numpy.lib.test_test_function_base.py`:\ndef test__parse_gufunc_signature():\n assert_equal(_parse_gufunc_signature(\"(x)->()\"), ([(\"x\",)], ()))\n assert_equal(_parse_gufunc_signature(\"(x,y)->()\"), ([(\"x\", \"y\")], ()))\n assert_equal(_parse_gufunc_signature(\"(x),(y)->()\"), ([(\"x\",), (\"y\",)], ()))\n assert_equal(_parse_gufunc_signature(\"(x)->(y)\"), ([(\"x\",)], (\"y\",)))\n assert_equal(_parse_gufunc_signature(\"(x)->(y),()\"), ([(\"x\",)], [(\"y\",), ()]))\n assert_equal(\n _parse_gufunc_signature(\"(),(a,b,c),(d)->(d,e)\"),\n ([(), (\"a\", \"b\", \"c\"), (\"d\",)], (\"d\", \"e\")),\n )\n with pytest.raises(ValueError):\n _parse_gufunc_signature(\"(x)(y)->()\")\n with pytest.raises(ValueError):\n _parse_gufunc_signature(\"(x),(y)->\")\n with pytest.raises(ValueError):\n _parse_gufunc_signature(\"((x))->(x)\")\n with pytest.raises(ValueError):\n _parse_gufunc_signature(\"(x)->(x),\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_input_validation_01_test_apply_gufunc_axes_input_validation_01.None_2.apply_gufunc_foo_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_input_validation_01_test_apply_gufunc_axes_input_validation_01.None_2.apply_gufunc_foo_i_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 58, "span_ids": ["test_apply_gufunc_axes_input_validation_01"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_axes_input_validation_01():\n def foo(x):\n return np.mean(x, axis=-1)\n\n a = da.random.normal(size=(20, 30), chunks=30)\n\n with pytest.raises(ValueError):\n apply_gufunc(foo, \"(i)->()\", a, axes=0)\n\n apply_gufunc(foo, \"(i)->()\", a, axes=[0])\n apply_gufunc(foo, \"(i)->()\", a, axes=[(0,)])\n apply_gufunc(foo, \"(i)->()\", a, axes=[0, tuple()])\n apply_gufunc(foo, \"(i)->()\", a, axes=[(0,), tuple()])\n\n with pytest.raises(ValueError):\n apply_gufunc(foo, \"(i)->()\", a, axes=[(0, 1)])\n\n with pytest.raises(ValueError):\n apply_gufunc(foo, \"(i)->()\", a, axes=[0, 0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_01_test__validate_normalize_axes_01.assert_o_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_01_test__validate_normalize_axes_01.assert_o_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 73, "span_ids": ["test__validate_normalize_axes_01"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test__validate_normalize_axes_01():\n with pytest.raises(ValueError):\n _validate_normalize_axes([(1, 0)], None, False, [(\"i\", \"j\")], (\"j\",))\n\n with pytest.raises(ValueError):\n _validate_normalize_axes([0, 0], None, False, [(\"i\", \"j\")], (\"j\",))\n\n with pytest.raises(ValueError):\n _validate_normalize_axes([(0,), 0], None, False, [(\"i\", \"j\")], (\"j\",))\n\n i, o = _validate_normalize_axes([(1, 0), 0], None, False, [(\"i\", \"j\")], (\"j\",))\n assert i == [(1, 0)]\n assert o == [(0,)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_02_test__validate_normalize_axes_02.None_2._validate_normalize_axes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_02_test__validate_normalize_axes_02.None_2._validate_normalize_axes_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 96, "span_ids": ["test__validate_normalize_axes_02"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test__validate_normalize_axes_02():\n i, o = _validate_normalize_axes(None, 0, False, [(\"i\",), (\"i\",)], ())\n assert i == [(0,), (0,)]\n assert o == [()]\n\n i, o = _validate_normalize_axes(None, 0, False, [(\"i\",)], (\"i\",))\n assert i == [(0,)]\n assert o == [(0,)]\n\n i, o = _validate_normalize_axes(None, 0, True, [(\"i\",), (\"i\",)], ())\n assert i == [(0,), (0,)]\n assert o == [(0,)]\n\n with pytest.raises(ValueError):\n _validate_normalize_axes(None, (0,), False, [(\"i\",), (\"i\",)], ())\n\n with pytest.raises(ValueError):\n _validate_normalize_axes(None, 0, False, [(\"i\",), (\"j\",)], ())\n\n with pytest.raises(ValueError):\n _validate_normalize_axes(None, 0, False, [(\"i\",), (\"j\",)], (\"j\",))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_03_test__validate_normalize_axes_03.None_2._validate_normalize_axes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test__validate_normalize_axes_03_test__validate_normalize_axes_03.None_2._validate_normalize_axes_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 111, "span_ids": ["test__validate_normalize_axes_03"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test__validate_normalize_axes_03():\n i, o = _validate_normalize_axes(None, 0, True, [(\"i\",)], ())\n assert i == [(0,)]\n assert o == [(0,)]\n\n with pytest.raises(ValueError):\n _validate_normalize_axes(None, 0, True, [(\"i\",)], (\"i\",))\n\n with pytest.raises(ValueError):\n _validate_normalize_axes([(0, 1), (0, 1)], None, True, [(\"i\", \"j\")], (\"i\", \"j\"))\n\n with pytest.raises(ValueError):\n _validate_normalize_axes([(0,), (0,)], None, True, [(\"i\",), (\"j\",)], ())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01_test_apply_gufunc_01.assert_std_compute_shap": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01_test_apply_gufunc_01.assert_std_compute_shap", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 123, "span_ids": ["test_apply_gufunc_01"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_01():\n def stats(x):\n return np.mean(x, axis=-1), np.std(x, axis=-1)\n\n a = da.random.normal(size=(10, 20, 30), chunks=(5, 5, 30))\n result = apply_gufunc(stats, \"(i)->(),()\", a, output_dtypes=2 * (a.dtype,))\n mean, std = result\n assert isinstance(result, tuple)\n assert mean.compute().shape == (10, 20)\n assert std.compute().shape == (10, 20)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01b_test_apply_gufunc_01b.assert_std_compute_shap": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_01b_test_apply_gufunc_01b.assert_std_compute_shap", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 126, "end_line": 135, "span_ids": ["test_apply_gufunc_01b"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_01b():\n def stats(x):\n return np.mean(x, axis=-1), np.std(x, axis=-1)\n\n a = da.random.normal(size=(10, 20, 30), chunks=5)\n mean, std = apply_gufunc(\n stats, \"(i)->(),()\", a, output_dtypes=2 * (a.dtype,), allow_rechunk=True\n )\n assert mean.compute().shape == (10, 20)\n assert std.compute().shape == (10, 20)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_test_apply_gufunc_output_dtypes_string.assert_mean_compute_sha": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_test_apply_gufunc_output_dtypes_string.assert_mean_compute_sha", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 145, "span_ids": ["test_apply_gufunc_output_dtypes_string"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"vectorize\", [False, True])\ndef test_apply_gufunc_output_dtypes_string(vectorize):\n def stats(x):\n return np.mean(x, axis=-1)\n\n a = da.random.normal(size=(10, 20, 30), chunks=(5, 5, 30))\n mean = apply_gufunc(stats, \"(i)->()\", a, output_dtypes=\"f\", vectorize=vectorize)\n assert mean.compute().shape == (10, 20)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_many_outputs_test_apply_gufunc_output_dtypes_string_many_outputs.assert_std_compute_shap": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_output_dtypes_string_many_outputs_test_apply_gufunc_output_dtypes_string_many_outputs.assert_std_compute_shap", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 148, "end_line": 158, "span_ids": ["test_apply_gufunc_output_dtypes_string_many_outputs"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"vectorize\", [False, True])\ndef test_apply_gufunc_output_dtypes_string_many_outputs(vectorize):\n def stats(x):\n return np.mean(x, axis=-1), np.std(x, axis=-1)\n\n a = da.random.normal(size=(10, 20, 30), chunks=(5, 5, 30))\n mean, std = apply_gufunc(\n stats, \"(i)->(),()\", a, output_dtypes=(\"f\", \"f\"), vectorize=vectorize\n )\n assert mean.compute().shape == (10, 20)\n assert std.compute().shape == (10, 20)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_pass_additional_kwargs_test_apply_gufunc_02.assert_c_compute_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_pass_additional_kwargs_test_apply_gufunc_02.assert_c_compute_shape_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 161, "end_line": 178, "span_ids": ["test_apply_gufunc_02", "test_apply_gufunc_pass_additional_kwargs"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_pass_additional_kwargs():\n def foo(x, bar):\n assert bar == 2\n return x\n\n ret = apply_gufunc(foo, \"()->()\", 1.0, output_dtypes=\"f\", bar=2)\n assert_eq(ret, np.array(1.0, dtype=\"f\"))\n\n\ndef test_apply_gufunc_02():\n def outer_product(x, y):\n return np.einsum(\"...i,...j->...ij\", x, y)\n\n a = da.random.normal(size=(20, 30), chunks=(5, 30))\n b = da.random.normal(size=(10, 1, 40), chunks=(10, 1, 40))\n c = apply_gufunc(outer_product, \"(i),(j)->(i,j)\", a, b, output_dtypes=a.dtype)\n\n assert c.compute().shape == (10, 20, 30, 40)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_scalar_output_test_apply_gufunc_elemwise_01b.with_pytest_raises_ValueE.apply_gufunc_add_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_scalar_output_test_apply_gufunc_elemwise_01b.with_pytest_raises_ValueE.apply_gufunc_add_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 181, "end_line": 206, "span_ids": ["test_apply_gufunc_elemwise_01", "test_apply_gufunc_scalar_output", "test_apply_gufunc_elemwise_01b"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_scalar_output():\n def foo():\n return 1\n\n x = apply_gufunc(foo, \"->()\", output_dtypes=int)\n assert x.compute() == 1\n\n\ndef test_apply_gufunc_elemwise_01():\n def add(x, y):\n return x + y\n\n a = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"a\")\n b = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"b\")\n z = apply_gufunc(add, \"(),()->()\", a, b, output_dtypes=a.dtype)\n assert_eq(z, np.array([2, 4, 6]))\n\n\ndef test_apply_gufunc_elemwise_01b():\n def add(x, y):\n return x + y\n\n a = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"a\")\n b = da.from_array(np.array([1, 2, 3]), chunks=1, name=\"b\")\n with pytest.raises(ValueError):\n apply_gufunc(add, \"(),()->()\", a, b, output_dtypes=a.dtype)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_elemwise_02_test_apply_gufunc_elemwise_02.assert_eq_z2_np_array_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_elemwise_02_test_apply_gufunc_elemwise_02.assert_eq_z2_np_array_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 209, "end_line": 218, "span_ids": ["test_apply_gufunc_elemwise_02"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_elemwise_02():\n def addmul(x, y):\n assert x.shape in ((2,), (1,))\n return x + y, x * y\n\n a = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"a\")\n b = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"b\")\n z1, z2 = apply_gufunc(addmul, \"(),()->(),()\", a, b, output_dtypes=2 * (a.dtype,))\n assert_eq(z1, np.array([2, 4, 6]))\n assert_eq(z2, np.array([1, 4, 9]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_vector_output_test_apply_gufunc_two_scalar_output.assert_y_compute_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_vector_output_test_apply_gufunc_two_scalar_output.assert_y_compute_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 266, "span_ids": ["test_apply_gufunc_elemwise_core", "test_apply_gufunc_two_scalar_output", "test_gufunc_vector_output", "test_apply_gufunc_elemwise_loop"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gufunc_vector_output():\n def foo():\n return np.array([1, 2, 3], dtype=int)\n\n x = apply_gufunc(foo, \"->(i_0)\", output_dtypes=int, output_sizes={\"i_0\": 3})\n assert x.chunks == ((3,),)\n assert_eq(x, np.array([1, 2, 3]))\n\n\ndef test_apply_gufunc_elemwise_loop():\n def foo(x):\n assert x.shape in ((2,), (1,))\n return 2 * x\n\n a = da.from_array(np.array([1, 2, 3]), chunks=2, name=\"a\")\n z = apply_gufunc(foo, \"()->()\", a, output_dtypes=int)\n assert z.chunks == ((2, 1),)\n assert_eq(z, np.array([2, 4, 6]))\n\n\ndef test_apply_gufunc_elemwise_core():\n def foo(x):\n assert x.shape == (3,)\n return 2 * x\n\n a = da.from_array(np.array([1, 2, 3]), chunks=3, name=\"a\")\n z = apply_gufunc(foo, \"(i)->(i)\", a, output_dtypes=int)\n assert z.chunks == ((3,),)\n assert_eq(z, np.array([2, 4, 6]))\n\n\n# TODO: In case single tuple output will get enabled:\n# def test_apply_gufunc_one_scalar_output():\n# def foo():\n# return 1,\n# x, = apply_gufunc(foo, \"->(),\", output_dtypes=(int,))\n# assert x.compute() == 1\n\n\ndef test_apply_gufunc_two_scalar_output():\n def foo():\n return 1, 2\n\n x, y = apply_gufunc(foo, \"->(),()\", output_dtypes=(int, int))\n assert x.compute() == 1\n assert y.compute() == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_two_mixed_outputs_test_apply_gufunc_output_dtypes.assert_eq_y_dy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_two_mixed_outputs_test_apply_gufunc_output_dtypes.assert_eq_y_dy_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 269, "end_line": 290, "span_ids": ["test_apply_gufunc_output_dtypes", "test_apply_gufunc_two_mixed_outputs"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_two_mixed_outputs():\n def foo():\n return 1, np.ones((2, 3), dtype=float)\n\n x, y = apply_gufunc(\n foo, \"->(),(i,j)\", output_dtypes=(int, float), output_sizes={\"i\": 2, \"j\": 3}\n )\n assert x.compute() == 1\n assert y.chunks == ((2,), (3,))\n assert_eq(y, np.ones((2, 3), dtype=float))\n\n\n@pytest.mark.parametrize(\"output_dtypes\", [int, (int,)])\ndef test_apply_gufunc_output_dtypes(output_dtypes):\n def foo(x):\n return y\n\n x = np.random.randn(10)\n y = x.astype(int)\n dy = apply_gufunc(foo, \"()->()\", x, output_dtypes=output_dtypes)\n # print(x, x.compute())\n assert_eq(y, dy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_two_inputs_test_gufunc_two_inputs.assert_eq_x_3_np_ones_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_two_inputs_test_gufunc_two_inputs.assert_eq_x_3_np_ones_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 293, "end_line": 300, "span_ids": ["test_gufunc_two_inputs"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gufunc_two_inputs():\n def foo(x, y):\n return np.einsum(\"...ij,...jk->ik\", x, y)\n\n a = da.ones((2, 3), chunks=100, dtype=int)\n b = da.ones((3, 4), chunks=100, dtype=int)\n x = apply_gufunc(foo, \"(i,j),(j,k)->(i,k)\", a, b, output_dtypes=int)\n assert_eq(x, 3 * np.ones((2, 4), dtype=int))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_mixed_inputs_test_gufunc.assert_valy_shape_10_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_gufunc_mixed_inputs_test_gufunc.assert_valy_shape_10_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 303, "end_line": 331, "span_ids": ["test_gufunc", "test_gufunc_mixed_inputs"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gufunc_mixed_inputs():\n def foo(x, y):\n return x + y\n\n a = np.ones((2, 1), dtype=int)\n b = da.ones((1, 8), chunks=(2, 3), dtype=int)\n x = apply_gufunc(foo, \"(),()->()\", a, b, output_dtypes=int)\n assert_eq(x, 2 * np.ones((2, 8), dtype=int))\n\n\ndef test_gufunc():\n x = da.random.normal(size=(10, 5), chunks=(2, 5))\n\n def foo(x):\n return np.mean(x, axis=-1)\n\n gufoo = gufunc(\n foo,\n signature=\"(i)->()\",\n axis=-1,\n keepdims=False,\n output_dtypes=float,\n vectorize=True,\n )\n\n y = gufoo(x)\n valy = y.compute()\n assert isinstance(y, Array)\n assert valy.shape == (10,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_as_gufunc_test_apply_gufunc_broadcasting_loopdims.assert_z_compute_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_as_gufunc_test_apply_gufunc_broadcasting_loopdims.assert_z_compute_shape_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 334, "end_line": 363, "span_ids": ["test_apply_gufunc_broadcasting_loopdims", "test_as_gufunc"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_as_gufunc():\n x = da.random.normal(size=(10, 5), chunks=(2, 5))\n\n @as_gufunc(\"(i)->()\", axis=-1, keepdims=False, output_dtypes=float, vectorize=True)\n def foo(x):\n return np.mean(x, axis=-1)\n\n y = foo(x)\n valy = y.compute()\n assert isinstance(y, Array)\n assert valy.shape == (10,)\n\n\ndef test_apply_gufunc_broadcasting_loopdims():\n def foo(x, y):\n assert len(x.shape) == 2\n assert len(y.shape) == 3\n x, y = np.broadcast_arrays(x, y)\n return x, y, x * y\n\n a = da.random.normal(size=(10, 30), chunks=(8, 30))\n b = da.random.normal(size=(20, 1, 30), chunks=(3, 1, 30))\n\n x, y, z = apply_gufunc(\n foo, \"(i),(i)->(i),(i),(i)\", a, b, output_dtypes=3 * (float,), vectorize=False\n )\n\n assert x.compute().shape == (20, 10, 30)\n assert y.compute().shape == (20, 10, 30)\n assert z.compute().shape == (20, 10, 30)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_same_dimsizes_test_apply_gufunc_check_coredim_chunksize.assert_consists_of_multi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_same_dimsizes_test_apply_gufunc_check_coredim_chunksize.assert_consists_of_multi", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 366, "end_line": 385, "span_ids": ["test_apply_gufunc_check_coredim_chunksize", "test_apply_gufunc_check_same_dimsizes"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_check_same_dimsizes():\n def foo(x, y):\n return x + y\n\n a = da.random.normal(size=(3,), chunks=(2,))\n b = da.random.normal(size=(4,), chunks=(2,))\n\n with pytest.raises(ValueError) as excinfo:\n apply_gufunc(foo, \"(),()->()\", a, b, output_dtypes=float, allow_rechunk=True)\n assert \"different lengths in arrays\" in str(excinfo.value)\n\n\ndef test_apply_gufunc_check_coredim_chunksize():\n def foo(x):\n return np.sum(x, axis=-1)\n\n a = da.random.normal(size=(8,), chunks=3)\n with pytest.raises(ValueError) as excinfo:\n da.apply_gufunc(foo, \"(i)->()\", a, output_dtypes=float, allow_rechunk=False)\n assert \"consists of multiple chunks\" in str(excinfo.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_inhomogeneous_chunksize_test_apply_gufunc_check_inhomogeneous_chunksize.assert_with_different_ch": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_check_inhomogeneous_chunksize_test_apply_gufunc_check_inhomogeneous_chunksize.assert_with_different_ch", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 388, "end_line": 399, "span_ids": ["test_apply_gufunc_check_inhomogeneous_chunksize"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_check_inhomogeneous_chunksize():\n def foo(x, y):\n return x + y\n\n a = da.random.normal(size=(8,), chunks=((2, 2, 2, 2),))\n b = da.random.normal(size=(8,), chunks=((2, 3, 3),))\n\n with pytest.raises(ValueError) as excinfo:\n da.apply_gufunc(\n foo, \"(),()->()\", a, b, output_dtypes=float, allow_rechunk=False\n )\n assert \"with different chunksize present\" in str(excinfo.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_infer_dtype_test_apply_gufunc_infer_dtype.assert_eq_z1_dx_dy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_infer_dtype_test_apply_gufunc_infer_dtype.assert_eq_z1_dx_dy_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 402, "end_line": 441, "span_ids": ["test_apply_gufunc_infer_dtype"], "tokens": 374}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_infer_dtype():\n x = np.arange(50).reshape((5, 10))\n y = np.arange(10)\n dx = da.from_array(x, chunks=5)\n dy = da.from_array(y, chunks=5)\n\n def foo(x, *args, **kwargs):\n cast = kwargs.pop(\"cast\", \"i8\")\n return (x + sum(args)).astype(cast)\n\n dz = apply_gufunc(foo, \"(),(),()->()\", dx, dy, 1)\n z = foo(dx, dy, 1)\n assert_eq(dz, z)\n\n dz = apply_gufunc(foo, \"(),(),()->()\", dx, dy, 1, cast=\"f8\")\n z = foo(dx, dy, 1, cast=\"f8\")\n assert_eq(dz, z)\n\n dz = apply_gufunc(foo, \"(),(),()->()\", dx, dy, 1, cast=\"f8\", output_dtypes=\"f8\")\n z = foo(dx, dy, 1, cast=\"f8\")\n assert_eq(dz, z)\n\n def foo(x):\n raise RuntimeError(\"Woops\")\n\n with pytest.raises(ValueError) as e:\n apply_gufunc(foo, \"()->()\", dx)\n msg = str(e.value)\n assert msg.startswith(\"`dtype` inference failed\")\n assert \"Please specify the dtype explicitly\" in msg\n assert \"RuntimeError\" in msg\n\n # Multiple outputs\n def foo(x, y):\n return x + y, x - y\n\n z0, z1 = apply_gufunc(foo, \"(),()->(),()\", dx, dy)\n\n assert_eq(z0, dx + dy)\n assert_eq(z1, dx - dy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_01_test_apply_gufunc_axis_02.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_01_test_apply_gufunc_axis_02.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 444, "end_line": 468, "span_ids": ["test_apply_gufunc_axis_01", "test_apply_gufunc_axis_02"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_apply_gufunc_axis_01(keepdims):\n def mymedian(x):\n return np.median(x, axis=-1)\n\n a = np.random.randn(10, 5)\n da_ = da.from_array(a, chunks=2)\n\n m = np.median(a, axis=0, keepdims=keepdims)\n dm = apply_gufunc(\n mymedian, \"(i)->()\", da_, axis=0, keepdims=keepdims, allow_rechunk=True\n )\n assert_eq(m, dm)\n\n\ndef test_apply_gufunc_axis_02():\n def myfft(x):\n return np.fft.fft(x, axis=-1)\n\n a = np.random.randn(10, 5)\n da_ = da.from_array(a, chunks=2)\n\n m = np.fft.fft(a, axis=0)\n dm = apply_gufunc(myfft, \"(i)->(i)\", da_, axis=0, allow_rechunk=True)\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_02b_test_apply_gufunc_axis_02b.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_02b_test_apply_gufunc_axis_02b.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 471, "end_line": 483, "span_ids": ["test_apply_gufunc_axis_02b"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_axis_02b():\n def myfilter(x, cn=10, axis=-1):\n y = np.fft.fft(x, axis=axis)\n y[cn:-cn] = 0\n nx = np.fft.ifft(y, axis=axis)\n return np.real(nx)\n\n a = np.random.randn(3, 6, 4)\n da_ = da.from_array(a, chunks=2)\n\n m = myfilter(a, axis=1)\n dm = apply_gufunc(myfilter, \"(i)->(i)\", da_, axis=1, allow_rechunk=True)\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_03_test_apply_gufunc_axis_03.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_03_test_apply_gufunc_axis_03.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 486, "end_line": 497, "span_ids": ["test_apply_gufunc_axis_03"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_axis_03():\n def mydiff(x):\n return np.diff(x, axis=-1)\n\n a = np.random.randn(3, 6, 4)\n da_ = da.from_array(a, chunks=2)\n\n m = np.diff(a, axis=1)\n dm = apply_gufunc(\n mydiff, \"(i)->(i)\", da_, axis=1, output_sizes={\"i\": 5}, allow_rechunk=True\n )\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_keepdims_test_apply_gufunc_axis_keepdims.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axis_keepdims_test_apply_gufunc_axis_keepdims.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 500, "end_line": 512, "span_ids": ["test_apply_gufunc_axis_keepdims"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axis\", [-2, -1, None])\ndef test_apply_gufunc_axis_keepdims(axis):\n def mymedian(x):\n return np.median(x, axis=-1)\n\n a = np.random.randn(10, 5)\n da_ = da.from_array(a, chunks=2)\n\n m = np.median(a, axis=-1 if not axis else axis, keepdims=True)\n dm = apply_gufunc(\n mymedian, \"(i)->()\", da_, axis=axis, keepdims=True, allow_rechunk=True\n )\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_01_test_apply_gufunc_axes_01.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_01_test_apply_gufunc_axes_01.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 515, "end_line": 527, "span_ids": ["test_apply_gufunc_axes_01"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axes\", [[0, 1], [(0,), (1,)]])\ndef test_apply_gufunc_axes_01(axes):\n def mystats(x, y):\n return np.std(x, axis=-1) * np.mean(y, axis=-1)\n\n a = np.random.randn(10, 5)\n b = np.random.randn(5, 6)\n da_ = da.from_array(a, chunks=2)\n db_ = da.from_array(b, chunks=2)\n\n m = np.std(a, axis=0) * np.mean(b, axis=1)\n dm = apply_gufunc(mystats, \"(i),(j)->()\", da_, db_, axes=axes, allow_rechunk=True)\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_02_test_apply_gufunc_axes_02.assert_eq_m_dm_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_02_test_apply_gufunc_axes_02.assert_eq_m_dm_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 530, "end_line": 549, "span_ids": ["test_apply_gufunc_axes_02"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_axes_02():\n def matmul(x, y):\n return np.einsum(\"...ij,...jk->...ik\", x, y)\n\n a = np.random.randn(3, 2, 1)\n b = np.random.randn(3, 7, 5)\n\n da_ = da.from_array(a, chunks=2)\n db = da.from_array(b, chunks=3)\n\n m = np.einsum(\"jiu,juk->uik\", a, b)\n dm = apply_gufunc(\n matmul,\n \"(i,j),(j,k)->(i,k)\",\n da_,\n db,\n axes=[(1, 0), (0, -1), (-2, -1)],\n allow_rechunk=True,\n )\n assert_eq(m, dm)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_two_kept_coredims_test_apply_gufunc_axes_two_kept_coredims.assert_c_compute_shape_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_axes_two_kept_coredims_test_apply_gufunc_axes_two_kept_coredims.assert_c_compute_shape_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 552, "end_line": 560, "span_ids": ["test_apply_gufunc_axes_two_kept_coredims"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_axes_two_kept_coredims():\n a = da.random.normal(size=(20, 30), chunks=(10, 30))\n b = da.random.normal(size=(10, 1, 40), chunks=(5, 1, 40))\n\n def outer_product(x, y):\n return np.einsum(\"i,j->ij\", x, y)\n\n c = apply_gufunc(outer_product, \"(i),(j)->(i,j)\", a, b, vectorize=True)\n assert c.compute().shape == (10, 20, 30, 40)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_01_test_apply_gufunc_via_numba_01.assert_eq_x_y_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_01_test_apply_gufunc_via_numba_01.assert_eq_x_y_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 563, "end_line": 579, "span_ids": ["test_apply_gufunc_via_numba_01"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_via_numba_01():\n numba = pytest.importorskip(\"numba\")\n\n @numba.guvectorize(\n [(numba.float64[:], numba.float64[:], numba.float64[:])], \"(n),(n)->(n)\"\n )\n def g(x, y, res):\n for i in range(x.shape[0]):\n res[i] = x[i] + y[i]\n\n a = da.random.normal(size=(20, 30), chunks=30)\n b = da.random.normal(size=(20, 30), chunks=30)\n\n x = a + b\n y = g(a, b, axis=0)\n\n assert_eq(x, y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_02_test_apply_gufunc_via_numba_02.assert_eq_x_y_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_via_numba_02_test_apply_gufunc_via_numba_02.assert_eq_x_y_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 582, "end_line": 596, "span_ids": ["test_apply_gufunc_via_numba_02"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_via_numba_02():\n numba = pytest.importorskip(\"numba\")\n\n @numba.guvectorize([(numba.float64[:], numba.float64[:])], \"(n)->()\")\n def mysum(x, res):\n res[0] = 0.0\n for i in range(x.shape[0]):\n res[0] += x[i]\n\n a = da.random.normal(size=(20, 30), chunks=5)\n\n x = a.sum(axis=0, keepdims=True)\n y = mysum(a, axis=0, keepdims=True, allow_rechunk=True)\n\n assert_eq(x, y)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_preserve_meta_type_test_preserve_meta_type.assert_eq_mean_mean_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_preserve_meta_type_test_preserve_meta_type.assert_eq_mean_mean_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 599, "end_line": 618, "span_ids": ["test_preserve_meta_type"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not IS_NEP18_ACTIVE, reason=\"NEP18 required for sparse meta propagation\"\n)\n@pytest.mark.xfail(_numpy_120, reason=\"https://github.com/pydata/sparse/issues/383\")\ndef test_preserve_meta_type():\n sparse = pytest.importorskip(\"sparse\")\n\n def stats(x):\n return np.sum(x, axis=-1), np.mean(x, axis=-1)\n\n a = da.random.normal(size=(10, 20, 30), chunks=(5, 5, 30))\n a = a.map_blocks(sparse.COO.from_numpy)\n sum, mean = apply_gufunc(stats, \"(i)->(),()\", a, output_dtypes=2 * (a.dtype,))\n\n assert isinstance(a._meta, sparse.COO)\n assert isinstance(sum._meta, sparse.COO)\n assert isinstance(mean._meta, sparse.COO)\n\n assert_eq(sum, sum)\n assert_eq(mean, mean)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_with_meta_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_gufunc.py_test_apply_gufunc_with_meta_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_gufunc.py", "file_name": "test_gufunc.py", "file_type": "text/x-python", "category": "test", "start_line": 621, "end_line": 631, "span_ids": ["test_apply_gufunc_with_meta"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_apply_gufunc_with_meta():\n def stats(x):\n return np.mean(x, axis=-1), np.std(x, axis=-1, dtype=np.float32)\n\n a = da.random.normal(size=(10, 20, 30), chunks=(5, 5, 30))\n meta = (np.ones(0, dtype=np.float64), np.ones(0, dtype=np.float32))\n result = apply_gufunc(stats, \"(i)->(),()\", a, meta=meta)\n expected = stats(a.compute())\n assert_eq(expected[0], result[0])\n assert_eq(expected[1], result[1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_from_contextlib_import_co_random_images.with_tmpdir_as_dirname_.yield_os_path_join_dirnam": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_from_contextlib_import_co_random_images.with_tmpdir_as_dirname_.yield_os_path_join_dirnam", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_image.py", "file_name": "test_image.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "random_images"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from contextlib import contextmanager\nimport os\n\nimport pytest\n\npytest.importorskip(\"skimage\")\nfrom dask.array.image import imread as da_imread\nimport numpy as np\nfrom skimage.io import imsave\n\nfrom dask.utils import tmpdir\n\n\n@contextmanager\ndef random_images(n, shape):\n with tmpdir() as dirname:\n for i in range(n):\n fn = os.path.join(dirname, \"image.%d.png\" % i)\n x = np.random.randint(0, 255, size=shape).astype(\"u1\")\n imsave(fn, x, check_contrast=False)\n\n yield os.path.join(dirname, \"*.png\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_test_imread.with_random_images_4_5_.assert_im_compute_dtype": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_test_imread.with_random_images_4_5_.assert_im_compute_dtype", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_image.py", "file_name": "test_image.py", "file_type": "text/x-python", "category": "test", "start_line": 25, "end_line": 33, "span_ids": ["test_imread"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_imread():\n with random_images(4, (5, 6, 3)) as globstring:\n im = da_imread(globstring)\n assert im.shape == (4, 5, 6, 3)\n assert im.chunks == ((1, 1, 1, 1), (5,), (6,), (3,))\n assert im.dtype == \"uint8\"\n\n assert im.compute().shape == (4, 5, 6, 3)\n assert im.compute().dtype == \"uint8\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_with_custom_function_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_image.py_test_imread_with_custom_function_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_image.py", "file_name": "test_image.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 53, "span_ids": ["test_preprocess", "test_imread_with_custom_function"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_imread_with_custom_function():\n def imread2(fn):\n return np.ones((2, 3, 4), dtype=\"i1\")\n\n with random_images(4, (5, 6, 3)) as globstring:\n im = da_imread(globstring, imread=imread2)\n assert (im.compute() == np.ones((4, 2, 3, 4), dtype=\"u1\")).all()\n\n\ndef test_preprocess():\n def preprocess(x):\n x[:] = 1\n return x[:, :, 0]\n\n with random_images(4, (2, 3, 4)) as globstring:\n im = da_imread(globstring, preprocess=preprocess)\n assert (im.compute() == np.ones((4, 2, 3), dtype=\"u1\")).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_pytest_test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_pytest_test_tsqr.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 98, "span_ids": ["imports", "test_tsqr"], "tokens": 1104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\npytest.importorskip(\"scipy\")\n\nimport numpy as np\nimport scipy.linalg\n\nimport dask.array as da\nfrom dask.array.linalg import tsqr, sfqr, svd_compressed, qr, svd\nfrom dask.array.utils import assert_eq, same_keys, svd_flip\n\n\n@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, None), # tall-skinny regular blocks\n (20, 10, (3, 10), None), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), None), # tall-skinny irregular fat layers\n (40, 10, ((15, 5, 5, 8, 7), 10), None), # tall-skinny non-uniform chunks (why?)\n (128, 2, (16, 2), None), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (300, 10, (40, 10), None), # tall-skinny regular thin layers; recursion_depth=2\n (300, 10, (30, 10), None), # tall-skinny regular thin layers; recursion_depth=3\n (300, 10, (20, 10), None), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), ValueError), # short-fat regular blocks\n (10, 40, (10, 15), ValueError), # short-fat irregular blocks\n (\n 10,\n 40,\n (10, (15, 5, 5, 8, 7)),\n ValueError,\n ), # short-fat non-uniform chunks (why?)\n (20, 20, 10, ValueError), # 2x2 regular blocks\n ],\n)\ndef test_tsqr(m, n, chunks, error_type):\n mat = np.random.rand(m, n)\n data = da.from_array(mat, chunks=chunks, name=\"A\")\n\n # qr\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n\n # svd\n m_u = m\n n_u = min(m, n)\n n_s = n_q\n m_vh = n_q\n n_vh = n\n d_vh = max(m_vh, n_vh) # full matrix returned\n\n if error_type is None:\n # test QR\n q, r = tsqr(data)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(np.eye(n_q, n_q), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, da.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n\n # test SVD\n u, s, vh = tsqr(data, compute_svd=True)\n s_exact = np.linalg.svd(mat)[1]\n assert_eq(s, s_exact) # s must contain the singular values\n assert_eq((m_u, n_u), u.shape) # shape check\n assert_eq((n_s,), s.shape) # shape check\n assert_eq((d_vh, d_vh), vh.shape) # shape check\n assert_eq(np.eye(n_u, n_u), da.dot(u.T, u)) # u must be orthonormal\n assert_eq(np.eye(d_vh, d_vh), da.dot(vh, vh.T)) # vh must be orthonormal\n assert_eq(mat, da.dot(da.dot(u, da.diag(s)), vh[:n_q])) # accuracy check\n else:\n with pytest.raises(error_type):\n q, r = tsqr(data)\n with pytest.raises(error_type):\n u, s, vh = tsqr(data, compute_svd=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain_test_tsqr_uncertain.if_vary_rows_.m.mat_shape_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain_test_tsqr_uncertain.if_vary_rows_.m.mat_shape_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 196, "span_ids": ["test_tsqr_uncertain"], "tokens": 748}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n mat = np.random.rand(m_min * 2, n_max)\n m, n = m_min * 2, n_max\n mat[0:m_min, 0] += 1\n _c0 = mat[:, 0]\n _r0 = mat[0, :]\n c0 = da.from_array(_c0, chunks=m_min, name=\"c\")\n r0 = da.from_array(_r0, chunks=n_max, name=\"r\")\n data = da.from_array(mat, chunks=chunks, name=\"A\")\n if vary_rows:\n data = data[c0 > 0.5, :]\n mat = mat[_c0 > 0.5, :]\n m = mat.shape[0]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_vary_cols__test_tsqr_uncertain._full_matrix_returned": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_vary_cols__test_tsqr_uncertain._full_matrix_returned", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 197, "end_line": 214, "span_ids": ["test_tsqr_uncertain"], "tokens": 731}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n # ... other code\n if vary_cols:\n data = data[:, r0 > 0.5]\n mat = mat[:, _r0 > 0.5]\n n = mat.shape[1]\n\n # qr\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n\n # svd\n m_u = m\n n_u = min(m, n)\n n_s = n_q\n m_vh = n_q\n n_vh = n\n d_vh = max(m_vh, n_vh) # full matrix returned\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_uncertain.if_error_type_is_None__test_tsqr_uncertain.if_error_type_is_None_.else_.None_1.u_s_vh_tsqr_data_com", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 216, "end_line": 244, "span_ids": ["test_tsqr_uncertain"], "tokens": 978}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m_min,n_max,chunks,vary_rows,vary_cols,error_type\",\n [\n (10, 5, (10, 5), True, False, None), # single block tall\n (10, 5, (10, 5), False, True, None), # single block tall\n (10, 5, (10, 5), True, True, None), # single block tall\n (40, 5, (10, 5), True, False, None), # multiple blocks tall\n (40, 5, (10, 5), False, True, None), # multiple blocks tall\n (40, 5, (10, 5), True, True, None), # multiple blocks tall\n (\n 300,\n 10,\n (40, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n False,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n False,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (\n 300,\n 10,\n (40, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n True,\n True,\n None,\n ), # tall-skinny regular thin layers; recursion_depth=4\n ],\n)\ndef test_tsqr_uncertain(m_min, n_max, chunks, vary_rows, vary_cols, error_type):\n # ... other code\n\n if error_type is None:\n # test QR\n q, r = tsqr(data)\n q = q.compute() # because uncertainty\n r = r.compute()\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, np.dot(q, r)) # accuracy check\n assert_eq(np.eye(n_q, n_q), np.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, np.triu(r)) # r must be upper triangular\n\n # test SVD\n u, s, vh = tsqr(data, compute_svd=True)\n u = u.compute() # because uncertainty\n s = s.compute()\n vh = vh.compute()\n s_exact = np.linalg.svd(mat)[1]\n assert_eq(s, s_exact) # s must contain the singular values\n assert_eq((m_u, n_u), u.shape) # shape check\n assert_eq((n_s,), s.shape) # shape check\n assert_eq((d_vh, d_vh), vh.shape) # shape check\n assert_eq(np.eye(n_u, n_u), np.dot(u.T, u)) # u must be orthonormal\n assert_eq(np.eye(d_vh, d_vh), np.dot(vh, vh.T)) # vh must be orthonormal\n assert_eq(mat, np.dot(np.dot(u, np.diag(s)), vh[:n_q])) # accuracy check\n else:\n with pytest.raises(error_type):\n q, r = tsqr(data)\n with pytest.raises(error_type):\n u, s, vh = tsqr(data, compute_svd=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_zero_height_chunks_test_tsqr_zero_height_chunks.None_13": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_tsqr_zero_height_chunks_test_tsqr_zero_height_chunks.None_13", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 247, "end_line": 276, "span_ids": ["test_tsqr_zero_height_chunks"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tsqr_zero_height_chunks():\n m_q = 10\n n_q = 5\n m_r = 5\n n_r = 5\n\n # certainty\n mat = np.random.rand(10, 5)\n x = da.from_array(mat, chunks=((4, 0, 1, 0, 5), (5,)))\n q, r = da.linalg.qr(x)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(np.eye(n_q, n_q), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, da.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n\n # uncertainty\n mat2 = np.vstack([mat, -(np.ones((10, 5)))])\n v2 = mat2[:, 0]\n x2 = da.from_array(mat2, chunks=5)\n c = da.from_array(v2, chunks=5)\n x = x2[c >= 0, :] # remove the ones added above to yield mat\n q, r = da.linalg.qr(x)\n q = q.compute() # because uncertainty\n r = r.compute()\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, np.dot(q, r)) # accuracy check\n assert_eq(np.eye(n_q, n_q), np.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, np.triu(r)) # r must be upper triangular", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_sfqr_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_sfqr_test_sfqr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_sfqr_data_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 279, "end_line": 360, "span_ids": ["test_sfqr"], "tokens": 793}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, ValueError), # tall-skinny regular blocks\n (20, 10, (3, 10), ValueError), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), ValueError), # tall-skinny irregular fat layers\n (\n 40,\n 10,\n ((15, 5, 5, 8, 7), 10),\n ValueError,\n ), # tall-skinny non-uniform chunks (why?)\n (\n 128,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 300,\n 10,\n (40, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=2\n (\n 300,\n 10,\n (30, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=3\n (\n 300,\n 10,\n (20, 10),\n ValueError,\n ), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), None), # short-fat regular blocks\n (10, 40, (10, 15), None), # short-fat irregular blocks\n (10, 40, (10, (15, 5, 5, 8, 7)), None), # short-fat non-uniform chunks (why?)\n (20, 20, 10, ValueError), # 2x2 regular blocks\n ],\n)\ndef test_sfqr(m, n, chunks, error_type):\n mat = np.random.rand(m, n)\n data = da.from_array(mat, chunks=chunks, name=\"A\")\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n m_qtq = n_q\n\n if error_type is None:\n q, r = sfqr(data)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(np.eye(m_qtq, m_qtq), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, da.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n else:\n with pytest.raises(error_type):\n q, r = sfqr(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_qr_test_qr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_qr_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_qr_test_qr.if_error_type_is_None_.else_.with_pytest_raises_error_.q_r_qr_data_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 363, "end_line": 419, "span_ids": ["test_qr"], "tokens": 756}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"m,n,chunks,error_type\",\n [\n (20, 10, 10, None), # tall-skinny regular blocks\n (20, 10, (3, 10), None), # tall-skinny regular fat layers\n (20, 10, ((8, 4, 8), 10), None), # tall-skinny irregular fat layers\n (40, 10, ((15, 5, 5, 8, 7), 10), None), # tall-skinny non-uniform chunks (why?)\n (128, 2, (16, 2), None), # tall-skinny regular thin layers; recursion_depth=1\n (\n 129,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 17x2\n (\n 130,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (\n 131,\n 2,\n (16, 2),\n None,\n ), # tall-skinny regular thin layers; recursion_depth=2 --> 18x2 next\n (300, 10, (40, 10), None), # tall-skinny regular thin layers; recursion_depth=2\n (300, 10, (30, 10), None), # tall-skinny regular thin layers; recursion_depth=3\n (300, 10, (20, 10), None), # tall-skinny regular thin layers; recursion_depth=4\n (10, 5, 10, None), # single block tall\n (5, 10, 10, None), # single block short\n (10, 10, 10, None), # single block square\n (10, 40, (10, 10), None), # short-fat regular blocks\n (10, 40, (10, 15), None), # short-fat irregular blocks\n (10, 40, (10, (15, 5, 5, 8, 7)), None), # short-fat non-uniform chunks (why?)\n (20, 20, 10, NotImplementedError), # 2x2 regular blocks\n ],\n)\ndef test_qr(m, n, chunks, error_type):\n mat = np.random.rand(m, n)\n data = da.from_array(mat, chunks=chunks, name=\"A\")\n m_q = m\n n_q = min(m, n)\n m_r = n_q\n n_r = n\n m_qtq = n_q\n\n if error_type is None:\n q, r = qr(data)\n assert_eq((m_q, n_q), q.shape) # shape check\n assert_eq((m_r, n_r), r.shape) # shape check\n assert_eq(mat, da.dot(q, r)) # accuracy check\n assert_eq(np.eye(m_qtq, m_qtq), da.dot(q.T, q)) # q must be orthonormal\n assert_eq(r, da.triu(r.rechunk(r.shape[0]))) # r must be upper triangular\n else:\n with pytest.raises(error_type):\n q, r = qr(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_linalg_consistent_names_test_linalg_consistent_names.assert_same_keys_v1_v2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_linalg_consistent_names_test_linalg_consistent_names.assert_same_keys_v1_v2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 422, "end_line": 436, "span_ids": ["test_linalg_consistent_names"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_linalg_consistent_names():\n m, n = 20, 10\n mat = np.random.rand(m, n)\n data = da.from_array(mat, chunks=(10, n), name=\"A\")\n\n q1, r1 = qr(data)\n q2, r2 = qr(data)\n assert same_keys(q1, q2)\n assert same_keys(r1, r2)\n\n u1, s1, v1 = svd(data)\n u2, s2, v2 = svd(data)\n assert same_keys(u1, u2)\n assert same_keys(s1, s2)\n assert same_keys(v1, v2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_dask_svd_self_consistent_test_dask_svd_self_consistent.for_d_e_e_in_zip_d_u_d.assert_d_e_dtype_e_dty": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_dask_svd_self_consistent_test_dask_svd_self_consistent.for_d_e_e_in_zip_d_u_d.assert_d_e_dtype_e_dty", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 449, "span_ids": ["test_dask_svd_self_consistent"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"m,n\", [(10, 20), (15, 15), (20, 10)])\ndef test_dask_svd_self_consistent(m, n):\n a = np.random.rand(m, n)\n d_a = da.from_array(a, chunks=(3, n), name=\"A\")\n\n d_u, d_s, d_vt = da.linalg.svd(d_a)\n u, s, vt = da.compute(d_u, d_s, d_vt)\n\n for d_e, e in zip([d_u, d_s, d_vt], [u, s, vt]):\n assert d_e.shape == e.shape\n assert d_e.dtype == e.dtype", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_test_svd_compressed._s_must_contain_the_sing": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_test_svd_compressed._s_must_contain_the_sing", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 452, "end_line": 480, "span_ids": ["test_svd_compressed"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.slow\ndef test_svd_compressed():\n m, n = 2000, 250\n r = 10\n np.random.seed(4321)\n mat1 = np.random.randn(m, r)\n mat2 = np.random.randn(r, n)\n mat = mat1.dot(mat2)\n data = da.from_array(mat, chunks=(500, 50))\n\n u, s, vt = svd_compressed(data, r, seed=4321, n_power_iter=2)\n\n usvt = da.dot(u, da.dot(da.diag(s), vt))\n\n tol = 0.2\n assert_eq(\n da.linalg.norm(usvt), np.linalg.norm(mat), rtol=tol, atol=tol\n ) # average accuracy check\n\n u = u[:, :r]\n s = s[:r]\n vt = vt[:r, :]\n\n s_exact = np.linalg.svd(mat)[1]\n s_exact = s_exact[:r]\n\n assert_eq(np.eye(r, r), da.dot(u.T, u)) # u must be orthonormal\n assert_eq(np.eye(r, r), da.dot(vt, vt.T)) # v must be orthonormal\n assert_eq(s, s_exact) # s must contain the singular values", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_deterministic_test_svd_compressed_deterministic.assert_all_da_compute_u_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_deterministic_test_svd_compressed_deterministic.assert_all_da_compute_u_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 483, "end_line": 489, "span_ids": ["test_svd_compressed_deterministic"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_svd_compressed_deterministic():\n m, n = 30, 25\n x = da.random.RandomState(1234).random_sample(size=(m, n), chunks=(5, 5))\n u, s, vt = svd_compressed(x, 3, seed=1234)\n u2, s2, vt2 = svd_compressed(x, 3, seed=1234)\n\n assert all(da.compute((u == u2).all(), (s == s2).all(), (vt == vt2).all()))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_shapes_test_svd_compressed_shapes.assert_v_shape_r_n_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_shapes_test_svd_compressed_shapes.assert_v_shape_r_n_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 492, "end_line": 503, "span_ids": ["test_svd_compressed_shapes"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"m\", [5, 10, 15, 20])\n@pytest.mark.parametrize(\"n\", [5, 10, 15, 20])\n@pytest.mark.parametrize(\"k\", [5])\n@pytest.mark.parametrize(\"chunks\", [(5, 10), (10, 5)])\ndef test_svd_compressed_shapes(m, n, k, chunks):\n x = da.random.random(size=(m, n), chunks=chunks)\n u, s, v = svd_compressed(x, k=k, n_power_iter=1, compute=True, seed=1)\n u, s, v = da.compute(u, s, v)\n r = min(m, n, k)\n assert u.shape == (m, r)\n assert s.shape == (r,)\n assert v.shape == (r, n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_compute__check_lu_result.assert_eq_u_da_triu_u_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_compressed_compute__check_lu_result.assert_eq_u_da_triu_u_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 506, "end_line": 521, "span_ids": ["_check_lu_result", "test_svd_compressed_compute"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_svd_compressed_compute():\n x = da.ones((100, 100), chunks=(10, 10))\n u, s, v = da.linalg.svd_compressed(x, k=2, n_power_iter=0, compute=True, seed=123)\n uu, ss, vv = da.linalg.svd_compressed(x, k=2, n_power_iter=0, seed=123)\n\n assert len(v.dask) < len(vv.dask)\n\n assert_eq(v, vv)\n\n\ndef _check_lu_result(p, l, u, A):\n assert np.allclose(p.dot(l).dot(u), A)\n\n # check triangulars\n assert_eq(l, da.tril(l), check_graph=False)\n assert_eq(u, da.triu(u), check_graph=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_1_test_lu_1.for_A_chunk_in_zip_A3_._check_lu_result_dp_dl_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_1_test_lu_1.for_A_chunk_in_zip_A3_._check_lu_result_dp_dl_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 524, "end_line": 563, "span_ids": ["test_lu_1"], "tokens": 500}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lu_1():\n A1 = np.array([[7, 3, -1, 2], [3, 8, 1, -4], [-1, 1, 4, -1], [2, -4, -1, 6]])\n\n A2 = np.array(\n [\n [7, 0, 0, 0, 0, 0],\n [0, 8, 0, 0, 0, 0],\n [0, 0, 4, 0, 0, 0],\n [0, 0, 0, 6, 0, 0],\n [0, 0, 0, 0, 3, 0],\n [0, 0, 0, 0, 0, 5],\n ]\n )\n # without shuffle\n for A, chunk in zip([A1, A2], [2, 2]):\n dA = da.from_array(A, chunks=(chunk, chunk))\n p, l, u = scipy.linalg.lu(A)\n dp, dl, du = da.linalg.lu(dA)\n assert_eq(p, dp, check_graph=False)\n assert_eq(l, dl, check_graph=False)\n assert_eq(u, du, check_graph=False)\n _check_lu_result(dp, dl, du, A)\n\n A3 = np.array(\n [\n [7, 3, 2, 1, 4, 1],\n [7, 11, 5, 2, 5, 2],\n [21, 25, 16, 10, 16, 5],\n [21, 41, 18, 13, 16, 11],\n [14, 46, 23, 24, 21, 22],\n [0, 56, 29, 17, 14, 8],\n ]\n )\n\n # with shuffle\n for A, chunk in zip([A3], [2]):\n dA = da.from_array(A, chunks=(chunk, chunk))\n p, l, u = scipy.linalg.lu(A)\n dp, dl, du = da.linalg.lu(dA)\n _check_lu_result(dp, dl, du, A)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_2_test_lu_3._check_lu_result_dp_dl_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_2_test_lu_3._check_lu_result_dp_dl_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 566, "end_line": 586, "span_ids": ["test_lu_2", "test_lu_3"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.slow\n@pytest.mark.parametrize(\"size\", [10, 20, 30, 50])\n@pytest.mark.filterwarnings(\"ignore:Increasing:dask.array.core.PerformanceWarning\")\ndef test_lu_2(size):\n np.random.seed(10)\n A = np.random.randint(0, 10, (size, size))\n\n dA = da.from_array(A, chunks=(5, 5))\n dp, dl, du = da.linalg.lu(dA)\n _check_lu_result(dp, dl, du, A)\n\n\n@pytest.mark.slow\n@pytest.mark.parametrize(\"size\", [50, 100, 200])\ndef test_lu_3(size):\n np.random.seed(10)\n A = np.random.randint(0, 10, (size, size))\n\n dA = da.from_array(A, chunks=(25, 25))\n dp, dl, du = da.linalg.lu(dA)\n _check_lu_result(dp, dl, du, A)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_errors_test_lu_errors.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lu_errors_test_lu_errors.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 589, "end_line": 600, "span_ids": ["test_lu_errors"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lu_errors():\n A = np.random.randint(0, 11, (10, 10, 10))\n dA = da.from_array(A, chunks=(5, 5, 5))\n pytest.raises(ValueError, lambda: da.linalg.lu(dA))\n\n A = np.random.randint(0, 11, (10, 8))\n dA = da.from_array(A, chunks=(5, 4))\n pytest.raises(ValueError, lambda: da.linalg.lu(dA))\n\n A = np.random.randint(0, 11, (20, 20))\n dA = da.from_array(A, chunks=(5, 4))\n pytest.raises(ValueError, lambda: da.linalg.lu(dA))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_vector_test_solve_triangular_vector.assert_eq_dAl_dot_res_b": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_vector_test_solve_triangular_vector.assert_eq_dAl_dot_res_b", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 603, "end_line": 624, "span_ids": ["test_solve_triangular_vector"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (50, 10), (70, 20)])\ndef test_solve_triangular_vector(shape, chunk):\n np.random.seed(1)\n\n A = np.random.randint(1, 11, (shape, shape))\n b = np.random.randint(1, 11, shape)\n\n # upper\n Au = np.triu(A)\n dAu = da.from_array(Au, (chunk, chunk))\n db = da.from_array(b, chunk)\n res = da.linalg.solve_triangular(dAu, db)\n assert_eq(res, scipy.linalg.solve_triangular(Au, b))\n assert_eq(dAu.dot(res), b.astype(float))\n\n # lower\n Al = np.tril(A)\n dAl = da.from_array(Al, (chunk, chunk))\n db = da.from_array(b, chunk)\n res = da.linalg.solve_triangular(dAl, db, lower=True)\n assert_eq(res, scipy.linalg.solve_triangular(Al, b, lower=True))\n assert_eq(dAl.dot(res), b.astype(float))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix_test_solve_triangular_matrix.assert_eq_dAl_dot_res_b": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix_test_solve_triangular_matrix.assert_eq_dAl_dot_res_b", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 627, "end_line": 648, "span_ids": ["test_solve_triangular_matrix"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (50, 10), (50, 20)])\ndef test_solve_triangular_matrix(shape, chunk):\n np.random.seed(1)\n\n A = np.random.randint(1, 10, (shape, shape))\n b = np.random.randint(1, 10, (shape, 5))\n\n # upper\n Au = np.triu(A)\n dAu = da.from_array(Au, (chunk, chunk))\n db = da.from_array(b, (chunk, 5))\n res = da.linalg.solve_triangular(dAu, db)\n assert_eq(res, scipy.linalg.solve_triangular(Au, b))\n assert_eq(dAu.dot(res), b.astype(float))\n\n # lower\n Al = np.tril(A)\n dAl = da.from_array(Al, (chunk, chunk))\n db = da.from_array(b, (chunk, 5))\n res = da.linalg.solve_triangular(dAl, db, lower=True)\n assert_eq(res, scipy.linalg.solve_triangular(Al, b, lower=True))\n assert_eq(dAl.dot(res), b.astype(float))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix2_test_solve_triangular_matrix2.assert_eq_dAl_dot_res_b": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_matrix2_test_solve_triangular_matrix2.assert_eq_dAl_dot_res_b", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 651, "end_line": 672, "span_ids": ["test_solve_triangular_matrix2"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (50, 10), (50, 20)])\ndef test_solve_triangular_matrix2(shape, chunk):\n np.random.seed(1)\n\n A = np.random.randint(1, 10, (shape, shape))\n b = np.random.randint(1, 10, (shape, shape))\n\n # upper\n Au = np.triu(A)\n dAu = da.from_array(Au, (chunk, chunk))\n db = da.from_array(b, (chunk, chunk))\n res = da.linalg.solve_triangular(dAu, db)\n assert_eq(res, scipy.linalg.solve_triangular(Au, b))\n assert_eq(dAu.dot(res), b.astype(float))\n\n # lower\n Al = np.tril(A)\n dAl = da.from_array(Al, (chunk, chunk))\n db = da.from_array(b, (chunk, chunk))\n res = da.linalg.solve_triangular(dAl, db, lower=True)\n assert_eq(res, scipy.linalg.solve_triangular(Al, b, lower=True))\n assert_eq(dAl.dot(res), b.astype(float))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_errors_test_solve_triangular_errors.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_triangular_errors_test_solve_triangular_errors.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 675, "end_line": 686, "span_ids": ["test_solve_triangular_errors"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_solve_triangular_errors():\n A = np.random.randint(0, 10, (10, 10, 10))\n b = np.random.randint(1, 10, 10)\n dA = da.from_array(A, chunks=(5, 5, 5))\n db = da.from_array(b, chunks=5)\n pytest.raises(ValueError, lambda: da.linalg.solve_triangular(dA, db))\n\n A = np.random.randint(0, 10, (10, 10))\n b = np.random.randint(1, 10, 10)\n dA = da.from_array(A, chunks=(3, 3))\n db = da.from_array(b, chunks=5)\n pytest.raises(ValueError, lambda: da.linalg.solve_triangular(dA, db))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_test_solve.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_test_solve.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 689, "end_line": 718, "span_ids": ["test_solve"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (50, 10)])\ndef test_solve(shape, chunk):\n np.random.seed(1)\n\n A = np.random.randint(1, 10, (shape, shape))\n dA = da.from_array(A, (chunk, chunk))\n\n # vector\n b = np.random.randint(1, 10, shape)\n db = da.from_array(b, chunk)\n\n res = da.linalg.solve(dA, db)\n assert_eq(res, scipy.linalg.solve(A, b), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)\n\n # tall-and-skinny matrix\n b = np.random.randint(1, 10, (shape, 5))\n db = da.from_array(b, (chunk, 5))\n\n res = da.linalg.solve(dA, db)\n assert_eq(res, scipy.linalg.solve(A, b), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)\n\n # matrix\n b = np.random.randint(1, 10, (shape, shape))\n db = da.from_array(b, (chunk, chunk))\n\n res = da.linalg.solve(dA, db)\n assert_eq(res, scipy.linalg.solve(A, b), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_inv__get_symmat.return.lA_dot_lA_T_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_inv__get_symmat.return.lA_dot_lA_T_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 721, "end_line": 737, "span_ids": ["test_inv", "_get_symmat"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (50, 10)])\ndef test_inv(shape, chunk):\n np.random.seed(1)\n\n A = np.random.randint(1, 10, (shape, shape))\n dA = da.from_array(A, (chunk, chunk))\n\n res = da.linalg.inv(dA)\n assert_eq(res, scipy.linalg.inv(A), check_graph=False)\n assert_eq(dA.dot(res), np.eye(shape, dtype=float), check_graph=False)\n\n\ndef _get_symmat(size):\n np.random.seed(1)\n A = np.random.randint(1, 21, (size, size))\n lA = np.tril(A)\n return lA.dot(lA.T)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_sym_pos_test_solve_sym_pos.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_solve_sym_pos_test_solve_sym_pos.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 740, "end_line": 769, "span_ids": ["test_solve_sym_pos"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (30, 6)])\ndef test_solve_sym_pos(shape, chunk):\n np.random.seed(1)\n\n A = _get_symmat(shape)\n dA = da.from_array(A, (chunk, chunk))\n\n # vector\n b = np.random.randint(1, 10, shape)\n db = da.from_array(b, chunk)\n\n res = da.linalg.solve(dA, db, sym_pos=True)\n assert_eq(res, scipy.linalg.solve(A, b, sym_pos=True), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)\n\n # tall-and-skinny matrix\n b = np.random.randint(1, 10, (shape, 5))\n db = da.from_array(b, (chunk, 5))\n\n res = da.linalg.solve(dA, db, sym_pos=True)\n assert_eq(res, scipy.linalg.solve(A, b, sym_pos=True), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)\n\n # matrix\n b = np.random.randint(1, 10, (shape, shape))\n db = da.from_array(b, (chunk, chunk))\n\n res = da.linalg.solve(dA, db, sym_pos=True)\n assert_eq(res, scipy.linalg.solve(A, b, sym_pos=True), check_graph=False)\n assert_eq(dA.dot(res), b.astype(float), check_graph=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_cholesky_test_cholesky.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_cholesky_test_cholesky.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 772, "end_line": 782, "span_ids": ["test_cholesky"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"shape\", \"chunk\"), [(20, 10), (12, 3), (30, 3), (30, 6)])\ndef test_cholesky(shape, chunk):\n\n A = _get_symmat(shape)\n dA = da.from_array(A, (chunk, chunk))\n assert_eq(da.linalg.cholesky(dA), scipy.linalg.cholesky(A), check_graph=False)\n assert_eq(\n da.linalg.cholesky(dA, lower=True),\n scipy.linalg.cholesky(A, lower=True),\n check_graph=False,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lstsq_test_lstsq.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_lstsq_test_lstsq.None_7", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 785, "end_line": 811, "span_ids": ["test_lstsq"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize((\"nrow\", \"ncol\", \"chunk\"), [(20, 10, 5), (100, 10, 10)])\ndef test_lstsq(nrow, ncol, chunk):\n np.random.seed(1)\n A = np.random.randint(1, 20, (nrow, ncol))\n b = np.random.randint(1, 20, nrow)\n\n dA = da.from_array(A, (chunk, ncol))\n db = da.from_array(b, chunk)\n\n x, r, rank, s = np.linalg.lstsq(A, b, rcond=-1)\n dx, dr, drank, ds = da.linalg.lstsq(dA, db)\n\n assert_eq(dx, x)\n assert_eq(dr, r)\n assert drank.compute() == rank\n assert_eq(ds, s)\n\n # reduce rank causes multicollinearity, only compare rank\n A[:, 1] = A[:, 2]\n dA = da.from_array(A, (chunk, ncol))\n db = da.from_array(b, chunk)\n x, r, rank, s = np.linalg.lstsq(\n A, b, rcond=np.finfo(np.double).eps * max(nrow, ncol)\n )\n assert rank == ncol - 1\n dx, dr, drank, ds = da.linalg.lstsq(dA, db)\n assert drank.compute() == rank", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_no_chunks_svd_test_no_chunks_svd.for_chunks_in_np_nan_.assert_eq_abs_u_abs_du_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_no_chunks_svd_test_no_chunks_svd.for_chunks_in_np_nan_.assert_eq_abs_u_abs_du_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 814, "end_line": 832, "span_ids": ["test_no_chunks_svd"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_chunks_svd():\n x = np.random.random((100, 10))\n u, s, v = np.linalg.svd(x, full_matrices=False)\n\n for chunks in [((np.nan,) * 10, (10,)), ((np.nan,) * 10, (np.nan,))]:\n dx = da.from_array(x, chunks=(10, 10))\n dx._chunks = chunks\n\n du, ds, dv = da.linalg.svd(dx)\n\n assert_eq(s, ds)\n assert_eq(u.dot(np.diag(s)).dot(v), du.dot(da.diag(ds)).dot(dv))\n assert_eq(du.T.dot(du), np.eye(10))\n assert_eq(dv.T.dot(dv), np.eye(10))\n\n dx = da.from_array(x, chunks=(10, 10))\n dx._chunks = ((np.nan,) * 10, (np.nan,))\n assert_eq(abs(v), abs(dv))\n assert_eq(abs(u), abs(du))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_flip_test_svd_flip.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_flip_test_svd_flip.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 835, "end_line": 849, "span_ids": ["test_svd_flip"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape\", [(10, 20), (10, 10), (20, 10)])\n@pytest.mark.parametrize(\"chunks\", [(-1, -1), (10, -1), (-1, 10)])\ndef test_svd_flip(shape, chunks):\n # Verify that sign-corrected SVD results can still\n # be used to reconstruct inputs\n x = da.random.random(size=shape, chunks=chunks)\n u, s, v = da.linalg.svd(x)\n\n # Validate w/ dask inputs\n uf, vf = svd_flip(u, v)\n np.testing.assert_almost_equal(np.asarray(np.dot(uf * s, vf)), x, decimal=9)\n\n # Validate w/ numpy inputs\n uc, vc = svd_flip(*da.compute(u, v))\n np.testing.assert_almost_equal(np.asarray(np.dot(uc * s, vc)), x, decimal=9)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_supported_array_shapes_test_svd_supported_array_shapes.assert_eq_dv_nv_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_supported_array_shapes_test_svd_supported_array_shapes.assert_eq_dv_nv_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 852, "end_line": 873, "span_ids": ["test_svd_supported_array_shapes"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [(10, -1), (-1, 10), (9, -1), (-1, 9)])\n@pytest.mark.parametrize(\"shape\", [(10, 100), (100, 10), (10, 10)])\ndef test_svd_supported_array_shapes(chunks, shape):\n # Test the following cases for tall-skinny, short-fat and square arrays:\n # - no chunking\n # - chunking that contradicts shape (e.g. a 10x100 array with 9x100 chunks)\n # - chunking that aligns with shape (e.g. a 10x100 array with 10x9 chunks)\n x = np.random.random(shape)\n dx = da.from_array(x, chunks=chunks)\n\n du, ds, dv = da.linalg.svd(dx)\n du, dv = da.compute(du, dv)\n\n nu, ns, nv = np.linalg.svd(x, full_matrices=False)\n\n # Correct signs before comparison\n du, dv = svd_flip(du, dv)\n nu, nv = svd_flip(nu, nv)\n\n assert_eq(du, nu)\n assert_eq(ds, ns)\n assert_eq(dv, nv)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_incompatible_chunking_test_svd_incompatible_dimensions.with_pytest_raises_ValueE.da_linalg_svd_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_svd_incompatible_chunking_test_svd_incompatible_dimensions.with_pytest_raises_ValueE.da_linalg_svd_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 876, "end_line": 888, "span_ids": ["test_svd_incompatible_chunking", "test_svd_incompatible_dimensions"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_svd_incompatible_chunking():\n with pytest.raises(\n NotImplementedError, match=\"Array must be chunked in one dimension only\"\n ):\n x = da.random.random((10, 10), chunks=(5, 5))\n da.linalg.svd(x)\n\n\n@pytest.mark.parametrize(\"ndim\", [0, 1, 3])\ndef test_svd_incompatible_dimensions(ndim):\n with pytest.raises(ValueError, match=\"Array must be 2D\"):\n x = da.random.random((10,) * ndim, chunks=(-1,) * ndim)\n da.linalg.svd(x)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_ndim_test_norm_any_ndim.assert_eq_a_r_d_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_ndim_test_norm_any_ndim.assert_eq_a_r_d_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 891, "end_line": 904, "span_ids": ["test_norm_any_ndim"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, axis\",\n [[(5,), (2,), None], [(5,), (2,), 0], [(5,), (2,), (0,)], [(5, 6), (2, 2), None]],\n)\n@pytest.mark.parametrize(\"norm\", [None, 1, -1, np.inf, -np.inf])\n@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_norm_any_ndim(shape, chunks, axis, norm, keepdims):\n a = np.random.random(shape)\n d = da.from_array(a, chunks=chunks)\n\n a_r = np.linalg.norm(a, ord=norm, axis=axis, keepdims=keepdims)\n d_r = da.linalg.norm(d, ord=norm, axis=axis, keepdims=keepdims)\n\n assert_eq(a_r, d_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_slice_test_norm_any_slice.for_firstaxis_in_range_le.for_secondaxis_in_range_l.assert_eq_a_r_d_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_any_slice_test_norm_any_slice.for_firstaxis_in_range_le.for_secondaxis_in_range_l.assert_eq_a_r_d_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 907, "end_line": 932, "span_ids": ["test_norm_any_slice"], "tokens": 284}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.slow\n@pytest.mark.parametrize(\n \"shape, chunks\",\n [\n [(5,), (2,)],\n [(5, 3), (2, 2)],\n [(4, 5, 3), (2, 2, 2)],\n [(4, 5, 2, 3), (2, 2, 2, 2)],\n [(2, 5, 2, 4, 3), (2, 2, 2, 2, 2)],\n ],\n)\n@pytest.mark.parametrize(\"norm\", [None, 1, -1, np.inf, -np.inf])\n@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_norm_any_slice(shape, chunks, norm, keepdims):\n a = np.random.random(shape)\n d = da.from_array(a, chunks=chunks)\n\n for firstaxis in range(len(shape)):\n for secondaxis in range(len(shape)):\n if firstaxis != secondaxis:\n axis = (firstaxis, secondaxis)\n else:\n axis = firstaxis\n a_r = np.linalg.norm(a, ord=norm, axis=axis, keepdims=keepdims)\n d_r = da.linalg.norm(d, ord=norm, axis=axis, keepdims=keepdims)\n assert_eq(a_r, d_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_1dim_test_norm_1dim.assert_eq_a_r_d_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_1dim_test_norm_1dim.assert_eq_a_r_d_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 935, "end_line": 946, "span_ids": ["test_norm_1dim"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, axis\", [[(5,), (2,), None], [(5,), (2,), 0], [(5,), (2,), (0,)]]\n)\n@pytest.mark.parametrize(\"norm\", [0, 2, -2, 0.5])\n@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_norm_1dim(shape, chunks, axis, norm, keepdims):\n a = np.random.random(shape)\n d = da.from_array(a, chunks=chunks)\n\n a_r = np.linalg.norm(a, ord=norm, axis=axis, keepdims=keepdims)\n d_r = da.linalg.norm(d, ord=norm, axis=axis, keepdims=keepdims)\n assert_eq(a_r, d_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_2dim_test_norm_2dim.assert_eq_a_r_d_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_2dim_test_norm_2dim.assert_eq_a_r_d_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 949, "end_line": 966, "span_ids": ["test_norm_2dim"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, axis\",\n [[(5, 6), (2, 2), None], [(5, 6), (2, 2), (0, 1)], [(5, 6), (2, 2), (1, 0)]],\n)\n@pytest.mark.parametrize(\"norm\", [\"fro\", \"nuc\", 2, -2])\n@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_norm_2dim(shape, chunks, axis, norm, keepdims):\n a = np.random.random(shape)\n d = da.from_array(a, chunks=chunks)\n\n # Need one chunk on last dimension for svd.\n if norm == \"nuc\" or norm == 2 or norm == -2:\n d = d.rechunk({-1: -1})\n\n a_r = np.linalg.norm(a, ord=norm, axis=axis, keepdims=keepdims)\n d_r = da.linalg.norm(d, ord=norm, axis=axis, keepdims=keepdims)\n\n assert_eq(a_r, d_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_implemented_errors_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linalg.py_test_norm_implemented_errors_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linalg.py", "file_name": "test_linalg.py", "file_type": "text/x-python", "category": "test", "start_line": 969, "end_line": 981, "span_ids": ["test_norm_implemented_errors"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, chunks, axis\",\n [[(3, 2, 4), (2, 2, 2), (1, 2)], [(2, 3, 4, 5), (2, 2, 2, 2), (-1, -2)]],\n)\n@pytest.mark.parametrize(\"norm\", [\"nuc\", 2, -2])\n@pytest.mark.parametrize(\"keepdims\", [False, True])\ndef test_norm_implemented_errors(shape, chunks, axis, norm, keepdims):\n a = np.random.random(shape)\n d = da.from_array(a, chunks=chunks)\n if len(shape) > 2 and len(axis) == 2:\n with pytest.raises(NotImplementedError):\n da.linalg.norm(d, ord=norm, axis=axis, keepdims=keepdims)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linearoperator.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_linearoperator.py_pytest_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_linearoperator.py", "file_name": "test_linearoperator.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["imports", "test_LinearOperator"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"scipy\")\n\nimport numpy as np\nimport dask.array as da\nimport scipy.sparse.linalg\n\n\ndef test_LinearOperator():\n X = np.random.random(size=(3, 2))\n y = np.random.random(size=(2, 1))\n w = np.random.random(size=(3, 1))\n square = np.random.random(size=(2, 2))\n\n dX = da.from_array(X, chunks=(2, 1))\n\n npLO = scipy.sparse.linalg.aslinearoperator(X)\n daLO = scipy.sparse.linalg.interface.MatrixLinearOperator(dX)\n\n functions = [lambda x, y: x.matvec(y), lambda x, y: x * y, lambda x, y: x.dot(y)]\n for func in functions:\n assert np.allclose(func(npLO, y), func(daLO, y))\n\n assert np.allclose(npLO.matmat(square), daLO.matmat(square))\n\n assert np.allclose(npLO.rmatvec(w), daLO.rmatvec(w))\n\n assert npLO.dtype == daLO.dtype\n assert npLO.shape == daLO.shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_random_test_tokenize_masked_array.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_random_test_tokenize_masked_array.None_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["imports", "test_tokenize_masked_array"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import random\nfrom itertools import product\n\nimport numpy as np\nimport pytest\n\nimport dask.array as da\nfrom dask.base import tokenize\nfrom dask.array.utils import assert_eq\nfrom copy import deepcopy\n\npytest.importorskip(\"dask.array.ma\")\n\n\ndef test_tokenize_masked_array():\n m = np.ma.masked_array([1, 2, 3], mask=[True, True, False], fill_value=10)\n m2 = np.ma.masked_array([1, 2, 3], mask=[True, True, False], fill_value=0)\n m3 = np.ma.masked_array([1, 2, 3], mask=False, fill_value=10)\n assert tokenize(m) == tokenize(m)\n assert tokenize(m2) == tokenize(m2)\n assert tokenize(m3) == tokenize(m3)\n assert tokenize(m) != tokenize(m2)\n assert tokenize(m) != tokenize(m3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_from_array_masked_array_test_copy_deepcopy.assert_isinstance_y2_comp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_from_array_masked_array_test_copy_deepcopy.assert_isinstance_y2_comp", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 46, "span_ids": ["test_copy_deepcopy", "test_from_array_masked_array"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_from_array_masked_array():\n m = np.ma.masked_array([1, 2, 3], mask=[True, True, False], fill_value=10)\n dm = da.from_array(m, chunks=(2,), asarray=False)\n assert_eq(dm, m)\n\n\ndef test_copy_deepcopy():\n t = np.ma.masked_array([1, 2], mask=[0, 1])\n x = da.from_array(t, chunks=t.shape, asarray=False)\n # x = da.arange(5, chunks=(2,))\n y = x.copy()\n memo = {}\n y2 = deepcopy(x, memo=memo)\n\n xx = da.ma.masked_where([False, True], [1, 2])\n assert_eq(x, xx)\n\n assert_eq(y, t)\n assert isinstance(y.compute(), np.ma.masked_array)\n assert_eq(y2, t)\n assert isinstance(y2.compute(), np.ma.masked_array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_functions_functions._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_functions_functions._", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 77, "span_ids": ["impl:2"], "tokens": 326}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "functions = [\n lambda x: x,\n lambda x: da.expm1(x),\n lambda x: 2 * x,\n lambda x: x / 2,\n lambda x: x ** 2,\n lambda x: x + x,\n lambda x: x * x,\n lambda x: x[0],\n lambda x: x[:, 1],\n lambda x: x[:1, None, 1:3],\n lambda x: x.T,\n lambda x: da.transpose(x, (1, 2, 0)),\n lambda x: x.sum(),\n lambda x: x.dot(np.arange(x.shape[-1])),\n lambda x: x.dot(np.eye(x.shape[-1])),\n lambda x: da.tensordot(x, np.ones(x.shape[:2]), axes=[(0, 1), (0, 1)]),\n lambda x: x.sum(axis=0),\n lambda x: x.max(axis=0),\n lambda x: x.sum(axis=(1, 2)),\n lambda x: x.astype(np.complex128),\n lambda x: x.map_blocks(lambda x: x * 2),\n lambda x: x.round(1),\n lambda x: x.reshape((x.shape[0] * x.shape[1], x.shape[2])),\n lambda x: abs(x),\n lambda x: x > 0.5,\n lambda x: x.rechunk((4, 4, 4)),\n lambda x: x.rechunk((2, 2, 1)),\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_basic_test_basic.if_yy_shape_.assert_isinstance_zz_np_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_basic_test_basic.if_yy_shape_.assert_isinstance_zz_np_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 80, "end_line": 94, "span_ids": ["test_basic"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", functions)\ndef test_basic(func):\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n x[x < 0.4] = 0\n\n y = da.ma.masked_equal(x, 0)\n\n xx = func(x)\n yy = func(y)\n\n assert_eq(xx, da.ma.filled(yy, 0))\n\n if yy.shape:\n zz = yy.compute()\n assert isinstance(zz, np.ma.masked_array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_tensordot_test_tensordot.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_tensordot_test_tensordot.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 117, "span_ids": ["test_tensordot"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tensordot():\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n x[x < 0.4] = 0\n y = da.random.random((4, 3, 2), chunks=(2, 2, 1))\n y[y < 0.4] = 0\n\n xx = da.ma.masked_equal(x, 0)\n yy = da.ma.masked_equal(y, 0)\n\n assert_eq(\n da.tensordot(x, y, axes=(2, 0)),\n da.ma.filled(da.tensordot(xx, yy, axes=(2, 0)), 0),\n )\n assert_eq(\n da.tensordot(x, y, axes=(1, 1)),\n da.ma.filled(da.tensordot(xx, yy, axes=(1, 1)), 0),\n )\n assert_eq(\n da.tensordot(x, y, axes=((1, 2), (1, 0))),\n da.ma.filled(da.tensordot(xx, yy, axes=((1, 2), (1, 0))), 0),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_check_m": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_check_m", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 120, "end_line": 134, "span_ids": ["test_mixed_concatenate"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", functions)\n@pytest.mark.filterwarnings(\"ignore::numpy.ComplexWarning\") # abs() in assert_eq\ndef test_mixed_concatenate(func):\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n y = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n\n y[y < 0.4] = 0\n yy = da.ma.masked_equal(y, 0)\n\n d = da.concatenate([x, y], axis=0)\n s = da.concatenate([x, yy], axis=0)\n\n dd = func(d)\n ss = func(s)\n assert_eq(dd, ss, check_meta=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_check_m": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_check_m", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 149, "span_ids": ["test_mixed_random"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", functions)\n@pytest.mark.filterwarnings(\"ignore::numpy.ComplexWarning\") # abs() in assert_eq\ndef test_mixed_random(func):\n d = da.random.random((4, 3, 4), chunks=(1, 2, 2))\n d[d < 0.4] = 0\n\n fn = lambda x: np.ma.masked_equal(x, 0) if random.random() < 0.5 else x\n s = d.map_blocks(fn)\n\n dd = func(d)\n ss = func(s)\n\n assert_eq(dd, ss, check_meta=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_output_type_test_mixed_output_type.assert_isinstance_zz_np_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_mixed_output_type_test_mixed_output_type.assert_isinstance_zz_np_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 162, "span_ids": ["test_mixed_output_type"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_mixed_output_type():\n y = da.random.random((10, 10), chunks=(5, 5))\n y[y < 0.4] = 0\n\n y = da.ma.masked_equal(y, 0)\n x = da.zeros((10, 1), chunks=(5, 1))\n\n z = da.concatenate([x, y], axis=1)\n assert z.shape == (10, 11)\n zz = z.compute()\n assert isinstance(zz, np.ma.masked_array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_creation_functions_test_creation_functions.assert_eq_da_ma_fix_inval": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_creation_functions_test_creation_functions.assert_eq_da_ma_fix_inval", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 165, "end_line": 212, "span_ids": ["test_creation_functions"], "tokens": 644}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_creation_functions():\n x = np.array([-2, -1, 0, 1, 2] * 20).reshape((10, 10))\n y = np.array([-2, 0, 1, 1, 0] * 2)\n dx = da.from_array(x, chunks=5)\n dy = da.from_array(y, chunks=4)\n\n sol = np.ma.masked_greater(x, y)\n for (a, b) in product([dx, x], [dy, y]):\n assert_eq(da.ma.masked_greater(a, b), sol)\n\n # These are all the same as masked_greater, just check for correct op\n assert_eq(da.ma.masked_greater(dx, 0), np.ma.masked_greater(x, 0))\n assert_eq(da.ma.masked_greater_equal(dx, 0), np.ma.masked_greater_equal(x, 0))\n assert_eq(da.ma.masked_less(dx, 0), np.ma.masked_less(x, 0))\n assert_eq(da.ma.masked_less_equal(dx, 0), np.ma.masked_less_equal(x, 0))\n assert_eq(da.ma.masked_equal(dx, 0), np.ma.masked_equal(x, 0))\n assert_eq(da.ma.masked_not_equal(dx, 0), np.ma.masked_not_equal(x, 0))\n\n # masked_where\n assert_eq(da.ma.masked_where(False, dx), np.ma.masked_where(False, x))\n assert_eq(da.ma.masked_where(dx > 2, dx), np.ma.masked_where(x > 2, x))\n\n with pytest.raises(IndexError):\n da.ma.masked_where((dx > 2)[:, 0], dx)\n\n assert_eq(da.ma.masked_inside(dx, -1, 1), np.ma.masked_inside(x, -1, 1))\n assert_eq(da.ma.masked_outside(dx, -1, 1), np.ma.masked_outside(x, -1, 1))\n assert_eq(da.ma.masked_values(dx, -1), np.ma.masked_values(x, -1))\n\n # masked_equal and masked_values in numpy sets the fill_value to `value`,\n # which can sometimes be an array. This is hard to support in dask, so we\n # forbid it. Check that this isn't supported:\n with pytest.raises(ValueError):\n da.ma.masked_equal(dx, dy)\n\n with pytest.raises(ValueError):\n da.ma.masked_values(dx, dy)\n\n y = x.astype(\"f8\")\n y[0, 0] = y[7, 5] = np.nan\n dy = da.from_array(y, chunks=5)\n\n assert_eq(da.ma.masked_invalid(dy), np.ma.masked_invalid(y))\n\n my = np.ma.masked_greater(y, 0)\n dmy = da.ma.masked_greater(dy, 0)\n\n assert_eq(da.ma.fix_invalid(dmy, fill_value=0), np.ma.fix_invalid(my, fill_value=0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_filled_assert_eq_ma.if_res_is_np_ma_masked_.else_.assert_eq_a_b_equal_nan": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_filled_assert_eq_ma.if_res_is_np_ma_masked_.else_.assert_eq_a_b_equal_nan", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 215, "end_line": 236, "span_ids": ["assert_eq_ma", "test_filled"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_filled():\n x = np.array([-2, -1, 0, 1, 2] * 20).reshape((10, 10))\n dx = da.from_array(x, chunks=5)\n\n mx = np.ma.masked_equal(x, 0)\n mdx = da.ma.masked_equal(dx, 0)\n\n assert_eq(da.ma.filled(mdx), np.ma.filled(mx))\n assert_eq(da.ma.filled(mdx, -5), np.ma.filled(mx, -5))\n\n\ndef assert_eq_ma(a, b):\n res = a.compute()\n if res is np.ma.masked:\n assert res is b\n else:\n assert type(res) == type(b)\n if hasattr(res, \"mask\"):\n np.testing.assert_equal(res.mask, b.mask)\n a = da.ma.filled(a)\n b = np.ma.filled(b)\n assert_eq(a, b, equal_nan=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_test_reductions.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_test_reductions.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 239, "end_line": 264, "span_ids": ["test_reductions"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dtype\", (\"i8\", \"f8\"))\n@pytest.mark.parametrize(\n \"reduction\", [\"sum\", \"prod\", \"mean\", \"var\", \"std\", \"min\", \"max\", \"any\", \"all\"]\n)\ndef test_reductions(dtype, reduction):\n x = (np.random.RandomState(42).rand(11, 11) * 10).astype(dtype)\n dx = da.from_array(x, chunks=(4, 4))\n mx = np.ma.masked_greater(x, 5)\n mdx = da.ma.masked_greater(dx, 5)\n\n dfunc = getattr(da, reduction)\n func = getattr(np, reduction)\n\n assert_eq_ma(dfunc(mdx), func(mx))\n assert_eq_ma(dfunc(mdx, axis=0), func(mx, axis=0))\n assert_eq_ma(dfunc(mdx, keepdims=True, split_every=4), func(mx, keepdims=True))\n assert_eq_ma(dfunc(mdx, axis=0, split_every=2), func(mx, axis=0))\n assert_eq_ma(\n dfunc(mdx, axis=0, keepdims=True, split_every=2),\n func(mx, axis=0, keepdims=True),\n )\n assert_eq_ma(dfunc(mdx, axis=1, split_every=2), func(mx, axis=1))\n assert_eq_ma(\n dfunc(mdx, axis=1, keepdims=True, split_every=2),\n func(mx, axis=1, keepdims=True),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_allmasked_test_reductions_allmasked.assert_eq_ma_dfunc_dx_f": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_reductions_allmasked_test_reductions_allmasked.assert_eq_ma_dfunc_dx_f", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 267, "end_line": 278, "span_ids": ["test_reductions_allmasked"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dtype\", (\"i8\", \"f8\"))\n@pytest.mark.parametrize(\n \"reduction\", [\"sum\", \"prod\", \"mean\", \"var\", \"std\", \"min\", \"max\", \"any\", \"all\"]\n)\ndef test_reductions_allmasked(dtype, reduction):\n x = np.ma.masked_array([1, 2], mask=True)\n dx = da.from_array(x, asarray=False)\n\n dfunc = getattr(da, reduction)\n func = getattr(np, reduction)\n\n assert_eq_ma(dfunc(dx), func(x))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_arg_reductions_test_arg_reductions.assert_eq_ma_dfunc_dmx_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_arg_reductions_test_arg_reductions.assert_eq_ma_dfunc_dmx_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 281, "end_line": 294, "span_ids": ["test_arg_reductions"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"reduction\", [\"argmin\", \"argmax\"])\ndef test_arg_reductions(reduction):\n x = np.random.random((10, 10, 10))\n dx = da.from_array(x, chunks=(3, 4, 5))\n mx = np.ma.masked_greater(x, 0.4)\n dmx = da.ma.masked_greater(dx, 0.4)\n\n dfunc = getattr(da, reduction)\n func = getattr(np, reduction)\n\n assert_eq_ma(dfunc(dmx), func(mx))\n assert_eq_ma(dfunc(dmx, 0), func(mx, 0))\n assert_eq_ma(dfunc(dmx, 1), func(mx, 1))\n assert_eq_ma(dfunc(dmx, 2), func(mx, 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_cumulative_test_cumulative.for_axis_in_0_1_2_.assert_eq_ma_dmx_cumprod_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_cumulative_test_cumulative.for_axis_in_0_1_2_.assert_eq_ma_dmx_cumprod_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 297, "end_line": 305, "span_ids": ["test_cumulative"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cumulative():\n x = np.random.RandomState(0).rand(20, 24, 13)\n dx = da.from_array(x, chunks=(6, 5, 4))\n mx = np.ma.masked_greater(x, 0.4)\n dmx = da.ma.masked_greater(dx, 0.4)\n\n for axis in [0, 1, 2]:\n assert_eq_ma(dmx.cumsum(axis=axis), mx.cumsum(axis=axis))\n assert_eq_ma(dmx.cumprod(axis=axis), mx.cumprod(axis=axis))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_accessors_test_accessors.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_accessors_test_accessors.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 308, "end_line": 317, "span_ids": ["test_accessors"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_accessors():\n x = np.random.random((10, 10))\n dx = da.from_array(x, chunks=(3, 4))\n mx = np.ma.masked_greater(x, 0.4)\n dmx = da.ma.masked_greater(dx, 0.4)\n\n assert_eq(da.ma.getmaskarray(dmx), np.ma.getmaskarray(mx))\n assert_eq(da.ma.getmaskarray(dx), np.ma.getmaskarray(x))\n assert_eq(da.ma.getdata(dmx), np.ma.getdata(mx))\n assert_eq(da.ma.getdata(dx), np.ma.getdata(x))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_masked_array_test_masked_array.with_pytest_raises_np_ma_.da_ma_masked_array_dx_ma": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_masked_array_test_masked_array.with_pytest_raises_np_ma_.da_ma_masked_array_dx_ma", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 320, "end_line": 347, "span_ids": ["test_masked_array"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_masked_array():\n x = np.random.random((10, 10)).astype(\"f4\")\n dx = da.from_array(x, chunks=(3, 4))\n f1 = da.from_array(np.array(1), chunks=())\n\n fill_values = [(None, None), (0.5, 0.5), (1, f1)]\n for data, (df, f) in product([x, dx], fill_values):\n assert_eq(\n da.ma.masked_array(data, fill_value=df), np.ma.masked_array(x, fill_value=f)\n )\n assert_eq(\n da.ma.masked_array(data, mask=data > 0.4, fill_value=df),\n np.ma.masked_array(x, mask=x > 0.4, fill_value=f),\n )\n assert_eq(\n da.ma.masked_array(data, mask=data > 0.4, fill_value=df),\n np.ma.masked_array(x, mask=x > 0.4, fill_value=f),\n )\n assert_eq(\n da.ma.masked_array(data, fill_value=df, dtype=\"f8\"),\n np.ma.masked_array(x, fill_value=f, dtype=\"f8\"),\n )\n\n with pytest.raises(ValueError):\n da.ma.masked_array(dx, fill_value=dx)\n\n with pytest.raises(np.ma.MaskError):\n da.ma.masked_array(dx, mask=dx[:3, :3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_set_fill_value_test_set_fill_value.with_pytest_raises_ValueE.da_ma_set_fill_value_dmx_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_set_fill_value_test_set_fill_value.with_pytest_raises_ValueE.da_ma_set_fill_value_dmx_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 350, "end_line": 368, "span_ids": ["test_set_fill_value"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_set_fill_value():\n x = np.random.randint(0, 10, (10, 10))\n dx = da.from_array(x, chunks=(3, 4))\n mx = np.ma.masked_greater(x, 3)\n dmx = da.ma.masked_greater(dx, 3)\n\n da.ma.set_fill_value(dmx, -10)\n np.ma.set_fill_value(mx, -10)\n assert_eq_ma(dmx, mx)\n\n da.ma.set_fill_value(dx, -10)\n np.ma.set_fill_value(x, -10)\n assert_eq_ma(dx, x)\n\n with pytest.raises(TypeError):\n da.ma.set_fill_value(dmx, 1e20)\n\n with pytest.raises(ValueError):\n da.ma.set_fill_value(dmx, dx)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_average_weights_with_masked_array_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_masked.py_test_average_weights_with_masked_array_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_masked.py", "file_name": "test_masked.py", "file_type": "text/x-python", "category": "test", "start_line": 371, "end_line": 396, "span_ids": ["test_arithmetic_results_in_masked", "test_average_weights_with_masked_array"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_average_weights_with_masked_array():\n mask = np.array([[True, False], [True, True], [False, True]])\n data = np.arange(6).reshape((3, 2))\n a = np.ma.array(data, mask=mask)\n d_a = da.ma.masked_array(data=data, mask=mask, chunks=2)\n\n weights = np.array([0.25, 0.75])\n d_weights = da.from_array(weights, chunks=2)\n\n np_avg = np.ma.average(a, weights=weights, axis=1)\n da_avg = da.ma.average(d_a, weights=d_weights, axis=1)\n\n assert_eq(np_avg, da_avg)\n\n\ndef test_arithmetic_results_in_masked():\n mask = np.array([[True, False], [True, True], [False, True]])\n x = np.arange(6).reshape((3, 2))\n masked = np.ma.array(x, mask=mask)\n dx = da.from_array(x, chunks=(2, 2))\n\n res = dx + masked\n sol = x + masked\n assert_eq(res, sol)\n assert isinstance(res.compute(), np.ma.masked_array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_pytest_test_slice_dtype.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_pytest_test_slice_dtype.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_numpy_compat.py", "file_name": "test_numpy_compat.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["imports", "test_slice_dtype", "test_basic", "index", "dtype"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nimport numpy as np\n\nimport dask.array as da\nfrom dask.array.numpy_compat import _make_sliced_dtype\nfrom dask.array.utils import assert_eq\n\n\n@pytest.fixture(\n params=[\n [(\"A\", (\"f4\", (3, 2))), (\"B\", (\"f4\", 3)), (\"C\", (\"f8\", 3))],\n [(\"A\", (\"i4\", (3, 2))), (\"B\", (\"f4\", 3)), (\"C\", (\"S4\", 3))],\n ]\n)\ndef dtype(request):\n return np.dtype(request.param)\n\n\n@pytest.fixture(params=[[\"A\"], [\"A\", \"B\"], [\"A\", \"B\", \"C\"]])\ndef index(request):\n return request.param\n\n\ndef test_basic():\n # sanity check\n dtype = [(\"a\", \"f8\"), (\"b\", \"f8\"), (\"c\", \"f8\")]\n x = np.ones((5, 3), dtype=dtype)\n dx = da.ones((5, 3), dtype=dtype, chunks=3)\n result = dx[[\"a\", \"b\"]]\n expected = x[[\"a\", \"b\"]]\n assert_eq(result, expected)\n\n\ndef test_slice_dtype(dtype, index):\n result = _make_sliced_dtype(dtype, index)\n expected = np.ones((5, len(dtype)), dtype=dtype)[index].dtype\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_test_min_max_round_funcs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_numpy_compat.py_test_min_max_round_funcs_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_numpy_compat.py", "file_name": "test_numpy_compat.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 48, "span_ids": ["test_min_max_round_funcs"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_min_max_round_funcs():\n # Regression test for gh-5031\n image = da.from_array(np.array([[0, 1], [1, 2]]), chunks=(1, 2))\n # These use __array_function__ (and min/max/round are aliased,\n # to amin/amax/round_ in numpy)\n assert int(np.min(image)) == 0\n assert int(np.max(image)) == 2\n assert np.round(image)[1, 1] == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_pytest_test_fuse_getitem.for_inp_expected_in_pair.assert_result_y_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_pytest_test_fuse_getitem.for_inp_expected_in_pair.assert_result_y_ex", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 100, "span_ids": ["test_fuse_getitem", "imports"], "tokens": 957}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\nimport dask\nimport dask.array as da\nfrom dask.optimization import fuse\nfrom dask.utils import SerializableLock\nfrom dask.array.core import getter, getter_nofancy\nfrom dask.array.optimization import getitem, optimize, optimize_slices, fuse_slice\nfrom dask.array.utils import assert_eq\n\n\ndef test_fuse_getitem():\n pairs = [\n (\n (getter, (getter, \"x\", slice(1000, 2000)), slice(15, 20)),\n (getter, \"x\", slice(1015, 1020)),\n ),\n (\n (\n getitem,\n (getter, \"x\", (slice(1000, 2000), slice(100, 200))),\n (slice(15, 20), slice(50, 60)),\n ),\n (getter, \"x\", (slice(1015, 1020), slice(150, 160))),\n ),\n (\n (\n getitem,\n (getter_nofancy, \"x\", (slice(1000, 2000), slice(100, 200))),\n (slice(15, 20), slice(50, 60)),\n ),\n (getter_nofancy, \"x\", (slice(1015, 1020), slice(150, 160))),\n ),\n ((getter, (getter, \"x\", slice(1000, 2000)), 10), (getter, \"x\", 1010)),\n (\n (getitem, (getter, \"x\", (slice(1000, 2000), 10)), (slice(15, 20),)),\n (getter, \"x\", (slice(1015, 1020), 10)),\n ),\n (\n (getitem, (getter_nofancy, \"x\", (slice(1000, 2000), 10)), (slice(15, 20),)),\n (getter_nofancy, \"x\", (slice(1015, 1020), 10)),\n ),\n (\n (getter, (getter, \"x\", (10, slice(1000, 2000))), (slice(15, 20),)),\n (getter, \"x\", (10, slice(1015, 1020))),\n ),\n (\n (\n getter,\n (getter, \"x\", (slice(1000, 2000), slice(100, 200))),\n (slice(None, None), slice(50, 60)),\n ),\n (getter, \"x\", (slice(1000, 2000), slice(150, 160))),\n ),\n (\n (getter, (getter, \"x\", (None, slice(None, None))), (slice(None, None), 5)),\n (getter, \"x\", (None, 5)),\n ),\n (\n (\n getter,\n (getter, \"x\", (slice(1000, 2000), slice(10, 20))),\n (slice(5, 10),),\n ),\n (getter, \"x\", (slice(1005, 1010), slice(10, 20))),\n ),\n (\n (\n getitem,\n (getitem, \"x\", (slice(1000, 2000),)),\n (slice(5, 10), slice(10, 20)),\n ),\n (getitem, \"x\", (slice(1005, 1010), slice(10, 20))),\n ),\n (\n (getter, (getter, \"x\", slice(1000, 2000), False, False), slice(15, 20)),\n (getter, \"x\", slice(1015, 1020)),\n ),\n (\n (getter, (getter, \"x\", slice(1000, 2000)), slice(15, 20), False, False),\n (getter, \"x\", slice(1015, 1020)),\n ),\n (\n (\n getter,\n (getter_nofancy, \"x\", slice(1000, 2000), False, False),\n slice(15, 20),\n False,\n False,\n ),\n (getter_nofancy, \"x\", slice(1015, 1020), False, False),\n ),\n ]\n\n for inp, expected in pairs:\n result = optimize_slices({\"y\": inp})\n assert result == {\"y\": expected}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getitem_lock_test_fuse_getitem_lock.for_inp_expected_in_pair.assert_result_y_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getitem_lock_test_fuse_getitem_lock.for_inp_expected_in_pair.assert_result_y_ex", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 154, "span_ids": ["test_fuse_getitem_lock"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fuse_getitem_lock():\n lock1 = SerializableLock()\n lock2 = SerializableLock()\n\n pairs = [\n (\n (getter, (getter, \"x\", slice(1000, 2000), True, lock1), slice(15, 20)),\n (getter, \"x\", slice(1015, 1020), True, lock1),\n ),\n (\n (\n getitem,\n (getter, \"x\", (slice(1000, 2000), slice(100, 200)), True, lock1),\n (slice(15, 20), slice(50, 60)),\n ),\n (getter, \"x\", (slice(1015, 1020), slice(150, 160)), True, lock1),\n ),\n (\n (\n getitem,\n (\n getter_nofancy,\n \"x\",\n (slice(1000, 2000), slice(100, 200)),\n True,\n lock1,\n ),\n (slice(15, 20), slice(50, 60)),\n ),\n (getter_nofancy, \"x\", (slice(1015, 1020), slice(150, 160)), True, lock1),\n ),\n (\n (\n getter,\n (getter, \"x\", slice(1000, 2000), True, lock1),\n slice(15, 20),\n True,\n lock2,\n ),\n (\n getter,\n (getter, \"x\", slice(1000, 2000), True, lock1),\n slice(15, 20),\n True,\n lock2,\n ),\n ),\n ]\n\n for inp, expected in pairs:\n result = optimize_slices({\"y\": inp})\n assert result == {\"y\": expected}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_with_getitem_fusion_test_optimize_with_getitem_fusion.assert_len_result_len_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_with_getitem_fusion_test_optimize_with_getitem_fusion.assert_len_result_len_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 157, "end_line": 167, "span_ids": ["test_optimize_with_getitem_fusion"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_optimize_with_getitem_fusion():\n dsk = {\n \"a\": \"some-array\",\n \"b\": (getter, \"a\", (slice(10, 20), slice(100, 200))),\n \"c\": (getter, \"b\", (5, slice(50, 60))),\n }\n\n result = optimize(dsk, [\"c\"])\n expected_task = (getter, \"some-array\", (15, slice(150, 160)))\n assert any(v == expected_task for v in result.values())\n assert len(result) < len(dsk)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_slicing_test_optimize_slicing.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_optimize_slicing_test_optimize_slicing.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 170, "end_line": 191, "span_ids": ["test_optimize_slicing"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_optimize_slicing():\n dsk = {\n \"a\": (range, 10),\n \"b\": (getter, \"a\", (slice(None, None, None),)),\n \"c\": (getter, \"b\", (slice(None, None, None),)),\n \"d\": (getter, \"c\", (slice(0, 5, None),)),\n \"e\": (getter, \"d\", (slice(None, None, None),)),\n }\n\n expected = {\"e\": (getter, (range, 10), (slice(0, 5, None),))}\n result = optimize_slices(fuse(dsk, [], rename_keys=False)[0])\n assert result == expected\n\n # protect output keys\n expected = {\n \"c\": (getter, (range, 10), (slice(0, None, None),)),\n \"d\": (getter, \"c\", (slice(0, 5, None),)),\n \"e\": (getter, \"d\", (slice(None, None, None),)),\n }\n result = optimize_slices(fuse(dsk, [\"c\", \"d\", \"e\"], rename_keys=False)[0])\n\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_test_fuse_slice.None_1.fuse_slice_None_np_array": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_test_fuse_slice.None_1.fuse_slice_None_np_array", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 218, "span_ids": ["test_fuse_slice"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fuse_slice():\n assert fuse_slice(slice(10, 15), slice(0, 5, 2)) == slice(10, 15, 2)\n\n assert fuse_slice((slice(100, 200),), (None, slice(10, 20))) == (\n None,\n slice(110, 120),\n )\n assert fuse_slice((slice(100, 200),), (slice(10, 20), None)) == (\n slice(110, 120),\n None,\n )\n assert fuse_slice((1,), (None,)) == (1, None)\n assert fuse_slice((1, slice(10, 20)), (None, None, 3, None)) == (\n 1,\n None,\n None,\n 13,\n None,\n )\n\n with pytest.raises(NotImplementedError):\n fuse_slice(slice(10, 15, 2), -1)\n # Regression test for #3076\n with pytest.raises(NotImplementedError):\n fuse_slice(None, np.array([0, 0]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_with_lists_test_fuse_slice_with_lists.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slice_with_lists_test_fuse_slice_with_lists.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 232, "span_ids": ["test_fuse_slice_with_lists"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fuse_slice_with_lists():\n assert fuse_slice(slice(10, 20, 2), [1, 2, 3]) == [12, 14, 16]\n assert fuse_slice([10, 20, 30, 40, 50], [3, 1, 2]) == [40, 20, 30]\n assert fuse_slice([10, 20, 30, 40, 50], 3) == 40\n assert fuse_slice([10, 20, 30, 40, 50], -1) == 50\n assert fuse_slice([10, 20, 30, 40, 50], slice(1, None, 2)) == [20, 40]\n assert fuse_slice(\n (slice(None), slice(0, 10), [1, 2, 3]), (slice(None), slice(1, 5), slice(None))\n ) == (slice(0, None), slice(1, 5), [1, 2, 3])\n assert fuse_slice(\n (slice(None), slice(None), [1, 2, 3]), (slice(None), slice(1, 5), 1)\n ) == (slice(0, None), slice(1, 5), 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_nonfusible_fancy_indexing_test_nonfusible_fancy_indexing.for_a_b_in_cases_.with_pytest_raises_NotImp.fuse_slice_a_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_nonfusible_fancy_indexing_test_nonfusible_fancy_indexing.for_a_b_in_cases_.with_pytest_raises_NotImp.fuse_slice_a_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 235, "end_line": 247, "span_ids": ["test_nonfusible_fancy_indexing"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nonfusible_fancy_indexing():\n nil = slice(None)\n cases = [ # x[:, list, :][int, :, :]\n ((nil, [1, 2, 3], nil), (0, nil, nil)),\n # x[int, :, :][:, list, :]\n ((0, nil, nil), (nil, [1, 2, 3], nil)),\n # x[:, list, :, :][:, :, :, int]\n ((nil, [1, 2], nil, nil), (nil, nil, nil, 0)),\n ]\n\n for a, b in cases:\n with pytest.raises(NotImplementedError):\n fuse_slice(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_hard_fuse_slice_cases_test_dont_fuse_numpy_arrays.for_chunks_in_5_10_.assert_sum_isinstance_v_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_hard_fuse_slice_cases_test_dont_fuse_numpy_arrays.for_chunks_in_5_10_.assert_sum_isinstance_v_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 250, "end_line": 263, "span_ids": ["test_hard_fuse_slice_cases", "test_dont_fuse_numpy_arrays"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_hard_fuse_slice_cases():\n dsk = {\n \"x\": (getter, (getter, \"x\", (None, slice(None, None))), (slice(None, None), 5))\n }\n assert optimize_slices(dsk) == {\"x\": (getter, \"x\", (None, 5))}\n\n\ndef test_dont_fuse_numpy_arrays():\n x = np.ones(10)\n for chunks in [(5,), (10,)]:\n y = da.from_array(x, chunks=(10,))\n\n dsk = y.__dask_optimize__(y.dask, y.__dask_keys__())\n assert sum(isinstance(v, np.ndarray) for v in dsk.values()) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_minimize_data_transfer_test_minimize_data_transfer.for_dep_in_deps_.assert_dsk_dep_1_big": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_minimize_data_transfer_test_minimize_data_transfer.for_dep_in_deps_.assert_dsk_dep_1_big", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 266, "end_line": 282, "span_ids": ["test_minimize_data_transfer"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_minimize_data_transfer():\n zarr = pytest.importorskip(\"zarr\")\n x = zarr.ones((100,))\n y = da.from_array(x, chunks=25)\n z = y + 1\n dsk = z.__dask_optimize__(z.dask, z.__dask_keys__())\n\n keys = list(dsk)\n results = dask.get(dsk, keys)\n big_key = [k for k, r in zip(keys, results) if r is x][0]\n dependencies, dependents = dask.core.get_deps(dsk)\n deps = dependents[big_key]\n\n assert len(deps) == 4\n for dep in deps:\n assert dsk[dep][0] in (getitem, getter)\n assert dsk[dep][1] == big_key", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slices_with_alias_test_fuse_slices_with_alias.assert_dsk2_fused_key_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_slices_with_alias_test_fuse_slices_with_alias.assert_dsk2_fused_key_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 296, "span_ids": ["test_fuse_slices_with_alias"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fuse_slices_with_alias():\n dsk = {\n \"x\": np.arange(16).reshape((4, 4)),\n (\"dx\", 0, 0): (getter, \"x\", (slice(0, 4), slice(0, 4))),\n (\"alias\", 0, 0): (\"dx\", 0, 0),\n (\"dx2\", 0): (getitem, (\"alias\", 0, 0), (slice(None), 0)),\n }\n keys = [(\"dx2\", 0)]\n dsk2 = optimize(dsk, keys)\n assert len(dsk2) == 3\n fused_key = set(dsk2).difference([\"x\", (\"dx2\", 0)]).pop()\n assert dsk2[fused_key] == (getter, \"x\", (slice(0, 4), 0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_dont_fuse_fancy_indexing_in_getter_nofancy_test_dont_fuse_fancy_indexing_in_getter_nofancy.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_dont_fuse_fancy_indexing_in_getter_nofancy_test_dont_fuse_fancy_indexing_in_getter_nofancy.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 299, "end_line": 310, "span_ids": ["test_dont_fuse_fancy_indexing_in_getter_nofancy"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dont_fuse_fancy_indexing_in_getter_nofancy():\n dsk = {\n \"a\": (\n getitem,\n (getter_nofancy, \"x\", (slice(10, 20, None), slice(100, 200, None))),\n ([1, 3], slice(50, 60, None)),\n )\n }\n assert optimize_slices(dsk) == dsk\n\n dsk = {\"a\": (getitem, (getter_nofancy, \"x\", [1, 2, 3]), 0)}\n assert optimize_slices(dsk) == dsk", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getter_with_asarray_test_fuse_getter_with_asarray.assert_eq_z_x_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_fuse_getter_with_asarray_test_fuse_getter_with_asarray.assert_eq_z_x_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 313, "end_line": 331, "span_ids": ["test_fuse_getter_with_asarray"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [10, 5, 3])\ndef test_fuse_getter_with_asarray(chunks):\n x = np.ones(10) * 1234567890\n y = da.ones(10, chunks=chunks)\n z = x + y\n dsk = z.__dask_optimize__(z.dask, z.__dask_keys__())\n assert any(v is x for v in dsk.values())\n for v in dsk.values():\n s = str(v)\n assert s.count(\"getitem\") + s.count(\"getter\") <= 1\n if v is not x:\n assert \"1234567890\" not in s\n n_getters = len([v for v in dsk.values() if v[0] in (getitem, getter)])\n if y.npartitions > 1:\n assert n_getters == y.npartitions\n else:\n assert n_getters == 0\n\n assert_eq(z, x + 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy.for_orig_final_in_opts_.assert_optimize_slices_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy_test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy.for_orig_final_in_opts_.assert_optimize_slices_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 334, "end_line": 357, "span_ids": ["test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"get,remove\", [(getter, False), (getter_nofancy, False), (getitem, True)]\n)\ndef test_remove_no_op_slices_if_get_is_not_getter_or_getter_nofancy(get, remove):\n # Test that no-op slices are removed as long as get is not getter or\n # getter_nofancy. This ensures that `get` calls are always made in all\n # tasks created by `from_array`, even after optimization\n null = slice(0, None)\n opts = [\n (\n (get, \"x\", null, False, False),\n \"x\" if remove else (get, \"x\", null, False, False),\n ),\n (\n (getitem, (get, \"x\", null, False, False), null),\n \"x\" if remove else (get, \"x\", null, False, False),\n ),\n (\n (getitem, (get, \"x\", (null, null), False, False), ()),\n \"x\" if remove else (get, \"x\", (null, null), False, False),\n ),\n ]\n for orig, final in opts:\n assert optimize_slices({\"a\": orig}) == {\"a\": final}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_turn_off_fusion_test_turn_off_fusion.assert_len_a_len_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_turn_off_fusion_test_turn_off_fusion.assert_len_a_len_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 360, "end_line": 371, "span_ids": ["test_turn_off_fusion"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"blockwise fusion does not respect this, which is ok\")\ndef test_turn_off_fusion():\n x = da.ones(10, chunks=(5,))\n y = da.sum(x + 1 + 2 + 3)\n\n a = y.__dask_optimize__(y.dask, y.__dask_keys__())\n\n with dask.config.set({\"optimization.fuse.ave-width\": 0}):\n b = y.__dask_optimize__(y.dask, y.__dask_keys__())\n\n assert dask.get(a, y.__dask_keys__()) == dask.get(b, y.__dask_keys__())\n assert len(a) < len(b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_gh3937_test_gh3937.y_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_gh3937_test_gh3937.y_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 374, "end_line": 383, "span_ids": ["test_gh3937"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gh3937():\n # test for github issue #3937\n x = da.from_array([1, 2, 3.0], (2,))\n x = da.concatenate((x, [x[-1]]))\n y = x.rechunk((2,))\n # This will produce Integral type indices that are not ints (np.int64), failing\n # the optimizer\n y = da.coarsen(np.sum, y, {0: 2})\n # How to trigger the optimizer explicitly?\n y.compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_double_dependencies_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_optimization.py_test_double_dependencies_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_optimization.py", "file_name": "test_optimization.py", "file_type": "text/x-python", "category": "test", "start_line": 386, "end_line": 403, "span_ids": ["test_double_dependencies", "test_fuse_roots"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_double_dependencies():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(4, 4))\n X = d + 1\n X = da.dot(X, X.T)\n\n assert_eq(X.compute(optimize_graph=False), X)\n\n\ndef test_fuse_roots():\n x = da.ones(10, chunks=(2,))\n y = da.zeros(10, chunks=(2,))\n z = (x + 1) + (2 * y ** 2)\n (zz,) = dask.optimize(z)\n # assert len(zz.dask) == 5\n assert sum(map(dask.istask, zz.dask.values())) == 5 # there are some aliases\n assert_eq(zz, z)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_pytest_test_fractional_slice.assert_isinstance_fs_1_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_pytest_test_fractional_slice.assert_isinstance_fs_1_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["imports", "test_fractional_slice"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\nfrom numpy.testing import assert_array_almost_equal, assert_array_equal\n\nimport dask.array as da\nfrom dask.array.overlap import (\n fractional_slice,\n getitem,\n trim_internal,\n overlap_internal,\n nearest,\n constant,\n boundaries,\n reflect,\n periodic,\n overlap,\n)\nfrom dask.array.utils import assert_eq, same_keys\n\n\ndef test_fractional_slice():\n assert fractional_slice((\"x\", 4.9), {0: 2}) == (getitem, (\"x\", 5), (slice(0, 2),))\n\n assert fractional_slice((\"x\", 3, 5.1), {0: 2, 1: 3}) == (\n getitem,\n (\"x\", 3, 5),\n (slice(None, None, None), slice(-3, None)),\n )\n\n assert fractional_slice((\"x\", 2.9, 5.1), {0: 2, 1: 3}) == (\n getitem,\n (\"x\", 3, 5),\n (slice(0, 2), slice(-3, None)),\n )\n\n fs = fractional_slice((\"x\", 4.9), {0: 2})\n assert isinstance(fs[1][1], int)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_test_overlap_internal.assert_same_keys_overlap_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_test_overlap_internal.assert_same_keys_overlap_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 69, "span_ids": ["test_overlap_internal"], "tokens": 496}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_internal():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n g = overlap_internal(d, {0: 2, 1: 1})\n result = g.compute(scheduler=\"sync\")\n assert g.chunks == ((6, 6), (5, 5))\n\n expected = np.array(\n [\n [0, 1, 2, 3, 4, 3, 4, 5, 6, 7],\n [8, 9, 10, 11, 12, 11, 12, 13, 14, 15],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [48, 49, 50, 51, 52, 51, 52, 53, 54, 55],\n [56, 57, 58, 59, 60, 59, 60, 61, 62, 63],\n ]\n )\n\n assert_eq(result, expected)\n assert same_keys(overlap_internal(d, {0: 2, 1: 1}), g)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_test_overlap_internal_asymmetric.assert_same_keys_overlap_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_test_overlap_internal_asymmetric.assert_same_keys_overlap_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 94, "span_ids": ["test_overlap_internal_asymmetric"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_internal_asymmetric():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n result = overlap_internal(d, {0: (2, 0), 1: (1, 0)})\n assert result.chunks == ((4, 6), (4, 5))\n\n expected = np.array(\n [\n [0, 1, 2, 3, 3, 4, 5, 6, 7],\n [8, 9, 10, 11, 11, 12, 13, 14, 15],\n [16, 17, 18, 19, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 27, 28, 29, 30, 31],\n [16, 17, 18, 19, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 43, 44, 45, 46, 47],\n [48, 49, 50, 51, 51, 52, 53, 54, 55],\n [56, 57, 58, 59, 59, 60, 61, 62, 63],\n ]\n )\n assert_eq(result, expected)\n assert same_keys(overlap_internal(d, {0: (2, 0), 1: (1, 0)}), result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_small_test_overlap_internal_asymmetric_small.assert_same_keys_overlap_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_internal_asymmetric_small_test_overlap_internal_asymmetric_small.assert_same_keys_overlap_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 135, "span_ids": ["test_overlap_internal_asymmetric_small"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_internal_asymmetric_small():\n x = np.arange(32).reshape((2, 16))\n d = da.from_array(x, chunks=(2, 4))\n\n result = overlap_internal(d, {0: (0, 0), 1: (1, 1)})\n assert result.chunks == ((2,), (5, 6, 6, 5))\n\n expected = np.array(\n [\n [0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 8, 7, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15],\n [\n 16,\n 17,\n 18,\n 19,\n 20,\n 19,\n 20,\n 21,\n 22,\n 23,\n 24,\n 23,\n 24,\n 25,\n 26,\n 27,\n 28,\n 27,\n 28,\n 29,\n 30,\n 31,\n ],\n ]\n )\n\n assert_eq(result, expected)\n assert same_keys(overlap_internal(d, {0: (0, 0), 1: (1, 1)}), result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_internal_test_periodic.assert_eq_e_0_d_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 154, "span_ids": ["test_periodic", "test_trim_internal"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_trim_internal():\n d = da.ones((40, 60), chunks=(10, 10))\n e = trim_internal(d, axes={0: 1, 1: 2})\n\n assert e.chunks == ((8, 8, 8, 8), (6, 6, 6, 6, 6, 6))\n\n\ndef test_periodic():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n e = periodic(d, axis=0, depth=2)\n assert e.shape[0] == d.shape[0] + 4\n assert e.shape[1] == d.shape[1]\n\n assert_eq(e[1, :], d[-1, :])\n assert_eq(e[0, :], d[-2, :])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_reflect_test_reflect.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_reflect_test_reflect.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 157, "end_line": 167, "span_ids": ["test_reflect"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reflect():\n x = np.arange(10)\n d = da.from_array(x, chunks=(5, 5))\n\n e = reflect(d, axis=0, depth=2)\n expected = np.array([1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8])\n assert_eq(e, expected)\n\n e = reflect(d, axis=0, depth=1)\n expected = np.array([0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9])\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_test_nearest.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_test_nearest.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 170, "end_line": 180, "span_ids": ["test_nearest"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nearest():\n x = np.arange(10)\n d = da.from_array(x, chunks=(5, 5))\n\n e = nearest(d, axis=0, depth=2)\n expected = np.array([0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9])\n assert_eq(e, expected)\n\n e = nearest(d, axis=0, depth=1)\n expected = np.array([0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9])\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_constant_test_constant.assert_eq_e_1_np_on": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_constant_test_constant.assert_eq_e_1_np_on", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 192, "span_ids": ["test_constant"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_constant():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n e = constant(d, axis=0, depth=2, value=10)\n assert e.shape[0] == d.shape[0] + 4\n assert e.shape[1] == d.shape[1]\n\n assert_eq(e[1, :], np.ones(8, dtype=x.dtype) * 10)\n assert_eq(e[-1, :], np.ones(8, dtype=x.dtype) * 10)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_boundaries_test_boundaries.assert_eq_e_expected_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_boundaries_test_boundaries.assert_eq_e_expected_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 195, "end_line": 217, "span_ids": ["test_boundaries"], "tokens": 458}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_boundaries():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n e = boundaries(d, {0: 2, 1: 1}, {0: 0, 1: \"periodic\"})\n\n expected = np.array(\n [\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [7, 0, 1, 2, 3, 4, 5, 6, 7, 0],\n [15, 8, 9, 10, 11, 12, 13, 14, 15, 8],\n [23, 16, 17, 18, 19, 20, 21, 22, 23, 16],\n [31, 24, 25, 26, 27, 28, 29, 30, 31, 24],\n [39, 32, 33, 34, 35, 36, 37, 38, 39, 32],\n [47, 40, 41, 42, 43, 44, 45, 46, 47, 40],\n [55, 48, 49, 50, 51, 52, 53, 54, 55, 48],\n [63, 56, 57, 58, 59, 60, 61, 62, 63, 56],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n ]\n )\n assert_eq(e, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_test_overlap.assert_same_keys_g_overl": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_test_overlap.assert_same_keys_g_overl", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 220, "end_line": 246, "span_ids": ["test_overlap"], "tokens": 736}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap():\n x = np.arange(64).reshape((8, 8))\n d = da.from_array(x, chunks=(4, 4))\n g = overlap(d, depth={0: 2, 1: 1}, boundary={0: 100, 1: \"reflect\"})\n assert g.chunks == ((8, 8), (6, 6))\n expected = np.array(\n [\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [0, 0, 1, 2, 3, 4, 3, 4, 5, 6, 7, 7],\n [8, 8, 9, 10, 11, 12, 11, 12, 13, 14, 15, 15],\n [16, 16, 17, 18, 19, 20, 19, 20, 21, 22, 23, 23],\n [24, 24, 25, 26, 27, 28, 27, 28, 29, 30, 31, 31],\n [32, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 39],\n [40, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 47],\n [16, 16, 17, 18, 19, 20, 19, 20, 21, 22, 23, 23],\n [24, 24, 25, 26, 27, 28, 27, 28, 29, 30, 31, 31],\n [32, 32, 33, 34, 35, 36, 35, 36, 37, 38, 39, 39],\n [40, 40, 41, 42, 43, 44, 43, 44, 45, 46, 47, 47],\n [48, 48, 49, 50, 51, 52, 51, 52, 53, 54, 55, 55],\n [56, 56, 57, 58, 59, 60, 59, 60, 61, 62, 63, 63],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n ]\n )\n assert_eq(g, expected)\n assert same_keys(g, overlap(d, depth={0: 2, 1: 1}, boundary={0: 100, 1: \"reflect\"}))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap.g_4_test_overlap.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap.g_4_test_overlap.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 248, "end_line": 270, "span_ids": ["test_overlap"], "tokens": 575}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap():\n # ... other code\n\n g = overlap(d, depth={0: 2, 1: 1}, boundary={0: 100, 1: \"none\"})\n expected = np.array(\n [\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [0, 1, 2, 3, 4, 3, 4, 5, 6, 7],\n [8, 9, 10, 11, 12, 11, 12, 13, 14, 15],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [16, 17, 18, 19, 20, 19, 20, 21, 22, 23],\n [24, 25, 26, 27, 28, 27, 28, 29, 30, 31],\n [32, 33, 34, 35, 36, 35, 36, 37, 38, 39],\n [40, 41, 42, 43, 44, 43, 44, 45, 46, 47],\n [48, 49, 50, 51, 52, 51, 52, 53, 54, 55],\n [56, 57, 58, 59, 60, 59, 60, 61, 62, 63],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],\n ]\n )\n assert_eq(g, expected)\n assert g.chunks == ((8, 8), (5, 5))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_asymmetric_overlap_boundary_exception_test_map_overlap.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_asymmetric_overlap_boundary_exception_test_map_overlap.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 273, "end_line": 317, "span_ids": ["test_map_overlap", "test_asymmetric_overlap_boundary_exception"], "tokens": 498}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_asymmetric_overlap_boundary_exception():\n x = da.arange(10, chunks=5)\n with pytest.raises(NotImplementedError):\n x.map_overlap(\n lambda x: x + len(x), depth={0: (0, 2)}, boundary=\"reflect\", dtype=x.dtype\n )\n\n\ndef test_map_overlap():\n x = da.arange(10, chunks=5)\n y = x.map_overlap(lambda x: x + len(x), depth=2, dtype=x.dtype)\n assert_eq(y, np.arange(10) + 5 + 2 + 2)\n\n x = da.arange(10, chunks=5)\n y = x.map_overlap(lambda x: x + len(x), depth=np.int64(2), dtype=x.dtype)\n assert all([(type(s) is int) for s in y.shape])\n assert_eq(y, np.arange(10) + 5 + 2 + 2)\n\n x = np.arange(16).reshape((4, 4))\n d = da.from_array(x, chunks=(2, 2))\n exp1 = d.map_overlap(lambda x: x + x.size, depth=1, dtype=d.dtype)\n exp2 = d.map_overlap(\n lambda x: x + x.size,\n depth={0: 1, 1: 1},\n boundary={0: \"reflect\", 1: \"none\"},\n dtype=d.dtype,\n )\n exp3 = d.map_overlap(\n lambda x: x + x.size, depth={1: 1}, boundary={1: \"reflect\"}, dtype=d.dtype\n )\n exp4 = d.map_overlap(\n lambda x: x + x.size,\n depth={1: (1, 0)},\n boundary={0: \"none\", 1: \"none\"},\n dtype=d.dtype,\n )\n assert_eq(exp1, x + 16)\n assert_eq(exp2, x + 12)\n assert_eq(exp3, x + 8)\n assert_eq(\n exp4,\n np.block(\n [[x[0:2, 0:2] + 4, x[0:2, 2:4] + 6], [x[2:4, 0:2] + 4, x[2:4, 2:4] + 6]]\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_no_depth_test_map_overlap_multiarray._are_not_somehow_shifted": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_no_depth_test_map_overlap_multiarray._are_not_somehow_shifted", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 320, "end_line": 360, "span_ids": ["test_map_overlap_no_depth", "test_map_overlap_multiarray"], "tokens": 520}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"boundary\", [None, \"reflect\", \"periodic\", \"nearest\", \"none\", 0]\n)\ndef test_map_overlap_no_depth(boundary):\n x = da.arange(10, chunks=5)\n y = x.map_overlap(lambda i: i, depth=0, boundary=boundary, dtype=x.dtype)\n assert_eq(y, x)\n\n\ndef test_map_overlap_multiarray():\n # Same ndim, same numblocks, same chunks\n x = da.arange(10, chunks=5)\n y = da.arange(10, chunks=5)\n z = da.map_overlap(lambda x, y: x + y, x, y, depth=1)\n assert_eq(z, 2 * np.arange(10))\n\n # Same ndim, same numblocks, different chunks\n x = da.arange(10, chunks=(2, 3, 5))\n y = da.arange(10, chunks=(5, 3, 2))\n z = da.map_overlap(lambda x, y: x + y, x, y, depth=1)\n assert z.chunks == ((2, 3, 3, 2),)\n assert_eq(z, 2 * np.arange(10))\n\n # Same ndim, different numblocks, different chunks\n x = da.arange(10, chunks=(10,))\n y = da.arange(10, chunks=(4, 4, 2))\n z = da.map_overlap(lambda x, y: x + y, x, y, depth=1)\n assert z.chunks == ((4, 4, 2),)\n assert_eq(z, 2 * np.arange(10))\n\n # Different ndim, different numblocks, different chunks\n x = da.arange(10, chunks=(10,))\n y = da.arange(10).reshape(1, 10).rechunk((1, (4, 4, 2)))\n z = da.map_overlap(lambda x, y: x + y, x, y, depth=1)\n assert z.chunks == ((1,), (4, 4, 2))\n assert z.shape == (1, 10)\n assert_eq(z, 2 * np.arange(10)[np.newaxis])\n\n # Note: checks on arange equality in all of the above help ensure that\n # trimming is applied appropriately to result chunks (i.e. results\n # are not somehow shifted)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_defaults_test_map_overlap_multiarray_defaults.assert_eq_z_sum_20_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_defaults_test_map_overlap_multiarray_defaults.assert_eq_z_sum_20_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 363, "end_line": 372, "span_ids": ["test_map_overlap_multiarray_defaults"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_overlap_multiarray_defaults():\n # Check that by default, chunk alignment and arrays of varying dimensionality\n # are supported by with no effect on result shape\n # (i.e. defaults are pass-through to map_blocks)\n x = da.ones((10,), chunks=10)\n y = da.ones((1, 10), chunks=5)\n z = da.map_overlap(lambda x, y: x + y, x, y)\n # func should be called twice and get (5,) and (1, 5) arrays of ones each time\n assert_eq(z.shape, (1, 10))\n assert_eq(z.sum(), 20)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_different_depths_test_map_overlap_multiarray_uneven_numblocks_exception.with_pytest_raises_ValueE.da_map_overlap_lambda_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_different_depths_test_map_overlap_multiarray_uneven_numblocks_exception.with_pytest_raises_ValueE.da_map_overlap_lambda_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 375, "end_line": 404, "span_ids": ["test_map_overlap_multiarray_uneven_numblocks_exception", "test_map_overlap_multiarray_different_depths"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_overlap_multiarray_different_depths():\n x = da.ones(5, dtype=\"int\")\n y = da.ones(5, dtype=\"int\")\n\n def run(depth):\n return da.map_overlap(\n lambda x, y: x.sum() + y.sum(), x, y, depth=depth, chunks=(0,), trim=False\n ).compute()\n\n # Check that the number of elements added\n # to arrays in overlap works as expected\n # when depths differ for each array\n assert_eq(run([0, 0]), 10)\n assert_eq(run([0, 1]), 12)\n assert_eq(run([1, 1]), 14)\n assert_eq(run([1, 2]), 16)\n assert_eq(run([0, 5]), 20)\n assert_eq(run([5, 5]), 30)\n\n # Ensure that depth > chunk size results in error\n with pytest.raises(ValueError):\n run([0, 6])\n\n\ndef test_map_overlap_multiarray_uneven_numblocks_exception():\n x = da.arange(10, chunks=(10,))\n y = da.arange(10, chunks=(5, 5))\n with pytest.raises(ValueError):\n # Fail with chunk alignment explicitly disabled\n da.map_overlap(lambda x, y: x + y, x, y, align_arrays=False).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_block_broadcast_test_map_overlap_multiarray_block_broadcast.assert_eq_z_sum_4_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_block_broadcast_test_map_overlap_multiarray_block_broadcast.assert_eq_z_sum_4_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 407, "end_line": 421, "span_ids": ["test_map_overlap_multiarray_block_broadcast"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_overlap_multiarray_block_broadcast():\n def func(x, y):\n # Return result with expected padding\n z = x.size + y.size\n return np.ones((3, 3)) * z\n\n # Chunks in trailing dimension will be unified to two chunks of size 6\n # and block broadcast will allow chunks from x to repeat\n x = da.ones((12,), chunks=12) # numblocks = (1,) -> (2, 2) after broadcast\n y = da.ones((16, 12), chunks=(8, 6)) # numblocks = (2, 2)\n z = da.map_overlap(func, x, y, chunks=(3, 3), depth=1, trim=True)\n assert_eq(z, z)\n assert z.shape == (2, 2)\n # func call will receive (8,) and (10, 8) arrays for each of 4 blocks\n assert_eq(z.sum(), 4 * (10 * 8 + 8))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_variadic_test_map_overlap_multiarray_variadic.assert_all_x_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_multiarray_variadic_test_map_overlap_multiarray_variadic.assert_all_x_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 424, "end_line": 441, "span_ids": ["test_map_overlap_multiarray_variadic"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_overlap_multiarray_variadic():\n # Test overlapping row slices from 3D arrays\n xs = [\n # Dim 0 will unify to chunks of size 4 for all:\n da.ones((12, 1, 1), chunks=((12,), 1, 1)),\n da.ones((12, 8, 1), chunks=((8, 4), 8, 1)),\n da.ones((12, 8, 4), chunks=((4, 8), 8, 4)),\n ]\n\n def func(*args):\n return np.array([sum([x.size for x in args])])\n\n x = da.map_overlap(func, *xs, chunks=(1,), depth=1, trim=False, drop_axis=[1, 2])\n\n # Each func call should get 4 rows from each array padded by 1 in each dimension\n size_per_slice = sum([np.pad(x[:4], 1, mode=\"constant\").size for x in xs])\n assert x.shape == (3,)\n assert all(x.compute() == size_per_slice)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_deprecated_signature_test_map_overlap_deprecated_signature.None_2.assert_y_shape_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_map_overlap_deprecated_signature_test_map_overlap_deprecated_signature.None_2.assert_y_shape_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 444, "end_line": 464, "span_ids": ["test_map_overlap_deprecated_signature"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_map_overlap_deprecated_signature():\n def func(x):\n return np.array(x.sum())\n\n x = da.ones(3)\n\n # Old positional signature: func, depth, boundary, trim\n with pytest.warns(FutureWarning):\n y = da.map_overlap(x, func, 0, \"reflect\", True)\n assert y.compute() == 3\n assert y.shape == (3,)\n\n with pytest.warns(FutureWarning):\n y = da.map_overlap(x, func, 1, \"reflect\", True)\n assert y.compute() == 5\n assert y.shape == (3,)\n\n with pytest.warns(FutureWarning):\n y = da.map_overlap(x, func, 1, \"reflect\", False)\n assert y.compute() == 5\n assert y.shape == (5,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_overlap_test_nearest_overlap.assert_array_almost_equal": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_nearest_overlap_test_nearest_overlap.assert_array_almost_equal", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 467, "end_line": 473, "span_ids": ["test_nearest_overlap"], "tokens": 105}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nearest_overlap():\n a = np.arange(144).reshape(12, 12).astype(float)\n\n darr = da.from_array(a, chunks=(6, 6))\n garr = overlap(darr, depth={0: 5, 1: 5}, boundary={0: \"nearest\", 1: \"nearest\"})\n tarr = trim_internal(garr, {0: 5, 1: 5})\n assert_array_almost_equal(tarr, a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_0_depth_test_0_depth.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_0_depth_test_0_depth.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 476, "end_line": 497, "span_ids": ["test_0_depth"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_0_depth():\n expected = np.arange(100).reshape(10, 10)\n darr = da.from_array(expected, chunks=(5, 2))\n\n depth = {0: 0, 1: 0}\n\n reflected = overlap(darr, depth=depth, boundary=\"reflect\")\n nearest = overlap(darr, depth=depth, boundary=\"nearest\")\n periodic = overlap(darr, depth=depth, boundary=\"periodic\")\n constant = overlap(darr, depth=depth, boundary=42)\n\n result = trim_internal(reflected, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(nearest, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(periodic, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(constant, depth)\n assert_array_equal(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_some_0_depth_test_some_0_depth.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_some_0_depth_test_some_0_depth.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 500, "end_line": 521, "span_ids": ["test_some_0_depth"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_some_0_depth():\n expected = np.arange(100).reshape(10, 10)\n darr = da.from_array(expected, chunks=(5, 5))\n\n depth = {0: 4, 1: 0}\n\n reflected = overlap(darr, depth=depth, boundary=\"reflect\")\n nearest = overlap(darr, depth=depth, boundary=\"nearest\")\n periodic = overlap(darr, depth=depth, boundary=\"periodic\")\n constant = overlap(darr, depth=depth, boundary=42)\n\n result = trim_internal(reflected, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(nearest, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(periodic, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(constant, depth)\n assert_array_equal(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_one_chunk_along_axis_test_constant_boundaries.assert_b_chunks_darr_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_one_chunk_along_axis_test_constant_boundaries.assert_b_chunks_darr_c", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 524, "end_line": 535, "span_ids": ["test_constant_boundaries", "test_one_chunk_along_axis"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_one_chunk_along_axis():\n a = np.arange(2 * 9).reshape(2, 9)\n darr = da.from_array(a, chunks=((2,), (2, 2, 2, 3)))\n g = overlap(darr, depth=0, boundary=0)\n assert a.shape == g.shape\n\n\ndef test_constant_boundaries():\n a = np.arange(1 * 9).reshape(1, 9)\n darr = da.from_array(a, chunks=((1,), (2, 2, 2, 3)))\n b = boundaries(darr, {0: 0, 1: 0}, {0: 0, 1: 0})\n assert b.chunks == darr.chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_equals_boundary_length_test_depth_equals_boundary_length.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_equals_boundary_length_test_depth_equals_boundary_length.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 538, "end_line": 559, "span_ids": ["test_depth_equals_boundary_length"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_depth_equals_boundary_length():\n expected = np.arange(100).reshape(10, 10)\n darr = da.from_array(expected, chunks=(5, 5))\n\n depth = {0: 5, 1: 5}\n\n reflected = overlap(darr, depth=depth, boundary=\"reflect\")\n nearest = overlap(darr, depth=depth, boundary=\"nearest\")\n periodic = overlap(darr, depth=depth, boundary=\"periodic\")\n constant = overlap(darr, depth=depth, boundary=42)\n\n result = trim_internal(reflected, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(nearest, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(periodic, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(constant, depth)\n assert_array_equal(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_greater_than_boundary_length_test_depth_greater_than_boundary_length.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_depth_greater_than_boundary_length_test_depth_greater_than_boundary_length.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 562, "end_line": 584, "span_ids": ["test_depth_greater_than_boundary_length"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail\ndef test_depth_greater_than_boundary_length():\n expected = np.arange(100).reshape(10, 10)\n darr = da.from_array(expected, chunks=(5, 5))\n\n depth = {0: 8, 1: 7}\n\n reflected = overlap(darr, depth=depth, boundary=\"reflect\")\n nearest = overlap(darr, depth=depth, boundary=\"nearest\")\n periodic = overlap(darr, depth=depth, boundary=\"periodic\")\n constant = overlap(darr, depth=depth, boundary=42)\n\n result = trim_internal(reflected, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(nearest, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(periodic, depth)\n assert_array_equal(result, expected)\n\n result = trim_internal(constant, depth)\n assert_array_equal(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_bad_depth_raises_test_none_boundaries.assert_eq_exp_res_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_bad_depth_raises_test_none_boundaries.assert_eq_exp_res_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 587, "end_line": 607, "span_ids": ["test_none_boundaries", "test_bad_depth_raises"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bad_depth_raises():\n expected = np.arange(144).reshape(12, 12)\n darr = da.from_array(expected, chunks=(5, 5))\n\n depth = {0: 4, 1: 2}\n\n pytest.raises(ValueError, overlap, darr, depth=depth, boundary=1)\n\n\ndef test_none_boundaries():\n x = da.from_array(np.arange(16).reshape(4, 4), chunks=(2, 2))\n exp = boundaries(x, 2, {0: \"none\", 1: 33})\n res = np.array(\n [\n [33, 33, 0, 1, 2, 3, 33, 33],\n [33, 33, 4, 5, 6, 7, 33, 33],\n [33, 33, 8, 9, 10, 11, 33, 33],\n [33, 33, 12, 13, 14, 15, 33, 33],\n ]\n )\n assert_eq(exp, res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_small_test_no_shared_keys_with_different_depths.da_compute_r_scheduler_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_small_test_no_shared_keys_with_different_depths.da_compute_r_scheduler_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 610, "end_line": 639, "span_ids": ["test_no_shared_keys_with_different_depths", "test_overlap_small"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_small():\n x = da.ones((10, 10), chunks=(5, 5))\n\n y = x.map_overlap(lambda x: x, depth=1)\n assert len(y.dask) < 200\n\n y = x.map_overlap(lambda x: x, depth=1, boundary=\"none\")\n assert len(y.dask) < 100\n\n\ndef test_no_shared_keys_with_different_depths():\n da.random.seed(0)\n a = da.random.random((9, 9), chunks=(3, 3))\n\n def check(x):\n assert x.shape == (3, 3)\n return x\n\n r = [\n a.map_overlap(\n lambda a: a + 1,\n dtype=a.dtype,\n depth={j: int(i == j) for j in range(a.ndim)},\n boundary=\"none\",\n ).map_blocks(check, dtype=a.dtype)\n for i in range(a.ndim)\n ]\n\n assert set(r[0].dask) & set(r[1].dask) == set(a.dask)\n da.compute(*r, scheduler=\"single-threaded\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_small_test_overlap_few_dimensions_small.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_small_test_overlap_few_dimensions_small.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 642, "end_line": 658, "span_ids": ["test_overlap_few_dimensions_small"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_few_dimensions_small():\n x = da.ones((20, 20), chunks=(10, 10))\n\n a = x.map_overlap(lambda x: x, depth={0: 1})\n assert_eq(x, a)\n assert any(isinstance(k[1], float) for k in a.dask)\n assert all(isinstance(k[2], int) for k in a.dask)\n\n b = x.map_overlap(lambda x: x, depth={1: 1})\n assert_eq(x, b)\n assert all(isinstance(k[1], int) for k in b.dask)\n assert any(isinstance(k[2], float) for k in b.dask)\n\n c = x.map_overlap(lambda x: x, depth={0: 1, 1: 1})\n assert_eq(x, c)\n assert any(isinstance(k[1], float) for k in c.dask)\n assert any(isinstance(k[2], float) for k in c.dask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_test_overlap_few_dimensions.assert_len_c_dask_10_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_overlap_few_dimensions_test_overlap_few_dimensions.assert_len_c_dask_10_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 661, "end_line": 671, "span_ids": ["test_overlap_few_dimensions"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_overlap_few_dimensions():\n x = da.ones((100, 100), chunks=(10, 10))\n\n a = x.map_overlap(lambda x: x, depth={0: 1})\n b = x.map_overlap(lambda x: x, depth={1: 1})\n c = x.map_overlap(lambda x: x, depth={0: 1, 1: 1})\n\n assert len(a.dask) == len(b.dask)\n assert len(a.dask) < len(c.dask)\n\n assert len(c.dask) < 10 * len(a.dask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_boundry_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_overlap.py_test_trim_boundry_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_overlap.py", "file_name": "test_overlap.py", "file_type": "text/x-python", "category": "test", "start_line": 674, "end_line": 690, "span_ids": ["test_trim_boundry"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"boundary\", [\"reflect\", \"periodic\", \"nearest\", \"none\"])\ndef test_trim_boundry(boundary):\n x = da.from_array(np.arange(24).reshape(4, 6), chunks=(2, 3))\n x_overlaped = da.overlap.overlap(x, 2, boundary={0: \"reflect\", 1: boundary})\n x_trimmed = da.overlap.trim_overlap(\n x_overlaped, 2, boundary={0: \"reflect\", 1: boundary}\n )\n assert np.all(x == x_trimmed)\n\n x_overlaped = da.overlap.overlap(x, 2, boundary={1: boundary})\n x_trimmed = da.overlap.trim_overlap(x_overlaped, 2, boundary={1: boundary})\n assert np.all(x == x_trimmed)\n\n x_overlaped = da.overlap.overlap(x, 2, boundary=boundary)\n x_trimmed = da.overlap.trim_overlap(x_overlaped, 2, boundary=boundary)\n assert np.all(x == x_trimmed)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_pytest_test_percentile.if_method_tdigest_.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_pytest_test_percentile.if_method_tdigest_.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_percentiles.py", "file_name": "test_percentiles.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 52, "span_ids": ["test_percentile", "imports"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\n\nimport dask.array as da\nfrom dask.array.utils import assert_eq, same_keys\n\ntry:\n import crick\nexcept ImportError:\n crick = None\n\n\npercentile_methods = pytest.mark.parametrize(\n \"method\",\n [\n pytest.param(\n \"tdigest\", marks=pytest.mark.skipif(not crick, reason=\"Requires crick\")\n ),\n \"dask\",\n ],\n)\n\n\n@percentile_methods\ndef test_percentile(method):\n d = da.ones((16,), chunks=(4,))\n qs = [0, 50, 100]\n\n assert_eq(da.percentile(d, qs, method=method), np.array([1, 1, 1], dtype=d.dtype))\n\n x = np.array([0, 0, 5, 5, 5, 5, 20, 20])\n d = da.from_array(x, chunks=(3,))\n\n result = da.percentile(d, qs, method=method)\n assert_eq(result, np.array([0, 5, 20], dtype=result.dtype))\n\n assert same_keys(\n da.percentile(d, qs, method=method), da.percentile(d, qs, method=method)\n )\n assert not same_keys(\n da.percentile(d, qs, method=method), da.percentile(d, [0, 50], method=method)\n )\n\n if method != \"tdigest\":\n x = np.array([\"a\", \"a\", \"d\", \"d\", \"d\", \"e\"])\n d = da.from_array(x, chunks=(3,))\n assert_eq(\n da.percentile(d, [0, 50, 100]), np.array([\"a\", \"d\", \"e\"], dtype=x.dtype)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentile_with_categoricals_test_percentile_with_categoricals.assert_same_keys_da_perce": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentile_with_categoricals_test_percentile_with_categoricals.assert_same_keys_da_perce", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_percentiles.py", "file_name": "test_percentiles.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 71, "span_ids": ["test_percentile_with_categoricals"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skip\ndef test_percentile_with_categoricals():\n try:\n import pandas as pd\n except ImportError:\n return\n x0 = pd.Categorical([\"Alice\", \"Bob\", \"Charlie\", \"Dennis\", \"Alice\", \"Alice\"])\n x1 = pd.Categorical([\"Alice\", \"Bob\", \"Charlie\", \"Dennis\", \"Alice\", \"Alice\"])\n\n dsk = {(\"x\", 0): x0, (\"x\", 1): x1}\n\n x = da.Array(dsk, \"x\", chunks=((6, 6),))\n\n p = da.percentile(x, [50])\n assert (p.compute().categories == x0.categories).all()\n assert (p.compute().codes == [0]).all()\n assert same_keys(da.percentile(x, [50]), da.percentile(x, [50]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentiles_with_empty_arrays_test_percentiles_with_scaler_percentile.assert_eq_da_percentile_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_percentiles_with_empty_arrays_test_percentiles_with_scaler_percentile.assert_eq_da_percentile_d", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_percentiles.py", "file_name": "test_percentiles.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 98, "span_ids": ["test_percentiles_with_empty_q", "test_percentiles_with_scaler_percentile", "test_percentiles_with_empty_arrays"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@percentile_methods\ndef test_percentiles_with_empty_arrays(method):\n x = da.ones(10, chunks=((5, 0, 5),))\n assert_eq(\n da.percentile(x, [10, 50, 90], method=method),\n np.array([1, 1, 1], dtype=x.dtype),\n )\n\n\n@percentile_methods\ndef test_percentiles_with_empty_q(method):\n x = da.ones(10, chunks=((5, 0, 5),))\n assert_eq(\n da.percentile(x, [], method=method),\n np.array([], dtype=x.dtype),\n )\n\n\n@percentile_methods\n@pytest.mark.parametrize(\"q\", [5, 5.0, np.int64(5), np.float64(5)])\ndef test_percentiles_with_scaler_percentile(method, q):\n # Regression test to ensure da.percentile works with scalar percentiles\n # See #3020\n d = da.ones((16,), chunks=(4,))\n assert_eq(da.percentile(d, q, method=method), np.array([1], dtype=d.dtype))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_unknown_chunk_sizes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_percentiles.py_test_unknown_chunk_sizes_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_percentiles.py", "file_name": "test_percentiles.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 113, "span_ids": ["test_unknown_chunk_sizes"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@percentile_methods\ndef test_unknown_chunk_sizes(method):\n x = da.random.random(1000, chunks=(100,))\n x._chunks = ((np.nan,) * 10,)\n\n result = da.percentile(x, 50, method=method).compute()\n assert 0.1 < result < 0.9\n\n a, b = da.percentile(x, [40, 60], method=method).compute()\n assert 0.1 < a < 0.9\n assert 0.1 < b < 0.9\n assert a < b", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_pytest_test_determinisim_through_dask_values.assert_eq_samples_1_samp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_pytest_test_determinisim_through_dask_values.assert_eq_samples_1_samp", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 53, "span_ids": ["test_doc_randomstate", "imports", "test_RandomState", "test_serializability", "test_concurrency", "test_determinisim_through_dask_values"], "tokens": 399}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\npytest.importorskip(\"numpy\")\n\nimport numpy as np\n\nimport dask\nimport dask.array as da\nfrom dask.utils import key_split\nfrom dask.array.core import Array\nfrom dask.array.random import random, exponential, normal\nfrom dask.array.utils import assert_eq\nfrom dask.multiprocessing import _dumps, _loads\n\n\ndef test_RandomState():\n state = da.random.RandomState(5)\n x = state.normal(10, 1, size=10, chunks=5)\n assert_eq(x, x)\n\n state = da.random.RandomState(5)\n y = state.normal(10, 1, size=10, chunks=5)\n assert_eq(x, y)\n\n\ndef test_concurrency():\n state = da.random.RandomState(5)\n x = state.normal(10, 1, size=10, chunks=2)\n\n state = da.random.RandomState(5)\n y = state.normal(10, 1, size=10, chunks=2)\n assert (x.compute(scheduler=\"processes\") == y.compute(scheduler=\"processes\")).all()\n\n\ndef test_doc_randomstate():\n assert \"mean\" in da.random.RandomState(5).normal.__doc__\n\n\ndef test_serializability():\n state = da.random.RandomState(5)\n x = state.normal(10, 1, size=10, chunks=5)\n\n y = _loads(_dumps(x))\n\n assert_eq(x, y)\n\n\ndef test_determinisim_through_dask_values():\n samples_1 = da.random.RandomState(42).normal(size=1000, chunks=10)\n samples_2 = da.random.RandomState(42).normal(size=1000, chunks=10)\n\n assert set(samples_1.dask) == set(samples_2.dask)\n assert_eq(samples_1, samples_2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_randomstate_consistent_names_test_randomstate_consistent_names.assert_sorted_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_randomstate_consistent_names_test_randomstate_consistent_names.assert_sorted_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 56, "end_line": 64, "span_ids": ["test_randomstate_consistent_names"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_randomstate_consistent_names():\n state1 = da.random.RandomState(42)\n state2 = da.random.RandomState(42)\n assert sorted(state1.normal(size=(100, 100), chunks=(10, 10)).dask) == sorted(\n state2.normal(size=(100, 100), chunks=(10, 10)).dask\n )\n assert sorted(\n state1.normal(size=100, loc=4.5, scale=5.0, chunks=10).dask\n ) == sorted(state2.normal(size=100, loc=4.5, scale=5.0, chunks=10).dask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_test_parametrized_random_function.assert_len_y_90": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_test_parametrized_random_function.assert_len_y_90", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 90, "span_ids": ["test_parametrized_random_function", "test_random"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_random():\n a = random((10, 10), chunks=(5, 5))\n assert isinstance(a, Array)\n assert isinstance(a.name, str) and a.name\n assert a.shape == (10, 10)\n assert a.chunks == ((5, 5), (5, 5))\n\n x = set(np.array(a).flat)\n\n assert len(x) > 90\n\n\ndef test_parametrized_random_function():\n a = exponential(1000, (10, 10), chunks=(5, 5))\n assert isinstance(a, Array)\n assert isinstance(a.name, str) and a.name\n assert a.shape == (10, 10)\n assert a.chunks == ((5, 5), (5, 5))\n\n x = np.array(a)\n assert 10 < x.mean() < 100000\n\n y = set(x.flat)\n assert len(y) > 90", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_kwargs_test_consistent_across_sizes.assert_eq_x1_x3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_kwargs_test_consistent_across_sizes.assert_eq_x1_x3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 135, "span_ids": ["test_consistent_across_sizes", "test_kwargs", "test_docs", "test_can_make_really_big_random_array", "test_random_seed", "test_unique_names"], "tokens": 361}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_kwargs():\n a = normal(loc=10.0, scale=0.1, size=(10, 10), chunks=(5, 5))\n assert isinstance(a, Array)\n x = np.array(a)\n assert 8 < x.mean() < 12\n\n\ndef test_unique_names():\n a = random((10, 10), chunks=(5, 5))\n b = random((10, 10), chunks=(5, 5))\n\n assert a.name != b.name\n\n\ndef test_docs():\n assert \"exponential\" in exponential.__doc__\n assert \"exponential\" in exponential.__name__\n assert \"# doctest: +SKIP\" in normal.__doc__\n\n\ndef test_can_make_really_big_random_array():\n normal(10, 1, (1000000, 1000000), chunks=(100000, 100000))\n\n\ndef test_random_seed():\n da.random.seed(123)\n x = da.random.normal(size=10, chunks=5)\n y = da.random.normal(size=10, chunks=5)\n\n da.random.seed(123)\n a = da.random.normal(size=10, chunks=5)\n b = da.random.normal(size=10, chunks=5)\n\n assert_eq(x, a)\n assert_eq(y, b)\n\n\ndef test_consistent_across_sizes():\n x1 = da.random.RandomState(123).random(20, chunks=20)\n x2 = da.random.RandomState(123).random(100, chunks=20)[:20]\n x3 = da.random.RandomState(123).random(200, chunks=20)[:20]\n assert_eq(x1, x2)\n assert_eq(x1, x3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_all_test_random_all.da_random_standard_t_2_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_random_all_test_random_all.da_random_standard_t_2_s", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 177, "span_ids": ["test_random_all"], "tokens": 666}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_random_all():\n da.random.beta(1, 2, size=5, chunks=3).compute()\n da.random.binomial(10, 0.5, size=5, chunks=3).compute()\n da.random.chisquare(1, size=5, chunks=3).compute()\n da.random.exponential(1, size=5, chunks=3).compute()\n da.random.f(1, 2, size=5, chunks=3).compute()\n da.random.gamma(5, 1, size=5, chunks=3).compute()\n da.random.geometric(1, size=5, chunks=3).compute()\n da.random.gumbel(1, size=5, chunks=3).compute()\n da.random.hypergeometric(1, 2, 3, size=5, chunks=3).compute()\n da.random.laplace(size=5, chunks=3).compute()\n da.random.logistic(size=5, chunks=3).compute()\n da.random.lognormal(size=5, chunks=3).compute()\n da.random.logseries(0.5, size=5, chunks=3).compute()\n da.random.multinomial(20, [1 / 6.0] * 6, size=5, chunks=3).compute()\n da.random.negative_binomial(5, 0.5, size=5, chunks=3).compute()\n da.random.noncentral_chisquare(2, 2, size=5, chunks=3).compute()\n\n da.random.noncentral_f(2, 2, 3, size=5, chunks=3).compute()\n da.random.normal(2, 2, size=5, chunks=3).compute()\n da.random.pareto(1, size=5, chunks=3).compute()\n da.random.poisson(size=5, chunks=3).compute()\n\n da.random.power(1, size=5, chunks=3).compute()\n da.random.rayleigh(size=5, chunks=3).compute()\n da.random.random_sample(size=5, chunks=3).compute()\n\n da.random.triangular(1, 2, 3, size=5, chunks=3).compute()\n da.random.uniform(size=5, chunks=3).compute()\n da.random.vonmises(2, 3, size=5, chunks=3).compute()\n da.random.wald(1, 2, size=5, chunks=3).compute()\n\n da.random.weibull(2, size=5, chunks=3).compute()\n da.random.zipf(2, size=5, chunks=3).compute()\n\n da.random.standard_cauchy(size=5, chunks=3).compute()\n da.random.standard_exponential(size=5, chunks=3).compute()\n da.random.standard_gamma(2, size=5, chunks=3).compute()\n da.random.standard_normal(size=5, chunks=3).compute()\n da.random.standard_t(2, size=5, chunks=3).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_array_broadcasting_test_multinomial.for_size_chunks_in_5_.assert_x_shape_y_shape": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_array_broadcasting_test_multinomial.for_size_chunks_in_5_.assert_x_shape_y_shape", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 231, "span_ids": ["test_multinomial", "test_array_broadcasting"], "tokens": 590}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not hasattr(np, \"broadcast_to\"), reason='requires numpy 1.10 method \"broadcast_to\"'\n)\ndef test_array_broadcasting():\n arr = np.arange(6).reshape((2, 3))\n daones = da.ones((2, 3, 4), chunks=3)\n assert da.random.poisson(arr, chunks=3).compute().shape == (2, 3)\n\n for x in (arr, daones):\n y = da.random.normal(x, 2, chunks=3)\n assert y.shape == x.shape\n assert y.compute().shape == x.shape\n\n y = da.random.normal(daones, 2, chunks=3)\n assert set(daones.dask).issubset(set(y.dask))\n\n assert da.random.normal(\n np.ones((1, 4)), da.ones((2, 3, 4), chunks=(2, 3, 4)), chunks=(2, 3, 4)\n ).compute().shape == (2, 3, 4)\n assert (\n da.random.normal(\n scale=np.ones((1, 4)),\n loc=da.ones((2, 3, 4), chunks=(2, 3, 4)),\n size=(2, 2, 3, 4),\n chunks=(2, 2, 3, 4),\n )\n .compute()\n .shape\n == (2, 2, 3, 4)\n )\n\n with pytest.raises(ValueError):\n da.random.normal(arr, np.ones((3, 1)), size=(2, 3, 4), chunks=3)\n\n for o in (np.ones(100), da.ones(100, chunks=(50,)), 1):\n a = da.random.normal(1000 * o, 0.01, chunks=(50,))\n assert 800 < a.mean().compute() < 1200\n\n # ensure that mis-matched chunks align well\n x = np.arange(10) ** 3\n y = da.from_array(x, chunks=(1,))\n z = da.random.normal(y, 0.01, chunks=(10,))\n\n assert 0.8 < z.mean().compute() / x.mean() < 1.2\n\n\ndef test_multinomial():\n for size, chunks in [(5, 3), ((5, 4), (2, 3))]:\n x = da.random.multinomial(20, [1 / 6.0] * 6, size=size, chunks=chunks)\n y = np.random.multinomial(20, [1 / 6.0] * 6, size=size)\n\n assert x.shape == y.shape == x.compute().shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_choice_test_choice.assert_len_res_len_np": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_choice_test_choice.assert_len_res_len_np", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 234, "end_line": 292, "span_ids": ["test_choice"], "tokens": 623}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_choice():\n np_dtype = np.random.choice(1, size=()).dtype\n size = (10, 3)\n chunks = 4\n x = da.random.choice(3, size=size, chunks=chunks)\n assert x.dtype == np_dtype\n assert x.shape == size\n res = x.compute()\n assert res.dtype == np_dtype\n assert res.shape == size\n\n py_a = [1, 3, 5, 7, 9]\n np_a = np.array(py_a, dtype=\"f8\")\n da_a = da.from_array(np_a, chunks=2)\n\n for a in [py_a, np_a, da_a]:\n x = da.random.choice(a, size=size, chunks=chunks)\n res = x.compute()\n expected_dtype = np.asarray(a).dtype\n assert x.dtype == expected_dtype\n assert res.dtype == expected_dtype\n assert set(np.unique(res)).issubset(np_a)\n\n np_p = np.array([0, 0.2, 0.2, 0.3, 0.3])\n da_p = da.from_array(np_p, chunks=2)\n\n for a, p in [(da_a, np_p), (np_a, da_p)]:\n x = da.random.choice(a, size=size, chunks=chunks, p=p)\n res = x.compute()\n assert x.dtype == np_a.dtype\n assert res.dtype == np_a.dtype\n assert set(np.unique(res)).issubset(np_a[1:])\n\n np_dtype = np.random.choice(1, size=(), p=np.array([1])).dtype\n x = da.random.choice(5, size=size, chunks=chunks, p=np_p)\n res = x.compute()\n assert x.dtype == np_dtype\n assert res.dtype == np_dtype\n\n errs = [\n (-1, None), # negative a\n (np_a[:, None], None), # a must be 1D\n (np_a, np_p[:, None]), # p must be 1D\n (np_a, np_p[:-2]), # a and p must match\n (3, np_p), # a and p must match\n (4, [0.2, 0.2, 0.3]),\n ] # p must sum to 1\n\n for (a, p) in errs:\n with pytest.raises(ValueError):\n da.random.choice(a, size=size, chunks=chunks, p=p)\n\n with pytest.raises(NotImplementedError):\n da.random.choice(da_a, size=size, chunks=chunks, replace=False)\n\n # Want to make sure replace=False works for a single-partition output array\n x = da.random.choice(da_a, size=da_a.shape[0], chunks=-1, replace=False)\n res = x.compute()\n assert len(res) == len(np.unique(res))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_create_with_auto_dimensions_test_permutation.assert_x_shape_100_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_create_with_auto_dimensions_test_permutation.assert_x_shape_100_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 295, "end_line": 327, "span_ids": ["test_create_with_auto_dimensions", "test_names", "test_permutation"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_create_with_auto_dimensions():\n with dask.config.set({\"array.chunk-size\": \"128MiB\"}):\n x = da.random.random((10000, 10000), chunks=(-1, \"auto\"))\n assert x.chunks == ((10000,), (1250,) * 8)\n\n y = da.random.random((10000, 10000), chunks=\"auto\")\n assert y.chunks == ((2500,) * 4, (2500,) * 4)\n\n\ndef test_names():\n name = da.random.normal(0, 1, size=(1000,), chunks=(500,)).name\n\n assert name.startswith(\"normal\")\n assert len(key_split(name)) < 10\n\n\ndef test_permutation():\n x = da.arange(12, chunks=3)\n y = da.random.permutation(x)\n\n assert y.shape == x.shape\n assert y.dtype == x.dtype\n\n y.compute() # smoke test\n\n a = da.random.RandomState(0)\n b = da.random.RandomState(0)\n r1 = a.permutation(x)\n r2 = b.permutation(x)\n assert_eq(r1, r2)\n\n x = da.random.permutation(100)\n assert x.shape == (100,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_external_randomstate_class_test_external_randomstate_class.assert_eq_a_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_external_randomstate_class_test_external_randomstate_class.assert_eq_a_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 330, "end_line": 350, "span_ids": ["test_external_randomstate_class"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_external_randomstate_class():\n randomgen = pytest.importorskip(\"randomgen\")\n\n rs = da.random.RandomState(\n RandomState=lambda seed: randomgen.RandomGenerator(randomgen.DSFMT(seed))\n )\n x = rs.normal(0, 1, size=10, chunks=(5,))\n assert_eq(x, x)\n\n rs = da.random.RandomState(\n RandomState=lambda seed: randomgen.RandomGenerator(randomgen.DSFMT(seed)),\n seed=123,\n )\n a = rs.normal(0, 1, size=10, chunks=(5,))\n rs = da.random.RandomState(\n RandomState=lambda seed: randomgen.RandomGenerator(randomgen.DSFMT(seed)),\n seed=123,\n )\n b = rs.normal(0, 1, size=10, chunks=(5,))\n assert a.name == b.name\n assert_eq(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_auto_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_random.py_test_auto_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_random.py", "file_name": "test_random.py", "file_type": "text/x-python", "category": "test", "start_line": 353, "end_line": 387, "span_ids": ["test_randint_dtype", "test_doc_wraps_deprecated", "test_auto_chunks", "test_raises_bad_kwarg", "test_randomstate_kwargs"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_auto_chunks():\n with dask.config.set({\"array.chunk-size\": \"50 MiB\"}):\n x = da.random.random((10000, 10000))\n assert 4 < x.npartitions < 32\n\n\ndef test_randint_dtype():\n x = da.random.randint(0, 255, size=10, dtype=\"uint8\")\n assert_eq(x, x)\n assert x.dtype == \"uint8\"\n assert x.compute().dtype == \"uint8\"\n\n\ndef test_doc_wraps_deprecated():\n with pytest.warns(FutureWarning):\n\n @da.random.doc_wraps(np.random.normal)\n def f():\n pass\n\n\ndef test_raises_bad_kwarg():\n with pytest.raises(Exception) as info:\n da.random.standard_normal(size=(10,), dtype=\"float64\")\n\n assert \"dtype\" in str(info.value)\n\n\ndef test_randomstate_kwargs():\n cupy = pytest.importorskip(\"cupy\")\n\n rs = da.random.RandomState(RandomState=cupy.random.RandomState)\n x = rs.standard_normal((10, 5), dtype=np.float32)\n assert x.dtype == np.float32", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_from_itertools_import_pro_test_rechunk_internals_1.assert_i1d_1_answer4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_from_itertools_import_pro_test_rechunk_internals_1.assert_i1d_1_answer4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 52, "span_ids": ["imports", "test_rechunk_internals_1"], "tokens": 513}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import product\nimport warnings\n\nimport pytest\n\nnp = pytest.importorskip(\"numpy\")\n\nimport dask\nfrom dask.utils import funcname\nfrom dask.array.utils import assert_eq\nfrom dask.array.rechunk import intersect_chunks, rechunk, normalize_chunks\nfrom dask.array.rechunk import cumdims_label, _breakpoints, _intersect_1d, _old_to_new\nfrom dask.array.rechunk import plan_rechunk, divide_to_width, merge_to_number\nimport dask.array as da\n\n\ndef test_rechunk_internals_1():\n \"\"\"Test the cumdims_label and _breakpoints and\n _intersect_1d internal funcs to rechunk.\"\"\"\n new = cumdims_label(((1, 1, 2), (1, 5, 1)), \"n\")\n old = cumdims_label(((4,), (1,) * 5), \"o\")\n breaks = tuple(_breakpoints(o, n) for o, n in zip(old, new))\n answer = ((\"o\", 0), (\"n\", 0), (\"n\", 1), (\"n\", 2), (\"o\", 4), (\"n\", 4))\n assert breaks[0] == answer\n answer2 = (\n (\"o\", 0),\n (\"n\", 0),\n (\"o\", 1),\n (\"n\", 1),\n (\"o\", 2),\n (\"o\", 3),\n (\"o\", 4),\n (\"o\", 5),\n (\"n\", 6),\n (\"n\", 7),\n )\n assert breaks[1] == answer2\n i1d = [_intersect_1d(b) for b in breaks]\n answer3 = [[(0, slice(0, 1))], [(0, slice(1, 2))], [(0, slice(2, 4))]]\n assert i1d[0] == answer3\n answer4 = [\n [(0, slice(0, 1))],\n [\n (1, slice(0, 1)),\n (2, slice(0, 1)),\n (3, slice(0, 1)),\n (4, slice(0, 1)),\n (5, slice(0, 1)),\n ],\n [(5, slice(1, 2))],\n ]\n assert i1d[1] == answer4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_1_test_intersect_1.assert_answer_cross": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_1_test_intersect_1.assert_answer_cross", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 65, "span_ids": ["test_intersect_1"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_intersect_1():\n \"\"\" Convert 1 D chunks\"\"\"\n old = ((10, 10, 10, 10, 10),)\n new = ((25, 5, 20),)\n answer = [\n (((0, slice(0, 10)),), ((1, slice(0, 10)),), ((2, slice(0, 5)),)),\n (((2, slice(5, 10)),),),\n (((3, slice(0, 10)),), ((4, slice(0, 10)),)),\n ]\n cross = list(intersect_chunks(old_chunks=old, new_chunks=new))\n assert answer == cross", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_2_test_intersect_2.assert_answer_cross": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_2_test_intersect_2.assert_answer_cross", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 79, "span_ids": ["test_intersect_2"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_intersect_2():\n \"\"\" Convert 1 D chunks\"\"\"\n old = ((20, 20, 20, 20, 20),)\n new = ((58, 4, 20, 18),)\n answer = [\n (((0, slice(0, 20)),), ((1, slice(0, 20)),), ((2, slice(0, 18)),)),\n (((2, slice(18, 20)),), ((3, slice(0, 2)),)),\n (((3, slice(2, 20)),), ((4, slice(0, 2)),)),\n (((4, slice(2, 20)),),),\n ]\n cross = list(intersect_chunks(old_chunks=old, new_chunks=new))\n assert answer == cross", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_1d_test_rechunk_2d.assert_np_all_x2_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_1d_test_rechunk_2d.assert_np_all_x2_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 99, "span_ids": ["test_rechunk_2d", "test_rechunk_1d"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_1d():\n \"\"\"Try rechunking a random 1d matrix\"\"\"\n a = np.random.uniform(0, 1, 30)\n x = da.from_array(a, chunks=((10,) * 3,))\n new = ((5,) * 6,)\n x2 = rechunk(x, chunks=new)\n assert x2.chunks == new\n assert np.all(x2.compute() == a)\n\n\ndef test_rechunk_2d():\n \"\"\"Try rechunking a random 2d matrix\"\"\"\n a = np.random.uniform(0, 1, 300).reshape((10, 30))\n x = da.from_array(a, chunks=((1, 2, 3, 4), (5,) * 6))\n new = ((5, 5), (15,) * 2)\n x2 = rechunk(x, chunks=new)\n assert x2.chunks == new\n assert np.all(x2.compute() == a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_4d_test_rechunk_expand.assert_np_all_y_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_4d_test_rechunk_expand.assert_np_all_y_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 117, "span_ids": ["test_rechunk_expand", "test_rechunk_4d"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_4d():\n \"\"\"Try rechunking a random 4d matrix\"\"\"\n old = ((5, 5),) * 4\n a = np.random.uniform(0, 1, 10000).reshape((10,) * 4)\n x = da.from_array(a, chunks=old)\n new = ((10,),) * 4\n x2 = rechunk(x, chunks=new)\n assert x2.chunks == new\n assert np.all(x2.compute() == a)\n\n\ndef test_rechunk_expand():\n a = np.random.uniform(0, 1, 100).reshape((10, 10))\n x = da.from_array(a, chunks=(5, 5))\n y = x.rechunk(chunks=((3, 3, 3, 1), (3, 3, 3, 1)))\n assert np.all(y.compute() == a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_expand2_test_rechunk_expand2.for_off_off2_in_product_.if_a_off_off2_0_.assert_np_all_y_orig_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_expand2_test_rechunk_expand2.for_off_off2_in_product_.if_a_off_off2_0_.assert_np_all_y_orig_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 120, "end_line": 131, "span_ids": ["test_rechunk_expand2"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_expand2():\n (a, b) = (3, 2)\n orig = np.random.uniform(0, 1, a ** b).reshape((a,) * b)\n for off, off2 in product(range(1, a - 1), range(1, a - 1)):\n old = ((a - off, off),) * b\n x = da.from_array(orig, chunks=old)\n new = ((a - off2, off2),) * b\n assert np.all(x.rechunk(chunks=new).compute() == orig)\n if a - off - off2 > 0:\n new = ((off, a - off2 - off, off2),) * b\n y = x.rechunk(chunks=new).compute()\n assert np.all(y == orig)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_method_test_rechunk_method.assert_np_all_x2_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_method_test_rechunk_method.assert_np_all_x2_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 134, "end_line": 142, "span_ids": ["test_rechunk_method"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_method():\n \"\"\" Test rechunking can be done as a method of dask array.\"\"\"\n old = ((5, 2, 3),) * 4\n new = ((3, 3, 3, 1),) * 4\n a = np.random.uniform(0, 1, 10000).reshape((10,) * 4)\n x = da.from_array(a, chunks=old)\n x2 = x.rechunk(chunks=new)\n assert x2.chunks == new\n assert np.all(x2.compute() == a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_blockshape_test_dtype.assert_x_rechunk_chunks_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_blockshape_test_dtype.assert_x_rechunk_chunks_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 159, "span_ids": ["test_rechunk_blockshape", "test_dtype"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_blockshape():\n \"\"\" Test that blockshape can be used.\"\"\"\n new_shape, new_chunks = (10, 10), (4, 3)\n new_blockdims = normalize_chunks(new_chunks, new_shape)\n old_chunks = ((4, 4, 2), (3, 3, 3, 1))\n a = np.random.uniform(0, 1, 100).reshape((10, 10))\n x = da.from_array(a, chunks=old_chunks)\n check1 = rechunk(x, chunks=new_chunks)\n assert check1.chunks == new_blockdims\n assert np.all(check1.compute() == a)\n\n\ndef test_dtype():\n x = da.ones(5, chunks=(2,))\n assert x.rechunk(chunks=(1,)).dtype == x.dtype", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_dict_test_rechunk_with_dict.assert_y_chunks_24_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_dict_test_rechunk_with_dict.assert_y_chunks_24_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 162, "end_line": 173, "span_ids": ["test_rechunk_with_dict"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_with_dict():\n x = da.ones((24, 24), chunks=(4, 8))\n y = x.rechunk(chunks={0: 12})\n assert y.chunks == ((12, 12), (8, 8, 8))\n\n x = da.ones((24, 24), chunks=(4, 8))\n y = x.rechunk(chunks={0: (12, 12)})\n assert y.chunks == ((12, 12), (8, 8, 8))\n\n x = da.ones((24, 24), chunks=(4, 8))\n y = x.rechunk(chunks={0: -1})\n assert y.chunks == ((24,), (8, 8, 8))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_empty_input_test_rechunk_intermediates.assert_len_y_dask_30": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_with_empty_input_test_rechunk_intermediates.assert_len_y_dask_30", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 176, "end_line": 254, "span_ids": ["test_rechunk_zero_dim_array_II", "test_rechunk_empty_array", "test_rechunk_with_null_dimensions", "test_rechunk_with_integer", "test_rechunk_with_empty_input", "test_rechunk_minus_one", "test_rechunk_with_zero_placeholders", "test_rechunk_same", "test_rechunk_0d", "test_rechunk_intermediates", "test_rechunk_zero_dim_array", "test_rechunk_empty"], "tokens": 717}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_with_empty_input():\n x = da.ones((24, 24), chunks=(4, 8))\n assert x.rechunk(chunks={}).chunks == x.chunks\n pytest.raises(ValueError, lambda: x.rechunk(chunks=()))\n\n\ndef test_rechunk_with_null_dimensions():\n x = da.from_array(np.ones((24, 24)), chunks=(4, 8))\n assert x.rechunk(chunks=(None, 4)).chunks == da.ones((24, 24), chunks=(4, 4)).chunks\n\n\ndef test_rechunk_with_integer():\n x = da.from_array(np.arange(5), chunks=4)\n y = x.rechunk(3)\n assert y.chunks == ((3, 2),)\n assert (x.compute() == y.compute()).all()\n\n\ndef test_rechunk_0d():\n a = np.array(42)\n x = da.from_array(a, chunks=())\n y = x.rechunk(())\n assert y.chunks == ()\n assert y.compute() == a\n\n\n@pytest.mark.parametrize(\n \"arr\", [da.array([]), da.array([[], []]), da.array([[[]], [[]]])]\n)\ndef test_rechunk_empty_array(arr):\n arr.rechunk()\n assert arr.size == 0\n\n\ndef test_rechunk_empty():\n x = da.ones((0, 10), chunks=(5, 5))\n y = x.rechunk((2, 2))\n assert y.chunks == ((0,), (2,) * 5)\n assert_eq(x, y)\n\n\ndef test_rechunk_zero_dim_array():\n x = da.zeros((4, 0), chunks=3)\n y = x.rechunk({0: 4})\n assert y.chunks == ((4,), (0,))\n assert_eq(x, y)\n\n\ndef test_rechunk_zero_dim_array_II():\n x = da.zeros((4, 0, 6, 10), chunks=3)\n y = x.rechunk({0: 4, 2: 2})\n assert y.chunks == ((4,), (0,), (2, 2, 2), (3, 3, 3, 1))\n assert_eq(x, y)\n\n\ndef test_rechunk_same():\n x = da.ones((24, 24), chunks=(4, 8))\n y = x.rechunk(x.chunks)\n assert x is y\n\n\ndef test_rechunk_with_zero_placeholders():\n x = da.ones((24, 24), chunks=((12, 12), (24, 0)))\n y = da.ones((24, 24), chunks=((12, 12), (12, 12)))\n y = y.rechunk(((12, 12), (24, 0)))\n assert x.chunks == y.chunks\n\n\ndef test_rechunk_minus_one():\n x = da.ones((24, 24), chunks=(4, 8))\n y = x.rechunk((-1, 8))\n assert y.chunks == ((24,), (8, 8, 8))\n assert_eq(x, y)\n\n\ndef test_rechunk_intermediates():\n x = da.random.normal(10, 0.1, (10, 10), chunks=(10, 1))\n y = x.rechunk((1, 10))\n assert len(y.dask) > 30", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_divide_to_width_test_divide_to_width.assert_chunks_4_4_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_divide_to_width_test_divide_to_width.assert_chunks_4_4_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 262, "span_ids": ["test_divide_to_width"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_divide_to_width():\n chunks = divide_to_width((8, 9, 10), 10)\n assert chunks == (8, 9, 10)\n chunks = divide_to_width((8, 2, 9, 10, 11, 12), 4)\n # Note how 9 gives (3, 3, 3), not (4, 4, 1) or whatever\n assert chunks == (4, 4, 2, 3, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_merge_to_number__assert_steps.assert_steps_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_merge_to_number__assert_steps.assert_steps_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 265, "end_line": 317, "span_ids": ["_assert_steps", "test_merge_to_number", "_plan"], "tokens": 700}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_to_number():\n chunks = merge_to_number((10,) * 4, 5)\n assert chunks == (10, 10, 10, 10)\n chunks = merge_to_number((10,) * 4, 4)\n assert chunks == (10, 10, 10, 10)\n chunks = merge_to_number((10,) * 4, 3)\n assert chunks == (20, 10, 10)\n chunks = merge_to_number((10,) * 4, 2)\n assert chunks == (20, 20)\n chunks = merge_to_number((10,) * 4, 1)\n assert chunks == (40,)\n\n chunks = merge_to_number((10,) * 10, 2)\n assert chunks == (50,) * 2\n chunks = merge_to_number((10,) * 10, 3)\n assert chunks == (40, 30, 30)\n\n chunks = merge_to_number((5, 1, 1, 15, 10), 4)\n assert chunks == (5, 2, 15, 10)\n chunks = merge_to_number((5, 1, 1, 15, 10), 3)\n assert chunks == (7, 15, 10)\n chunks = merge_to_number((5, 1, 1, 15, 10), 2)\n assert chunks == (22, 10)\n chunks = merge_to_number((5, 1, 1, 15, 10), 1)\n assert chunks == (32,)\n\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 6)\n assert chunks == (2, 1, 1, 3, 1, 1)\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 5)\n assert chunks == (2, 2, 3, 1, 1)\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 4)\n assert chunks == (2, 2, 3, 2)\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 3)\n assert chunks == (4, 3, 2)\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 2)\n assert chunks == (4, 5)\n chunks = merge_to_number((1, 1, 1, 1, 3, 1, 1), 1)\n assert chunks == (9,)\n\n\ndef _plan(old_chunks, new_chunks, itemsize=1, block_size_limit=1e7, threshold=4):\n return plan_rechunk(\n old_chunks,\n new_chunks,\n itemsize=itemsize,\n block_size_limit=block_size_limit,\n threshold=threshold,\n )\n\n\ndef _assert_steps(steps, expected):\n assert len(steps) == len(expected)\n assert steps == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_test_plan_rechunk.for_i_in_range_len_steps_.assert_len_succ_1_le": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_test_plan_rechunk.for_i_in_range_len_steps_.assert_len_succ_1_le", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 320, "end_line": 386, "span_ids": ["test_plan_rechunk"], "tokens": 765}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plan_rechunk():\n c = (20,) * 2 # coarse\n f = (2,) * 20 # fine\n nc = (float(\"nan\"),) * 2 # nan-coarse\n nf = (float(\"nan\"),) * 20 # nan-fine\n\n # Trivial cases\n steps = _plan((), ())\n _assert_steps(steps, [()])\n steps = _plan((c, ()), (f, ()))\n _assert_steps(steps, [(f, ())])\n\n # No intermediate required\n steps = _plan((c,), (f,))\n _assert_steps(steps, [(f,)])\n steps = _plan((f,), (c,))\n _assert_steps(steps, [(c,)])\n steps = _plan((c, c), (f, f))\n _assert_steps(steps, [(f, f)])\n steps = _plan((f, f), (c, c))\n _assert_steps(steps, [(c, c)])\n steps = _plan((f, c), (c, c))\n _assert_steps(steps, [(c, c)])\n steps = _plan((c, c, c, c), (c, f, c, c))\n _assert_steps(steps, [(c, f, c, c)])\n\n # An intermediate is used to reduce graph size\n steps = _plan((f, c), (c, f))\n _assert_steps(steps, [(c, c), (c, f)])\n\n steps = _plan((c + c, c + f), (f + f, c + c))\n _assert_steps(steps, [(c + c, c + c), (f + f, c + c)])\n\n # Same, with unknown dim\n steps = _plan((nc + nf, c + c, c + f), (nc + nf, f + f, c + c))\n _assert_steps(steps, steps)\n\n # Regression test for #5908\n steps = _plan((c, c), (f, f), threshold=1)\n _assert_steps(steps, [(f, f)])\n\n # Just at the memory limit => an intermediate is used\n steps = _plan((f, c), (c, f), block_size_limit=400)\n _assert_steps(steps, [(c, c), (c, f)])\n\n # Hitting the memory limit => partial merge\n m = (10,) * 4 # mid\n\n steps = _plan((f, c), (c, f), block_size_limit=399)\n _assert_steps(steps, [(m, c), (c, f)])\n\n steps2 = _plan((f, c), (c, f), block_size_limit=3999, itemsize=10)\n _assert_steps(steps2, steps)\n\n # Larger problem size => more intermediates\n c = (1000,) * 2 # coarse\n f = (2,) * 1000 # fine\n\n steps = _plan((f, c), (c, f), block_size_limit=99999)\n assert len(steps) == 3\n assert steps[-1] == (c, f)\n for i in range(len(steps) - 1):\n prev = steps[i]\n succ = steps[i + 1]\n # Merging on the first dim, splitting on the second dim\n assert len(succ[0]) <= len(prev[0]) / 2.0\n assert len(succ[1]) >= len(prev[1]) * 2.0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_5d_test_plan_rechunk_5d.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_5d_test_plan_rechunk_5d.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 389, "end_line": 400, "span_ids": ["test_plan_rechunk_5d"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plan_rechunk_5d():\n # 5d problem\n c = (10,) * 1 # coarse\n f = (1,) * 10 # fine\n\n steps = _plan((c, c, c, c, c), (f, f, f, f, f))\n _assert_steps(steps, [(f, f, f, f, f)])\n steps = _plan((f, f, f, f, c), (c, c, c, f, f))\n _assert_steps(steps, [(c, c, c, f, c), (c, c, c, f, f)])\n # Only 1 dim can be merged at first\n steps = _plan((c, c, f, f, c), (c, c, c, f, f), block_size_limit=2e4)\n _assert_steps(steps, [(c, c, c, f, c), (c, c, c, f, f)])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_heterogenous_test_plan_rechunk_heterogenous.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_heterogenous_test_plan_rechunk_heterogenous.None_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 403, "end_line": 430, "span_ids": ["test_plan_rechunk_heterogenous"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plan_rechunk_heterogenous():\n c = (10,) * 1 # coarse\n f = (1,) * 10 # fine\n cf = c + f\n cc = c + c\n ff = f + f\n fc = f + c\n\n # No intermediate required\n steps = _plan((cc, cf), (ff, ff))\n _assert_steps(steps, [(ff, ff)])\n steps = _plan((cf, fc), (ff, cf))\n _assert_steps(steps, [(ff, cf)])\n\n # An intermediate is used to reduce graph size\n steps = _plan((cc, cf), (ff, cc))\n _assert_steps(steps, [(cc, cc), (ff, cc)])\n\n steps = _plan((cc, cf, cc), (ff, cc, cf))\n _assert_steps(steps, [(cc, cc, cc), (ff, cc, cf)])\n\n # Imposing a memory limit => the first intermediate is constrained:\n # * cc -> ff would increase the graph size: no\n # * ff -> cf would increase the block size too much: no\n # * cf -> cc fits the bill (graph size /= 10, block size neutral)\n # * cf -> fc also fits the bill (graph size and block size neutral)\n steps = _plan((cc, ff, cf), (ff, cf, cc), block_size_limit=100)\n _assert_steps(steps, [(cc, ff, cc), (ff, cf, cc)])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_asymmetric_test_rechunk_warning.assert_not_w": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_plan_rechunk_asymmetric_test_rechunk_warning.assert_not_w", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 433, "end_line": 450, "span_ids": ["test_rechunk_warning", "test_plan_rechunk_asymmetric"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plan_rechunk_asymmetric():\n a = ((1,) * 1000, (80000000,))\n b = ((1000,), (80000,) * 1000)\n steps = plan_rechunk(a, b, itemsize=8)\n assert len(steps) > 1\n\n x = da.ones((1000, 80000000), chunks=(1, 80000000))\n y = x.rechunk((1000, x.shape[1] // 1000))\n assert len(y.dask) < 100000\n\n\ndef test_rechunk_warning():\n N = 20\n x = da.random.normal(size=(N, N, 100), chunks=(1, N, 100))\n with warnings.catch_warnings(record=True) as w:\n x = x.rechunk((N, 1, 100))\n\n assert not w", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_dont_concatenate_single_chunks_test_dont_concatenate_single_chunks.assert_not_any_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_dont_concatenate_single_chunks_test_dont_concatenate_single_chunks.assert_not_any_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 453, "end_line": 464, "span_ids": ["test_dont_concatenate_single_chunks"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape,chunks\", [[(4,), (2,)], [(4, 4), (2, 2)], [(4, 4), (4, 2)]]\n)\ndef test_dont_concatenate_single_chunks(shape, chunks):\n x = da.ones(shape, chunks=shape)\n y = x.rechunk(chunks)\n dsk = dict(y.dask)\n assert not any(\n funcname(task[0]).startswith(\"concat\")\n for task in dsk.values()\n if dask.istask(task)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_test_intersect_nan.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_test_intersect_nan.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 467, "end_line": 478, "span_ids": ["test_intersect_nan"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_intersect_nan():\n old_chunks = ((float(\"nan\"), float(\"nan\")), (8,))\n new_chunks = ((float(\"nan\"), float(\"nan\")), (4, 4))\n\n result = list(intersect_chunks(old_chunks, new_chunks))\n expected = [\n (((0, slice(0, None, None)), (0, slice(0, 4, None))),),\n (((0, slice(0, None, None)), (0, slice(4, 8, None))),),\n (((1, slice(0, None, None)), (0, slice(0, 4, None))),),\n (((1, slice(0, None, None)), (0, slice(4, 8, None))),),\n ]\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_single_test_intersect_nan_single.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_single_test_intersect_nan_single.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 481, "end_line": 490, "span_ids": ["test_intersect_nan_single"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_intersect_nan_single():\n old_chunks = ((float(\"nan\"),), (10,))\n new_chunks = ((float(\"nan\"),), (5, 5))\n\n result = list(intersect_chunks(old_chunks, new_chunks))\n expected = [\n (((0, slice(0, None, None)), (0, slice(0, 5, None))),),\n (((0, slice(0, None, None)), (0, slice(5, 10, None))),),\n ]\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_long_test_intersect_nan_long.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_intersect_nan_long_test_intersect_nan_long.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 493, "end_line": 508, "span_ids": ["test_intersect_nan_long"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_intersect_nan_long():\n\n old_chunks = (tuple([float(\"nan\")] * 4), (10,))\n new_chunks = (tuple([float(\"nan\")] * 4), (5, 5))\n result = list(intersect_chunks(old_chunks, new_chunks))\n expected = [\n (((0, slice(0, None, None)), (0, slice(0, 5, None))),),\n (((0, slice(0, None, None)), (0, slice(5, 10, None))),),\n (((1, slice(0, None, None)), (0, slice(0, 5, None))),),\n (((1, slice(0, None, None)), (0, slice(5, 10, None))),),\n (((2, slice(0, None, None)), (0, slice(0, 5, None))),),\n (((2, slice(0, None, None)), (0, slice(5, 10, None))),),\n (((3, slice(0, None, None)), (0, slice(0, 5, None))),),\n (((3, slice(0, None, None)), (0, slice(5, 10, None))),),\n ]\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_pandas_test_rechunk_unknown_from_pandas.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_pandas_test_rechunk_unknown_from_pandas.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 522, "span_ids": ["test_rechunk_unknown_from_pandas"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_unknown_from_pandas():\n dd = pytest.importorskip(\"dask.dataframe\")\n pd = pytest.importorskip(\"pandas\")\n\n arr = np.random.randn(50, 10)\n x = dd.from_pandas(pd.DataFrame(arr), 2).values\n result = x.rechunk((None, (5, 5)))\n assert np.isnan(x.chunks[0]).all()\n assert np.isnan(result.chunks[0]).all()\n assert result.chunks[1] == (5, 5)\n expected = da.from_array(arr, chunks=((25, 25), (10,))).rechunk((None, (5, 5)))\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_array_test_rechunk_unknown_from_array.assert_eq_x_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_from_array_test_rechunk_unknown_from_array.assert_eq_x_result_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 525, "end_line": 534, "span_ids": ["test_rechunk_unknown_from_array"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_unknown_from_array():\n dd = pytest.importorskip(\"dask.dataframe\")\n # pd = pytest.importorskip('pandas')\n x = dd.from_array(da.ones(shape=(4, 4), chunks=(2, 2))).values\n # result = x.rechunk({1: 5})\n result = x.rechunk((None, 4))\n assert np.isnan(x.chunks[0]).all()\n assert np.isnan(result.chunks[0]).all()\n assert x.chunks[1] == (4,)\n assert_eq(x, result)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_test_rechunk_unknown.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_test_rechunk_unknown.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 537, "end_line": 561, "span_ids": ["test_rechunk_unknown"], "tokens": 387}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"x, chunks\",\n [\n (da.ones(shape=(50, 10), chunks=(25, 10)), (None, 5)),\n (da.ones(shape=(50, 10), chunks=(25, 10)), {1: 5}),\n (da.ones(shape=(50, 10), chunks=(25, 10)), (None, (5, 5))),\n (da.ones(shape=(1000, 10), chunks=(5, 10)), (None, 5)),\n (da.ones(shape=(1000, 10), chunks=(5, 10)), {1: 5}),\n (da.ones(shape=(1000, 10), chunks=(5, 10)), (None, (5, 5))),\n (da.ones(shape=(10, 10), chunks=(10, 10)), (None, 5)),\n (da.ones(shape=(10, 10), chunks=(10, 10)), {1: 5}),\n (da.ones(shape=(10, 10), chunks=(10, 10)), (None, (5, 5))),\n (da.ones(shape=(10, 10), chunks=(10, 2)), (None, 5)),\n (da.ones(shape=(10, 10), chunks=(10, 2)), {1: 5}),\n (da.ones(shape=(10, 10), chunks=(10, 2)), (None, (5, 5))),\n ],\n)\ndef test_rechunk_unknown(x, chunks):\n dd = pytest.importorskip(\"dask.dataframe\")\n y = dd.from_array(x).values\n result = y.rechunk(chunks)\n expected = x.rechunk(chunks)\n\n assert_chunks_match(result.chunks, expected.chunks)\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_explicit_test_rechunk_unknown_raises.with_pytest_raises_ValueE.x_rechunk_None_5_5_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_unknown_explicit_test_rechunk_unknown_raises.with_pytest_raises_ValueE.x_rechunk_None_5_5_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 564, "end_line": 587, "span_ids": ["test_rechunk_unknown_explicit", "assert_chunks_match", "test_rechunk_unknown_raises"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_unknown_explicit():\n dd = pytest.importorskip(\"dask.dataframe\")\n x = da.ones(shape=(10, 10), chunks=(5, 2))\n y = dd.from_array(x).values\n result = y.rechunk(((float(\"nan\"), float(\"nan\")), (5, 5)))\n expected = x.rechunk((None, (5, 5)))\n assert_chunks_match(result.chunks, expected.chunks)\n assert_eq(result, expected)\n\n\ndef assert_chunks_match(left, right):\n for x, y in zip(left, right):\n if np.isnan(x).any():\n assert np.isnan(x).all()\n else:\n assert x == y\n\n\ndef test_rechunk_unknown_raises():\n dd = pytest.importorskip(\"dask.dataframe\")\n\n x = dd.from_array(da.ones(shape=(10, 10), chunks=(5, 5))).values\n with pytest.raises(ValueError):\n x.rechunk((None, (5, 5, 5)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_single_test_old_to_new.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_single_test_old_to_new.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 590, "end_line": 612, "span_ids": ["test_old_to_new_single", "test_old_to_new"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_old_to_new_single():\n old = ((float(\"nan\"), float(\"nan\")), (8,))\n new = ((float(\"nan\"), float(\"nan\")), (4, 4))\n result = _old_to_new(old, new)\n\n expected = [\n [[(0, slice(0, None, None))], [(1, slice(0, None, None))]],\n [[(0, slice(0, 4, None))], [(0, slice(4, 8, None))]],\n ]\n\n assert result == expected\n\n\ndef test_old_to_new():\n old = ((float(\"nan\"),), (10,))\n new = ((float(\"nan\"),), (5, 5))\n result = _old_to_new(old, new)\n expected = [\n [[(0, slice(0, None, None))]],\n [[(0, slice(0, 5, None))], [(0, slice(5, 10, None))]],\n ]\n\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_large_test_old_to_new_large.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_old_to_new_large_test_old_to_new_large.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 615, "end_line": 629, "span_ids": ["test_old_to_new_large"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_old_to_new_large():\n old = (tuple([float(\"nan\")] * 4), (10,))\n new = (tuple([float(\"nan\")] * 4), (5, 5))\n\n result = _old_to_new(old, new)\n expected = [\n [\n [(0, slice(0, None, None))],\n [(1, slice(0, None, None))],\n [(2, slice(0, None, None))],\n [(3, slice(0, None, None))],\n ],\n [[(0, slice(0, 5, None))], [(0, slice(5, 10, None))]],\n ]\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_changing_raises_test_old_to_new_known.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_changing_raises_test_old_to_new_known.assert_result_expected", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 632, "end_line": 651, "span_ids": ["test_old_to_new_known", "test_changing_raises"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_changing_raises():\n nan = float(\"nan\")\n with pytest.raises(ValueError) as record:\n _old_to_new(((nan, nan), (4, 4)), ((nan, nan, nan), (4, 4)))\n\n assert \"unchanging\" in str(record.value)\n\n\ndef test_old_to_new_known():\n old = ((10, 10, 10, 10, 10),)\n new = ((25, 5, 20),)\n result = _old_to_new(old, new)\n expected = [\n [\n [(0, slice(0, 10, None)), (1, slice(0, 10, None)), (2, slice(0, 5, None))],\n [(2, slice(5, 10, None))],\n [(3, slice(0, 10, None)), (4, slice(0, 10, None))],\n ]\n ]\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_dim_test_rechunk_avoid_needless_chunking.assert_len_dsk_8_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_dim_test_rechunk_avoid_needless_chunking.assert_len_dsk_8_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 654, "end_line": 671, "span_ids": ["test_rechunk_zero_dim", "test_rechunk_empty_chunks", "test_rechunk_avoid_needless_chunking"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_zero_dim():\n da = pytest.importorskip(\"dask.array\")\n\n x = da.ones((0, 10, 100), chunks=(0, 10, 10)).rechunk((0, 10, 50))\n assert len(x.compute()) == 0\n\n\ndef test_rechunk_empty_chunks():\n x = da.zeros((7, 24), chunks=((7,), (10, 0, 0, 9, 0, 5)))\n y = x.rechunk((2, 3))\n assert_eq(x, y)\n\n\ndef test_rechunk_avoid_needless_chunking():\n x = da.ones(16, chunks=2)\n y = x.rechunk(8)\n dsk = y.__dask_graph__()\n assert len(dsk) <= 8 + 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_1d_test_rechunk_auto_1d.assert_y_chunks_expec": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_1d_test_rechunk_auto_1d.assert_y_chunks_expec", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 674, "end_line": 687, "span_ids": ["test_rechunk_auto_1d"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape,chunks,bs,expected\",\n [\n (100, 1, 10, (10,) * 10),\n (100, 50, 10, (10,) * 10),\n (100, 100, 10, (10,) * 10),\n (20, 7, 10, (7, 7, 6)),\n (20, (1, 1, 1, 1, 6, 2, 1, 7), 5, (5, 5, 5, 5)),\n ],\n)\ndef test_rechunk_auto_1d(shape, chunks, bs, expected):\n x = da.ones(shape, chunks=(chunks,))\n y = x.rechunk({0: \"auto\"}, block_size_limit=bs * x.dtype.itemsize)\n assert y.chunks == (expected,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_2d_test_rechunk_auto_2d._limited_by_largest": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_2d_test_rechunk_auto_2d._limited_by_largest", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 690, "end_line": 707, "span_ids": ["test_rechunk_auto_2d"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_auto_2d():\n x = da.ones((20, 20), chunks=(2, 2))\n y = x.rechunk({0: -1, 1: \"auto\"}, block_size_limit=20 * x.dtype.itemsize)\n assert y.chunks == ((20,), (1,) * 20)\n\n x = da.ones((20, 20), chunks=(2, 2))\n y = x.rechunk((-1, \"auto\"), block_size_limit=80 * x.dtype.itemsize)\n assert y.chunks == ((20,), (4,) * 5)\n\n x = da.ones((20, 20), chunks=((2, 2)))\n y = x.rechunk({0: \"auto\"}, block_size_limit=20 * x.dtype.itemsize)\n assert y.chunks[1] == x.chunks[1]\n assert y.chunks[0] == (10, 10)\n\n x = da.ones((20, 20), chunks=((2,) * 10, (2, 2, 2, 2, 2, 5, 5)))\n y = x.rechunk({0: \"auto\"}, block_size_limit=20 * x.dtype.itemsize)\n assert y.chunks[1] == x.chunks[1]\n assert y.chunks[0] == (4, 4, 4, 4, 4) # limited by largest", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_3d_test_rechunk_auto_3d._even_split": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_3d_test_rechunk_auto_3d._even_split", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 710, "end_line": 715, "span_ids": ["test_rechunk_auto_3d"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_auto_3d():\n x = da.ones((20, 20, 20), chunks=((2, 2, 2)))\n y = x.rechunk({0: \"auto\", 1: \"auto\"}, block_size_limit=200 * x.dtype.itemsize)\n assert y.chunks[2] == x.chunks[2]\n assert y.chunks[0] == (10, 10)\n assert y.chunks[1] == (10, 10) # even split", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_image_stack_test_rechunk_auto_image_stack.None_2.assert_z_chunks_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_auto_image_stack_test_rechunk_auto_image_stack.None_2.assert_z_chunks_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 718, "end_line": 733, "span_ids": ["test_rechunk_auto_image_stack"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"n\", [100, 1000])\ndef test_rechunk_auto_image_stack(n):\n with dask.config.set({\"array.chunk-size\": \"10MiB\"}):\n x = da.ones((n, 1000, 1000), chunks=(1, 1000, 1000), dtype=\"uint8\")\n y = x.rechunk(\"auto\")\n assert y.chunks == ((10,) * (n // 10), (1000,), (1000,))\n assert y.rechunk(\"auto\").chunks == y.chunks # idempotent\n\n with dask.config.set({\"array.chunk-size\": \"7MiB\"}):\n z = x.rechunk(\"auto\")\n assert z.chunks == ((5,) * (n // 5), (1000,), (1000,))\n\n with dask.config.set({\"array.chunk-size\": \"1MiB\"}):\n x = da.ones((n, 1000, 1000), chunks=(1, 1000, 1000), dtype=\"float64\")\n z = x.rechunk(\"auto\")\n assert z.chunks == ((1,) * n, (250,) * 4, (250,) * 4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_down_test_rechunk_down.None_2.assert_z_chunks_10_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_down_test_rechunk_down.None_2.assert_z_chunks_10_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 736, "end_line": 751, "span_ids": ["test_rechunk_down"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_down():\n with dask.config.set({\"array.chunk-size\": \"10MiB\"}):\n x = da.ones((100, 1000, 1000), chunks=(1, 1000, 1000), dtype=\"uint8\")\n y = x.rechunk(\"auto\")\n assert y.chunks == ((10,) * 10, (1000,), (1000,))\n\n with dask.config.set({\"array.chunk-size\": \"1MiB\"}):\n z = y.rechunk(\"auto\")\n assert z.chunks == ((5,) * 20, (250,) * 4, (250,) * 4)\n\n with dask.config.set({\"array.chunk-size\": \"1MiB\"}):\n z = y.rechunk({0: \"auto\"})\n assert z.chunks == ((1,) * 100, (1000,), (1000,))\n\n z = y.rechunk({1: \"auto\"})\n assert z.chunks == ((10,) * 10, (100,) * 10, (1000,))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_rechunk.py_test_rechunk_zero_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_rechunk.py", "file_name": "test_rechunk.py", "file_type": "text/x-python", "category": "test", "start_line": 754, "end_line": 780, "span_ids": ["test_rechunk_bad_keys", "test_rechunk_zero"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rechunk_zero():\n with dask.config.set({\"array.chunk-size\": \"1B\"}):\n x = da.ones(10, chunks=(5,))\n y = x.rechunk(\"auto\")\n assert y.chunks == ((1,) * 10,)\n\n\ndef test_rechunk_bad_keys():\n x = da.zeros((2, 3, 4), chunks=1)\n assert x.rechunk({-1: 4}).chunks == ((1, 1), (1, 1, 1), (4,))\n assert x.rechunk({-x.ndim: 2}).chunks == ((2,), (1, 1, 1), (1, 1, 1, 1))\n\n with pytest.raises(TypeError) as info:\n x.rechunk({\"blah\": 4})\n\n assert \"blah\" in str(info.value)\n\n with pytest.raises(ValueError) as info:\n x.rechunk({100: 4})\n\n assert \"100\" in str(info.value)\n\n with pytest.raises(ValueError) as info:\n x.rechunk({-100: 4})\n\n assert \"-100\" in str(info.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_from_itertools_import_zip_test_numel.None_1.for_sub_in_itertools_comb.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_from_itertools_import_zip_test_numel.None_1.for_sub_in_itertools_comb.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 48, "span_ids": ["test_numel", "imports", "assert_eq"], "tokens": 386}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import zip_longest\nimport os\nimport warnings\n\nimport pytest\n\nnp = pytest.importorskip(\"numpy\")\n\nimport itertools\n\nimport dask.array as da\nfrom dask.array.utils import assert_eq as _assert_eq, same_keys\nfrom dask.core import get_deps\nimport dask.config as config\n\n\ndef assert_eq(a, b):\n _assert_eq(a, b, equal_nan=True)\n\n\n@pytest.mark.parametrize(\"dtype\", [\"f4\", \"i4\"])\n@pytest.mark.parametrize(\"keepdims\", [True, False])\ndef test_numel(dtype, keepdims):\n x = np.ones((2, 3, 4))\n\n assert_eq(\n da.reductions.numel(x, axis=(), keepdims=keepdims, dtype=dtype),\n np.sum(x, axis=(), keepdims=keepdims, dtype=dtype),\n )\n assert_eq(\n da.reductions.numel(x, axis=0, keepdims=keepdims, dtype=dtype),\n np.sum(x, axis=0, keepdims=keepdims, dtype=dtype),\n )\n\n for length in range(x.ndim):\n for sub in itertools.combinations([d for d in range(x.ndim)], length):\n assert_eq(\n da.reductions.numel(x, axis=sub, keepdims=keepdims, dtype=dtype),\n np.sum(x, axis=sub, keepdims=keepdims, dtype=dtype),\n )\n\n for length in range(x.ndim):\n for sub in itertools.combinations([d for d in range(x.ndim)], length):\n ssub = np.random.shuffle(list(sub))\n assert_eq(\n da.reductions.numel(x, axis=ssub, keepdims=keepdims, dtype=dtype),\n np.sum(x, axis=ssub, keepdims=keepdims, dtype=dtype),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_1d_test_reduction_1d_test.if_split_every_.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_1d_test_reduction_1d_test.if_split_every_.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 51, "end_line": 72, "span_ids": ["reduction_1d_test"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reduction_1d_test(da_func, darr, np_func, narr, use_dtype=True, split_every=True):\n assert_eq(da_func(darr), np_func(narr))\n assert_eq(\n da_func(narr), np_func(narr)\n ) # Ensure Dask reductions work with NumPy arrays\n assert_eq(da_func(darr, keepdims=True), np_func(narr, keepdims=True))\n assert_eq(da_func(darr, axis=()), np_func(narr, axis=()))\n assert same_keys(da_func(darr), da_func(darr))\n assert same_keys(da_func(darr, keepdims=True), da_func(darr, keepdims=True))\n if use_dtype:\n assert_eq(da_func(darr, dtype=\"f8\"), np_func(narr, dtype=\"f8\"))\n assert_eq(da_func(darr, dtype=\"i8\"), np_func(narr, dtype=\"i8\"))\n assert same_keys(da_func(darr, dtype=\"i8\"), da_func(darr, dtype=\"i8\"))\n if split_every:\n a1 = da_func(darr, split_every=2)\n a2 = da_func(darr, split_every={0: 2})\n assert same_keys(a1, a2)\n assert_eq(a1, np_func(narr))\n assert_eq(a2, np_func(narr))\n assert_eq(\n da_func(darr, keepdims=True, split_every=2), np_func(narr, keepdims=True)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_1D_test_reductions_1D.None_15": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_1D_test_reductions_1D.None_15", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 96, "span_ids": ["test_reductions_1D"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dtype\", [\"f4\", \"i4\"])\ndef test_reductions_1D(dtype):\n x = np.arange(5).astype(dtype)\n a = da.from_array(x, chunks=(2,))\n\n reduction_1d_test(da.sum, a, np.sum, x)\n reduction_1d_test(da.prod, a, np.prod, x)\n reduction_1d_test(da.mean, a, np.mean, x)\n reduction_1d_test(da.var, a, np.var, x)\n reduction_1d_test(da.std, a, np.std, x)\n reduction_1d_test(da.min, a, np.min, x, False)\n reduction_1d_test(da.max, a, np.max, x, False)\n reduction_1d_test(da.any, a, np.any, x, False)\n reduction_1d_test(da.all, a, np.all, x, False)\n\n reduction_1d_test(da.nansum, a, np.nansum, x)\n reduction_1d_test(da.nanprod, a, np.nanprod, x)\n reduction_1d_test(da.nanmean, a, np.mean, x)\n reduction_1d_test(da.nanvar, a, np.var, x)\n reduction_1d_test(da.nanstd, a, np.std, x)\n reduction_1d_test(da.nanmin, a, np.nanmin, x, False)\n reduction_1d_test(da.nanmax, a, np.nanmax, x, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_2d_test_reduction_2d_test.with_warnings_catch_warni.if_split_every_.None_8": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_reduction_2d_test_reduction_2d_test.with_warnings_catch_warni.if_split_every_.None_8", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 149, "span_ids": ["reduction_2d_test"], "tokens": 687}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def reduction_2d_test(da_func, darr, np_func, narr, use_dtype=True, split_every=True):\n with warnings.catch_warnings():\n warnings.simplefilter(\"ignore\") # overflow\n assert_eq(da_func(darr), np_func(narr))\n assert_eq(da_func(darr, keepdims=True), np_func(narr, keepdims=True))\n assert_eq(da_func(darr, axis=()), np_func(narr, axis=()))\n assert_eq(da_func(darr, axis=0), np_func(narr, axis=0))\n assert_eq(da_func(darr, axis=1), np_func(narr, axis=1))\n assert_eq(da_func(darr, axis=-1), np_func(narr, axis=-1))\n assert_eq(da_func(darr, axis=-2), np_func(narr, axis=-2))\n assert_eq(\n da_func(darr, axis=1, keepdims=True), np_func(narr, axis=1, keepdims=True)\n )\n assert_eq(\n da_func(darr, axis=(), keepdims=True), np_func(narr, axis=(), keepdims=True)\n )\n assert_eq(da_func(darr, axis=(1, 0)), np_func(narr, axis=(1, 0)))\n\n assert same_keys(da_func(darr, axis=()), da_func(darr, axis=()))\n assert same_keys(da_func(darr, axis=1), da_func(darr, axis=1))\n assert same_keys(da_func(darr, axis=(1, 0)), da_func(darr, axis=(1, 0)))\n\n if use_dtype:\n assert_eq(da_func(darr, dtype=\"f8\"), np_func(narr, dtype=\"f8\"))\n assert_eq(da_func(darr, dtype=\"i8\"), np_func(narr, dtype=\"i8\"))\n\n if split_every:\n a1 = da_func(darr, split_every=4)\n a2 = da_func(darr, split_every={0: 2, 1: 2})\n assert same_keys(a1, a2)\n assert_eq(a1, np_func(narr))\n assert_eq(a2, np_func(narr))\n assert_eq(\n da_func(darr, keepdims=True, split_every=4),\n np_func(narr, keepdims=True),\n )\n assert_eq(da_func(darr, axis=(), split_every=2), np_func(narr, axis=()))\n assert_eq(da_func(darr, axis=0, split_every=2), np_func(narr, axis=0))\n assert_eq(\n da_func(darr, axis=(), keepdims=True, split_every=2),\n np_func(narr, axis=(), keepdims=True),\n )\n assert_eq(\n da_func(darr, axis=0, keepdims=True, split_every=2),\n np_func(narr, axis=0, keepdims=True),\n )\n assert_eq(da_func(darr, axis=1, split_every=2), np_func(narr, axis=1))\n assert_eq(\n da_func(darr, axis=1, keepdims=True, split_every=2),\n np_func(narr, axis=1, keepdims=True),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reduction_errors_test_reductions_2D.None_15": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reduction_errors_test_reductions_2D.None_15", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 185, "span_ids": ["test_reductions_2D", "test_reduction_errors"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reduction_errors():\n x = da.ones((5, 5), chunks=(3, 3))\n with pytest.raises(ValueError):\n x.sum(axis=2)\n with pytest.raises(ValueError):\n x.sum(axis=-3)\n\n\n@pytest.mark.slow\n@pytest.mark.parametrize(\"dtype\", [\"f4\", \"i4\"])\ndef test_reductions_2D(dtype):\n x = np.arange(1, 122).reshape((11, 11)).astype(dtype)\n a = da.from_array(x, chunks=(4, 4))\n\n b = a.sum(keepdims=True)\n assert b.__dask_keys__() == [[(b.name, 0, 0)]]\n\n reduction_2d_test(da.sum, a, np.sum, x)\n reduction_2d_test(da.prod, a, np.prod, x)\n reduction_2d_test(da.mean, a, np.mean, x)\n reduction_2d_test(da.var, a, np.var, x, False) # Difference in dtype algo\n reduction_2d_test(da.std, a, np.std, x, False) # Difference in dtype algo\n reduction_2d_test(da.min, a, np.min, x, False)\n reduction_2d_test(da.max, a, np.max, x, False)\n reduction_2d_test(da.any, a, np.any, x, False)\n reduction_2d_test(da.all, a, np.all, x, False)\n\n reduction_2d_test(da.nansum, a, np.nansum, x)\n reduction_2d_test(da.nanprod, a, np.nanprod, x)\n reduction_2d_test(da.nanmean, a, np.mean, x)\n reduction_2d_test(da.nanvar, a, np.nanvar, x, False) # Difference in dtype algo\n reduction_2d_test(da.nanstd, a, np.nanstd, x, False) # Difference in dtype algo\n reduction_2d_test(da.nanmin, a, np.nanmin, x, False)\n reduction_2d_test(da.nanmax, a, np.nanmax, x, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_test_arg_reductions.assert_eq_dfunc_a2_0_sp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_test_arg_reductions.assert_eq_dfunc_a2_0_sp", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 218, "span_ids": ["test_arg_reductions"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n [\"dfunc\", \"func\"],\n [\n (da.argmin, np.argmin),\n (da.argmax, np.argmax),\n (da.nanargmin, np.nanargmin),\n (da.nanargmax, np.nanargmax),\n ],\n)\ndef test_arg_reductions(dfunc, func):\n x = np.random.random((10, 10, 10))\n a = da.from_array(x, chunks=(3, 4, 5))\n\n assert_eq(dfunc(a), func(x))\n assert_eq(dfunc(a, 0), func(x, 0))\n assert_eq(dfunc(a, 1), func(x, 1))\n assert_eq(dfunc(a, 2), func(x, 2))\n with config.set(split_every=2):\n assert_eq(dfunc(a), func(x))\n assert_eq(dfunc(a, 0), func(x, 0))\n assert_eq(dfunc(a, 1), func(x, 1))\n assert_eq(dfunc(a, 2), func(x, 2))\n\n pytest.raises(ValueError, lambda: dfunc(a, 3))\n pytest.raises(TypeError, lambda: dfunc(a, (0, 1)))\n\n x2 = np.arange(10)\n a2 = da.from_array(x2, chunks=3)\n assert_eq(dfunc(a2), func(x2))\n assert_eq(dfunc(a2, 0), func(x2, 0))\n assert_eq(dfunc(a2, 0, split_every=2), func(x2, 0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nanarg_reductions_test_nanarg_reductions.None_2.with_pytest_warns_None_.dfunc_a_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nanarg_reductions_test_nanarg_reductions.None_2.with_pytest_warns_None_.dfunc_a_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 221, "end_line": 243, "span_ids": ["test_nanarg_reductions"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n [\"dfunc\", \"func\"], [(da.nanargmin, np.nanargmin), (da.nanargmax, np.nanargmax)]\n)\ndef test_nanarg_reductions(dfunc, func):\n\n x = np.random.random((10, 10, 10))\n x[5] = np.nan\n a = da.from_array(x, chunks=(3, 4, 5))\n assert_eq(dfunc(a), func(x))\n assert_eq(dfunc(a, 0), func(x, 0))\n with pytest.raises(ValueError):\n with pytest.warns(None): # All NaN axis\n dfunc(a, 1).compute()\n\n with pytest.raises(ValueError):\n with pytest.warns(None): # All NaN axis\n dfunc(a, 2).compute()\n\n x[:] = np.nan\n a = da.from_array(x, chunks=(3, 4, 5))\n with pytest.raises(ValueError):\n with pytest.warns(None): # All NaN axis\n dfunc(a).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_unknown_chunksize_test_arg_reductions_unknown_single_chunksize.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_arg_reductions_unknown_chunksize_test_arg_reductions_unknown_single_chunksize.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 246, "end_line": 274, "span_ids": ["test_arg_reductions_unknown_chunksize_2d", "test_arg_reductions_unknown_chunksize", "test_arg_reductions_unknown_single_chunksize"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", [\"argmax\", \"nanargmax\"])\ndef test_arg_reductions_unknown_chunksize(func):\n x = da.arange(10, chunks=5)\n x = x[x > 1]\n\n with pytest.raises(ValueError) as info:\n getattr(da, func)(x)\n\n assert \"unknown chunksize\" in str(info.value)\n\n\n@pytest.mark.parametrize(\"func\", [\"argmax\", \"nanargmax\"])\ndef test_arg_reductions_unknown_chunksize_2d(func):\n x = da.ones((10, 10), chunks=(5, 5))\n x = x[x[0, :] > 0, :] # unknown chunks in first dimension only\n\n with pytest.raises(ValueError):\n getattr(da, func)(x, axis=0)\n\n getattr(da, func)(x, axis=1).compute()\n\n\n@pytest.mark.parametrize(\"func\", [\"argmax\", \"nanargmax\"])\ndef test_arg_reductions_unknown_single_chunksize(func):\n x = da.ones((10, 10), chunks=(10, 10))\n x = x[x[0, :] > 0, :] # unknown chunks in first dimension only\n\n getattr(da, func)(x, axis=0).compute()\n getattr(da, func)(x, axis=1).compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans_test_reductions_2D_nans.None_9.assert_eq_da_nanargmin_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans_test_reductions_2D_nans.None_9.assert_eq_da_nanargmin_a_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 327, "span_ids": ["test_reductions_2D_nans"], "tokens": 749}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reductions_2D_nans():\n # chunks are a mix of some/all/no NaNs\n x = np.full((4, 4), np.nan)\n x[:2, :2] = np.array([[1, 2], [3, 4]])\n x[2, 2] = 5\n x[3, 3] = 6\n a = da.from_array(x, chunks=(2, 2))\n\n reduction_2d_test(da.sum, a, np.sum, x, False, False)\n reduction_2d_test(da.prod, a, np.prod, x, False, False)\n reduction_2d_test(da.mean, a, np.mean, x, False, False)\n reduction_2d_test(da.var, a, np.var, x, False, False)\n reduction_2d_test(da.std, a, np.std, x, False, False)\n reduction_2d_test(da.min, a, np.min, x, False, False)\n reduction_2d_test(da.max, a, np.max, x, False, False)\n reduction_2d_test(da.any, a, np.any, x, False, False)\n reduction_2d_test(da.all, a, np.all, x, False, False)\n\n reduction_2d_test(da.nansum, a, np.nansum, x, False, False)\n reduction_2d_test(da.nanprod, a, np.nanprod, x, False, False)\n reduction_2d_test(da.nanmean, a, np.nanmean, x, False, False)\n with pytest.warns(None): # division by 0 warning\n reduction_2d_test(da.nanvar, a, np.nanvar, x, False, False)\n with pytest.warns(None): # division by 0 warning\n reduction_2d_test(da.nanstd, a, np.nanstd, x, False, False)\n with pytest.warns(None): # all NaN axis warning\n reduction_2d_test(da.nanmin, a, np.nanmin, x, False, False)\n with pytest.warns(None): # all NaN axis warning\n reduction_2d_test(da.nanmax, a, np.nanmax, x, False, False)\n\n with warnings.catch_warnings():\n # RuntimeWarning: invalid value encountered in reduce\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n assert_eq(da.argmax(a), np.argmax(x))\n assert_eq(da.argmin(a), np.argmin(x))\n\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmax(a), np.nanargmax(x))\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmin(a), np.nanargmin(x))\n\n with warnings.catch_warnings():\n # RuntimeWarning: invalid value encountered in reduce\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n assert_eq(da.argmax(a, axis=0), np.argmax(x, axis=0))\n assert_eq(da.argmin(a, axis=0), np.argmin(x, axis=0))\n\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmax(a, axis=0), np.nanargmax(x, axis=0))\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmin(a, axis=0), np.nanargmin(x, axis=0))\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans.None_10_test_reductions_2D_nans.None_12.assert_eq_da_nanargmin_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_2D_nans.None_10_test_reductions_2D_nans.None_12.assert_eq_da_nanargmin_a_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 329, "end_line": 338, "span_ids": ["test_reductions_2D_nans"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reductions_2D_nans():\n # ... other code\n\n with warnings.catch_warnings():\n # RuntimeWarning: invalid value encountered in reduce\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n assert_eq(da.argmax(a, axis=1), np.argmax(x, axis=1))\n assert_eq(da.argmin(a, axis=1), np.argmin(x, axis=1))\n\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmax(a, axis=1), np.nanargmax(x, axis=1))\n with pytest.warns(None): # all NaN axis warning\n assert_eq(da.nanargmin(a, axis=1), np.nanargmin(x, axis=1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_moment_test_moment.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_moment_test_moment.None_7", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 341, "end_line": 362, "span_ids": ["test_moment"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_moment():\n def moment(x, n, axis=None):\n return ((x - x.mean(axis=axis, keepdims=True)) ** n).sum(\n axis=axis\n ) / np.ones_like(x).sum(axis=axis)\n\n # Poorly conditioned\n x = np.array([1.0, 2.0, 3.0] * 10).reshape((3, 10)) + 1e8\n a = da.from_array(x, chunks=5)\n assert_eq(a.moment(2), moment(x, 2))\n assert_eq(a.moment(3), moment(x, 3))\n assert_eq(a.moment(4), moment(x, 4))\n\n x = np.arange(1, 122).reshape((11, 11)).astype(\"f8\")\n a = da.from_array(x, chunks=(4, 4))\n assert_eq(a.moment(4, axis=1), moment(x, 4, axis=1))\n assert_eq(a.moment(4, axis=(1, 0)), moment(x, 4, axis=(1, 0)))\n\n # Tree reduction\n assert_eq(a.moment(order=4, split_every=4), moment(x, 4))\n assert_eq(a.moment(order=4, axis=0, split_every=4), moment(x, 4, axis=0))\n assert_eq(a.moment(order=4, axis=1, split_every=4), moment(x, 4, axis=1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_negative_axes_test_reductions_with_negative_axes.assert_eq_a_sum_axis_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_negative_axes_test_reductions_with_negative_axes.assert_eq_a_sum_axis_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 365, "end_line": 373, "span_ids": ["test_reductions_with_negative_axes"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reductions_with_negative_axes():\n x = np.random.random((4, 4, 4))\n a = da.from_array(x, chunks=2)\n\n assert_eq(a.argmin(axis=-1), x.argmin(axis=-1))\n assert_eq(a.argmin(axis=-1, split_every=2), x.argmin(axis=-1))\n\n assert_eq(a.sum(axis=-1), x.sum(axis=-1))\n assert_eq(a.sum(axis=(0, -1)), x.sum(axis=(0, -1)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_test_nan.assert_eq_np_nanprod_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_test_nan.assert_eq_np_nanprod_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 376, "end_line": 389, "span_ids": ["test_nan"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nan():\n x = np.array([[1, np.nan, 3, 4], [5, 6, 7, np.nan], [9, 10, 11, 12]])\n d = da.from_array(x, chunks=(2, 2))\n\n assert_eq(np.nansum(x), da.nansum(d))\n assert_eq(np.nansum(x, axis=0), da.nansum(d, axis=0))\n assert_eq(np.nanmean(x, axis=1), da.nanmean(d, axis=1))\n assert_eq(np.nanmin(x, axis=1), da.nanmin(d, axis=1))\n assert_eq(np.nanmax(x, axis=(0, 1)), da.nanmax(d, axis=(0, 1)))\n assert_eq(np.nanvar(x), da.nanvar(d))\n assert_eq(np.nanstd(x, axis=0), da.nanstd(d, axis=0))\n assert_eq(np.nanargmin(x, axis=0), da.nanargmin(d, axis=0))\n assert_eq(np.nanargmax(x, axis=0), da.nanargmax(d, axis=0))\n assert_eq(np.nanprod(x), da.nanprod(d))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_object_test_nan_object.with_warnings_catch_warni.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_nan_object_test_nan_object.with_warnings_catch_warni.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 392, "end_line": 420, "span_ids": ["test_nan_object"], "tokens": 342}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", [\"nansum\", \"sum\", \"nanmin\", \"min\", \"nanmax\", \"max\"])\ndef test_nan_object(func):\n with warnings.catch_warnings():\n if os.name == \"nt\" and func in {\"min\", \"max\"}:\n # RuntimeWarning: invalid value encountered in reduce in wrapreduction\n # from NumPy.\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n\n x = np.array([[1, np.nan, 3, 4], [5, 6, 7, np.nan], [9, 10, 11, 12]]).astype(\n object\n )\n d = da.from_array(x, chunks=(2, 2))\n\n if func in {\"nanmin\", \"nanmax\"}:\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n\n assert_eq(getattr(np, func)(x, axis=()), getattr(da, func)(d, axis=()))\n\n if func in {\"nanmin\", \"nanmax\"}:\n warnings.simplefilter(\"default\", RuntimeWarning)\n\n if func in {\"min\", \"max\"}:\n warnings.simplefilter(\"ignore\", RuntimeWarning)\n assert_eq(getattr(np, func)(x, axis=0), getattr(da, func)(d, axis=0))\n if os.name != \"nt\" and func in {\"min\", \"max\"}:\n warnings.simplefilter(\"default\", RuntimeWarning)\n\n assert_eq(getattr(np, func)(x, axis=1), getattr(da, func)(d, axis=1))\n assert_eq(getattr(np, func)(x), getattr(da, func)(d))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_0d_array_test_reduction_on_scalar.assert_x_x_all_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_0d_array_test_reduction_on_scalar.assert_x_x_all_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 423, "end_line": 436, "span_ids": ["test_0d_array", "test_reduction_on_scalar"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_0d_array():\n x = da.mean(da.ones(4, chunks=4), axis=()).compute()\n x = da.mean(da.ones(4, chunks=4), axis=0).compute()\n y = np.mean(np.ones(4))\n assert type(x) == type(y)\n\n x = da.sum(da.zeros(4, chunks=1)).compute()\n y = np.sum(np.zeros(4))\n assert type(x) == type(y)\n\n\ndef test_reduction_on_scalar():\n x = da.from_array(np.array(1.0), chunks=())\n assert (x == x).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_empty_array_assert_max_deps.if_eq_.else_.assert_max_map_len_depen": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_reductions_with_empty_array_assert_max_deps.if_eq_.else_.assert_max_map_len_depen", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 439, "end_line": 459, "span_ids": ["assert_max_deps", "test_reductions_with_empty_array"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reductions_with_empty_array():\n dx1 = da.ones((10, 0, 5), chunks=4)\n x1 = dx1.compute()\n dx2 = da.ones((0, 0, 0), chunks=4)\n x2 = dx2.compute()\n\n for dx, x in [(dx1, x1), (dx2, x2)]:\n with pytest.warns(None): # empty slice warning\n assert_eq(dx.mean(), x.mean())\n assert_eq(dx.mean(axis=()), x.mean(axis=()))\n assert_eq(dx.mean(axis=0), x.mean(axis=0))\n assert_eq(dx.mean(axis=1), x.mean(axis=1))\n assert_eq(dx.mean(axis=2), x.mean(axis=2))\n\n\ndef assert_max_deps(x, n, eq=True):\n dependencies, dependents = get_deps(x.dask)\n if eq:\n assert max(map(len, dependencies.values())) == n\n else:\n assert max(map(len, dependencies.values())) <= n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_depth_test_tree_reduce_depth.None_26": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_depth_test_tree_reduce_depth.None_26", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 462, "end_line": 496, "span_ids": ["test_tree_reduce_depth"], "tokens": 646}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tree_reduce_depth():\n # 2D\n x = da.from_array(np.arange(242).reshape((11, 22)), chunks=(3, 4))\n thresh = {0: 2, 1: 3}\n assert_max_deps(x.sum(split_every=thresh), 2 * 3)\n assert_max_deps(x.sum(axis=(), split_every=thresh), 1)\n assert_max_deps(x.sum(axis=0, split_every=thresh), 2)\n assert_max_deps(x.sum(axis=1, split_every=thresh), 3)\n assert_max_deps(x.sum(split_every=20), 20, False)\n assert_max_deps(x.sum(axis=(), split_every=20), 1)\n assert_max_deps(x.sum(axis=0, split_every=20), 4)\n assert_max_deps(x.sum(axis=1, split_every=20), 6)\n\n # 3D\n x = da.from_array(np.arange(11 * 22 * 29).reshape((11, 22, 29)), chunks=(3, 4, 5))\n thresh = {0: 2, 1: 3, 2: 4}\n assert_max_deps(x.sum(split_every=thresh), 2 * 3 * 4)\n assert_max_deps(x.sum(axis=(), split_every=thresh), 1)\n assert_max_deps(x.sum(axis=0, split_every=thresh), 2)\n assert_max_deps(x.sum(axis=1, split_every=thresh), 3)\n assert_max_deps(x.sum(axis=2, split_every=thresh), 4)\n assert_max_deps(x.sum(axis=(0, 1), split_every=thresh), 2 * 3)\n assert_max_deps(x.sum(axis=(0, 2), split_every=thresh), 2 * 4)\n assert_max_deps(x.sum(axis=(1, 2), split_every=thresh), 3 * 4)\n assert_max_deps(x.sum(split_every=20), 20, False)\n assert_max_deps(x.sum(axis=(), split_every=20), 1)\n assert_max_deps(x.sum(axis=0, split_every=20), 4)\n assert_max_deps(x.sum(axis=1, split_every=20), 6)\n assert_max_deps(x.sum(axis=2, split_every=20), 6)\n assert_max_deps(x.sum(axis=(0, 1), split_every=20), 20, False)\n assert_max_deps(x.sum(axis=(0, 2), split_every=20), 20, False)\n assert_max_deps(x.sum(axis=(1, 2), split_every=20), 20, False)\n assert_max_deps(x.sum(axis=(0, 1), split_every=40), 4 * 6)\n assert_max_deps(x.sum(axis=(0, 2), split_every=40), 4 * 6)\n assert_max_deps(x.sum(axis=(1, 2), split_every=40), 6 * 6)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_set_options_test_array_reduction_out.assert_eq_x_func_np_ones": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_tree_reduce_set_options_test_array_reduction_out.assert_eq_x_func_np_ones", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 499, "end_line": 533, "span_ids": ["test_array_reduction_out", "test_tree_reduce_set_options", "test_general_reduction_names", "test_reduction_names"], "tokens": 383}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tree_reduce_set_options():\n x = da.from_array(np.arange(242).reshape((11, 22)), chunks=(3, 4))\n with config.set(split_every={0: 2, 1: 3}):\n assert_max_deps(x.sum(), 2 * 3)\n assert_max_deps(x.sum(axis=()), 1)\n assert_max_deps(x.sum(axis=0), 2)\n\n\ndef test_reduction_names():\n x = da.ones(5, chunks=(2,))\n assert x.sum().name.startswith(\"sum\")\n assert \"max\" in x.max().name.split(\"-\")[0]\n assert x.var().name.startswith(\"var\")\n assert x.all().name.startswith(\"all\")\n assert any(k[0].startswith(\"nansum\") for k in da.nansum(x).dask)\n assert x.mean().name.startswith(\"mean\")\n\n\ndef test_general_reduction_names():\n dtype = int\n a = da.reduction(\n da.ones(10, dtype, chunks=2), np.sum, np.sum, dtype=dtype, name=\"foo\"\n )\n names, tokens = list(zip_longest(*[key[0].rsplit(\"-\", 1) for key in a.dask]))\n assert set(names) == {\"ones\", \"foo\", \"foo-partial\", \"foo-aggregate\"}\n assert all(tokens)\n\n\n@pytest.mark.filterwarnings(\"ignore:`argmax` is not implemented by dask\")\n@pytest.mark.parametrize(\"func\", [np.sum, np.argmax])\ndef test_array_reduction_out(func):\n x = da.arange(10, chunks=(5,))\n y = da.ones((10, 10), chunks=(4, 4))\n func(y, axis=0, out=x)\n assert_eq(x, func(np.ones((10, 10)), axis=0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_array_cumreduction_axis_test_array_cumreduction_out.assert_eq_x_func_np_ones": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_array_cumreduction_axis_test_array_cumreduction_out.assert_eq_x_func_np_ones", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 536, "end_line": 559, "span_ids": ["test_array_cumreduction_axis", "test_array_cumreduction_out"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", [\"cumsum\", \"cumprod\", \"nancumsum\", \"nancumprod\"])\n@pytest.mark.parametrize(\"use_nan\", [False, True])\n@pytest.mark.parametrize(\"axis\", [None, 0, 1, -1])\ndef test_array_cumreduction_axis(func, use_nan, axis):\n np_func = getattr(np, func)\n da_func = getattr(da, func)\n\n s = (10, 11, 12)\n a = np.arange(np.prod(s)).reshape(s)\n if use_nan:\n a[1] = np.nan\n d = da.from_array(a, chunks=(4, 5, 6))\n\n a_r = np_func(a, axis=axis)\n d_r = da_func(d, axis=axis)\n\n assert_eq(a_r, d_r)\n\n\n@pytest.mark.parametrize(\"func\", [np.cumsum, np.cumprod])\ndef test_array_cumreduction_out(func):\n x = da.ones((10, 10), chunks=(4, 4))\n func(x, axis=0, out=x)\n assert_eq(x, func(np.ones((10, 10)), axis=0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk1_test_topk_argtopk1.None_1.daskfunc_b_k_axis_3_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk1_test_topk_argtopk1.None_1.daskfunc_b_k_axis_3_s", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 562, "end_line": 613, "span_ids": ["test_topk_argtopk1"], "tokens": 595}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"npfunc,daskfunc\", [(np.sort, da.topk), (np.argsort, da.argtopk)]\n)\n@pytest.mark.parametrize(\"split_every\", [None, 2, 4, 8])\ndef test_topk_argtopk1(npfunc, daskfunc, split_every):\n # Test data\n k = 5\n # Test at least 3 levels of aggregation when split_every=2\n # to stress the different chunk, combine, aggregate kernels\n npa = np.random.random(800)\n npb = np.random.random((10, 20, 30))\n\n a = da.from_array(npa, chunks=((120, 80, 100, 200, 300),))\n b = da.from_array(npb, chunks=(4, 8, 8))\n\n # 1-dimensional arrays\n # top 5 elements, sorted descending\n assert_eq(npfunc(npa)[-k:][::-1], daskfunc(a, k, split_every=split_every))\n # bottom 5 elements, sorted ascending\n assert_eq(npfunc(npa)[:k], daskfunc(a, -k, split_every=split_every))\n\n # n-dimensional arrays\n # also testing when k > chunk\n # top 5 elements, sorted descending\n assert_eq(\n npfunc(npb, axis=0)[-k:, :, :][::-1, :, :],\n daskfunc(b, k, axis=0, split_every=split_every),\n )\n assert_eq(\n npfunc(npb, axis=1)[:, -k:, :][:, ::-1, :],\n daskfunc(b, k, axis=1, split_every=split_every),\n )\n assert_eq(\n npfunc(npb, axis=-1)[:, :, -k:][:, :, ::-1],\n daskfunc(b, k, axis=-1, split_every=split_every),\n )\n with pytest.raises(ValueError):\n daskfunc(b, k, axis=3, split_every=split_every)\n\n # bottom 5 elements, sorted ascending\n assert_eq(\n npfunc(npb, axis=0)[:k, :, :], daskfunc(b, -k, axis=0, split_every=split_every)\n )\n assert_eq(\n npfunc(npb, axis=1)[:, :k, :], daskfunc(b, -k, axis=1, split_every=split_every)\n )\n assert_eq(\n npfunc(npb, axis=-1)[:, :, :k],\n daskfunc(b, -k, axis=-1, split_every=split_every),\n )\n with pytest.raises(ValueError):\n daskfunc(b, -k, axis=3, split_every=split_every)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk2_test_topk_argtopk2.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk2_test_topk_argtopk2.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 616, "end_line": 630, "span_ids": ["test_topk_argtopk2"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"npfunc,daskfunc\", [(np.sort, da.topk), (np.argsort, da.argtopk)]\n)\n@pytest.mark.parametrize(\"split_every\", [None, 2, 3, 4])\n@pytest.mark.parametrize(\"chunksize\", [1, 2, 3, 4, 5, 10])\ndef test_topk_argtopk2(npfunc, daskfunc, split_every, chunksize):\n \"\"\"Fine test use cases when k is larger than chunk size\"\"\"\n npa = np.random.random((10,))\n a = da.from_array(npa, chunks=chunksize)\n k = 5\n\n # top 5 elements, sorted descending\n assert_eq(npfunc(npa)[-k:][::-1], daskfunc(a, k, split_every=split_every))\n # bottom 5 elements, sorted ascending\n assert_eq(npfunc(npa)[:k], daskfunc(a, -k, split_every=split_every))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk3_test_topk_argtopk3.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_topk_argtopk3_test_topk_argtopk3.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 633, "end_line": 640, "span_ids": ["test_topk_argtopk3"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_topk_argtopk3():\n a = da.random.random((10, 20, 30), chunks=(4, 8, 8))\n\n # As Array methods\n assert_eq(a.topk(5, axis=1, split_every=2), da.topk(a, 5, axis=1, split_every=2))\n assert_eq(\n a.argtopk(5, axis=1, split_every=2), da.argtopk(a, 5, axis=1, split_every=2)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_regres_3940_test_regres_3940.if_func_not_in_da_cumsum.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_regres_3940_test_regres_3940.if_func_not_in_da_cumsum.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 643, "end_line": 654, "span_ids": ["test_regres_3940"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"func\",\n [da.cumsum, da.cumprod, da.argmin, da.argmax, da.min, da.max, da.nansum, da.nanmax],\n)\ndef test_regres_3940(func):\n a = da.ones((5, 2), chunks=(2, 2))\n assert func(a).name != func(a + 1).name\n assert func(a, axis=0).name != func(a).name\n assert func(a, axis=0).name != func(a, axis=1).name\n if func not in {da.cumsum, da.cumprod, da.argmin, da.argmax}:\n assert func(a, axis=()).name != func(a).name\n assert func(a, axis=()).name != func(a, axis=0).name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_trace_test_trace.None_13": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_trace_test_trace.None_13", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 657, "end_line": 679, "span_ids": ["test_trace"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_trace():\n def _assert(a, b, *args, **kwargs):\n return assert_eq(a.trace(*args, **kwargs), b.trace(*args, **kwargs))\n\n b = np.arange(12).reshape((3, 4))\n a = da.from_array(b, 1)\n _assert(a, b)\n _assert(a, b, 0)\n _assert(a, b, 1)\n _assert(a, b, -1)\n\n b = np.arange(8).reshape((2, 2, 2))\n a = da.from_array(b, 2)\n _assert(a, b)\n _assert(a, b, 0)\n _assert(a, b, 1)\n _assert(a, b, -1)\n _assert(a, b, 0, 0, 1)\n _assert(a, b, 0, 0, 2)\n _assert(a, b, 0, 1, 2, int)\n _assert(a, b, 0, 1, 2, float)\n _assert(a, b, offset=1, axis1=0, axis2=2, dtype=int)\n _assert(a, b, offset=1, axis1=0, axis2=2, dtype=float)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_median_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reductions.py_test_median_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reductions.py", "file_name": "test_reductions.py", "file_type": "text/x-python", "category": "test", "start_line": 682, "end_line": 692, "span_ids": ["test_median"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", [\"median\", \"nanmedian\"])\n@pytest.mark.parametrize(\"axis\", [0, [0, 1], 1, -1])\n@pytest.mark.parametrize(\"keepdims\", [True, False])\ndef test_median(axis, keepdims, func):\n x = np.arange(100).reshape((2, 5, 10))\n d = da.from_array(x, chunks=2)\n assert_eq(\n getattr(da, func)(d, axis=axis, keepdims=keepdims),\n getattr(np, func)(x, axis=axis, keepdims=keepdims),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_pytest_test_reshape_rechunk.assert_np_prod_list_map_l": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_pytest_test_reshape_rechunk.assert_np_prod_list_map_l", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reshape.py", "file_name": "test_reshape.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 51, "span_ids": ["imports", "test_reshape_rechunk"], "tokens": 843}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nimport numpy as np\nimport dask.array as da\nfrom dask.array.reshape import reshape_rechunk, expand_tuple, contract_tuple\nfrom dask.array.utils import assert_eq\n\n\n@pytest.mark.parametrize(\n \"inshape,outshape,prechunks,inchunks,outchunks\",\n [\n ((4,), (4,), ((2, 2),), ((2, 2),), ((2, 2),)),\n ((4,), (2, 2), ((2, 2),), ((2, 2),), ((1, 1), (2,))),\n ((4,), (4, 1), ((2, 2),), ((2, 2),), ((2, 2), (1,))),\n ((4,), (1, 4), ((2, 2),), ((2, 2),), ((1,), (2, 2))),\n ((1, 4), (4,), ((1,), (2, 2)), ((1,), (2, 2)), ((2, 2),)),\n ((4, 1), (4,), ((2, 2), (1,)), ((2, 2), (1,)), ((2, 2),)),\n (\n (4, 1, 4),\n (4, 4),\n ((2, 2), (1,), (2, 2)),\n ((2, 2), (1,), (2, 2)),\n ((2, 2), (2, 2)),\n ),\n ((4, 4), (4, 1, 4), ((2, 2), (2, 2)), ((2, 2), (2, 2)), ((2, 2), (1,), (2, 2))),\n ((2, 2), (4,), ((2,), (2,)), ((2,), (2,)), ((4,),)),\n ((2, 2), (4,), ((1, 1), (2,)), ((1, 1), (2,)), ((2, 2),)),\n ((2, 2), (4,), ((2,), (1, 1)), ((1, 1), (2,)), ((2, 2),)),\n (\n (64,),\n (4, 4, 4),\n ((8, 8, 8, 8, 8, 8, 8, 8),),\n ((16, 16, 16, 16),),\n ((1, 1, 1, 1), (4,), (4,)),\n ),\n ((64,), (4, 4, 4), ((32, 32),), ((32, 32),), ((2, 2), (4,), (4,))),\n ((64,), (4, 4, 4), ((16, 48),), ((16, 48),), ((1, 3), (4,), (4,))),\n ((64,), (4, 4, 4), ((20, 44),), ((16, 48),), ((1, 3), (4,), (4,))),\n (\n (64, 4),\n (8, 8, 4),\n ((16, 16, 16, 16), (2, 2)),\n ((16, 16, 16, 16), (2, 2)),\n ((2, 2, 2, 2), (8,), (2, 2)),\n ),\n ],\n)\ndef test_reshape_rechunk(inshape, outshape, prechunks, inchunks, outchunks):\n result_in, result_out = reshape_rechunk(inshape, outshape, prechunks)\n assert result_in == inchunks\n assert result_out == outchunks\n assert np.prod(list(map(len, result_in))) == np.prod(list(map(len, result_out)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_expand_tuple_test_expand_tuple.assert_expand_tuple_7_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_expand_tuple_test_expand_tuple.assert_expand_tuple_7_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reshape.py", "file_name": "test_reshape.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 58, "span_ids": ["test_expand_tuple"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_expand_tuple():\n assert expand_tuple((2, 4), 2) == (1, 1, 2, 2)\n assert expand_tuple((2, 4), 3) == (1, 1, 1, 1, 2)\n assert expand_tuple((3, 4), 2) == (1, 2, 2, 2)\n assert expand_tuple((7, 4), 3) == (2, 2, 3, 1, 1, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_contract_tuple_test_contract_tuple.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_contract_tuple_test_contract_tuple.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reshape.py", "file_name": "test_reshape.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 65, "span_ids": ["test_contract_tuple"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_contract_tuple():\n assert contract_tuple((1, 1, 2, 3, 1), 2) == (2, 2, 2, 2)\n assert contract_tuple((1, 1, 2, 5, 1), 2) == (2, 2, 4, 2)\n assert contract_tuple((2, 4), 2) == (2, 4)\n assert contract_tuple((2, 4), 3) == (6,)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_reshape_unknown_sizes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_reshape.py_test_reshape_unknown_sizes_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_reshape.py", "file_name": "test_reshape.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 82, "span_ids": ["test_reshape_unknown_sizes"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_reshape_unknown_sizes():\n a = np.random.random((10, 6, 6))\n A = da.from_array(a, chunks=(5, 2, 3))\n\n a2 = a.reshape((60, -1))\n A2 = A.reshape((60, -1))\n\n assert A2.shape == (60, 6)\n assert_eq(A2, a2)\n\n with pytest.raises(ValueError):\n a.reshape((60, -1, -1))\n with pytest.raises(ValueError):\n A.reshape((60, -1, -1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_itertools_test_array.assert_isinstance_y_da_A": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_itertools_test_array.assert_isinstance_y_da_A", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["imports", "test_array"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nfrom numbers import Number\n\nimport pytest\nfrom distutils.version import LooseVersion\n\nnp = pytest.importorskip(\"numpy\")\n\nimport dask.array as da\nfrom dask.utils import ignoring\nfrom dask.array.utils import assert_eq, same_keys, AxisError, IS_NEP18_ACTIVE\nfrom dask.array.numpy_compat import _numpy_115\n\n\ndef test_array():\n x = np.ones(5, dtype=\"i4\")\n d = da.ones(5, chunks=3, dtype=\"i4\")\n assert_eq(da.array(d, ndmin=3, dtype=\"i8\"), np.array(x, ndmin=3, dtype=\"i8\"))\n\n # regression #1847 this shall not raise an exception.\n x = da.ones((100, 3), chunks=10)\n y = da.array(x)\n assert isinstance(y, da.Array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_array_return_type_test_atleast_nd_no_args.assert_np_r_n_da_r_n": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_array_return_type_test_atleast_nd_no_args.assert_np_r_n_da_r_n", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 26, "end_line": 47, "span_ids": ["test_array_return_type", "test_atleast_nd_no_args", "test_derived_docstrings"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_array_return_type():\n # Regression test for https://github.com/dask/dask/issues/5426\n x = [0, 1, 2, 3]\n dx = da.array(x)\n assert isinstance(dx, da.Array)\n assert_eq(x, dx)\n\n\ndef test_derived_docstrings():\n assert \"This docstring was copied from numpy.array\" in da.routines.array.__doc__\n assert \"Create an array.\" in da.routines.array.__doc__\n\n\n@pytest.mark.parametrize(\"funcname\", [\"atleast_1d\", \"atleast_2d\", \"atleast_3d\"])\ndef test_atleast_nd_no_args(funcname):\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n\n np_r_n = np_func()\n da_r_n = da_func()\n\n assert np_r_n == da_r_n", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_one_arg_test_atleast_nd_one_arg.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_one_arg_test_atleast_nd_one_arg.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 50, "end_line": 71, "span_ids": ["test_atleast_nd_one_arg"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", [\"atleast_1d\", \"atleast_2d\", \"atleast_3d\"])\n@pytest.mark.parametrize(\n \"shape, chunks\",\n [\n (tuple(), tuple()),\n ((4,), (2,)),\n ((4, 6), (2, 3)),\n ((4, 6, 8), (2, 3, 4)),\n ((4, 6, 8, 10), (2, 3, 4, 5)),\n ],\n)\ndef test_atleast_nd_one_arg(funcname, shape, chunks):\n np_a = np.random.random(shape)\n da_a = da.from_array(np_a, chunks=chunks)\n\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n\n np_r = np_func(np_a)\n da_r = da_func(da_a)\n\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_two_args_test_atleast_nd_two_args.for_np_r_da_r_in_zip_np_.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_atleast_nd_two_args_test_atleast_nd_two_args.for_np_r_da_r_in_zip_np_.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 74, "end_line": 104, "span_ids": ["test_atleast_nd_two_args"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", [\"atleast_1d\", \"atleast_2d\", \"atleast_3d\"])\n@pytest.mark.parametrize(\n \"shape1, shape2\",\n list(\n itertools.combinations_with_replacement(\n [tuple(), (4,), (4, 6), (4, 6, 8), (4, 6, 8, 10)], 2\n )\n ),\n)\ndef test_atleast_nd_two_args(funcname, shape1, shape2):\n np_a_1 = np.random.random(shape1)\n da_a_1 = da.from_array(np_a_1, chunks=tuple(c // 2 for c in shape1))\n\n np_a_2 = np.random.random(shape2)\n da_a_2 = da.from_array(np_a_2, chunks=tuple(c // 2 for c in shape2))\n\n np_a_n = [np_a_1, np_a_2]\n da_a_n = [da_a_1, da_a_2]\n\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n\n np_r_n = np_func(*np_a_n)\n da_r_n = da_func(*da_a_n)\n\n assert type(np_r_n) is type(da_r_n)\n\n assert len(np_r_n) == len(da_r_n)\n\n for np_r, da_r in zip(np_r_n, da_r_n):\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_test_transpose.None_1.d_transpose_1_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_test_transpose.None_1.d_transpose_1_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 107, "end_line": 121, "span_ids": ["test_transpose"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_transpose():\n x = np.arange(240).reshape((4, 6, 10))\n d = da.from_array(x, (2, 3, 4))\n\n assert_eq(d.transpose((2, 0, 1)), x.transpose((2, 0, 1)))\n assert same_keys(d.transpose((2, 0, 1)), d.transpose((2, 0, 1)))\n\n assert_eq(d.transpose(2, 0, 1), x.transpose(2, 0, 1))\n assert same_keys(d.transpose(2, 0, 1), d.transpose(2, 0, 1))\n\n with pytest.raises(ValueError):\n d.transpose(1, 2)\n\n with pytest.raises(ValueError):\n d.transpose((1, 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_negative_axes_test_transpose_skip_when_possible.assert_x_transpose_3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_transpose_negative_axes_test_transpose_skip_when_possible.assert_x_transpose_3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 134, "span_ids": ["test_transpose_negative_axes", "test_transpose_skip_when_possible"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_transpose_negative_axes():\n x = np.ones((2, 3, 4, 5))\n y = da.ones((2, 3, 4, 5), chunks=3)\n\n assert_eq(x.transpose([-1, -2, 0, 1]), y.transpose([-1, -2, 0, 1]))\n\n\ndef test_transpose_skip_when_possible():\n x = da.ones((2, 3, 4), chunks=3)\n assert x.transpose((0, 1, 2)) is x\n assert x.transpose((-3, -2, -1)) is x", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_swapaxes_test_swapaxes.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_swapaxes_test_swapaxes.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 150, "span_ids": ["test_swapaxes"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_swapaxes():\n x = np.random.normal(0, 10, size=(10, 12, 7))\n d = da.from_array(x, chunks=(4, 5, 2))\n\n assert_eq(np.swapaxes(x, 0, 1), da.swapaxes(d, 0, 1))\n assert_eq(np.swapaxes(x, 2, 1), da.swapaxes(d, 2, 1))\n assert_eq(x.swapaxes(2, 1), d.swapaxes(2, 1))\n assert_eq(x.swapaxes(0, 0), d.swapaxes(0, 0))\n assert_eq(x.swapaxes(1, 2), d.swapaxes(1, 2))\n assert_eq(x.swapaxes(0, -1), d.swapaxes(0, -1))\n assert_eq(x.swapaxes(-1, 1), d.swapaxes(-1, 1))\n\n assert d.swapaxes(0, 1).name == d.swapaxes(0, 1).name\n assert d.swapaxes(0, 1).name != d.swapaxes(1, 0).name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_test_moveaxis_rollaxis.for_axis1_in_range_x_ndi.for_axis2_in_range_x_ndi.assert_eq_np_func_x_axis": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_test_moveaxis_rollaxis.for_axis1_in_range_x_ndi.for_axis2_in_range_x_ndi.assert_eq_np_func_x_axis", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 163, "span_ids": ["test_moveaxis_rollaxis"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"funcname\", [\"moveaxis\", \"rollaxis\"])\n@pytest.mark.parametrize(\"shape\", [(), (5,), (3, 5, 7, 3)])\ndef test_moveaxis_rollaxis(funcname, shape):\n x = np.random.random(shape)\n d = da.from_array(x, chunks=(len(shape) * (2,)))\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n for axis1 in range(-x.ndim, x.ndim):\n assert isinstance(da_func(d, 0, axis1), da.Array)\n for axis2 in range(-x.ndim, x.ndim):\n assert_eq(np_func(x, axis1, axis2), da_func(d, axis1, axis2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_keyword_test_moveaxis_rollaxis_numpy_api.assert_eq_result_np_roll": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_moveaxis_rollaxis_keyword_test_moveaxis_rollaxis_numpy_api.assert_eq_result_np_roll", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 185, "span_ids": ["test_moveaxis_rollaxis_keyword", "test_moveaxis_rollaxis_numpy_api"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_moveaxis_rollaxis_keyword():\n x = np.random.random((10, 12, 7))\n d = da.from_array(x, chunks=(4, 5, 2))\n assert_eq(\n np.moveaxis(x, destination=1, source=0), da.moveaxis(d, destination=1, source=0)\n )\n assert_eq(np.rollaxis(x, 2), da.rollaxis(d, 2))\n assert isinstance(da.rollaxis(d, 1), da.Array)\n assert_eq(np.rollaxis(x, start=1, axis=2), da.rollaxis(d, start=1, axis=2))\n\n\ndef test_moveaxis_rollaxis_numpy_api():\n a = da.random.random((4, 4, 4), chunks=2)\n result = np.moveaxis(a, 2, 0)\n assert isinstance(result, da.Array)\n assert_eq(result, np.moveaxis(a.compute(), 2, 0))\n\n result = np.rollaxis(a, 2, 0)\n assert isinstance(result, da.Array)\n assert_eq(result, np.rollaxis(a.compute(), 2, 0))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_flip_test_flip.try_.else_.assert_eq_np_r_da_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_flip_test_flip.try_.else_.assert_eq_np_r_da_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 223, "span_ids": ["test_flip"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"funcname, kwargs\",\n [\n (\"flipud\", {}),\n (\"fliplr\", {}),\n (\"flip\", {\"axis\": 0}),\n (\"flip\", {\"axis\": 1}),\n (\"flip\", {\"axis\": 2}),\n (\"flip\", {\"axis\": -1}),\n ],\n)\n@pytest.mark.parametrize(\"shape\", [tuple(), (4,), (4, 6), (4, 6, 8), (4, 6, 8, 10)])\ndef test_flip(funcname, kwargs, shape):\n axis = kwargs.get(\"axis\")\n if axis is None:\n if funcname == \"flipud\":\n axis = 0\n elif funcname == \"fliplr\":\n axis = 1\n\n np_a = np.random.random(shape)\n da_a = da.from_array(np_a, chunks=1)\n\n np_func = getattr(np, funcname)\n da_func = getattr(da, funcname)\n\n try:\n range(np_a.ndim)[axis]\n except IndexError:\n with pytest.raises(ValueError):\n da_func(da_a, **kwargs)\n else:\n np_r = np_func(np_a, **kwargs)\n da_r = da_func(da_a, **kwargs)\n\n assert_eq(np_r, da_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_matmul_test_matmul.for_d1_d2_in_itertools_p.if_x_ndim_0_or_y_ndim_.else_.assert_eq_expected_da_ma": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_matmul_test_matmul.for_d1_d2_in_itertools_p.if_x_ndim_0_or_y_ndim_.else_.assert_eq_expected_da_ma", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 226, "end_line": 276, "span_ids": ["test_matmul"], "tokens": 540}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"x_shape, y_shape\",\n [\n [(), ()],\n [(), (7,)],\n [(), (7, 11)],\n [(), (7, 11, 15)],\n [(), (7, 11, 15, 19)],\n [(7,), ()],\n [(7,), (7,)],\n [(11,), (11, 7)],\n [(15,), (7, 15, 11)],\n [(19,), (7, 11, 19, 15)],\n [(7, 11), ()],\n [(7, 11), (11,)],\n [(7, 11), (11, 7)],\n [(11, 15), (7, 15, 11)],\n [(15, 19), (7, 11, 19, 15)],\n [(7, 11, 15), ()],\n [(7, 11, 15), (15,)],\n [(7, 11, 15), (15, 7)],\n [(7, 11, 15), (7, 15, 11)],\n [(11, 15, 19), (7, 11, 19, 15)],\n [(7, 11, 15, 19), ()],\n [(7, 11, 15, 19), (19,)],\n [(7, 11, 15, 19), (19, 7)],\n [(7, 11, 15, 19), (11, 19, 13)],\n [(7, 11, 15, 19), (7, 11, 19, 15)],\n ],\n)\ndef test_matmul(x_shape, y_shape):\n np.random.seed(3732)\n\n x = np.random.random(x_shape)[()]\n y = np.random.random(y_shape)[()]\n\n a = da.from_array(x, chunks=tuple((i // 2) for i in x.shape))\n b = da.from_array(y, chunks=tuple((i // 2) for i in y.shape))\n\n expected = None\n try:\n expected = np.matmul(x, y)\n except ValueError:\n pass\n\n for d1, d2 in itertools.product([a, x], [b, y]):\n if x.ndim == 0 or y.ndim == 0:\n with pytest.raises(ValueError):\n da.matmul(d1, d2)\n else:\n assert_eq(expected, da.matmul(d1, d2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_test_tensordot.with_pytest_warns_da_Perf.assert_not_same_keys_da_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_test_tensordot.with_pytest_warns_da_Perf.assert_not_same_keys_da_t", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 279, "end_line": 294, "span_ids": ["test_tensordot"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tensordot():\n x = np.arange(400).reshape((20, 20))\n a = da.from_array(x, chunks=(5, 4))\n y = np.arange(200).reshape((20, 10))\n b = da.from_array(y, chunks=(4, 5))\n\n for axes in [1, (1, 0)]:\n assert_eq(da.tensordot(a, b, axes=axes), np.tensordot(x, y, axes=axes))\n assert_eq(da.tensordot(x, b, axes=axes), np.tensordot(x, y, axes=axes))\n assert_eq(da.tensordot(a, y, axes=axes), np.tensordot(x, y, axes=axes))\n\n assert same_keys(da.tensordot(a, b, axes=(1, 0)), da.tensordot(a, b, axes=(1, 0)))\n\n # Increasing number of chunks warning\n with pytest.warns(da.PerformanceWarning):\n assert not same_keys(da.tensordot(a, b, axes=0), da.tensordot(a, b, axes=1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_2_test_tensordot_2.assert_eq_da_tensordot_y_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_2_test_tensordot_2.assert_eq_da_tensordot_y_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 297, "end_line": 304, "span_ids": ["test_tensordot_2"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"axes\", [0, 1, (0, 1), (1, 0), ((1, 0), (2, 1)), ((1, 2), (2, 0)), ((2, 0), (1, 2))]\n)\ndef test_tensordot_2(axes):\n x = np.arange(4 * 4 * 4).reshape((4, 4, 4))\n y = da.from_array(x, chunks=2)\n\n assert_eq(da.tensordot(y, y, axes=axes), np.tensordot(x, x, axes=axes))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_neq2_test_tensordot_double_contraction_neq2.assert_eq_da_tensordot_y_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_neq2_test_tensordot_double_contraction_neq2.assert_eq_da_tensordot_y_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 307, "end_line": 312, "span_ids": ["test_tensordot_double_contraction_neq2"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [\"auto\", (4, 6), (2, 3), (4, 3), (2, 6)])\ndef test_tensordot_double_contraction_neq2(chunks):\n # Regression test for https://github.com/dask/dask/issues/5472\n x = np.arange(24).reshape(4, 6)\n y = da.from_array(x, chunks=chunks)\n assert_eq(da.tensordot(y, y, axes=2), np.tensordot(x, x, axes=2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_ngt2_test_tensordot_double_contraction_ngt2.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_double_contraction_ngt2_test_tensordot_double_contraction_ngt2.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 315, "end_line": 329, "span_ids": ["test_tensordot_double_contraction_ngt2"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tensordot_double_contraction_ngt2():\n # Regression test for https://github.com/dask/dask/issues/5472\n x = np.arange(60.0).reshape(3, 4, 5)\n y = np.arange(60.0).reshape(4, 5, 3)\n u = da.from_array(x)\n v = da.from_array(y)\n\n assert_eq(da.tensordot(u, v, axes=2), np.tensordot(x, y, axes=2))\n\n x = np.arange(60.0).reshape(3, 4, 5)\n y = np.arange(60.0).reshape(4, 5, 3)\n u = da.from_array(x, chunks=3)\n v = da.from_array(y)\n\n assert_eq(da.tensordot(u, v, axes=2), np.tensordot(x, y, axes=2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_more_than_26_dims_test_dot_method.assert_eq_a_dot_b_x_dot": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_tensordot_more_than_26_dims_test_dot_method.assert_eq_a_dot_b_x_dot", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 332, "end_line": 345, "span_ids": ["test_tensordot_more_than_26_dims", "test_dot_method"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_tensordot_more_than_26_dims():\n ndim = 27\n x = np.broadcast_to(1, [2] * ndim)\n dx = da.from_array(x, chunks=-1)\n assert_eq(da.tensordot(dx, dx, ndim), np.array(2 ** ndim))\n\n\ndef test_dot_method():\n x = np.arange(400).reshape((20, 20))\n a = da.from_array(x, chunks=(5, 5))\n y = np.arange(200).reshape((20, 10))\n b = da.from_array(y, chunks=(5, 5))\n\n assert_eq(a.dot(b), x.dot(y))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vdot_test_vdot.assert_eq_da_vdot_a_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vdot_test_vdot.assert_eq_da_vdot_a_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 348, "end_line": 363, "span_ids": ["test_vdot"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape, chunks\", [((20,), (6,)), ((4, 5), (2, 3))])\ndef test_vdot(shape, chunks):\n np.random.seed(1337)\n\n x = 2 * np.random.random((2,) + shape) - 1\n x = x[0] + 1j * x[1]\n\n y = 2 * np.random.random((2,) + shape) - 1\n y = y[0] + 1j * y[1]\n\n a = da.from_array(x, chunks=chunks)\n b = da.from_array(y, chunks=chunks)\n\n assert_eq(np.vdot(x, y), da.vdot(a, b))\n assert_eq(np.vdot(y, x), da.vdot(b, a))\n assert_eq(da.vdot(a, b), da.vdot(b, a).conj())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_outer_test_outer.assert_eq_np_outer_y_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_outer_test_outer.assert_eq_np_outer_y_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 366, "end_line": 377, "span_ids": ["test_outer"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape1, shape2\", [((20,), (6,)), ((4, 5), (2, 3))])\ndef test_outer(shape1, shape2):\n np.random.seed(1337)\n\n x = 2 * np.random.random(shape1) - 1\n y = 2 * np.random.random(shape2) - 1\n\n a = da.from_array(x, chunks=3)\n b = da.from_array(y, chunks=3)\n\n assert_eq(np.outer(x, y), da.outer(a, b))\n assert_eq(np.outer(y, x), da.outer(b, a))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_along_axis_test_apply_along_axis.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_along_axis_test_apply_along_axis.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 380, "end_line": 412, "span_ids": ["test_apply_along_axis"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"func1d_name, func1d, specify_output_props\",\n [\n [\"ndim\", lambda x: x.ndim, False],\n [\"sum\", lambda x: x.sum(), False],\n [\"range\", lambda x: [x.min(), x.max()], False],\n [\"range2\", lambda x: [[x.min(), x.max()], [x.max(), x.min()]], False],\n [\"cumsum\", lambda x: np.cumsum(x), True],\n ],\n)\n@pytest.mark.parametrize(\n \"input_shape, axis\",\n [[(10, 15, 20), 0], [(10, 15, 20), 1], [(10, 15, 20), 2], [(10, 15, 20), -1]],\n)\ndef test_apply_along_axis(func1d_name, func1d, specify_output_props, input_shape, axis):\n a = np.random.randint(0, 10, input_shape)\n d = da.from_array(a, chunks=(len(input_shape) * (5,)))\n\n output_shape = None\n output_dtype = None\n\n if specify_output_props:\n slices = [0] * a.ndim\n slices[axis] = slice(None)\n slices = tuple(slices)\n sample = np.array(func1d(a[slices]))\n output_shape = sample.shape\n output_dtype = sample.dtype\n\n assert_eq(\n da.apply_along_axis(func1d, axis, d, dtype=output_dtype, shape=output_shape),\n np.apply_along_axis(func1d, axis, a),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_over_axes_test_apply_over_axes.assert_eq_da_apply_over_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_apply_over_axes_test_apply_over_axes.assert_eq_da_apply_over_a", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 415, "end_line": 443, "span_ids": ["test_apply_over_axes"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"func_name, func\",\n [\n [\"sum0\", lambda x, axis: x.sum(axis=axis)],\n [\"sum1\", lambda x, axis: x.sum(axis=axis, keepdims=True)],\n [\n \"range\",\n lambda x, axis: np.concatenate(\n [x.min(axis=axis, keepdims=True), x.max(axis=axis, keepdims=True)],\n axis=axis,\n ),\n ],\n ],\n)\n@pytest.mark.parametrize(\n \"shape, axes\",\n [\n [(10, 15, 20), tuple()],\n [(10, 15, 20), 0],\n [(10, 15, 20), (1,)],\n [(10, 15, 20), (-1, 1)],\n [(10, 15, 20), (2, 0, 1)],\n ],\n)\ndef test_apply_over_axes(func_name, func, shape, axes):\n a = np.random.randint(0, 10, shape)\n d = da.from_array(a, chunks=(len(shape) * (5,)))\n\n assert_eq(da.apply_over_axes(func, d, axes), np.apply_over_axes(func, a, axes))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ptp_test_ptp.assert_eq_da_ptp_d_axis_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ptp_test_ptp.assert_eq_da_ptp_d_axis_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 446, "end_line": 460, "span_ids": ["test_ptp"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, axis\",\n [\n [(10, 15, 20), None],\n [(10, 15, 20), 0],\n [(10, 15, 20), 1],\n [(10, 15, 20), 2],\n [(10, 15, 20), -1],\n ],\n)\ndef test_ptp(shape, axis):\n a = np.random.randint(0, 10, shape)\n d = da.from_array(a, chunks=(len(shape) * (5,)))\n\n assert_eq(da.ptp(d, axis), np.ptp(a, axis))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_diff_test_diff.assert_eq_da_diff_a_n_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_diff_test_diff.assert_eq_da_diff_a_n_a", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 463, "end_line": 472, "span_ids": ["test_diff"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, axis\",\n [[(10, 15, 20), 0], [(10, 15, 20), 1], [(10, 15, 20), 2], [(10, 15, 20), -1]],\n)\n@pytest.mark.parametrize(\"n\", [0, 1, 2])\ndef test_diff(shape, n, axis):\n x = np.random.randint(0, 10, shape)\n a = da.from_array(x, chunks=(len(shape) * (5,)))\n\n assert_eq(da.diff(a, n, axis), np.diff(x, n, axis))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ediff1d_test_ediff1d.assert_eq_da_ediff1d_a_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ediff1d_test_ediff1d.assert_eq_da_ediff1d_a_t", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 475, "end_line": 481, "span_ids": ["test_ediff1d"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"shape\", [(10,), (10, 15)])\n@pytest.mark.parametrize(\"to_end, to_begin\", [[None, None], [0, 0], [[1, 2], [3, 4]]])\ndef test_ediff1d(shape, to_end, to_begin):\n x = np.random.randint(0, 10, shape)\n a = da.from_array(x, chunks=(len(shape) * (5,)))\n\n assert_eq(da.ediff1d(a, to_end, to_begin), np.ediff1d(x, to_end, to_begin))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_gradient_test_gradient.if_isinstance_axis_Numbe.else_.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_gradient_test_gradient.if_isinstance_axis_Numbe.else_.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 484, "end_line": 518, "span_ids": ["test_gradient"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape, varargs, axis\",\n [\n [(10, 15, 20), (), None],\n [(10, 15, 20), (2,), None],\n [(10, 15, 20), (1.0, 1.5, 2.0), None],\n [(10, 15, 20), (), 0],\n [(10, 15, 20), (), 1],\n [(10, 15, 20), (), 2],\n [(10, 15, 20), (), -1],\n [(10, 15, 20), (), (0, 2)],\n [(10, 15, 20), (np.exp(np.arange(10)), np.exp(np.arange(20))), (0, 2)],\n [(10, 15, 20), (0.5, np.exp(np.arange(20))), (0, 2)],\n [(10, 15, 20), (np.exp(np.arange(20)),), -1],\n ],\n)\n@pytest.mark.parametrize(\"edge_order\", [1, 2])\ndef test_gradient(shape, varargs, axis, edge_order):\n a = np.random.randint(0, 10, shape)\n d_a = da.from_array(a, chunks=(len(shape) * (5,)))\n\n r_a = np.gradient(a, *varargs, axis=axis, edge_order=edge_order)\n r_d_a = da.gradient(d_a, *varargs, axis=axis, edge_order=edge_order)\n\n if isinstance(axis, Number):\n assert_eq(r_d_a, r_a)\n else:\n assert len(r_d_a) == len(r_a)\n\n for e_r_d_a, e_r_a in zip(r_d_a, r_a):\n assert_eq(e_r_d_a, e_r_a)\n\n assert_eq(\n da.sqrt(sum(map(da.square, r_d_a))), np.sqrt(sum(map(np.square, r_a)))\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_test_bincount.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_test_bincount.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 521, "end_line": 529, "span_ids": ["test_bincount"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bincount():\n x = np.array([2, 1, 5, 2, 1])\n d = da.from_array(x, chunks=2)\n e = da.bincount(d, minlength=6)\n assert_eq(e, np.bincount(x, minlength=6))\n assert same_keys(da.bincount(d, minlength=6), e)\n\n assert da.bincount(d, minlength=6).name != da.bincount(d, minlength=7).name\n assert da.bincount(d, minlength=6).name == da.bincount(d, minlength=6).name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_with_weights_test_bincount_unspecified_minlength._shape_is_nan_so_must": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_bincount_with_weights_test_bincount_unspecified_minlength._shape_is_nan_so_must", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 532, "end_line": 549, "span_ids": ["test_bincount_with_weights", "test_bincount_unspecified_minlength"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bincount_with_weights():\n x = np.array([2, 1, 5, 2, 1])\n d = da.from_array(x, chunks=2)\n weights = np.array([1, 2, 1, 0.5, 1])\n\n dweights = da.from_array(weights, chunks=2)\n e = da.bincount(d, weights=dweights, minlength=6)\n assert_eq(e, np.bincount(x, weights=dweights.compute(), minlength=6))\n assert same_keys(da.bincount(d, weights=dweights, minlength=6), e)\n\n\ndef test_bincount_unspecified_minlength():\n x = np.array([1, 1, 3, 7, 0])\n d = da.from_array(x, chunks=2)\n e = da.bincount(d)\n assert_eq(e, np.bincount(x))\n assert same_keys(da.bincount(d), e)\n assert len(e.compute()) == 8 # shape is (nan,) so must compute for len()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_digitize_test_digitize.for_chunks_in_10_10_.for_right_in_False_True.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_digitize_test_digitize.for_chunks_in_10_10_.for_right_in_False_True.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 552, "end_line": 570, "span_ids": ["test_digitize"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_digitize():\n x = np.array([2, 4, 5, 6, 1])\n bins = np.array([1, 2, 3, 4, 5])\n for chunks in [2, 4]:\n for right in [False, True]:\n d = da.from_array(x, chunks=chunks)\n assert_eq(\n da.digitize(d, bins, right=right), np.digitize(x, bins, right=right)\n )\n\n x = np.random.random(size=(100, 100))\n bins = np.random.random(size=13)\n bins.sort()\n for chunks in [(10, 10), (10, 20), (13, 17), (87, 54)]:\n for right in [False, True]:\n d = da.from_array(x, chunks=chunks)\n assert_eq(\n da.digitize(d, bins, right=right), np.digitize(x, bins, right=right)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_test_histogram.assert_same_keys_da_histo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_test_histogram.assert_same_keys_da_histo", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 573, "end_line": 585, "span_ids": ["test_histogram"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_histogram():\n # Test for normal, flattened input\n n = 100\n v = da.random.random(n, chunks=10)\n bins = np.arange(0, 1.01, 0.01)\n (a1, b1) = da.histogram(v, bins=bins)\n (a2, b2) = np.histogram(v, bins=bins)\n\n # Check if the sum of the bins equals the number of samples\n assert a2.sum(axis=0) == n\n assert a1.sum(axis=0) == n\n assert_eq(a1, a2)\n assert same_keys(da.histogram(v, bins=bins)[0], a1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_alternative_bins_range_test_histogram_return_type.assert_eq_da_histogram_v_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_alternative_bins_range_test_histogram_return_type.assert_eq_da_histogram_v_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 588, "end_line": 611, "span_ids": ["test_histogram_return_type", "test_histogram_bins_range_with_nan_array", "test_histogram_alternative_bins_range"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_histogram_alternative_bins_range():\n v = da.random.random(100, chunks=10)\n (a1, b1) = da.histogram(v, bins=10, range=(0, 1))\n (a2, b2) = np.histogram(v, bins=10, range=(0, 1))\n assert_eq(a1, a2)\n assert_eq(b1, b2)\n\n\n@pytest.mark.filterwarnings(\"ignore:invalid value:RuntimeWarning\")\ndef test_histogram_bins_range_with_nan_array():\n # Regression test for issue #3977\n v = da.from_array(np.array([-2, np.nan, 2]), chunks=1)\n (a1, b1) = da.histogram(v, bins=10, range=(-3, 3))\n (a2, b2) = np.histogram(v, bins=10, range=(-3, 3))\n assert_eq(a1, a2)\n assert_eq(b1, b2)\n\n\ndef test_histogram_return_type():\n v = da.random.random(100, chunks=10)\n bins = np.arange(0, 1.01, 0.01)\n # Check if return type is same as hist\n bins = np.arange(0, 11, 1, dtype=\"i4\")\n assert_eq(da.histogram(v * 10, bins=bins)[0], np.histogram(v * 10, bins=bins)[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_extra_args_and_shapes_test_histogram_extra_args_and_shapes.for_v_bins_w_in_data_.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_extra_args_and_shapes_test_histogram_extra_args_and_shapes.for_v_bins_w_in_data_.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 614, "end_line": 639, "span_ids": ["test_histogram_extra_args_and_shapes"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_histogram_extra_args_and_shapes():\n # Check for extra args and shapes\n bins = np.arange(0, 1.01, 0.01)\n v = da.random.random(100, chunks=10)\n data = [\n (v, bins, da.ones(100, chunks=v.chunks) * 5),\n (da.random.random((50, 50), chunks=10), bins, da.ones((50, 50), chunks=10) * 5),\n ]\n\n for v, bins, w in data:\n # density\n assert_eq(\n da.histogram(v, bins=bins, density=True)[0],\n np.histogram(v, bins=bins, density=True)[0],\n )\n\n # weights\n assert_eq(\n da.histogram(v, bins=bins, weights=w)[0],\n np.histogram(v, bins=bins, weights=w)[0],\n )\n\n assert_eq(\n da.histogram(v, bins=bins, weights=w, density=True)[0],\n da.histogram(v, bins=bins, weights=w, density=True)[0],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_normed_deprecation_test_histogram_bin_range_raises.assert_bins_in_err_msg_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_normed_deprecation_test_histogram_bin_range_raises.assert_bins_in_err_msg_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 642, "end_line": 672, "span_ids": ["test_histogram_normed_deprecation", "test_histogram_bin_range_raises"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_histogram_normed_deprecation():\n x = da.arange(10)\n with pytest.raises(ValueError) as info:\n da.histogram(x, bins=[1, 2, 3], normed=True)\n\n assert \"density\" in str(info.value)\n assert \"deprecated\" in str(info.value).lower()\n\n\n@pytest.mark.parametrize(\n \"bins, hist_range\",\n [\n (None, None),\n (10, None),\n (10, 1),\n (None, (1, 10)),\n (10, [0, 1, 2]),\n (10, [0]),\n (10, np.array([[0, 1]])),\n (10, da.array([[0, 1]])),\n ([[0, 1, 2]], None),\n (np.array([[0, 1, 2]]), None),\n (da.array([[0, 1, 2]]), None),\n ],\n)\ndef test_histogram_bin_range_raises(bins, hist_range):\n data = da.random.random(10, chunks=2)\n with pytest.raises((ValueError, TypeError)) as info:\n da.histogram(data, bins=bins, range=hist_range)\n err_msg = str(info.value)\n assert \"bins\" in err_msg or \"range\" in err_msg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_range_test_histogram_delayed_range.assert_eq_bins_d_bins_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_range_test_histogram_delayed_range.assert_eq_bins_d_bins_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 675, "end_line": 708, "span_ids": ["test_histogram_delayed_range"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"density\", [True, False])\n@pytest.mark.parametrize(\"weighted\", [True, False])\n@pytest.mark.parametrize(\"non_delayed_i\", [None, 0, 1])\n@pytest.mark.parametrize(\"delay_n_bins\", [False, True])\ndef test_histogram_delayed_range(density, weighted, non_delayed_i, delay_n_bins):\n n = 100\n v = np.random.random(n)\n vd = da.from_array(v, chunks=10)\n\n if weighted:\n weights = np.random.random(n)\n weights_d = da.from_array(weights, chunks=vd.chunks)\n\n d_range = [vd.min(), vd.max()]\n if non_delayed_i is not None:\n d_range[non_delayed_i] = d_range[non_delayed_i].compute()\n hist_d, bins_d = da.histogram(\n vd,\n bins=da.array(n) if delay_n_bins and not density else n,\n range=d_range,\n density=density,\n weights=weights_d if weighted else None,\n )\n\n hist, bins = np.histogram(\n v,\n bins=n,\n range=[v.min(), v.max()],\n density=density,\n weights=weights if weighted else None,\n )\n\n assert_eq(hist_d, hist)\n assert_eq(bins_d, bins)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_bins_test_histogram_delayed_bins.assert_eq_bins_d2_bins_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_bins_test_histogram_delayed_bins.assert_eq_bins_d2_bins_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 711, "end_line": 743, "span_ids": ["test_histogram_delayed_bins"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"density\", [True, False])\n@pytest.mark.parametrize(\"weighted\", [True, False])\ndef test_histogram_delayed_bins(density, weighted):\n n = 100\n v = np.random.random(n)\n bins = np.array([0, 0.2, 0.5, 0.8, 1])\n\n vd = da.from_array(v, chunks=10)\n bins_d = da.from_array(bins, chunks=2)\n\n if weighted:\n weights = np.random.random(n)\n weights_d = da.from_array(weights, chunks=vd.chunks)\n\n hist_d, bins_d2 = da.histogram(\n vd,\n bins=bins_d,\n range=[bins_d[0], bins_d[-1]],\n density=density,\n weights=weights_d if weighted else None,\n )\n\n hist, bins = np.histogram(\n v,\n bins=bins,\n range=[bins[0], bins[-1]],\n density=density,\n weights=weights if weighted else None,\n )\n\n assert bins_d is bins_d2\n assert_eq(hist_d, hist)\n assert_eq(bins_d2, bins)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_n_bins_raises_with_density_test_cov.with_pytest_raises_ValueE.da_cov_d_ddof_1_5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_histogram_delayed_n_bins_raises_with_density_test_cov.with_pytest_raises_ValueE.da_cov_d_ddof_1_5_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 746, "end_line": 772, "span_ids": ["test_cov", "test_histogram_delayed_n_bins_raises_with_density"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_histogram_delayed_n_bins_raises_with_density():\n data = da.random.random(10, chunks=2)\n with pytest.raises(\n NotImplementedError, match=\"`bins` cannot be a scalar Dask object\"\n ):\n da.histogram(data, bins=da.array(10), range=[0, 1], density=True)\n\n\ndef test_cov():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n assert_eq(da.cov(d), np.cov(x))\n assert_eq(da.cov(d, rowvar=0), np.cov(x, rowvar=0))\n with pytest.warns(None): # warning dof <= 0 for slice\n assert_eq(da.cov(d, ddof=10), np.cov(x, ddof=10))\n assert_eq(da.cov(d, bias=1), np.cov(x, bias=1))\n assert_eq(da.cov(d, d), np.cov(x, x))\n\n y = np.arange(8)\n e = da.from_array(y, chunks=(4,))\n\n assert_eq(da.cov(d, e), np.cov(x, y))\n assert_eq(da.cov(e, d), np.cov(y, x))\n\n with pytest.raises(ValueError):\n da.cov(d, ddof=1.5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_corrcoef_test_round.assert_eq_d_round_2_da_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_corrcoef_test_round.assert_eq_d_round_2_da_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 775, "end_line": 797, "span_ids": ["test_round", "test_corrcoef"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_corrcoef():\n x = np.arange(56).reshape((7, 8))\n d = da.from_array(x, chunks=(4, 4))\n\n assert_eq(da.corrcoef(d), np.corrcoef(x))\n assert_eq(da.corrcoef(d, rowvar=0), np.corrcoef(x, rowvar=0))\n assert_eq(da.corrcoef(d, d), np.corrcoef(x, x))\n\n y = np.arange(8)\n e = da.from_array(y, chunks=(4,))\n\n assert_eq(da.corrcoef(d, e), np.corrcoef(x, y))\n assert_eq(da.corrcoef(e, d), np.corrcoef(y, x))\n\n\ndef test_round():\n x = np.random.random(10)\n d = da.from_array(x, chunks=4)\n\n for i in (0, 1, 4, 5):\n assert_eq(x.round(i), d.round(i))\n\n assert_eq(d.round(2), da.round(d, 2))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_kwargs_test_unique_kwargs.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_kwargs_test_unique_kwargs.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 800, "end_line": 830, "span_ids": ["test_unique_kwargs"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"return_index\", [False, True])\n@pytest.mark.parametrize(\"return_inverse\", [False, True])\n@pytest.mark.parametrize(\"return_counts\", [False, True])\ndef test_unique_kwargs(return_index, return_inverse, return_counts):\n kwargs = dict(\n return_index=return_index,\n return_inverse=return_inverse,\n return_counts=return_counts,\n )\n\n a = np.array([1, 2, 4, 4, 5, 2])\n d = da.from_array(a, chunks=(3,))\n\n r_a = np.unique(a, **kwargs)\n r_d = da.unique(d, **kwargs)\n\n if not any([return_index, return_inverse, return_counts]):\n assert isinstance(r_a, np.ndarray)\n assert isinstance(r_d, da.Array)\n\n r_a = (r_a,)\n r_d = (r_d,)\n\n assert len(r_a) == len(r_d)\n\n if return_inverse:\n i = 1 + int(return_index)\n assert (d.size,) == r_d[i].shape\n\n for e_r_a, e_r_d in zip(r_a, r_d):\n assert_eq(e_r_d, e_r_a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_rand_test_unique_rand.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unique_rand_test_unique_rand.for_e_r_a_e_r_d_in_zip_r.assert_eq_e_r_d_e_r_a_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 833, "end_line": 855, "span_ids": ["test_unique_rand"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"seed\", [23, 796])\n@pytest.mark.parametrize(\"low, high\", [[0, 10]])\n@pytest.mark.parametrize(\n \"shape, chunks\",\n [[(10,), (5,)], [(10,), (3,)], [(4, 5), (3, 2)], [(20, 20), (4, 5)]],\n)\ndef test_unique_rand(seed, low, high, shape, chunks):\n np.random.seed(seed)\n\n a = np.random.randint(low, high, size=shape)\n d = da.from_array(a, chunks=chunks)\n\n kwargs = dict(return_index=True, return_inverse=True, return_counts=True)\n\n r_a = np.unique(a, **kwargs)\n r_d = da.unique(d, **kwargs)\n\n assert len(r_a) == len(r_d)\n\n assert (d.size,) == r_d[2].shape\n\n for e_r_a, e_r_d in zip(r_a, r_d):\n assert_eq(e_r_d, e_r_a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_rand_test_isin_rand.assert_eq_r_a_r_d_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_rand_test_isin_rand.assert_eq_r_a_r_d_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 858, "end_line": 883, "span_ids": ["test_isin_rand"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"seed\", [23, 796])\n@pytest.mark.parametrize(\"low, high\", [[0, 10]])\n@pytest.mark.parametrize(\n \"elements_shape, elements_chunks\",\n [[(10,), (5,)], [(10,), (3,)], [(4, 5), (3, 2)], [(20, 20), (4, 5)]],\n)\n@pytest.mark.parametrize(\n \"test_shape, test_chunks\",\n [[(10,), (5,)], [(10,), (3,)], [(4, 5), (3, 2)], [(20, 20), (4, 5)]],\n)\n@pytest.mark.parametrize(\"invert\", [True, False])\ndef test_isin_rand(\n seed, low, high, elements_shape, elements_chunks, test_shape, test_chunks, invert\n):\n rng = np.random.RandomState(seed)\n\n a1 = rng.randint(low, high, size=elements_shape)\n d1 = da.from_array(a1, chunks=elements_chunks)\n\n a2 = rng.randint(low, high, size=test_shape) - 5\n d2 = da.from_array(a2, chunks=test_chunks)\n\n with pytest.warns(None):\n r_a = np.isin(a1, a2, invert=invert)\n r_d = da.isin(d1, d2, invert=invert)\n assert_eq(r_a, r_d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_assume_unique__maybe_len.try_.except_TypeError_.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isin_assume_unique__maybe_len.try_.except_TypeError_.return.0", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 886, "end_line": 901, "span_ids": ["_maybe_len", "test_isin_assume_unique"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"assume_unique\", [True, False])\ndef test_isin_assume_unique(assume_unique):\n a1 = np.arange(10)\n d1 = da.from_array(a1, chunks=(5,))\n\n test_elements = np.arange(0, 10, 2)\n r_a = np.isin(a1, test_elements, assume_unique=assume_unique)\n r_d = da.isin(d1, test_elements, assume_unique=assume_unique)\n assert_eq(r_a, r_d)\n\n\ndef _maybe_len(l):\n try:\n return len(l)\n except TypeError:\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_roll_test_shape.assert_np_shape_x_sha": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_roll_test_shape.assert_np_shape_x_sha", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 904, "end_line": 921, "span_ids": ["test_shape", "test_roll"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [(4, 6), (2, 6)])\n@pytest.mark.parametrize(\"shift\", [3, 7, 9, (3, 9), (7, 2)])\n@pytest.mark.parametrize(\"axis\", [None, 0, 1, -1, (0, 1), (1, 0)])\ndef test_roll(chunks, shift, axis):\n x = np.random.randint(10, size=(4, 6))\n a = da.from_array(x, chunks=chunks)\n\n if _maybe_len(shift) != _maybe_len(axis):\n with pytest.raises(TypeError if axis is None else ValueError):\n da.roll(a, shift, axis)\n else:\n assert_eq(np.roll(x, shift, axis), da.roll(a, shift, axis))\n\n\n@pytest.mark.parametrize(\"shape\", [(10,), (5, 10), (5, 10, 10)])\ndef test_shape(shape):\n x = da.random.random(shape)\n assert np.shape(x) == shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_union1d_test_union1d.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_union1d_test_union1d.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 924, "end_line": 948, "span_ids": ["test_union1d"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"shape\", [((12,), (12,)), ((4, 3), (3, 4)), ((12,), (1, 6, 2))]\n)\n@pytest.mark.parametrize(\"reverse\", [True, False])\ndef test_union1d(shape, reverse):\n if any(len(x) > 1 for x in shape) and not _numpy_115:\n pytest.skip(\"NumPy-10563.\")\n\n s1, s2 = shape\n x1 = np.arange(12).reshape(s1)\n x2 = np.arange(6, 18).reshape(s2)\n\n if reverse:\n x1 = x1[::-1]\n\n dx1 = da.from_array(x1)\n dx2 = da.from_array(x2)\n\n result = np.union1d(dx1, dx2)\n expected = np.union1d(x1, x2)\n\n if IS_NEP18_ACTIVE:\n assert isinstance(result, da.Array)\n\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ravel_test_ravel_1D_no_op.assert_eq_dx_dx_2_rave": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_ravel_test_ravel_1D_no_op.assert_eq_dx_dx_2_rave", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 951, "end_line": 983, "span_ids": ["test_ravel_1D_no_op", "test_ravel"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ravel():\n x = np.random.randint(10, size=(4, 6))\n\n # 2d\n for chunks in [(4, 6), (2, 6)]:\n a = da.from_array(x, chunks=chunks)\n assert_eq(x.ravel(), a.ravel())\n assert len(a.ravel().dask) == len(a.dask) + len(a.chunks[0])\n\n # 0d\n assert_eq(x[0, 0].ravel(), a[0, 0].ravel())\n\n # 1d\n a_flat = a.ravel()\n assert_eq(a_flat.ravel(), a_flat)\n\n # 3d\n x = np.random.randint(10, size=(2, 3, 4))\n for chunks in [4, (1, 3, 4)]:\n a = da.from_array(x, chunks=chunks)\n assert_eq(x.ravel(), a.ravel())\n\n assert_eq(x.flatten(), a.flatten())\n assert_eq(np.ravel(x), da.ravel(a))\n\n\ndef test_ravel_1D_no_op():\n x = np.random.randint(10, size=100)\n dx = da.from_array(x, chunks=10)\n # known dims\n assert_eq(dx.ravel(), x.ravel())\n # Unknown dims\n assert_eq(dx[dx > 2].ravel(), x[x > 2].ravel())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_squeeze_test_squeeze.assert_d_s_chunks_exp_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_squeeze_test_squeeze.assert_d_s_chunks_exp_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 986, "end_line": 1010, "span_ids": ["test_squeeze"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"is_func\", [True, False])\n@pytest.mark.parametrize(\"axis\", [None, 0, -1, (0, -1)])\ndef test_squeeze(is_func, axis):\n a = np.arange(10)[None, :, None, None]\n d = da.from_array(a, chunks=(1, 3, 1, 1))\n\n if is_func:\n a_s = np.squeeze(a, axis=axis)\n d_s = da.squeeze(d, axis=axis)\n else:\n a_s = a.squeeze(axis=axis)\n d_s = d.squeeze(axis=axis)\n\n assert_eq(d_s, a_s)\n assert same_keys(d_s, da.squeeze(d, axis=axis))\n\n if axis is None:\n axis = tuple(range(a.ndim))\n else:\n axis = axis if isinstance(axis, tuple) else (axis,)\n axis = tuple(i % a.ndim for i in axis)\n axis = tuple(i for i, c in enumerate(d.chunks) if i in axis and len(c) == 1)\n\n exp_d_s_chunks = tuple(c for i, c in enumerate(d.chunks) if i not in axis)\n assert d_s.chunks == exp_d_s_chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vstack_test_hstack.assert_eq_np_hstack_x_y": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_vstack_test_hstack.assert_eq_np_hstack_x_y", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1013, "end_line": 1030, "span_ids": ["test_vstack", "test_hstack"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_vstack():\n x = np.arange(5)\n y = np.ones(5)\n a = da.arange(5, chunks=2)\n b = da.ones(5, chunks=2)\n\n assert_eq(np.vstack((x, y)), da.vstack((a, b)))\n assert_eq(np.vstack((x, y[None, :])), da.vstack((a, b[None, :])))\n\n\ndef test_hstack():\n x = np.arange(5)\n y = np.ones(5)\n a = da.arange(5, chunks=2)\n b = da.ones(5, chunks=2)\n\n assert_eq(np.hstack((x[None, :], y[None, :])), da.hstack((a[None, :], b[None, :])))\n assert_eq(np.hstack((x, y)), da.hstack((a, b)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_dstack_test_dstack.assert_eq_np_dstack_x_y": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_dstack_test_dstack.assert_eq_np_dstack_x_y", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1033, "end_line": 1044, "span_ids": ["test_dstack"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dstack():\n x = np.arange(5)\n y = np.ones(5)\n a = da.arange(5, chunks=2)\n b = da.ones(5, chunks=2)\n\n assert_eq(\n np.dstack((x[None, None, :], y[None, None, :])),\n da.dstack((a[None, None, :], b[None, None, :])),\n )\n assert_eq(np.dstack((x[None, :], y[None, :])), da.dstack((a[None, :], b[None, :])))\n assert_eq(np.dstack((x, y)), da.dstack((a, b)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_stack_unknown_chunk_sizes_test_stack_unknown_chunk_sizes.assert_eq_np_stacked_dsk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_stack_unknown_chunk_sizes_test_stack_unknown_chunk_sizes.assert_eq_np_stacked_dsk", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1047, "end_line": 1065, "span_ids": ["test_stack_unknown_chunk_sizes"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"np_func,dsk_func,nan_chunk\",\n [(np.hstack, da.hstack, 0), (np.dstack, da.dstack, 1), (np.vstack, da.vstack, 2)],\n)\ndef test_stack_unknown_chunk_sizes(np_func, dsk_func, nan_chunk):\n shape = (100, 100, 100)\n x = da.ones(shape, chunks=(50, 50, 50))\n y = np.ones(shape)\n\n tmp = list(x._chunks)\n tmp[nan_chunk] = (np.nan,) * 2\n x._chunks = tuple(tmp)\n\n with pytest.raises(ValueError):\n dsk_func((x, x))\n\n np_stacked = np_func((y, y))\n dsk_stacked = dsk_func((x, x), allow_unknown_chunksizes=True)\n assert_eq(np_stacked, dsk_stacked)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_test_take.assert_same_keys_da_take_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_test_take.assert_same_keys_da_take_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1068, "end_line": 1078, "span_ids": ["test_take"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take():\n x = np.arange(400).reshape((20, 20))\n a = da.from_array(x, chunks=(5, 5))\n\n assert_eq(np.take(x, 3, axis=0), da.take(a, 3, axis=0))\n assert_eq(np.take(x, [3, 4, 5], axis=-1), da.take(a, [3, 4, 5], axis=-1))\n\n with pytest.raises(ValueError):\n da.take(a, 3, axis=2)\n\n assert same_keys(da.take(a, [3, 4, 5], axis=-1), da.take(a, [3, 4, 5], axis=-1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_dask_from_numpy_test_take_dask_from_numpy.assert_eq_z_np_array_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_take_dask_from_numpy_test_take_dask_from_numpy.assert_eq_z_np_array_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1081, "end_line": 1088, "span_ids": ["test_take_dask_from_numpy"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take_dask_from_numpy():\n x = np.arange(5).astype(\"f8\")\n y = da.from_array(np.array([1, 2, 3, 3, 2, 1]), chunks=3)\n\n z = da.take(x * 2, y)\n\n assert z.chunks == y.chunks\n assert_eq(z, np.array([2.0, 4.0, 6.0, 6.0, 4.0, 2.0]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_compress_test_compress.None_2.da_compress_True_Fal": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_compress_test_compress.None_2.da_compress_True_Fal", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1091, "end_line": 1123, "span_ids": ["test_compress"], "tokens": 376}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_compress():\n x = np.arange(25).reshape((5, 5))\n a = da.from_array(x, chunks=(2, 2))\n\n c1 = np.array([True, False, True, False, True])\n c2 = np.array([True, False])\n c3 = [True, False]\n dc1 = da.from_array(c1, chunks=3)\n dc2 = da.from_array(c2, chunks=2)\n\n for c, dc in [(c1, c1), (c2, c2), (c3, c3), (c1, dc1), (c2, dc2), (c3, dc2)]:\n for axis in [None, 0, 1]:\n res = da.compress(dc, a, axis=axis)\n assert_eq(np.compress(c, x, axis=axis), res)\n if isinstance(dc, da.Array):\n # If condition is a dask array then we expect the shape of the\n # compressed array to be nan, because we won't know that until\n # the result is computed.\n axis = axis or 0\n assert np.isnan(res.shape[axis]).all()\n assert np.isnan(res.chunks[axis]).all()\n else:\n # If condition is a not a dask array then we expect the shape of the\n # compressed axis to be known, i.e., not nan.\n axis = axis or 0\n assert np.count_nonzero(dc) == res.shape[axis]\n assert not np.isnan(res.chunks[axis]).any()\n\n with pytest.raises(ValueError):\n da.compress([True, False], a, axis=100)\n\n with pytest.raises(ValueError):\n da.compress([[True], [False]], a, axis=100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_extract_test_extract.for_c_dc_in_c1_c1_.if_isinstance_dc_da_Arra.assert_np_isnan_res_chunk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_extract_test_extract.for_c_dc_in_c1_c1_.if_isinstance_dc_da_Arra.assert_np_isnan_res_chunk", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1126, "end_line": 1141, "span_ids": ["test_extract"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_extract():\n x = np.arange(25).reshape((5, 5))\n a = da.from_array(x, chunks=(2, 2))\n\n c1 = np.array([True, False, True, False, True])\n c2 = np.array([[True, False], [True, False]])\n c3 = np.array([True, False])\n dc1 = da.from_array(c1, chunks=3)\n dc2 = da.from_array(c2, chunks=(2, 1))\n dc3 = da.from_array(c3, chunks=2)\n\n for c, dc in [(c1, c1), (c2, c2), (c3, c3), (c1, dc1), (c2, dc2), (c3, dc3)]:\n res = da.extract(dc, a)\n assert_eq(np.extract(c, x), res)\n if isinstance(dc, da.Array):\n assert np.isnan(res.chunks[0]).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isnull_test_isclose.assert_eq_da_isclose_a_b": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_isnull_test_isclose.assert_eq_da_isclose_a_b", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1144, "end_line": 1165, "span_ids": ["test_isnull_result_is_an_array", "test_isnull", "test_isclose"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isnull():\n x = np.array([1, np.nan])\n a = da.from_array(x, chunks=(2,))\n with ignoring(ImportError):\n assert_eq(da.isnull(a), np.isnan(x))\n assert_eq(da.notnull(a), ~(np.isnan(x)))\n\n\ndef test_isnull_result_is_an_array():\n # regression test for https://github.com/dask/dask/issues/3822\n arr = da.from_array(np.arange(3, dtype=np.int64), chunks=-1)\n with ignoring(ImportError):\n result = da.isnull(arr[0]).compute()\n assert type(result) is np.ndarray\n\n\ndef test_isclose():\n x = np.array([0, np.nan, 1, 1.5])\n y = np.array([1e-9, np.nan, 1, 2])\n a = da.from_array(x, chunks=(2,))\n b = da.from_array(y, chunks=(2,))\n assert_eq(da.isclose(a, b, equal_nan=True), np.isclose(x, y, equal_nan=True))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_allclose_test_allclose.assert_eq_np_array_n_r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_allclose_test_allclose.assert_eq_np_array_n_r_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1168, "end_line": 1178, "span_ids": ["test_allclose"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_allclose():\n n_a = np.array([0, np.nan, 1, 1.5])\n n_b = np.array([1e-9, np.nan, 1, 2])\n\n d_a = da.from_array(n_a, chunks=(2,))\n d_b = da.from_array(n_b, chunks=(2,))\n\n n_r = np.allclose(n_a, n_b, equal_nan=True)\n d_r = da.allclose(d_a, d_b, equal_nan=True)\n\n assert_eq(np.array(n_r)[()], d_r)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_choose_test_choose.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_choose_test_choose.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1181, "end_line": 1193, "span_ids": ["test_choose"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_choose():\n # test choose function\n x = np.random.randint(10, size=(15, 16))\n d = da.from_array(x, chunks=(4, 5))\n\n assert_eq(da.choose(d > 5, [0, d]), np.choose(x > 5, [0, x]))\n assert_eq(da.choose(d > 5, [-d, d]), np.choose(x > 5, [-x, x]))\n\n # test choose method\n index_dask = d > 5\n index_numpy = x > 5\n assert_eq(index_dask.choose([0, d]), index_numpy.choose([0, x]))\n assert_eq(index_dask.choose([-d, d]), index_numpy.choose([-x, x]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_test_piecewise.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_test_piecewise.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1196, "end_line": 1205, "span_ids": ["test_piecewise"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_piecewise():\n np.random.seed(1337)\n\n x = np.random.randint(10, size=(15, 16))\n d = da.from_array(x, chunks=(4, 5))\n\n assert_eq(\n np.piecewise(x, [x < 5, x >= 5], [lambda e, v, k: e + 1, 5], 1, k=2),\n da.piecewise(d, [d < 5, d >= 5], [lambda e, v, k: e + 1, 5], 1, k=2),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_otherwise_test_piecewise_otherwise.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_piecewise_otherwise_test_piecewise_otherwise.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1208, "end_line": 1229, "span_ids": ["test_piecewise_otherwise"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_piecewise_otherwise():\n np.random.seed(1337)\n\n x = np.random.randint(10, size=(15, 16))\n d = da.from_array(x, chunks=(4, 5))\n\n assert_eq(\n np.piecewise(\n x,\n [x > 5, x <= 2],\n [lambda e, v, k: e + 1, lambda e, v, k: v * e, lambda e, v, k: 0],\n 1,\n k=2,\n ),\n da.piecewise(\n d,\n [d > 5, d <= 2],\n [lambda e, v, k: e + 1, lambda e, v, k: v * e, lambda e, v, k: 0],\n 1,\n k=2,\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_argwhere_test_argwhere_str.assert_eq_d_nz_x_nz_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_argwhere_test_argwhere_str.assert_eq_d_nz_x_nz_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1232, "end_line": 1263, "span_ids": ["test_argwhere", "test_argwhere_str", "test_argwhere_obj"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_argwhere():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_nz = np.argwhere(x)\n d_nz = da.argwhere(d)\n\n assert_eq(d_nz, x_nz)\n\n\ndef test_argwhere_obj():\n x = np.random.randint(10, size=(15, 16)).astype(object)\n d = da.from_array(x, chunks=(4, 5))\n\n x_nz = np.argwhere(x)\n d_nz = da.argwhere(d)\n\n assert_eq(d_nz, x_nz)\n\n\ndef test_argwhere_str():\n # We may have behavior differences with NumPy for strings\n # with just spaces, depending on the version of NumPy.\n # https://github.com/numpy/numpy/issues/9875\n x = np.array(list(\"Hello world\"))\n d = da.from_array(x, chunks=(4,))\n\n x_nz = np.argwhere(x)\n d_nz = da.argwhere(d)\n\n assert_eq(d_nz, x_nz)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_test_where.for_c1_c2_in_.for_b1_b2_in_0_0_.assert_eq_w1_w2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_test_where.for_c1_c2_in_.for_b1_b2_in_0_0_.assert_eq_w1_w2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1266, "end_line": 1287, "span_ids": ["test_where"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_where():\n x = np.random.randint(10, size=(15, 14))\n x[5, 5] = x[4, 4] = 0 # Ensure some false elements\n d = da.from_array(x, chunks=(4, 5))\n y = np.random.randint(10, size=15).astype(np.uint8)\n e = da.from_array(y, chunks=(4,))\n\n for c1, c2 in [\n (d > 5, x > 5),\n (d, x),\n (1, 1),\n (0, 0),\n (5, 5),\n (True, True),\n (np.True_, np.True_),\n (False, False),\n (np.False_, np.False_),\n ]:\n for b1, b2 in [(0, 0), (-e[:, None], -y[:, None]), (e[:14], y[:14])]:\n w1 = da.where(c1, d, b1)\n w2 = np.where(c2, x, b2)\n assert_eq(w1, w2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_scalar_dtype_test_where_scalar_dtype.assert_eq_w3_w4_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_scalar_dtype_test_where_scalar_dtype.assert_eq_w3_w4_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1290, "end_line": 1302, "span_ids": ["test_where_scalar_dtype"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_where_scalar_dtype():\n x = np.int32(3)\n y1 = np.array([4, 5, 6], dtype=np.int16)\n c1 = np.array([1, 0, 1])\n y2 = da.from_array(y1, chunks=2)\n c2 = da.from_array(c1, chunks=2)\n w1 = np.where(c1, x, y1)\n w2 = da.where(c2, x, y2)\n assert_eq(w1, w2)\n # Test again for the bool optimization\n w3 = np.where(True, x, y1)\n w4 = da.where(True, x, y1)\n assert_eq(w3, w4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_bool_optimization_test_where_bool_optimization.for_c_in_True_False_np.assert_w1_is_ex_w1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_bool_optimization_test_where_bool_optimization.for_c_in_True_False_np.assert_w1_is_ex_w1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1305, "end_line": 1319, "span_ids": ["test_where_bool_optimization"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_where_bool_optimization():\n x = np.random.randint(10, size=(15, 16))\n d = da.from_array(x, chunks=(4, 5))\n y = np.random.randint(10, size=(15, 16))\n e = da.from_array(y, chunks=(4, 5))\n\n for c in [True, False, np.True_, np.False_, 1, 0]:\n w1 = da.where(c, d, e)\n w2 = np.where(c, x, y)\n\n assert_eq(w1, w2)\n\n ex_w1 = d if c else e\n\n assert w1 is ex_w1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_nonzero_test_where_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_w_.assert_eq_d_w_i_x_w_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_nonzero_test_where_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_w_.assert_eq_d_w_i_x_w_i_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1322, "end_line": 1334, "span_ids": ["test_where_nonzero"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_where_nonzero():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_w = np.where(x)\n d_w = da.where(d)\n\n assert isinstance(d_w, type(x_w))\n assert len(d_w) == len(x_w)\n\n for i in range(len(x_w)):\n assert_eq(d_w[i], x_w[i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_incorrect_args_test_count_nonzero.for_shape_chunks_in_0_.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_where_incorrect_args_test_count_nonzero.for_shape_chunks_in_0_.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1337, "end_line": 1359, "span_ids": ["test_count_nonzero", "test_where_incorrect_args"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_where_incorrect_args():\n a = da.ones(5, chunks=3)\n\n for kwd in [\"x\", \"y\"]:\n kwargs = {kwd: a}\n try:\n da.where(a > 0, **kwargs)\n except ValueError as e:\n assert \"either both or neither of x and y should be given\" in str(e)\n\n\ndef test_count_nonzero():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_c = np.count_nonzero(x)\n d_c = da.count_nonzero(d)\n\n if d_c.shape == tuple():\n assert x_c == d_c.compute()\n else:\n assert_eq(x_c, d_c)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_axis_test_count_nonzero_obj.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_axis_test_count_nonzero_obj.if_d_c_shape_tuple_.else_.assert_eq_x_c_d_c_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1362, "end_line": 1387, "span_ids": ["test_count_nonzero_axis", "test_count_nonzero_obj"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axis\", [None, 0, (1,), (0, 1)])\ndef test_count_nonzero_axis(axis):\n for shape, chunks in [((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_c = np.count_nonzero(x, axis)\n d_c = da.count_nonzero(d, axis)\n\n if d_c.shape == tuple():\n assert x_c == d_c.compute()\n else:\n assert_eq(x_c, d_c)\n\n\ndef test_count_nonzero_obj():\n x = np.random.randint(10, size=(15, 16)).astype(object)\n d = da.from_array(x, chunks=(4, 5))\n\n x_c = np.count_nonzero(x)\n d_c = da.count_nonzero(d)\n\n if d_c.shape == tuple():\n assert x_c == d_c.compute()\n else:\n assert_eq(x_c, d_c)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_obj_axis_test_count_nonzero_obj_axis.if_d_c_shape_tuple_.else_.assert_eq_x_c_astype_np_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_obj_axis_test_count_nonzero_obj_axis.if_d_c_shape_tuple_.else_.assert_eq_x_c_astype_np_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1390, "end_line": 1406, "span_ids": ["test_count_nonzero_obj_axis"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"axis\", [None, 0, (1,), (0, 1)])\ndef test_count_nonzero_obj_axis(axis):\n x = np.random.randint(10, size=(15, 16)).astype(object)\n d = da.from_array(x, chunks=(4, 5))\n\n x_c = np.count_nonzero(x, axis)\n d_c = da.count_nonzero(d, axis)\n\n if d_c.shape == tuple():\n assert x_c == d_c.compute()\n else:\n #######################################################\n # Workaround oddness with Windows and object arrays. #\n # #\n # xref: https://github.com/numpy/numpy/issues/9468 #\n #######################################################\n assert_eq(x_c.astype(np.intp), d_c)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_str_test_flatnonzero.for_shape_chunks_in_0_.assert_eq_d_fnz_x_fnz_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_count_nonzero_str_test_flatnonzero.for_shape_chunks_in_0_.assert_eq_d_fnz_x_fnz_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1409, "end_line": 1430, "span_ids": ["test_count_nonzero_str", "test_flatnonzero"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_count_nonzero_str():\n # We may have behavior differences with NumPy for strings\n # with just spaces, depending on the version of NumPy.\n # https://github.com/numpy/numpy/issues/9875\n x = np.array(list(\"Hellow orld\"))\n d = da.from_array(x, chunks=(4,))\n\n x_c = np.count_nonzero(x)\n d_c = da.count_nonzero(d)\n\n assert x_c == d_c.compute()\n\n\ndef test_flatnonzero():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_fnz = np.flatnonzero(x)\n d_fnz = da.flatnonzero(d)\n\n assert_eq(d_fnz, x_fnz)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_test_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_test_nonzero.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1433, "end_line": 1445, "span_ids": ["test_nonzero"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nonzero():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_nz = np.nonzero(x)\n d_nz = da.nonzero(d)\n\n assert isinstance(d_nz, type(x_nz))\n assert len(d_nz) == len(x_nz)\n\n for i in range(len(x_nz)):\n assert_eq(d_nz[i], x_nz[i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_method_test_nonzero_method.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_nonzero_method_test_nonzero_method.for_shape_chunks_in_0_.for_i_in_range_len_x_nz_.assert_eq_d_nz_i_x_nz_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1448, "end_line": 1460, "span_ids": ["test_nonzero_method"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_nonzero_method():\n for shape, chunks in [(0, ()), ((0, 0), (0, 0)), ((15, 16), (4, 5))]:\n x = np.random.randint(10, size=shape)\n d = da.from_array(x, chunks=chunks)\n\n x_nz = x.nonzero()\n d_nz = d.nonzero()\n\n assert isinstance(d_nz, type(x_nz))\n assert len(d_nz) == len(x_nz)\n\n for i in range(len(x_nz)):\n assert_eq(d_nz[i], x_nz[i])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_empty_test_unravel_index_empty.assert_len_d_indices_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_empty_test_unravel_index_empty.assert_len_d_indices_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1463, "end_line": 1476, "span_ids": ["test_unravel_index_empty"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n LooseVersion(np.__version__) < LooseVersion(\"1.14.0\"),\n reason=\"NumPy 1.14.0+ needed for `unravel_index` to take an empty shape.\",\n)\ndef test_unravel_index_empty():\n shape = tuple()\n findices = np.array(0, dtype=int)\n d_findices = da.from_array(findices, chunks=1)\n\n indices = np.unravel_index(findices, shape)\n d_indices = da.unravel_index(d_findices, shape)\n\n assert isinstance(d_indices, type(indices))\n assert len(d_indices) == len(indices) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_test_unravel_index.for_nindices_shape_orde.assert_eq_darr_vindex_d_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_unravel_index_test_unravel_index.for_nindices_shape_orde.assert_eq_darr_vindex_d_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1479, "end_line": 1503, "span_ids": ["test_unravel_index"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_unravel_index():\n for nindices, shape, order in [\n (0, (15,), \"C\"),\n (1, (15,), \"C\"),\n (3, (15,), \"C\"),\n (3, (15,), \"F\"),\n (2, (15, 16), \"C\"),\n (2, (15, 16), \"F\"),\n ]:\n arr = np.random.random(shape)\n darr = da.from_array(arr, chunks=1)\n\n findices = np.random.randint(np.prod(shape, dtype=int), size=nindices)\n d_findices = da.from_array(findices, chunks=1)\n\n indices = np.unravel_index(findices, shape, order)\n d_indices = da.unravel_index(d_findices, shape, order)\n\n assert isinstance(d_indices, type(indices))\n assert len(d_indices) == len(indices)\n\n for i in range(len(indices)):\n assert_eq(d_indices[i], indices[i])\n\n assert_eq(darr.vindex[d_indices], arr[indices])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_test_coarsen.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_test_coarsen.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1506, "end_line": 1519, "span_ids": ["test_coarsen"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_coarsen():\n x = np.random.randint(10, size=(24, 24))\n d = da.from_array(x, chunks=(4, 8))\n\n assert_eq(\n da.chunk.coarsen(np.sum, x, {0: 2, 1: 4}), da.coarsen(np.sum, d, {0: 2, 1: 4})\n )\n assert_eq(\n da.chunk.coarsen(np.sum, x, {0: 2, 1: 4}), da.coarsen(da.sum, d, {0: 2, 1: 4})\n )\n assert_eq(\n da.chunk.coarsen(np.mean, x, {0: 2, 1: 4}, dtype=\"float32\"),\n da.coarsen(da.mean, d, {0: 2, 1: 4}, dtype=\"float32\"),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_with_excess_test_coarsen_bad_chunks.assert_eq_da_coarsen_np_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_coarsen_with_excess_test_coarsen_bad_chunks.assert_eq_da_coarsen_np_s", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1522, "end_line": 1535, "span_ids": ["test_coarsen_bad_chunks", "test_coarsen_with_excess"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_coarsen_with_excess():\n x = da.arange(10, chunks=5)\n assert_eq(da.coarsen(np.min, x, {0: 5}, trim_excess=True), np.array([0, 5]))\n assert_eq(\n da.coarsen(np.sum, x, {0: 3}, trim_excess=True),\n np.array([0 + 1 + 2, 3 + 4 + 5, 6 + 7 + 8]),\n )\n\n\ndef test_coarsen_bad_chunks():\n\n x1 = da.arange(10, chunks=5)\n x2 = x1.rechunk((1, 2, 3, 4))\n assert_eq(da.coarsen(np.sum, x1, {0: 5}), da.coarsen(np.sum, x2, {0: 5}))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_aligned_coarsen_chunks_test_aligned_coarsen_chunks.assert_acc_10_20_30_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_aligned_coarsen_chunks_test_aligned_coarsen_chunks.assert_acc_10_20_30_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1538, "end_line": 1546, "span_ids": ["test_aligned_coarsen_chunks"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_aligned_coarsen_chunks():\n\n from ..routines import aligned_coarsen_chunks as acc\n\n assert acc((20, 10, 15, 23, 24), 10) == (20, 10, 20, 20, 20, 2)\n assert acc((20, 10, 15, 42, 23, 24), 10) == (20, 10, 20, 40, 20, 20, 4)\n assert acc((20, 10, 15, 47, 23, 24), 10) == (20, 10, 20, 50, 20, 10, 9)\n assert acc((2, 10, 15, 47, 23, 24), 10) == (10, 20, 50, 20, 20, 1)\n assert acc((10, 20, 30, 40, 2), 10) == (10, 20, 30, 40, 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_insert_test_insert.None_2.da_insert_a_3_1_axi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_insert_test_insert.None_2.da_insert_a_3_1_axi", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1549, "end_line": 1585, "span_ids": ["test_insert"], "tokens": 571}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_insert():\n x = np.random.randint(10, size=(10, 10))\n a = da.from_array(x, chunks=(5, 5))\n y = np.random.randint(10, size=(5, 10))\n b = da.from_array(y, chunks=(4, 4))\n\n assert_eq(np.insert(x, 0, -1, axis=0), da.insert(a, 0, -1, axis=0))\n assert_eq(np.insert(x, 3, -1, axis=-1), da.insert(a, 3, -1, axis=-1))\n assert_eq(np.insert(x, 5, -1, axis=1), da.insert(a, 5, -1, axis=1))\n assert_eq(np.insert(x, -1, -1, axis=-2), da.insert(a, -1, -1, axis=-2))\n assert_eq(np.insert(x, [2, 3, 3], -1, axis=1), da.insert(a, [2, 3, 3], -1, axis=1))\n assert_eq(\n np.insert(x, [2, 3, 8, 8, -2, -2], -1, axis=0),\n da.insert(a, [2, 3, 8, 8, -2, -2], -1, axis=0),\n )\n assert_eq(\n np.insert(x, slice(1, 4), -1, axis=1), da.insert(a, slice(1, 4), -1, axis=1)\n )\n assert_eq(\n np.insert(x, [2] * 3 + [5] * 2, y, axis=0),\n da.insert(a, [2] * 3 + [5] * 2, b, axis=0),\n )\n assert_eq(np.insert(x, 0, y[0], axis=1), da.insert(a, 0, b[0], axis=1))\n\n assert same_keys(\n da.insert(a, [2, 3, 8, 8, -2, -2], -1, axis=0),\n da.insert(a, [2, 3, 8, 8, -2, -2], -1, axis=0),\n )\n\n with pytest.raises(NotImplementedError):\n da.insert(a, [4, 2], -1, axis=0)\n\n with pytest.raises(AxisError):\n da.insert(a, [3], -1, axis=2)\n\n with pytest.raises(AxisError):\n da.insert(a, [3], -1, axis=-3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_multi_insert_test_result_type.None_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_multi_insert_test_result_type.None_10", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1588, "end_line": 1615, "span_ids": ["test_result_type", "test_multi_insert"], "tokens": 416}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multi_insert():\n z = np.random.randint(10, size=(1, 2))\n c = da.from_array(z, chunks=(1, 2))\n assert_eq(\n np.insert(np.insert(z, [0, 1], -1, axis=0), [1], -1, axis=1),\n da.insert(da.insert(c, [0, 1], -1, axis=0), [1], -1, axis=1),\n )\n\n\ndef test_result_type():\n a = da.from_array(np.ones(5, np.float32), chunks=(3,))\n b = da.from_array(np.ones(5, np.int16), chunks=(3,))\n c = da.from_array(np.ones(5, np.int64), chunks=(3,))\n x = np.ones(5, np.float32)\n assert da.result_type(b, c) == np.int64\n assert da.result_type(a, b, c) == np.float64\n assert da.result_type(b, np.float32) == np.float32\n assert da.result_type(b, np.dtype(np.float32)) == np.float32\n assert da.result_type(b, x) == np.float32\n # Effect of scalars depends on their value\n assert da.result_type(1, b) == np.int16\n assert da.result_type(1.0, a) == np.float32\n assert da.result_type(np.int64(1), b) == np.int16\n assert da.result_type(np.ones((), np.int64), b) == np.int16 # 0d array\n assert da.result_type(1e200, a) == np.float64 # 1e200 is too big for float32\n # dask 0d-arrays are NOT treated like scalars\n c = da.from_array(np.ones((), np.float64), chunks=())\n assert da.result_type(a, c) == np.float64", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py__numpy_and_dask_inputs__numpy_and_dask_inputs.return.np_inputs_da_inputs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py__numpy_and_dask_inputs__numpy_and_dask_inputs.return.np_inputs_da_inputs", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1618, "end_line": 1657, "span_ids": ["_numpy_and_dask_inputs"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _numpy_and_dask_inputs(input_sigs):\n # einsum label dimensions\n _dimensions = {\n \"a\": 5,\n \"b\": 6,\n \"c\": 7,\n \"d\": 5,\n \"e\": 6,\n \"f\": 10,\n \"g\": 1,\n \"h\": 2,\n \"*\": 11,\n }\n\n # dimension chunks sizes\n _chunks = {\n \"a\": (2, 3),\n \"b\": (2, 3, 1),\n \"c\": (2, 3, 2),\n \"d\": (4, 1),\n \"e\": (2, 4),\n \"f\": (1, 2, 3, 4),\n \"g\": 1,\n \"h\": (1, 1),\n \"*\": 11,\n }\n\n def _shape_from_string(s):\n return tuple(_dimensions[c] for c in s)\n\n def _chunks_from_string(s):\n return tuple(_chunks[c] for c in s)\n\n shapes = [_shape_from_string(s) for s in input_sigs]\n chunks = [_chunks_from_string(s) for s in input_sigs]\n\n np_inputs = [np.random.random(s) for s in shapes]\n da_inputs = [da.from_array(i, chunks=c) for i, c in zip(np_inputs, chunks)]\n\n return np_inputs, da_inputs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_test_einsum.with_pytest_warns_None_.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_test_einsum.with_pytest_warns_None_.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1660, "end_line": 1703, "span_ids": ["test_einsum"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"einsum_signature\",\n [\n \"abc,bad->abcd\",\n \"abcdef,bcdfg->abcdeg\",\n \"ea,fb,abcd,gc,hd->efgh\",\n \"ab,b\",\n \"aa\",\n \"a,a->\",\n \"a,a->a\",\n \"a,a\",\n \"a,b\",\n \"a,b,c\",\n \"a\",\n \"ba,b\",\n \"ba,b->\",\n \"defab,fedbc->defac\",\n \"ab...,bc...->ac...\",\n \"a...a\",\n \"abc...->cba...\",\n \"...ab->...a\",\n \"a...a->a...\",\n # Following 2 from # https://stackoverflow.com/a/19203475/1611416\n \"...abc,...abcd->...d\",\n \"ab...,b->ab...\",\n # https://github.com/dask/dask/pull/3412#discussion_r182413444\n \"aa->a\",\n \"ab,ab,c->c\",\n \"aab,bc->ac\",\n \"aab,bcc->ac\",\n \"fdf,cdd,ccd,afe->ae\",\n \"fff,fae,bef,def->abd\",\n ],\n)\ndef test_einsum(einsum_signature):\n input_sigs = einsum_signature.split(\"->\")[0].replace(\"...\", \"*\").split(\",\")\n\n np_inputs, da_inputs = _numpy_and_dask_inputs(input_sigs)\n\n with pytest.warns(None):\n assert_eq(\n np.einsum(einsum_signature, *np_inputs),\n da.einsum(einsum_signature, *da_inputs),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_optimize_test_einsum_optimize.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_optimize_test_einsum_optimize.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1706, "end_line": 1724, "span_ids": ["test_einsum_optimize"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"optimize_opts\", [(True, False), (\"greedy\", False), (\"optimal\", False)]\n)\ndef test_einsum_optimize(optimize_opts):\n sig = \"ea,fb,abcd,gc,hd->efgh\"\n input_sigs = sig.split(\"->\")[0].split(\",\")\n np_inputs, da_inputs = _numpy_and_dask_inputs(input_sigs)\n\n opt1, opt2 = optimize_opts\n\n assert_eq(\n np.einsum(sig, *np_inputs, optimize=opt1),\n da.einsum(sig, *np_inputs, optimize=opt2),\n )\n\n assert_eq(\n np.einsum(sig, *np_inputs, optimize=opt2),\n da.einsum(sig, *np_inputs, optimize=opt1),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_order_test_einsum_order.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_order_test_einsum_order.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1727, "end_line": 1735, "span_ids": ["test_einsum_order"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"order\", [\"C\", \"F\", \"A\", \"K\"])\ndef test_einsum_order(order):\n sig = \"ea,fb,abcd,gc,hd->efgh\"\n input_sigs = sig.split(\"->\")[0].split(\",\")\n np_inputs, da_inputs = _numpy_and_dask_inputs(input_sigs)\n\n assert_eq(\n np.einsum(sig, *np_inputs, order=order), da.einsum(sig, *np_inputs, order=order)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_casting_test_einsum_casting.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_casting_test_einsum_casting.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1738, "end_line": 1747, "span_ids": ["test_einsum_casting"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"casting\", [\"no\", \"equiv\", \"safe\", \"same_kind\", \"unsafe\"])\ndef test_einsum_casting(casting):\n sig = \"ea,fb,abcd,gc,hd->efgh\"\n input_sigs = sig.split(\"->\")[0].split(\",\")\n np_inputs, da_inputs = _numpy_and_dask_inputs(input_sigs)\n\n assert_eq(\n np.einsum(sig, *np_inputs, casting=casting),\n da.einsum(sig, *np_inputs, casting=casting),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_split_every_test_einsum_invalid_args.with_pytest_raises_TypeEr.da_einsum_a_da_inputs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_split_every_test_einsum_invalid_args.with_pytest_raises_TypeEr.da_einsum_a_da_inputs", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1750, "end_line": 1761, "span_ids": ["test_einsum_invalid_args", "test_einsum_split_every"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"split_every\", [None, 2])\ndef test_einsum_split_every(split_every):\n np_inputs, da_inputs = _numpy_and_dask_inputs(\"a\")\n assert_eq(\n np.einsum(\"a\", *np_inputs), da.einsum(\"a\", *da_inputs, split_every=split_every)\n )\n\n\ndef test_einsum_invalid_args():\n _, da_inputs = _numpy_and_dask_inputs(\"a\")\n with pytest.raises(TypeError):\n da.einsum(\"a\", *da_inputs, foo=1, bar=2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction_test_einsum_broadcasting_contraction.assert_eq_np_res_mul_res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction_test_einsum_broadcasting_contraction.assert_eq_np_res_mul_res", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1764, "end_line": 1784, "span_ids": ["test_einsum_broadcasting_contraction"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_einsum_broadcasting_contraction():\n a = np.random.rand(1, 5, 4)\n b = np.random.rand(4, 6)\n c = np.random.rand(5, 6)\n d = np.random.rand(10)\n\n d_a = da.from_array(a, chunks=(1, (2, 3), (2, 2)))\n d_b = da.from_array(b, chunks=((2, 2), (4, 2)))\n d_c = da.from_array(c, chunks=((2, 3), (4, 2)))\n d_d = da.from_array(d, chunks=((7, 3)))\n\n np_res = np.einsum(\"ijk,kl,jl\", a, b, c)\n da_res = da.einsum(\"ijk,kl,jl\", d_a, d_b, d_c)\n assert_eq(np_res, da_res)\n\n mul_res = da_res * d\n\n np_res = np.einsum(\"ijk,kl,jl,i->i\", a, b, c, d)\n da_res = da.einsum(\"ijk,kl,jl,i->i\", d_a, d_b, d_c, d_d)\n assert_eq(np_res, da_res)\n assert_eq(np_res, mul_res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction2_test_einsum_broadcasting_contraction2.assert_eq_np_res_mul_res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction2_test_einsum_broadcasting_contraction2.assert_eq_np_res_mul_res", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1787, "end_line": 1807, "span_ids": ["test_einsum_broadcasting_contraction2"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_einsum_broadcasting_contraction2():\n a = np.random.rand(1, 1, 5, 4)\n b = np.random.rand(4, 6)\n c = np.random.rand(5, 6)\n d = np.random.rand(7, 7)\n\n d_a = da.from_array(a, chunks=(1, 1, (2, 3), (2, 2)))\n d_b = da.from_array(b, chunks=((2, 2), (4, 2)))\n d_c = da.from_array(c, chunks=((2, 3), (4, 2)))\n d_d = da.from_array(d, chunks=((7, 3)))\n\n np_res = np.einsum(\"abjk,kl,jl\", a, b, c)\n da_res = da.einsum(\"abjk,kl,jl\", d_a, d_b, d_c)\n assert_eq(np_res, da_res)\n\n mul_res = da_res * d\n\n np_res = np.einsum(\"abjk,kl,jl,ab->ab\", a, b, c, d)\n da_res = da.einsum(\"abjk,kl,jl,ab->ab\", d_a, d_b, d_c, d_d)\n assert_eq(np_res, da_res)\n assert_eq(np_res, mul_res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction3_test_einsum_broadcasting_contraction3.assert_eq_np_res_da_res_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_einsum_broadcasting_contraction3_test_einsum_broadcasting_contraction3.assert_eq_np_res_da_res_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1810, "end_line": 1823, "span_ids": ["test_einsum_broadcasting_contraction3"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_einsum_broadcasting_contraction3():\n a = np.random.rand(1, 5, 4)\n b = np.random.rand(4, 1, 6)\n c = np.random.rand(5, 6)\n d = np.random.rand(7, 7)\n\n d_a = da.from_array(a, chunks=(1, (2, 3), (2, 2)))\n d_b = da.from_array(b, chunks=((2, 2), 1, (4, 2)))\n d_c = da.from_array(c, chunks=((2, 3), (4, 2)))\n d_d = da.from_array(d, chunks=((7, 3)))\n\n np_res = np.einsum(\"ajk,kbl,jl,ab->ab\", a, b, c, d)\n da_res = da.einsum(\"ajk,kbl,jl,ab->ab\", d_a, d_b, d_c, d_d)\n assert_eq(np_res, da_res)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_average_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_routines.py_test_average_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_routines.py", "file_name": "test_routines.py", "file_type": "text/x-python", "category": "test", "start_line": 1826, "end_line": 1866, "span_ids": ["test_average", "test_average_raises", "test_average_weights", "test_iscomplexobj"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"a\", [np.arange(11), np.arange(6).reshape((3, 2))])\n@pytest.mark.parametrize(\"returned\", [True, False])\ndef test_average(a, returned):\n d_a = da.from_array(a, chunks=2)\n\n np_avg = np.average(a, returned=returned)\n da_avg = da.average(d_a, returned=returned)\n\n assert_eq(np_avg, da_avg)\n\n\ndef test_average_weights():\n a = np.arange(6).reshape((3, 2))\n d_a = da.from_array(a, chunks=2)\n\n weights = np.array([0.25, 0.75])\n d_weights = da.from_array(weights, chunks=2)\n\n np_avg = np.average(a, weights=weights, axis=1)\n da_avg = da.average(d_a, weights=d_weights, axis=1)\n\n assert_eq(np_avg, da_avg)\n\n\ndef test_average_raises():\n d_a = da.arange(11, chunks=2)\n\n with pytest.raises(TypeError):\n da.average(d_a, weights=[1, 2, 3])\n\n with pytest.warns(RuntimeWarning):\n da.average(d_a, weights=da.zeros_like(d_a)).compute()\n\n\ndef test_iscomplexobj():\n a = da.from_array(np.array([1, 2]), 2)\n assert np.iscomplexobj(a) is False\n\n a = da.from_array(np.array([1, 2 + 0j]), 2)\n assert np.iscomplexobj(a) is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_itertools_from_dask_array_utils_imp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_itertools_from_dask_array_utils_imp", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["imports"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nfrom operator import getitem\n\nimport pytest\nfrom tlz import merge\n\nnp = pytest.importorskip(\"numpy\")\n\nimport dask\nfrom dask import config, utils\nimport dask.array as da\nfrom dask.array.slicing import (\n _sanitize_index_element,\n _slice_1d,\n new_blockdim,\n sanitize_index,\n slice_array,\n take,\n normalize_index,\n slicing_plan,\n make_block_sorted_slices,\n shuffle_slice,\n)\nfrom dask.array.slicing import (\n _sanitize_index_element,\n _slice_1d,\n new_blockdim,\n sanitize_index,\n slice_array,\n take,\n normalize_index,\n slicing_plan,\n cached_cumsum,\n)\nfrom dask.array.utils import assert_eq, same_keys", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d_test_slice_1d._x_1_8_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d_test_slice_1d._x_1_8_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 109, "span_ids": ["test_slice_1d"], "tokens": 784}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_1d():\n expected = {0: slice(10, 25, 1), 1: slice(None, None, None), 2: slice(0, 1, 1)}\n result = _slice_1d(100, [25] * 4, slice(10, 51, None))\n assert expected == result\n\n # x[100:12:-3]\n expected = {\n 0: slice(-2, -8, -3),\n 1: slice(-1, -21, -3),\n 2: slice(-3, -21, -3),\n 3: slice(-2, -21, -3),\n 4: slice(-1, -21, -3),\n }\n result = _slice_1d(100, [20] * 5, slice(100, 12, -3))\n assert expected == result\n\n # x[102::-3]\n expected = {\n 0: slice(-2, -21, -3),\n 1: slice(-1, -21, -3),\n 2: slice(-3, -21, -3),\n 3: slice(-2, -21, -3),\n 4: slice(-1, -21, -3),\n }\n result = _slice_1d(100, [20] * 5, slice(102, None, -3))\n assert expected == result\n\n # x[::-4]\n expected = {\n 0: slice(-1, -21, -4),\n 1: slice(-1, -21, -4),\n 2: slice(-1, -21, -4),\n 3: slice(-1, -21, -4),\n 4: slice(-1, -21, -4),\n }\n result = _slice_1d(100, [20] * 5, slice(None, None, -4))\n assert expected == result\n\n # x[::-7]\n expected = {\n 0: slice(-5, -21, -7),\n 1: slice(-4, -21, -7),\n 2: slice(-3, -21, -7),\n 3: slice(-2, -21, -7),\n 4: slice(-1, -21, -7),\n }\n result = _slice_1d(100, [20] * 5, slice(None, None, -7))\n assert expected == result\n\n # x=range(115)\n # x[::-7]\n expected = {\n 0: slice(-7, -24, -7),\n 1: slice(-2, -24, -7),\n 2: slice(-4, -24, -7),\n 3: slice(-6, -24, -7),\n 4: slice(-1, -24, -7),\n }\n result = _slice_1d(115, [23] * 5, slice(None, None, -7))\n assert expected == result\n\n # x[79::-3]\n expected = {\n 0: slice(-1, -21, -3),\n 1: slice(-3, -21, -3),\n 2: slice(-2, -21, -3),\n 3: slice(-1, -21, -3),\n }\n result = _slice_1d(100, [20] * 5, slice(79, None, -3))\n assert expected == result\n\n # x[-1:-8:-1]\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d.expected_14_test_slice_1d.None_14": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_1d.expected_14_test_slice_1d.None_14", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 110, "end_line": 179, "span_ids": ["test_slice_1d"], "tokens": 850}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_1d():\n # ... other code\n expected = {4: slice(-1, -8, -1)}\n result = _slice_1d(100, [20, 20, 20, 20, 20], slice(-1, 92, -1))\n assert expected == result\n\n # x[20:0:-1]\n expected = {0: slice(-1, -20, -1), 1: slice(-20, -21, -1)}\n result = _slice_1d(100, [20, 20, 20, 20, 20], slice(20, 0, -1))\n assert expected == result\n\n # x[:0]\n expected = {}\n result = _slice_1d(100, [20, 20, 20, 20, 20], slice(0))\n assert result\n\n # x=range(99)\n expected = {\n 0: slice(-3, -21, -3),\n 1: slice(-2, -21, -3),\n 2: slice(-1, -21, -3),\n 3: slice(-2, -20, -3),\n 4: slice(-1, -21, -3),\n }\n # This array has non-uniformly sized blocks\n result = _slice_1d(99, [20, 20, 20, 19, 20], slice(100, None, -3))\n assert expected == result\n\n # x=range(104)\n # x[::-3]\n expected = {\n 0: slice(-1, -21, -3),\n 1: slice(-3, -24, -3),\n 2: slice(-3, -28, -3),\n 3: slice(-1, -14, -3),\n 4: slice(-1, -22, -3),\n }\n # This array has non-uniformly sized blocks\n result = _slice_1d(104, [20, 23, 27, 13, 21], slice(None, None, -3))\n assert expected == result\n\n # x=range(104)\n # x[:27:-3]\n expected = {\n 1: slice(-3, -16, -3),\n 2: slice(-3, -28, -3),\n 3: slice(-1, -14, -3),\n 4: slice(-1, -22, -3),\n }\n # This array has non-uniformly sized blocks\n result = _slice_1d(104, [20, 23, 27, 13, 21], slice(None, 27, -3))\n assert expected == result\n\n # x=range(104)\n # x[100:27:-3]\n expected = {\n 1: slice(-3, -16, -3),\n 2: slice(-3, -28, -3),\n 3: slice(-1, -14, -3),\n 4: slice(-4, -22, -3),\n }\n # This array has non-uniformly sized blocks\n result = _slice_1d(104, [20, 23, 27, 13, 21], slice(100, 27, -3))\n assert expected == result\n\n # x=range(1000000000000)\n # x[1000:]\n expected = {0: slice(1000, 1000000000, 1)}\n expected.update({ii: slice(None, None, None) for ii in range(1, 1000)})\n # This array is large\n result = _slice_1d(1000000000000, [1000000000] * 1000, slice(1000, None, None))\n assert expected == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_singleton_value_on_boundary_test_slice_array_1d.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_singleton_value_on_boundary_test_slice_array_1d.None_7", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 228, "span_ids": ["test_slice_array_1d", "test_slice_singleton_value_on_boundary"], "tokens": 688}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_singleton_value_on_boundary():\n assert _slice_1d(15, [5, 5, 5], 10) == {2: 0}\n assert _slice_1d(30, (5, 5, 5, 5, 5, 5), 10) == {2: 0}\n\n\ndef test_slice_array_1d():\n # x[24::2]\n expected = {\n (\"y\", 0): (getitem, (\"x\", 0), (slice(24, 25, 2),)),\n (\"y\", 1): (getitem, (\"x\", 1), (slice(1, 25, 2),)),\n (\"y\", 2): (getitem, (\"x\", 2), (slice(0, 25, 2),)),\n (\"y\", 3): (getitem, (\"x\", 3), (slice(1, 25, 2),)),\n }\n result, chunks = slice_array(\"y\", \"x\", [[25] * 4], [slice(24, None, 2)], 8)\n\n assert expected == result\n\n # x[26::2]\n expected = {\n (\"y\", 0): (getitem, (\"x\", 1), (slice(1, 25, 2),)),\n (\"y\", 1): (getitem, (\"x\", 2), (slice(0, 25, 2),)),\n (\"y\", 2): (getitem, (\"x\", 3), (slice(1, 25, 2),)),\n }\n\n result, chunks = slice_array(\"y\", \"x\", [[25] * 4], [slice(26, None, 2)], 8)\n assert expected == result\n\n # x[24::2]\n expected = {\n (\"y\", 0): (getitem, (\"x\", 0), (slice(24, 25, 2),)),\n (\"y\", 1): (getitem, (\"x\", 1), (slice(1, 25, 2),)),\n (\"y\", 2): (getitem, (\"x\", 2), (slice(0, 25, 2),)),\n (\"y\", 3): (getitem, (\"x\", 3), (slice(1, 25, 2),)),\n }\n result, chunks = slice_array(\"y\", \"x\", [(25,) * 4], (slice(24, None, 2),), 8)\n\n assert expected == result\n\n # x[26::2]\n expected = {\n (\"y\", 0): (getitem, (\"x\", 1), (slice(1, 25, 2),)),\n (\"y\", 1): (getitem, (\"x\", 2), (slice(0, 25, 2),)),\n (\"y\", 2): (getitem, (\"x\", 3), (slice(1, 25, 2),)),\n }\n\n result, chunks = slice_array(\"y\", \"x\", [(25,) * 4], (slice(26, None, 2),), 8)\n assert expected == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_array_2d_test_slice_array_2d.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_array_2d_test_slice_array_2d.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 231, "end_line": 268, "span_ids": ["test_slice_array_2d"], "tokens": 392}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_array_2d():\n # 2d slices: x[13::2,10::1]\n expected = {\n (\"y\", 0, 0): (getitem, (\"x\", 0, 0), (slice(13, 20, 2), slice(10, 20, 1))),\n (\"y\", 0, 1): (\n getitem,\n (\"x\", 0, 1),\n (slice(13, 20, 2), slice(None, None, None)),\n ),\n (\"y\", 0, 2): (\n getitem,\n (\"x\", 0, 2),\n (slice(13, 20, 2), slice(None, None, None)),\n ),\n }\n\n result, chunks = slice_array(\n \"y\",\n \"x\",\n [[20], [20, 20, 5]],\n [slice(13, None, 2), slice(10, None, 1)],\n itemsize=8,\n )\n\n assert expected == result\n\n # 2d slices with one dimension: x[5,10::1]\n expected = {\n (\"y\", 0): (getitem, (\"x\", 0, 0), (5, slice(10, 20, 1))),\n (\"y\", 1): (getitem, (\"x\", 0, 1), (5, slice(None, None, None))),\n (\"y\", 2): (getitem, (\"x\", 0, 2), (5, slice(None, None, None))),\n }\n\n result, chunks = slice_array(\n \"y\", \"x\", ([20], [20, 20, 5]), [5, slice(10, None, 1)], 8\n )\n\n assert expected == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_optimizations_test_slicing_with_singleton_indices.assert_expected_result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_optimizations_test_slicing_with_singleton_indices.assert_expected_result", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 271, "end_line": 296, "span_ids": ["test_slice_optimizations", "test_slicing_with_singleton_indices"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_optimizations():\n # bar[:]\n expected = {(\"foo\", 0): (\"bar\", 0)}\n result, chunks = slice_array(\"foo\", \"bar\", [[100]], (slice(None, None, None),), 8)\n assert expected == result\n\n # bar[:,:,:]\n expected = {(\"foo\", 0): (\"bar\", 0), (\"foo\", 1): (\"bar\", 1), (\"foo\", 2): (\"bar\", 2)}\n result, chunks = slice_array(\n \"foo\",\n \"bar\",\n [(100, 1000, 10000)],\n (slice(None, None, None), slice(None, None, None), slice(None, None, None)),\n itemsize=8,\n )\n assert expected == result\n\n\ndef test_slicing_with_singleton_indices():\n result, chunks = slice_array(\n \"y\", \"x\", ([5, 5], [5, 5]), (slice(0, 5), 8), itemsize=8\n )\n\n expected = {(\"y\", 0): (getitem, (\"x\", 0, 1), (slice(None, None, None), 3))}\n\n assert expected == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_newaxis_test_slicing_with_newaxis.assert_chunks_3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_newaxis_test_slicing_with_newaxis.assert_chunks_3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 299, "end_line": 322, "span_ids": ["test_slicing_with_newaxis"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_with_newaxis():\n result, chunks = slice_array(\n \"y\",\n \"x\",\n ([5, 5], [5, 5]),\n (slice(0, 3), None, slice(None, None, None)),\n itemsize=8,\n )\n\n expected = {\n (\"y\", 0, 0, 0): (\n getitem,\n (\"x\", 0, 0),\n (slice(0, 3, 1), None, slice(None, None, None)),\n ),\n (\"y\", 0, 0, 1): (\n getitem,\n (\"x\", 0, 1),\n (slice(0, 3, 1), None, slice(None, None, None)),\n ),\n }\n\n assert expected == result\n assert chunks == ((3,), (1,), (5, 5))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_test_take.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_test_take.None_3", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 325, "end_line": 355, "span_ids": ["test_take"], "tokens": 479}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take():\n chunks, dsk = take(\"y\", \"x\", [(20, 20, 20, 20)], [5, 1, 47, 3], itemsize=8, axis=0)\n expected = {\n (\"y\", 0): (getitem, (\"x\", 0), (np.array([5, 1]),)),\n (\"y\", 1): (getitem, (\"x\", 2), (np.array([7]),)),\n (\"y\", 2): (getitem, (\"x\", 0), (np.array([3]),)),\n }\n np.testing.assert_equal(sorted(dsk.items()), sorted(expected.items()))\n assert chunks == ((2, 1, 1),)\n\n chunks, dsk = take(\n \"y\", \"x\", [(20, 20, 20, 20), (20, 20)], [5, 1, 47, 3], itemsize=8, axis=0\n )\n expected = {\n (\"y\", 0, 0): (\n getitem,\n (\"x\", 0, 0),\n (np.array([5, 1]), slice(None, None, None)),\n ),\n (\"y\", 0, 1): (\n getitem,\n (\"x\", 0, 1),\n (np.array([5, 1]), slice(None, None, None)),\n ),\n (\"y\", 1, 0): (getitem, (\"x\", 2, 0), (np.array([7]), slice(None, None, None))),\n (\"y\", 1, 1): (getitem, (\"x\", 2, 1), (np.array([7]), slice(None, None, None))),\n (\"y\", 2, 0): (getitem, (\"x\", 0, 0), (np.array([3]), slice(None, None, None))),\n (\"y\", 2, 1): (getitem, (\"x\", 0, 1), (np.array([3]), slice(None, None, None))),\n }\n np.testing.assert_equal(sorted(dsk.items()), sorted(expected.items()))\n assert chunks == ((2, 1, 1), (20, 20))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_sorted_test_take_sorted.assert_chunks_20_20": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_sorted_test_take_sorted.assert_chunks_20_20", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 358, "end_line": 381, "span_ids": ["test_take_sorted"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take_sorted():\n chunks, dsk = take(\"y\", \"x\", [(20, 20, 20, 20)], [1, 3, 5, 47], itemsize=8, axis=0)\n expected = {\n (\"y\", 0): (getitem, (\"x\", 0), ([1, 3, 5],)),\n (\"y\", 1): (getitem, (\"x\", 2), ([7],)),\n }\n np.testing.assert_equal(dsk, expected)\n assert chunks == ((3, 1),)\n\n chunks, dsk = take(\n \"y\", \"x\", [(20, 20, 20, 20), (20, 20)], [1, 3, 5, 37], itemsize=8, axis=1\n )\n expected = merge(\n dict(\n ((\"y\", i, 0), (getitem, (\"x\", i, 0), (slice(None, None, None), [1, 3, 5])))\n for i in range(4)\n ),\n dict(\n ((\"y\", i, 1), (getitem, (\"x\", i, 1), (slice(None, None, None), [17])))\n for i in range(4)\n ),\n )\n np.testing.assert_equal(dsk, expected)\n assert chunks == ((20, 20, 20, 20), (3, 1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_chunks_test_slicing_chunks.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_chunks_test_slicing_chunks.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 384, "end_line": 398, "span_ids": ["test_slicing_chunks"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_chunks():\n result, chunks = slice_array(\n \"y\", \"x\", ([5, 5], [5, 5]), (1, np.array([2, 0, 3])), itemsize=8\n )\n assert chunks == ((3,),)\n\n result, chunks = slice_array(\n \"y\", \"x\", ([5, 5], [5, 5]), (slice(0, 7), np.array([2, 0, 3])), itemsize=8\n )\n assert chunks == ((5, 2), (3,))\n\n result, chunks = slice_array(\n \"y\", \"x\", ([5, 5], [5, 5]), (slice(0, 7), 1), itemsize=8\n )\n assert chunks == ((5, 2),)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_numpy_arrays_test_slicing_with_numpy_arrays.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_numpy_arrays_test_slicing_with_numpy_arrays.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 401, "end_line": 425, "span_ids": ["test_slicing_with_numpy_arrays"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_with_numpy_arrays():\n a, bd1 = slice_array(\n \"y\",\n \"x\",\n ((3, 3, 3, 1), (3, 3, 3, 1)),\n (np.array([1, 2, 9]), slice(None, None, None)),\n itemsize=8,\n )\n b, bd2 = slice_array(\n \"y\",\n \"x\",\n ((3, 3, 3, 1), (3, 3, 3, 1)),\n (np.array([1, 2, 9]), slice(None, None, None)),\n itemsize=8,\n )\n\n assert bd1 == bd2\n np.testing.assert_equal(a, b)\n\n i = [False, True, True, False, False, False, False, False, False, True]\n index = (i, slice(None, None, None))\n index = normalize_index(index, (10, 10))\n c, bd3 = slice_array(\"y\", \"x\", ((3, 3, 3, 1), (3, 3, 3, 1)), index, itemsize=8)\n assert bd1 == bd3\n np.testing.assert_equal(a, c)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_and_chunks_test_slicing_identities.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_and_chunks_test_slicing_identities.None_9", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 428, "end_line": 446, "span_ids": ["test_slicing_and_chunks", "test_slicing_identities"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_and_chunks():\n o = da.ones((24, 16), chunks=((4, 8, 8, 4), (2, 6, 6, 2)))\n t = o[4:-4, 2:-2]\n assert t.chunks == ((8, 8), (6, 6))\n\n\ndef test_slicing_identities():\n a = da.ones((24, 16), chunks=((4, 8, 8, 4), (2, 6, 6, 2)))\n\n assert a is a[slice(None)]\n assert a is a[:]\n assert a is a[::]\n assert a is a[...]\n assert a is a[0:]\n assert a is a[0::]\n assert a is a[::1]\n assert a is a[0 : len(a)]\n assert a is a[0::1]\n assert a is a[0 : len(a) : 1]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_stop_0_ReturnItem.__getitem__.return.key": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slice_stop_0_ReturnItem.__getitem__.return.key", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 449, "end_line": 465, "span_ids": ["test_slice_stop_0", "ReturnItem.__getitem__", "ReturnItem", "test_slice_list_then_None"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slice_stop_0():\n # from gh-125\n a = da.ones(10, chunks=(10,))[:0].compute()\n b = np.ones(10)[:0]\n assert_eq(a, b)\n\n\ndef test_slice_list_then_None():\n x = da.zeros(shape=(5, 5), chunks=(3, 3))\n y = x[[2, 1]][None]\n\n assert_eq(y, np.zeros((1, 2, 5)))\n\n\nclass ReturnItem(object):\n def __getitem__(self, key):\n return key", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_exhaustively_test_slicing_exhaustively.for_i_in_first_indexers_.for_j_in_second_indexers_.assert_eq_x_i_j_a_i_j": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_exhaustively_test_slicing_exhaustively.for_i_in_first_indexers_.for_j_in_second_indexers_.assert_eq_x_i_j_a_i_j", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 468, "end_line": 489, "span_ids": ["test_slicing_exhaustively"], "tokens": 337}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skip(reason=\"really long test\")\ndef test_slicing_exhaustively():\n x = np.random.rand(6, 7, 8)\n a = da.from_array(x, chunks=(3, 3, 3))\n I = ReturnItem()\n\n # independent indexing along different axes\n indexers = [0, -2, I[:], I[:5], [0, 1], [0, 1, 2], [4, 2], I[::-1], None, I[:0], []]\n for i in indexers:\n assert_eq(x[i], a[i]), i\n for j in indexers:\n assert_eq(x[i][:, j], a[i][:, j]), (i, j)\n assert_eq(x[:, i][j], a[:, i][j]), (i, j)\n for k in indexers:\n assert_eq(x[..., i][:, j][k], a[..., i][:, j][k]), (i, j, k)\n\n # repeated indexing along the first axis\n first_indexers = [I[:], I[:5], np.arange(5), [3, 1, 4, 5, 0], np.arange(6) < 6]\n second_indexers = [0, -1, 3, I[:], I[:3], I[2:-1], [2, 4], [], I[:0]]\n for i in first_indexers:\n for j in second_indexers:\n assert_eq(x[i][j], a[i][j]), (i, j)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_negative_step_flops_keys_test_slicing_with_negative_step_flops_keys.assert_y_dask_y_name_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_with_negative_step_flops_keys_test_slicing_with_negative_step_flops_keys.assert_y_dask_y_name_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 492, "end_line": 503, "span_ids": ["test_slicing_with_negative_step_flops_keys"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_with_negative_step_flops_keys():\n x = da.arange(10, chunks=5)\n y = x[:1:-1]\n assert (x.name, 1) in y.dask[(y.name, 0)]\n assert (x.name, 0) in y.dask[(y.name, 1)]\n\n assert_eq(y, np.arange(10)[:1:-1])\n\n assert y.chunks == ((5, 3),)\n\n assert y.dask[(y.name, 0)] == (getitem, (x.name, 1), (slice(-1, -6, -1),))\n assert y.dask[(y.name, 1)] == (getitem, (x.name, 0), (slice(-1, -4, -1),))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_slice_test_multiple_list_slicing.assert_eq_x_0_1_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_slice_test_multiple_list_slicing.assert_eq_x_0_1_2_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 506, "end_line": 516, "span_ids": ["test_empty_slice", "test_multiple_list_slicing"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_empty_slice():\n x = da.ones((5, 5), chunks=(2, 2), dtype=\"i4\")\n y = x[:0]\n\n assert_eq(y, np.ones((5, 5), dtype=\"i4\")[:0])\n\n\ndef test_multiple_list_slicing():\n x = np.random.rand(6, 7, 8)\n a = da.from_array(x, chunks=(3, 3, 3))\n assert_eq(x[:, [0, 1, 2]][[0, 1]], a[:, [0, 1, 2]][[0, 1]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_list_slicing_test_boolean_list_slicing.assert_eq_da_asarray_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_list_slicing_test_boolean_list_slicing.assert_eq_da_asarray_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 519, "end_line": 529, "span_ids": ["test_boolean_list_slicing"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_boolean_list_slicing():\n with pytest.raises(IndexError):\n da.asarray(range(2))[[True]]\n with pytest.raises(IndexError):\n da.asarray(range(2))[[False, False, False]]\n x = np.arange(5)\n ind = [True, False, False, False, True]\n assert_eq(da.asarray(x)[ind], x[ind])\n # https://github.com/dask/dask/issues/3706\n ind = [True]\n assert_eq(da.asarray([0])[ind], np.arange(1)[ind])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_numpy_array_slicing_test_boolean_numpy_array_slicing.assert_eq_da_asarray_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_boolean_numpy_array_slicing_test_boolean_numpy_array_slicing.assert_eq_da_asarray_0_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 532, "end_line": 542, "span_ids": ["test_boolean_numpy_array_slicing"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_boolean_numpy_array_slicing():\n with pytest.raises(IndexError):\n da.asarray(range(2))[np.array([True])]\n with pytest.raises(IndexError):\n da.asarray(range(2))[np.array([False, False, False])]\n x = np.arange(5)\n ind = np.array([True, False, False, False, True])\n assert_eq(da.asarray(x)[ind], x[ind])\n # https://github.com/dask/dask/issues/3706\n ind = np.array([True])\n assert_eq(da.asarray([0])[ind], np.arange(1)[ind])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_list_test_new_blockdim.assert_new_blockdim_20_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_empty_list_test_new_blockdim.assert_new_blockdim_20_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 545, "end_line": 559, "span_ids": ["test_new_blockdim", "test_empty_list", "test_uneven_chunks"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_empty_list():\n x = np.ones((5, 5, 5), dtype=\"i4\")\n dx = da.from_array(x, chunks=2)\n\n assert_eq(dx[[], :3, :2], x[[], :3, :2])\n assert_eq(dx[:3, [], :2], x[:3, [], :2])\n assert_eq(dx[:3, :2, []], x[:3, :2, []])\n\n\ndef test_uneven_chunks():\n assert da.ones(20, chunks=5)[::2].chunks == ((3, 2, 3, 2),)\n\n\ndef test_new_blockdim():\n assert new_blockdim(20, [5, 5, 5, 5], slice(0, None, 2)) == [3, 2, 3, 2]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_test_slicing_consistent_names.assert_same_keys_a_0_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_test_slicing_consistent_names.assert_same_keys_a_0_1_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 562, "end_line": 574, "span_ids": ["test_slicing_consistent_names"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_consistent_names():\n x = np.arange(100).reshape((10, 10))\n a = da.from_array(x, chunks=(5, 5))\n assert same_keys(a[0], a[0])\n assert same_keys(a[:, [1, 2, 3]], a[:, [1, 2, 3]])\n assert same_keys(a[:, 5:2:-1], a[:, 5:2:-1])\n assert same_keys(a[0, ...], a[0, ...])\n assert same_keys(a[...], a[...])\n assert same_keys(a[[1, 3, 5]], a[[1, 3, 5]])\n assert same_keys(a[-11:11], a[:])\n assert same_keys(a[-11:-9], a[:1])\n assert same_keys(a[-1], a[9])\n assert same_keys(a[0::-1], a[0:-11:-1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_after_normalization_test_sanitize_index.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_consistent_names_after_normalization_test_sanitize_index.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 577, "end_line": 596, "span_ids": ["test_slicing_consistent_names_after_normalization", "test_sanitize_index_element", "test_sanitize_index"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_slicing_consistent_names_after_normalization():\n x = da.zeros(10, chunks=(5,))\n assert same_keys(x[0:], x[:10])\n assert same_keys(x[0:], x[0:10])\n assert same_keys(x[0:], x[0:10:1])\n assert same_keys(x[:], x[0:10:1])\n\n\ndef test_sanitize_index_element():\n with pytest.raises(TypeError):\n _sanitize_index_element(\"Hello!\")\n\n\ndef test_sanitize_index():\n pd = pytest.importorskip(\"pandas\")\n with pytest.raises(TypeError):\n sanitize_index(\"Hello!\")\n\n np.testing.assert_equal(sanitize_index(pd.Series([1, 2, 3])), [1, 2, 3])\n np.testing.assert_equal(sanitize_index((1, 2, 3)), [1, 2, 3])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_uneven_blockdims_test_uneven_blockdims.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_uneven_blockdims_test_uneven_blockdims.None_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 599, "end_line": 622, "span_ids": ["test_uneven_blockdims"], "tokens": 553}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_uneven_blockdims():\n blockdims = ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30), (100,))\n index = (slice(240, 270), slice(None))\n dsk_out, bd_out = slice_array(\"in\", \"out\", blockdims, index, itemsize=8)\n sol = {\n (\"in\", 0, 0): (getitem, (\"out\", 7, 0), (slice(28, 31, 1), slice(None))),\n (\"in\", 1, 0): (getitem, (\"out\", 8, 0), (slice(0, 27, 1), slice(None))),\n }\n assert dsk_out == sol\n assert bd_out == ((3, 27), (100,))\n\n blockdims = ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30),) * 2\n index = (slice(240, 270), slice(180, 230))\n dsk_out, bd_out = slice_array(\"in\", \"out\", blockdims, index, itemsize=8)\n sol = {\n (\"in\", 0, 0): (getitem, (\"out\", 7, 5), (slice(28, 31, 1), slice(29, 30, 1))),\n (\"in\", 0, 1): (getitem, (\"out\", 7, 6), (slice(28, 31, 1), slice(None))),\n (\"in\", 0, 2): (getitem, (\"out\", 7, 7), (slice(28, 31, 1), slice(0, 18, 1))),\n (\"in\", 1, 0): (getitem, (\"out\", 8, 5), (slice(0, 27, 1), slice(29, 30, 1))),\n (\"in\", 1, 1): (getitem, (\"out\", 8, 6), (slice(0, 27, 1), slice(None))),\n (\"in\", 1, 2): (getitem, (\"out\", 8, 7), (slice(0, 27, 1), slice(0, 18, 1))),\n }\n assert dsk_out == sol\n assert bd_out == ((3, 27), (1, 31, 18))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_oob_check_test_index_with_int_dask_array.assert_eq_x_T_idx_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_oob_check_test_index_with_int_dask_array.assert_eq_x_T_idx_ex", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 625, "end_line": 658, "span_ids": ["test_oob_check", "test_index_with_int_dask_array"], "tokens": 354}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_oob_check():\n x = da.ones(5, chunks=(2,))\n with pytest.raises(IndexError):\n x[6]\n with pytest.raises(IndexError):\n x[[6]]\n with pytest.raises(IndexError):\n x[-10]\n with pytest.raises(IndexError):\n x[[-10]]\n with pytest.raises(IndexError):\n x[0, 0]\n\n\n@pytest.mark.parametrize(\"idx_chunks\", [None, 3, 2, 1])\n@pytest.mark.parametrize(\"x_chunks\", [None, (3, 5), (2, 3), (1, 2), (1, 1)])\ndef test_index_with_int_dask_array(x_chunks, idx_chunks):\n # test data is crafted to stress use cases:\n # - pick from different chunks of x out of order\n # - a chunk of x contains no matches\n # - only one chunk of x\n x = np.array(\n [[10, 20, 30, 40, 50], [60, 70, 80, 90, 100], [110, 120, 130, 140, 150]]\n )\n idx = np.array([3, 0, 1])\n expect = np.array([[40, 10, 20], [90, 60, 70], [140, 110, 120]])\n\n if x_chunks is not None:\n x = da.from_array(x, chunks=x_chunks)\n if idx_chunks is not None:\n idx = da.from_array(idx, chunks=idx_chunks)\n\n assert_eq(x[:, idx], expect)\n assert_eq(x.T[idx, :], expect.T)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_0d_test_index_with_int_dask_array_0d.assert_eq_x_idx0_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_0d_test_index_with_int_dask_array_0d.assert_eq_x_idx0_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 661, "end_line": 667, "span_ids": ["test_index_with_int_dask_array_0d"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [1, 2, 3])\ndef test_index_with_int_dask_array_0d(chunks):\n # Slice by 0-dimensional array\n x = da.from_array([[10, 20, 30], [40, 50, 60]], chunks=chunks)\n idx0 = da.from_array(1, chunks=1)\n assert_eq(x[idx0, :], x[1, :])\n assert_eq(x[:, idx0], x[:, 1])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_nanchunks_test_index_with_int_dask_array_nanchunks.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_nanchunks_test_index_with_int_dask_array_nanchunks.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 670, "end_line": 677, "span_ids": ["test_index_with_int_dask_array_nanchunks"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [1, 2, 3, 4, 5])\ndef test_index_with_int_dask_array_nanchunks(chunks):\n # Slice by array with nan-sized chunks\n a = da.arange(-2, 3, chunks=chunks)\n assert_eq(a[a.nonzero()], np.array([-2, -1, 1, 2]))\n # Edge case: the nan-sized chunks resolve to size 0\n a = da.zeros(5, chunks=chunks)\n assert_eq(a[a.nonzero()], np.array([]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_negindex_test_index_with_int_dask_array_indexerror.None_1.a_idx_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_negindex_test_index_with_int_dask_array_indexerror.None_1.a_idx_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 680, "end_line": 695, "span_ids": ["test_index_with_int_dask_array_negindex", "test_index_with_int_dask_array_indexerror"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"chunks\", [2, 4])\ndef test_index_with_int_dask_array_negindex(chunks):\n a = da.arange(4, chunks=chunks)\n idx = da.from_array([-1, -4], chunks=1)\n assert_eq(a[idx], np.array([3, 0]))\n\n\n@pytest.mark.parametrize(\"chunks\", [2, 4])\ndef test_index_with_int_dask_array_indexerror(chunks):\n a = da.arange(4, chunks=chunks)\n idx = da.from_array([4], chunks=1)\n with pytest.raises(IndexError):\n a[idx].compute()\n idx = da.from_array([-5], chunks=1)\n with pytest.raises(IndexError):\n a[idx].compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_dtypes_test_index_with_int_dask_array_nocompute.with_pytest_raises_NotImp.result_compute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_int_dask_array_dtypes_test_index_with_int_dask_array_nocompute.with_pytest_raises_NotImp.result_compute_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 698, "end_line": 719, "span_ids": ["test_index_with_int_dask_array_dtypes", "test_index_with_int_dask_array_nocompute"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dtype\", [\"int8\", \"int16\", \"int32\", \"int64\", \"uint8\", \"uint16\", \"uint32\", \"uint64\"]\n)\ndef test_index_with_int_dask_array_dtypes(dtype):\n a = da.from_array([10, 20, 30, 40], chunks=-1)\n idx = da.from_array(np.array([1, 2]).astype(dtype), chunks=1)\n assert_eq(a[idx], np.array([20, 30]))\n\n\ndef test_index_with_int_dask_array_nocompute():\n \"\"\"Test that when the indices are a dask array\n they are not accidentally computed\n \"\"\"\n\n def crash():\n raise NotImplementedError()\n\n x = da.arange(5, chunks=-1)\n idx = da.Array({(\"x\", 0): (crash,)}, name=\"x\", chunks=((2,),), dtype=np.int64)\n result = x[idx]\n with pytest.raises(NotImplementedError):\n result.compute()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_test_index_with_bool_dask_array.for_index_in_ind_slice.assert_eq_x_x_index_d_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_test_index_with_bool_dask_array.for_index_in_ind_slice.assert_eq_x_x_index_d_i", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 722, "end_line": 729, "span_ids": ["test_index_with_bool_dask_array"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_index_with_bool_dask_array():\n x = np.arange(36).reshape((6, 6))\n d = da.from_array(x, chunks=(3, 3))\n ind = np.asarray([True, True, False, True, False, False], dtype=bool)\n ind = da.from_array(ind, chunks=2)\n for index in [ind, (slice(1, 9, 2), ind), (ind, slice(2, 8, 1))]:\n x_index = dask.compute(index)[0]\n assert_eq(x[x_index], d[index])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_2_test_index_with_bool_dask_array_2.for_i_in_range_x_ndim_.assert_eq_x_tuple_index3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_index_with_bool_dask_array_2_test_index_with_bool_dask_array_2.for_i_in_range_x_ndim_.assert_eq_x_tuple_index3_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 732, "end_line": 748, "span_ids": ["test_index_with_bool_dask_array_2"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_index_with_bool_dask_array_2():\n x = np.random.random((10, 10, 10))\n ind = np.random.random(10) > 0.5\n\n d = da.from_array(x, chunks=(3, 4, 5))\n dind = da.from_array(ind, chunks=4)\n\n index = [slice(1, 9, 1), slice(None)]\n\n for i in range(x.ndim):\n index2 = index[:]\n index2.insert(i, dind)\n\n index3 = index[:]\n index3.insert(i, ind)\n\n assert_eq(x[tuple(index3)], d[tuple(index2)])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cull_test_negative_list_slicing.assert_eq_dx_4_1_x_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cull_test_negative_list_slicing.assert_eq_dx_4_1_x_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 751, "end_line": 833, "span_ids": ["impl:3", "test_slicing_with_Nones", "test_slicing_integer_no_warnings", "test_slicing_none_int_ellipes", "test_cull", "test_None_overlap_int", "test_negative_n_slicing", "test_negative_list_slicing"], "tokens": 723}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail\ndef test_cull():\n x = da.ones(1000, chunks=(10,))\n\n for slc in [1, slice(0, 30), slice(0, None, 100)]:\n y = x[slc]\n assert len(y.dask) < len(x.dask)\n\n\n@pytest.mark.parametrize(\"shape\", [(2,), (2, 3), (2, 3, 5)])\n@pytest.mark.parametrize(\n \"index\", [(Ellipsis,), (None, Ellipsis), (Ellipsis, None), (None, Ellipsis, None)]\n)\ndef test_slicing_with_Nones(shape, index):\n x = np.random.random(shape)\n d = da.from_array(x, chunks=shape)\n\n assert_eq(x[index], d[index])\n\n\nindexers = [Ellipsis, slice(2), 0, 1, -2, -1, slice(-2, None), None]\n\n\n\"\"\"\n# We comment this out because it is 4096 tests\n@pytest.mark.parametrize('a', indexers)\n@pytest.mark.parametrize('b', indexers)\n@pytest.mark.parametrize('c', indexers)\n@pytest.mark.parametrize('d', indexers)\ndef test_slicing_none_int_ellipses(a, b, c, d):\n if (a, b, c, d).count(Ellipsis) > 1:\n return\n shape = (2,3,5,7,11)\n x = np.arange(np.prod(shape)).reshape(shape)\n y = da.core.asarray(x)\n\n xx = x[a, b, c, d]\n yy = y[a, b, c, d]\n assert_eq(xx, yy)\n\"\"\"\n\n\ndef test_slicing_integer_no_warnings():\n # https://github.com/dask/dask/pull/2457/\n X = da.random.random((100, 2), (2, 2))\n idx = np.array([0, 0, 1, 1])\n with pytest.warns(None) as rec:\n X[idx].compute()\n assert len(rec) == 0\n\n\n@pytest.mark.slow\ndef test_slicing_none_int_ellipes():\n shape = (2, 3, 5, 7, 11)\n x = np.arange(np.prod(shape)).reshape(shape)\n y = da.core.asarray(x)\n for ind in itertools.product(indexers, indexers, indexers, indexers):\n if ind.count(Ellipsis) > 1:\n continue\n\n assert_eq(x[ind], y[ind])\n\n\ndef test_None_overlap_int():\n a, b, c, d = (0, slice(None, 2, None), None, Ellipsis)\n shape = (2, 3, 5, 7, 11)\n x = np.arange(np.prod(shape)).reshape(shape)\n y = da.core.asarray(x)\n\n xx = x[a, b, c, d]\n yy = y[a, b, c, d]\n assert_eq(xx, yy)\n\n\ndef test_negative_n_slicing():\n assert_eq(da.ones(2, chunks=2)[-2], np.ones(2)[-2])\n\n\ndef test_negative_list_slicing():\n x = np.arange(5)\n dx = da.from_array(x, chunks=2)\n assert_eq(dx[[0, -5]], x[[0, -5]])\n assert_eq(dx[[4, -1]], x[[4, -1]])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_permit_oob_slices_test_take_semi_sorted.assert_y_chunks_5_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_permit_oob_slices_test_take_semi_sorted.assert_y_chunks_5_5", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 836, "end_line": 860, "span_ids": ["test_normalize_index", "test_take_semi_sorted", "test_permit_oob_slices"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_permit_oob_slices():\n x = np.arange(5)\n dx = da.from_array(x, chunks=2)\n\n assert_eq(x[-102:], dx[-102:])\n assert_eq(x[102:], dx[102:])\n assert_eq(x[:102], dx[:102])\n assert_eq(x[:-102], dx[:-102])\n\n\ndef test_normalize_index():\n assert normalize_index((Ellipsis, None), (10,)) == (slice(None), None)\n assert normalize_index(5, (np.nan,)) == (5,)\n assert normalize_index(-5, (np.nan,)) == (-5,)\n (result,) = normalize_index([-5, -2, 1], (np.nan,))\n assert result.tolist() == [-5, -2, 1]\n assert normalize_index(slice(-5, -2), (np.nan,)) == (slice(-5, -2),)\n\n\ndef test_take_semi_sorted():\n x = da.ones(10, chunks=(5,))\n index = np.arange(15) % 10\n\n y = x[index]\n assert y.chunks == ((5, 5, 5),)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_plan_test_slicing_plan.for_i_x_j_y_in_zip.assert_x_y_all_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_slicing_plan_test_slicing_plan.for_i_x_j_y_in_zip.assert_x_y_all_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 863, "end_line": 881, "span_ids": ["test_slicing_plan"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"chunks,index,expected\",\n [\n ((5, 5, 5), np.arange(5, 15) % 10, [(1, np.arange(5)), (0, np.arange(5))]),\n (\n (5, 5, 5, 5),\n np.arange(20) // 2,\n [(0, np.arange(10) // 2), (1, np.arange(10) // 2)],\n ),\n ((10, 10), [15, 2, 3, 15], [(1, [5]), (0, [2, 3]), (1, [5])]),\n ],\n)\ndef test_slicing_plan(chunks, index, expected):\n plan = slicing_plan(chunks, index=index)\n assert len(plan) == len(expected)\n for (i, x), (j, y) in zip(plan, expected):\n assert i == j\n assert len(x) == len(y)\n assert (x == y).all()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_test_getitem_avoids_large_chunks.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_test_getitem_avoids_large_chunks.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 884, "end_line": 893, "span_ids": ["test_getitem_avoids_large_chunks"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_getitem_avoids_large_chunks():\n a = np.arange(4 * 500 * 500).reshape(4, 500, 500)\n arr = da.from_array(a, chunks=(1, 500, 500))\n indexer = [0, 1] + [2] * 100 + [3]\n result = arr[indexer]\n chunk_size = utils.parse_bytes(config.get(\"array.chunk-size\"))\n assert all(x.nbytes < chunk_size for x in result.blocks)\n expected = a[indexer]\n\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_missing_test_getitem_avoids_large_chunks_missing.assert_eq_result_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_getitem_avoids_large_chunks_missing_test_getitem_avoids_large_chunks_missing.assert_eq_result_expecte", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 896, "end_line": 915, "span_ids": ["test_getitem_avoids_large_chunks_missing"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"chunks\",\n [\n ((1, 1, 1, 1), (np.nan,), (np.nan,)),\n pytest.param(\n ((np.nan, np.nan, np.nan, np.nan), (500,), (500,)),\n marks=pytest.mark.xfail(reason=\"https://github.com/dask/dask/issues/6586\"),\n ),\n ],\n)\ndef test_getitem_avoids_large_chunks_missing(chunks):\n # We cannot apply the \"avoid large chunks\" optimization when\n # the chunks have unknown sizes.\n a = np.arange(4 * 500 * 500).reshape(4, 500, 500)\n arr = da.from_array(a, chunks=(1, 500, 500))\n arr._chunks = chunks\n indexer = [0, 1] + [2] * 100 + [3]\n expected = a[indexer]\n result = arr[indexer]\n assert_eq(result, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_avoids_large_chunks_test_take_avoids_large_chunks.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_avoids_large_chunks_test_take_avoids_large_chunks.None_11", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 918, "end_line": 941, "span_ids": ["test_take_avoids_large_chunks"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take_avoids_large_chunks():\n # unit test for https://github.com/dask/dask/issues/6270\n chunks = ((1, 1, 1, 1), (500,), (500,))\n itemsize = 8\n index = np.array([0, 1] + [2] * 101 + [3])\n chunks2, dsk = take(\"a\", \"b\", chunks, index, itemsize)\n assert chunks2 == ((1, 1, 51, 50, 1), (500,), (500,))\n assert len(dsk) == 5\n\n index = np.array([0] * 101 + [1, 2, 3])\n chunks2, dsk = take(\"a\", \"b\", chunks, index, itemsize)\n assert chunks2 == ((51, 50, 1, 1, 1), (500,), (500,))\n assert len(dsk) == 5\n\n index = np.array([0, 1, 2] + [3] * 101)\n chunks2, dsk = take(\"a\", \"b\", chunks, index, itemsize)\n assert chunks2 == ((1, 1, 1, 51, 50), (500,), (500,))\n assert len(dsk) == 5\n\n chunks = ((500,), (1, 1, 1, 1), (500,))\n index = np.array([0, 1, 2] + [3] * 101)\n chunks2, dsk = take(\"a\", \"b\", chunks, index, itemsize, axis=1)\n assert chunks2 == ((500,), (1, 1, 1, 51, 50), (500,))\n assert len(dsk) == 5", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_uses_config_test_take_uses_config.assert_len_dsk_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_take_uses_config_test_take_uses_config.assert_len_dsk_4", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 944, "end_line": 951, "span_ids": ["test_take_uses_config"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_take_uses_config():\n chunks = ((1, 1, 1, 1), (500,), (500,))\n index = np.array([0, 1] + [2] * 101 + [3])\n itemsize = 8\n with config.set(**{\"array.chunk-size\": \"10GB\"}):\n chunks2, dsk = take(\"a\", \"b\", chunks, index, itemsize)\n assert chunks2 == ((1, 1, 101, 1), (500,), (500,))\n assert len(dsk) == 4", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_pathological_unsorted_slicing_test_pathological_unsorted_slicing.assert_out_of_order_in_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_pathological_unsorted_slicing_test_pathological_unsorted_slicing.assert_out_of_order_in_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 954, "end_line": 964, "span_ids": ["test_pathological_unsorted_slicing"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pathological_unsorted_slicing():\n x = da.ones(100, chunks=10)\n\n # [0, 10, 20, ... 90, 1, 11, 21, ... 91, ...]\n index = np.arange(100).reshape(10, 10).ravel(order=\"F\")\n\n with pytest.warns(da.PerformanceWarning) as info:\n x[index]\n\n assert \"10\" in str(info.list[0])\n assert \"out-of-order\" in str(info.list[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cached_cumsum_test_cached_cumsum_non_tuple.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_cached_cumsum_test_cached_cumsum_non_tuple.None_2", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 967, "end_line": 987, "span_ids": ["test_cached_cumsum_nan", "test_cached_cumsum_non_tuple", "test_cached_cumsum"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cached_cumsum():\n a = (1, 2, 3, 4)\n x = cached_cumsum(a)\n y = cached_cumsum(a, initial_zero=True)\n assert x == (1, 3, 6, 10)\n assert y == (0, 1, 3, 6, 10)\n\n\ndef test_cached_cumsum_nan():\n a = (1, np.nan, 3)\n x = cached_cumsum(a)\n y = cached_cumsum(a, initial_zero=True)\n np.testing.assert_equal(x, (1, np.nan, np.nan))\n np.testing.assert_equal(y, (0, 1, np.nan, np.nan))\n\n\ndef test_cached_cumsum_non_tuple():\n a = [1, 2, 3]\n assert cached_cumsum(a) == (1, 3, 6)\n a[1] = 4\n assert cached_cumsum(a) == (1, 5, 8)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_setitem_with_different_chunks_preserves_shape_test_setitem_with_different_chunks_preserves_shape.assert_x_shape_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_setitem_with_different_chunks_preserves_shape_test_setitem_with_different_chunks_preserves_shape.assert_x_shape_result_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 990, "end_line": 1003, "span_ids": ["test_setitem_with_different_chunks_preserves_shape"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"params\", [(2, 2, 1), (5, 3, 2)])\ndef test_setitem_with_different_chunks_preserves_shape(params):\n \"\"\"Reproducer for https://github.com/dask/dask/issues/3730.\n\n Mutating based on an array with different chunks can cause new chunks to be\n used. We need to ensure those new chunk sizes are applied to the mutated\n array, otherwise the array won't generate the correct keys.\n \"\"\"\n array_size, chunk_size1, chunk_size2 = params\n x = da.zeros(array_size, chunks=chunk_size1)\n mask = da.zeros(array_size, chunks=chunk_size2)\n x[mask] = 1\n result = x.compute()\n assert x.shape == result.shape", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh3579_test_make_blockwise_sorted_slice.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh3579_test_make_blockwise_sorted_slice.None_1", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 1006, "end_line": 1020, "span_ids": ["test_make_blockwise_sorted_slice", "test_gh3579"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gh3579():\n assert_eq(np.arange(10)[0::-1], da.arange(10, chunks=3)[0::-1])\n assert_eq(np.arange(10)[::-1], da.arange(10, chunks=3)[::-1])\n\n\ndef test_make_blockwise_sorted_slice():\n x = da.arange(8, chunks=4)\n index = np.array([6, 0, 4, 2, 7, 1, 5, 3])\n\n a, b = make_block_sorted_slices(index, x.chunks)\n\n index2 = np.array([0, 2, 4, 6, 1, 3, 5, 7])\n index3 = np.array([3, 0, 2, 1, 7, 4, 6, 5])\n np.testing.assert_array_equal(a, index2)\n np.testing.assert_array_equal(b, index3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_shuffle_slice_test_shuffle_slice.assert_eq_a_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_shuffle_slice_test_shuffle_slice.assert_eq_a_b_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 1023, "end_line": 1034, "span_ids": ["test_shuffle_slice"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.filterwarnings(\"ignore\")\n@pytest.mark.parametrize(\n \"size, chunks\", [((100, 2), (50, 2)), ((100, 2), (37, 1)), ((100,), (55,))]\n)\ndef test_shuffle_slice(size, chunks):\n x = da.random.randint(0, 1000, size=size, chunks=chunks)\n index = np.arange(len(x))\n np.random.shuffle(index)\n\n a = x[index]\n b = shuffle_slice(x, index)\n assert_eq(a, b)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh4043_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_slicing.py_test_gh4043_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_slicing.py", "file_name": "test_slicing.py", "file_type": "text/x-python", "category": "test", "start_line": 1037, "end_line": 1055, "span_ids": ["test_slice_array_3d_with_bool_numpy_array", "test_gh4043"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"lock\", [True, False])\n@pytest.mark.parametrize(\"asarray\", [True, False])\n@pytest.mark.parametrize(\"fancy\", [True, False])\ndef test_gh4043(lock, asarray, fancy):\n a1 = da.from_array(np.zeros(3), chunks=1, asarray=asarray, lock=lock, fancy=fancy)\n a2 = da.from_array(np.ones(3), chunks=1, asarray=asarray, lock=lock, fancy=fancy)\n al = da.stack([a1, a2])\n assert_eq(al, al)\n\n\ndef test_slice_array_3d_with_bool_numpy_array():\n # https://github.com/dask/dask/issues/6089\n array = da.arange(0, 24).reshape((4, 3, 2))\n mask = np.arange(0, 24).reshape((4, 3, 2)) > 12\n\n actual = array[mask].compute()\n expected = np.arange(13, 24)\n assert_eq(actual, expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_random_numpy_120_xfail.pytest_mark_xfail_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_random_numpy_120_xfail.pytest_mark_xfail_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 20, "span_ids": ["imports"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import random\n\nimport numpy as np\nimport pytest\n\nimport dask\nimport dask.array as da\nfrom dask.array.numpy_compat import _numpy_117, _numpy_120\nfrom dask.array.utils import assert_eq, IS_NEP18_ACTIVE\n\nsparse = pytest.importorskip(\"sparse\")\nif sparse:\n # Test failures on older versions of Numba.\n # Conda-Forge provides 0.35.0 on windows right now, causing failures like\n # searchsorted() got an unexpected keyword argument 'side'\n pytest.importorskip(\"numba\", minversion=\"0.40.0\")\n\nnumpy_120_xfail = pytest.mark.xfail(\n _numpy_120, reason=\"https://github.com/pydata/sparse/issues/383\"\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_functions_functions._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_functions_functions._", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 23, "end_line": 72, "span_ids": ["imports"], "tokens": 636}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "functions = [\n lambda x: x,\n lambda x: da.expm1(x),\n lambda x: 2 * x,\n lambda x: x / 2,\n lambda x: x ** 2,\n pytest.param(lambda x: x + x, marks=numpy_120_xfail),\n pytest.param(lambda x: x * x, marks=numpy_120_xfail),\n pytest.param(lambda x: x[0], marks=numpy_120_xfail),\n pytest.param(lambda x: x[:, 1], marks=numpy_120_xfail),\n pytest.param(lambda x: x[:1, None, 1:3], marks=numpy_120_xfail),\n lambda x: x.T,\n lambda x: da.transpose(x, (1, 2, 0)),\n pytest.param(lambda x: x.sum(), marks=numpy_120_xfail),\n pytest.param(lambda x: x.mean(), marks=numpy_120_xfail),\n lambda x: x.moment(order=0),\n pytest.param(\n lambda x: x.std(),\n marks=pytest.mark.xfail(\n reason=\"fixed in https://github.com/pydata/sparse/pull/243\"\n ),\n ),\n pytest.param(\n lambda x: x.var(),\n marks=pytest.mark.xfail(\n reason=\"fixed in https://github.com/pydata/sparse/pull/243\"\n ),\n ),\n pytest.param(lambda x: x.dot(np.arange(x.shape[-1])), marks=numpy_120_xfail),\n pytest.param(lambda x: x.dot(np.eye(x.shape[-1])), marks=numpy_120_xfail),\n pytest.param(\n lambda x: da.tensordot(x, np.ones(x.shape[:2]), axes=[(0, 1), (0, 1)]),\n marks=numpy_120_xfail,\n ),\n pytest.param(lambda x: x.sum(axis=0), marks=numpy_120_xfail),\n pytest.param(lambda x: x.max(axis=0), marks=numpy_120_xfail),\n pytest.param(lambda x: x.sum(axis=(1, 2)), marks=numpy_120_xfail),\n lambda x: x.astype(np.complex128),\n lambda x: x.map_blocks(lambda x: x * 2),\n lambda x: x.map_overlap(lambda x: x * 2, depth=0, trim=True),\n lambda x: x.map_overlap(lambda x: x * 2, depth=0, trim=False),\n lambda x: x.round(1),\n lambda x: x.reshape((x.shape[0] * x.shape[1], x.shape[2])),\n lambda x: abs(x),\n lambda x: x > 0.5,\n lambda x: x.rechunk((4, 4, 4)),\n pytest.param(lambda x: x.rechunk((2, 2, 1)), marks=numpy_120_xfail),\n lambda x: np.isneginf(x),\n lambda x: np.isposinf(x),\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_basic_test_basic.if_yy_shape_.if_not_isinstance_zz_spa._mostly_dense": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_basic_test_basic.if_yy_shape_.if_not_isinstance_zz_spa._mostly_dense", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 90, "span_ids": ["test_basic"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"func\", functions)\ndef test_basic(func):\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n x[x < 0.8] = 0\n\n y = x.map_blocks(sparse.COO.from_numpy)\n\n xx = func(x)\n yy = func(y)\n\n assert_eq(xx, yy)\n\n if yy.shape:\n zz = yy.compute()\n if not isinstance(zz, sparse.COO):\n assert (zz != 1).sum() > np.prod(zz.shape) / 2 # mostly dense", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_tensordot_test_tensordot.assert_eq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_tensordot_test_tensordot.assert_eq_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 111, "span_ids": ["test_tensordot"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n sparse.__version__ < \"0.7.0+10\",\n reason=\"fixed in https://github.com/pydata/sparse/pull/256\",\n)\ndef test_tensordot():\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n x[x < 0.8] = 0\n y = da.random.random((4, 3, 2), chunks=(2, 2, 1))\n y[y < 0.8] = 0\n\n xx = x.map_blocks(sparse.COO.from_numpy)\n yy = y.map_blocks(sparse.COO.from_numpy)\n\n assert_eq(da.tensordot(x, y, axes=(2, 0)), da.tensordot(xx, yy, axes=(2, 0)))\n assert_eq(da.tensordot(x, y, axes=(1, 1)), da.tensordot(xx, yy, axes=(1, 1)))\n assert_eq(\n da.tensordot(x, y, axes=((1, 2), (1, 0))),\n da.tensordot(xx, yy, axes=((1, 2), (1, 0))),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_concatenate_test_mixed_concatenate.assert_eq_dd_ss_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 129, "span_ids": ["test_mixed_concatenate"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"upstream change\", strict=False)\n@pytest.mark.parametrize(\"func\", functions)\ndef test_mixed_concatenate(func):\n x = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n\n y = da.random.random((2, 3, 4), chunks=(1, 2, 2))\n y[y < 0.8] = 0\n yy = y.map_blocks(sparse.COO.from_numpy)\n\n d = da.concatenate([x, y], axis=0)\n s = da.concatenate([x, yy], axis=0)\n\n dd = func(d)\n ss = func(s)\n\n assert_eq(dd, ss)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_random_test_mixed_random.assert_eq_dd_ss_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 132, "end_line": 144, "span_ids": ["test_mixed_random"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"upstream change\", strict=False)\n@pytest.mark.parametrize(\"func\", functions)\ndef test_mixed_random(func):\n d = da.random.random((4, 3, 4), chunks=(1, 2, 2))\n d[d < 0.7] = 0\n\n fn = lambda x: sparse.COO.from_numpy(x) if random.random() < 0.5 else x\n s = d.map_blocks(fn)\n\n dd = func(d)\n ss = func(s)\n\n assert_eq(dd, ss)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_output_type_test_mixed_output_type.assert_zz_nnz_y_comput": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_mixed_output_type_test_mixed_output_type.assert_zz_nnz_y_comput", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 147, "end_line": 161, "span_ids": ["test_mixed_output_type"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.xfail(reason=\"upstream change\", strict=False)\ndef test_mixed_output_type():\n y = da.random.random((10, 10), chunks=(5, 5))\n y[y < 0.8] = 0\n y = y.map_blocks(sparse.COO.from_numpy)\n\n x = da.zeros((10, 1), chunks=(5, 1))\n\n z = da.concatenate([x, y], axis=1)\n\n assert z.shape == (10, 11)\n\n zz = z.compute()\n assert isinstance(zz, sparse.COO)\n assert zz.nnz == y.compute().nnz", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_metadata_test_metadata.if_IS_NEP18_ACTIVE_.if__numpy_117_.assert_isinstance_np_conc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_metadata_test_metadata.if_IS_NEP18_ACTIVE_.if__numpy_117_.assert_isinstance_np_conc", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 164, "end_line": 185, "span_ids": ["test_metadata"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@numpy_120_xfail\ndef test_metadata():\n y = da.random.random((10, 10), chunks=(5, 5))\n y[y < 0.8] = 0\n z = sparse.COO.from_numpy(y.compute())\n y = y.map_blocks(sparse.COO.from_numpy)\n\n assert isinstance(y._meta, sparse.COO)\n assert isinstance((y + 1)._meta, sparse.COO)\n assert isinstance(y.sum(axis=0)._meta, sparse.COO)\n assert isinstance(y.var(axis=0)._meta, sparse.COO)\n assert isinstance(y[:5, ::2]._meta, sparse.COO)\n assert isinstance(y.rechunk((2, 2))._meta, sparse.COO)\n assert isinstance((y - z)._meta, sparse.COO)\n assert isinstance(y.persist()._meta, sparse.COO)\n if IS_NEP18_ACTIVE:\n assert isinstance(np.concatenate([y, y])._meta, sparse.COO)\n assert isinstance(np.concatenate([y, y[:0], y])._meta, sparse.COO)\n assert isinstance(np.stack([y, y])._meta, sparse.COO)\n if _numpy_117:\n assert isinstance(np.stack([y[:0], y[:0]])._meta, sparse.COO)\n assert isinstance(np.concatenate([y[:0], y[:0]])._meta, sparse.COO)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_html_repr_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_sparse.py_test_html_repr_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_sparse.py", "file_name": "test_sparse.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 234, "span_ids": ["test_html_repr", "test_map_blocks", "test_meta_from_array", "test_from_delayed_meta", "test_from_array"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_html_repr():\n y = da.random.random((10, 10), chunks=(5, 5))\n y[y < 0.8] = 0\n y = y.map_blocks(sparse.COO.from_numpy)\n\n text = y._repr_html_()\n\n assert \"COO\" in text\n assert \"sparse\" in text\n assert \"Bytes\" not in text\n\n\n@numpy_120_xfail\ndef test_from_delayed_meta():\n def f():\n return sparse.COO.from_numpy(np.eye(3))\n\n d = dask.delayed(f)()\n x = da.from_delayed(d, shape=(3, 3), meta=sparse.COO.from_numpy(np.eye(1)))\n assert isinstance(x._meta, sparse.COO)\n assert_eq(x, x)\n\n\n@numpy_120_xfail\ndef test_from_array():\n x = sparse.COO.from_numpy(np.eye(10))\n d = da.from_array(x, chunks=(5, 5))\n\n assert isinstance(d._meta, sparse.COO)\n assert_eq(d, d)\n assert isinstance(d.compute(), sparse.COO)\n\n\n@numpy_120_xfail\ndef test_map_blocks():\n x = da.eye(10, chunks=5)\n y = x.map_blocks(sparse.COO.from_numpy, meta=sparse.COO.from_numpy(np.eye(1)))\n assert isinstance(y._meta, sparse.COO)\n assert_eq(y, y)\n\n\n@numpy_120_xfail\ndef test_meta_from_array():\n x = sparse.COO.from_numpy(np.eye(1))\n y = da.utils.meta_from_array(x, ndim=2)\n assert isinstance(y, sparse.COO)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_pytest_test_measures.assert_isinstance_result_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_pytest_test_measures.assert_isinstance_result_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_stats.py", "file_name": "test_stats.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "test_measures"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nscipy = pytest.importorskip(\"scipy\")\nimport numpy as np\nimport dask.array as da\nfrom dask.array.utils import assert_eq\nfrom dask.delayed import Delayed\nimport dask.array.stats\nfrom dask.array.utils import allclose\n\n\n@pytest.mark.parametrize(\n \"kind, kwargs\", [(\"skew\", {}), (\"kurtosis\", {}), (\"kurtosis\", {\"fisher\": False})]\n)\n@pytest.mark.parametrize(\"single_dim\", [True, False])\ndef test_measures(kind, kwargs, single_dim):\n np.random.seed(seed=1337)\n if single_dim:\n x = np.random.random(size=(30,))\n else:\n x = np.random.random(size=(30, 2))\n y = da.from_array(x, 3)\n dfunc = getattr(dask.array.stats, kind)\n sfunc = getattr(scipy.stats, kind)\n\n expected = sfunc(x, **kwargs)\n result = dfunc(y, **kwargs)\n if np.isscalar(expected):\n # make it an array to account for possible numeric errors\n expected = np.array(expected)\n assert_eq(result, expected)\n assert isinstance(result, da.Array)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_bias_raises_test_one.assert_allclose_result_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_bias_raises_test_one.assert_allclose_result_co", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_stats.py", "file_name": "test_stats.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 60, "span_ids": ["test_bias_raises", "test_one"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bias_raises():\n x = np.random.random(size=(30, 2))\n y = da.from_array(x, 3)\n\n with pytest.raises(NotImplementedError):\n dask.array.stats.skew(y, bias=False)\n\n with pytest.raises(NotImplementedError):\n dask.array.stats.kurtosis(y, bias=False)\n\n\n@pytest.mark.parametrize(\n \"kind\", [\"chisquare\", \"power_divergence\", \"normaltest\", \"skewtest\", \"kurtosistest\"]\n)\ndef test_one(kind):\n a = np.random.random(size=30)\n a_ = da.from_array(a, 3)\n\n dask_test = getattr(dask.array.stats, kind)\n scipy_test = getattr(scipy.stats, kind)\n\n result = dask_test(a_)\n expected = scipy_test(a)\n\n assert isinstance(result, Delayed)\n assert allclose(result.compute(), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_two_test_two._assert_dask_compute_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_two_test_two._assert_dask_compute_re", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_stats.py", "file_name": "test_stats.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 93, "span_ids": ["test_two"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"kind, kwargs\",\n [\n (\"ttest_ind\", {}),\n (\"ttest_ind\", {\"equal_var\": False}),\n (\"ttest_1samp\", {}),\n (\"ttest_rel\", {}),\n (\"chisquare\", {}),\n (\"power_divergence\", {}),\n (\"power_divergence\", {\"lambda_\": 0}),\n (\"power_divergence\", {\"lambda_\": -1}),\n (\"power_divergence\", {\"lambda_\": \"neyman\"}),\n ],\n)\ndef test_two(kind, kwargs):\n a = np.random.random(size=30)\n b = np.random.random(size=30)\n a_ = da.from_array(a, 3)\n b_ = da.from_array(b, 3)\n\n dask_test = getattr(dask.array.stats, kind)\n scipy_test = getattr(scipy.stats, kind)\n\n with pytest.warns(None): # maybe overflow warning (powrer_divergence)\n result = dask_test(a_, b_, **kwargs)\n expected = scipy_test(a, b, **kwargs)\n\n assert isinstance(result, Delayed)\n assert allclose(result.compute(), expected)\n # fails occasionally. shouldn't this be exact?\n # assert dask.compute(*result) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_moments_test_anova.assert_allclose_result_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_moments_test_anova.assert_allclose_result_co", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_stats.py", "file_name": "test_stats.py", "file_type": "text/x-python", "category": "test", "start_line": 96, "end_line": 113, "span_ids": ["test_moments", "test_anova"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"k\", range(5))\ndef test_moments(k):\n x = np.random.random(size=(30, 2))\n y = da.from_array(x, 3)\n\n expected = scipy.stats.moment(x, k)\n result = dask.array.stats.moment(y, k)\n assert_eq(result, expected)\n\n\ndef test_anova():\n np_args = [i * np.random.random(size=(30,)) for i in range(4)]\n da_args = [da.from_array(x, chunks=10) for x in np_args]\n\n result = dask.array.stats.f_oneway(*da_args)\n expected = scipy.stats.f_oneway(*np_args)\n\n assert allclose(result.compute(), expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_nan_raises_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_stats.py_test_nan_raises_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_stats.py", "file_name": "test_stats.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 146, "span_ids": ["test_skew_raises", "test_power_divergence_invalid", "test_nan_raises"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"func, nargs\",\n [\n (dask.array.stats.ttest_1samp, 2),\n (dask.array.stats.ttest_rel, 2),\n (dask.array.stats.skewtest, 1),\n (dask.array.stats.kurtosis, 1),\n (dask.array.stats.kurtosistest, 1),\n (dask.array.stats.normaltest, 1),\n (dask.array.stats.moment, 1),\n ],\n)\n@pytest.mark.parametrize(\"nan_policy\", [\"omit\", \"raise\"])\ndef test_nan_raises(func, nargs, nan_policy):\n with pytest.raises(NotImplementedError):\n func(*(None,) * nargs, nan_policy=nan_policy)\n\n\ndef test_power_divergence_invalid():\n a = np.random.random(size=30)\n a_ = da.from_array(a, 3)\n\n with pytest.raises(ValueError):\n dask.array.stats.power_divergence(a_, lambda_=\"wrong\")\n\n\ndef test_skew_raises():\n a = da.ones((7,), chunks=(7,))\n with pytest.raises(ValueError, match=\"7 samples\"):\n dask.array.stats.skewtest(a)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_da_test_basic.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_da_test_basic.None_6", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_svg.py", "file_name": "test_svg.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 19, "span_ids": ["imports", "parses", "test_basic"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import dask.array as da\nfrom dask.array.svg import draw_sizes\nimport xml.etree.ElementTree\nimport pytest\n\n\ndef parses(text):\n cleaned = text.replace(\"→\", \"\") # xml doesn't like righarrow character\n assert xml.etree.ElementTree.fromstring(cleaned) is not None # parses cleanly\n\n\ndef test_basic():\n parses(da.ones(10).to_svg())\n parses(da.ones((10, 10)).to_svg())\n parses(da.ones((10, 10, 10)).to_svg())\n parses(da.ones((10, 10, 10, 10)).to_svg())\n parses(da.ones((10, 10, 10, 10, 10)).to_svg())\n parses(da.ones((10, 10, 10, 10, 10, 10)).to_svg())\n parses(da.ones((10, 10, 10, 10, 10, 10, 10)).to_svg())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_test_errors.assert_unknown_chunk_siz": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_test_errors.assert_unknown_chunk_siz", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_svg.py", "file_name": "test_svg.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 52, "span_ids": ["test_errors", "test_repr_html"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repr_html():\n assert da.ones([])._repr_html_()\n assert da.ones(10)[:0]._repr_html_()\n assert da.ones(10)._repr_html_()\n assert da.ones((10, 10))._repr_html_()\n assert da.ones((10, 10, 10))._repr_html_()\n assert da.ones((10, 10, 10, 10))._repr_html_()\n\n\ndef test_errors():\n # empty arrays\n with pytest.raises(NotImplementedError) as excpt:\n da.ones([]).to_svg()\n assert \"0 dimensions\" in str(excpt.value)\n\n # Scalars\n with pytest.raises(NotImplementedError) as excpt:\n da.asarray(1).to_svg()\n assert \"0 dimensions\" in str(excpt.value)\n\n # 0-length dims arrays\n with pytest.raises(NotImplementedError) as excpt:\n da.ones(10)[:0].to_svg()\n assert \"0-length dimensions\" in str(excpt.value)\n\n # unknown chunk sizes\n with pytest.raises(NotImplementedError) as excpt:\n x = da.ones(10)\n x = x[x > 5]\n x.to_svg()\n assert \"unknown chunk sizes\" in str(excpt.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_size_units_test_repr_html_size_units.parses_x__repr_html__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_repr_html_size_units_test_repr_html_size_units.parses_x__repr_html__", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_svg.py", "file_name": "test_svg.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 67, "span_ids": ["test_repr_html_size_units"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repr_html_size_units():\n x = da.ones((10000, 5000))\n x = da.ones((3000, 10000), chunks=(1000, 1000))\n text = x._repr_html_()\n\n assert \"MB\" in text or \"MiB\" in text\n assert str(x.shape) in text\n assert str(x.dtype) in text\n\n parses(text)\n\n x = da.ones((3000, 10000, 50), chunks=(1000, 1000, 10))\n parses(x._repr_html_())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_draw_sizes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/dask/array/tests/test_svg.py_test_draw_sizes_", "embedding": null, "metadata": {"file_path": "dask/array/tests/test_svg.py", "file_name": "test_svg.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 85, "span_ids": ["test_draw_sizes", "test_3d"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_draw_sizes():\n assert draw_sizes((10, 10), size=100) == (100, 100) # respect symmetry\n assert draw_sizes((10, 10), size=200) == (200, 200) # respect size keyword\n assert draw_sizes((10, 5), size=100) == (100, 50) # respect small ratios\n\n a, b, c = draw_sizes((1000, 100, 10))\n assert a > b\n assert b > c\n assert a < b * 5\n assert b < c * 5\n\n\ndef test_3d():\n text = da.ones((10, 10, 10, 10, 10)).to_svg()\n assert text.count(\"
\n \n \n {description}
\n \n\n \"\"\"\n return [node]\n\n\ndef generate_html(config, schema, location):\n nested_html = dask_config_to_html(\n key=\"\", value=config, schema=schema, prefix=location\n )\n return \"\".join(nested_html)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_from_time_import_time_trivial.return.d_x_height_1_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_from_time_import_time_trivial.return.d_x_height_1_i_", "embedding": null, "metadata": {"file_path": "docs/source/scripts/scheduling.py", "file_name": "scheduling.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 19, "span_ids": ["imports", "noop", "trivial", "impl"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from time import time\nimport dask\nfrom dask import threaded, multiprocessing, local\nfrom random import randint\nimport matplotlib.pyplot as plt\n\n\ndef noop(x):\n pass\n\nnrepetitions = 1\n\ndef trivial(width, height):\n \"\"\" Embarrassingly parallel dask \"\"\"\n d = {('x', 0, i): i for i in range(width)}\n for j in range(1, height):\n d.update({('x', j, i): (noop, ('x', j - 1, i))\n for i in range(width)})\n return d, [('x', height - 1, i) for i in range(width)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_crosstalk_crosstalk.return.d_x_height_1_i_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_crosstalk_crosstalk.return.d_x_height_1_i_", "embedding": null, "metadata": {"file_path": "docs/source/scripts/scheduling.py", "file_name": "scheduling.py", "file_type": "text/x-python", "category": "implementation", "start_line": 21, "end_line": 28, "span_ids": ["crosstalk"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def crosstalk(width, height, connections):\n \"\"\" Natural looking dask with some inter-connections \"\"\"\n d = {('x', 0, i): i for i in range(width)}\n for j in range(1, height):\n d.update({('x', j, i): (noop, [('x', j - 1, randint(0, width))\n for _ in range(connections)])\n for i in range(width)})\n return d, [('x', height - 1, i) for i in range(width)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_dense_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/docs/source/scripts/scheduling.py_dense_", "embedding": null, "metadata": {"file_path": "docs/source/scripts/scheduling.py", "file_name": "scheduling.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 109, "span_ids": ["impl:3", "dense"], "tokens": 619}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dense(width, height):\n \"\"\" Full barriers between each step \"\"\"\n d = {('x', 0, i): i for i in range(width)}\n for j in range(1, height):\n d.update({('x', j, i): (noop, [('x', j - 1, k)\n for k in range(width)])\n for i in range(width)})\n return d, [('x', height - 1, i) for i in range(width)]\n\n\nimport numpy as np\n\nx = np.logspace(0, 4, 10)\ntrivial_results = dict()\nfor get in [dask.get, threaded.get, local.get_sync, multiprocessing.get]:\n y = list()\n for n in x:\n dsk, keys = trivial(int(n), 5)\n start = time()\n get(dsk, keys)\n end = time()\n y.append(end - start)\n trivial_results[get] = np.array(y)\n\n\n########\n# Plot #\n########\n\nf, (left, right) = plt.subplots(nrows=1, ncols=2, sharex=True, figsize=(12, 5), squeeze=True)\n\nfor get in trivial_results:\n left.loglog(x * 5, trivial_results[get], label=get.__module__)\n right.loglog(x * 5, trivial_results[get] / x, label=get.__module__)\n\nleft.set_title('Cost for Entire graph')\nright.set_title('Cost per task')\nleft.set_ylabel('Duration (s)')\nright.set_ylabel('Duration (s)')\nleft.set_xlabel('Number of tasks')\nright.set_xlabel('Number of tasks')\n\nplt.legend()\nplt.savefig('images/scaling-nodes.png')\n\n#####################\n# Crosstalk example #\n#####################\n\nx = np.linspace(1, 100, 10)\ncrosstalk_results = dict()\nfor get in [threaded.get, local.get_sync]:\n y = list()\n for n in x:\n dsk, keys = crosstalk(1000, 5, int(n))\n start = time()\n get(dsk, keys)\n end = time()\n y.append(end - start)\n crosstalk_results[get] = np.array(y)\n\n########\n# Plot #\n########\n\nf, (left, right) = plt.subplots(nrows=1, ncols=2, sharex=True, figsize=(12, 5), squeeze=True)\n\nfor get in crosstalk_results:\n left.plot(x, crosstalk_results[get], label=get.__module__)\n right.semilogy(x, crosstalk_results[get] / 5000. / x, label=get.__module__)\n\nleft.set_title('Cost for Entire graph')\nright.set_title('Cost per edge')\nleft.set_ylabel('Duration (s)')\nright.set_ylabel('Duration (s)')\nleft.set_xlabel('Number of edges per task')\nright.set_xlabel('Number of edges per task')\nplt.legend()\nplt.savefig('images/scaling-edges.png')", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/setup.py__usr_bin_env_python_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/setup.py__usr_bin_env_python_", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 78, "span_ids": ["impl:16", "docstring"], "tokens": 629}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "#!/usr/bin/env python\n\nimport sys\nfrom os.path import exists\nfrom setuptools import setup\nimport versioneer\n\n# NOTE: These are tested in `continuous_integration/travis/test_imports.sh` If\n# you modify these, make sure to change the corresponding line there.\nextras_require = {\n \"array\": [\"numpy >= 1.13.0\", \"toolz >= 0.8.2\"],\n \"bag\": [\n \"cloudpickle >= 0.2.2\",\n \"fsspec >= 0.6.0\",\n \"toolz >= 0.8.2\",\n \"partd >= 0.3.10\",\n ],\n \"dataframe\": [\n \"numpy >= 1.13.0\",\n \"pandas >= 0.23.0\",\n \"toolz >= 0.8.2\",\n \"partd >= 0.3.10\",\n \"fsspec >= 0.6.0\",\n ],\n \"distributed\": [\"distributed >= 2.0\"],\n \"diagnostics\": [\"bokeh >= 1.0.0, != 2.0.0\"],\n \"delayed\": [\"cloudpickle >= 0.2.2\", \"toolz >= 0.8.2\"],\n}\nextras_require[\"complete\"] = sorted({v for req in extras_require.values() for v in req})\n\ninstall_requires = [\"pyyaml\"]\n\npackages = [\n \"dask\",\n \"dask.array\",\n \"dask.bag\",\n \"dask.bytes\",\n \"dask.dataframe\",\n \"dask.dataframe.io\",\n \"dask.dataframe.tseries\",\n \"dask.diagnostics\",\n]\n\ntests = [p + \".tests\" for p in packages]\n\n# Only include pytest-runner in setup_requires if we're invoking tests\nif {\"pytest\", \"test\", \"ptr\"}.intersection(sys.argv):\n setup_requires = [\"pytest-runner\"]\nelse:\n setup_requires = []\n\nsetup(\n name=\"dask\",\n version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(),\n description=\"Parallel PyData with Task Scheduling\",\n url=\"https://github.com/dask/dask/\",\n maintainer=\"Matthew Rocklin\",\n maintainer_email=\"mrocklin@gmail.com\",\n license=\"BSD\",\n keywords=\"task-scheduling parallel numpy pandas pydata\",\n classifiers=[\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.6\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n ],\n packages=packages + tests,\n long_description=open(\"README.rst\").read() if exists(\"README.rst\") else \"\",\n python_requires=\">=3.6\",\n install_requires=install_requires,\n setup_requires=setup_requires,\n tests_require=[\"pytest\"],\n extras_require=extras_require,\n include_package_data=True,\n zip_safe=False,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py__Version_0_16_get_root.return.root": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py__Version_0_16_get_root.return.root", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 2, "end_line": 402, "span_ids": ["VersioneerConfig", "imports", "get_root", "docstring"], "tokens": 496}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Version: 0.16\n\nfrom __future__ import print_function\ntry:\n import configparser\nexcept ImportError:\n import ConfigParser as configparser\nimport errno\nimport json\nimport os\nimport re\nimport subprocess\nimport sys\n\n\nclass VersioneerConfig:\n \"\"\"Container for Versioneer configuration parameters.\"\"\"\n\n\ndef get_root():\n \"\"\"Get the project root directory.\n\n We require that all commands are run from the project root, i.e. the\n directory that contains setup.py, setup.cfg, and versioneer.py .\n \"\"\"\n root = os.path.realpath(os.path.abspath(os.getcwd()))\n setup_py = os.path.join(root, \"setup.py\")\n versioneer_py = os.path.join(root, \"versioneer.py\")\n if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)):\n # allow 'python path/to/setup.py COMMAND'\n root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0])))\n setup_py = os.path.join(root, \"setup.py\")\n versioneer_py = os.path.join(root, \"versioneer.py\")\n if not (os.path.exists(setup_py) or os.path.exists(versioneer_py)):\n err = (\"Versioneer was unable to run the project root directory. \"\n \"Versioneer requires setup.py to be executed from \"\n \"its immediate directory (like 'python setup.py COMMAND'), \"\n \"or in a way that lets it use sys.argv[0] to find the root \"\n \"(like 'python path/to/setup.py COMMAND').\")\n raise VersioneerBadRootError(err)\n try:\n # Certain runtime workflows (setup.py install/develop in a setuptools\n # tree) execute all dependencies in a single python process, so\n # \"versioneer\" may be imported multiple times, and python's shared\n # module-import table will cache the first one. So we can't use\n # os.path.dirname(__file__), as that will find whichever\n # versioneer.py was first imported, even in later projects.\n me = os.path.realpath(os.path.abspath(__file__))\n if os.path.splitext(me)[0] != os.path.splitext(versioneer_py)[0]:\n print(\"Warning: build in %s is using versioneer.py from %s\"\n % (os.path.dirname(me), versioneer_py))\n except NameError:\n pass\n return root", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_config_from_root_get_config_from_root.return.cfg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_config_from_root_get_config_from_root.return.cfg", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 405, "end_line": 431, "span_ids": ["get_config_from_root"], "tokens": 294}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_config_from_root(root):\n \"\"\"Read the project setup.cfg file to determine Versioneer config.\"\"\"\n # This might raise EnvironmentError (if setup.cfg is missing), or\n # configparser.NoSectionError (if it lacks a [versioneer] section), or\n # configparser.NoOptionError (if it lacks \"VCS=\"). See the docstring at\n # the top of versioneer.py for instructions on writing your setup.cfg .\n setup_cfg = os.path.join(root, \"setup.cfg\")\n parser = configparser.SafeConfigParser()\n with open(setup_cfg, \"r\") as f:\n parser.readfp(f)\n VCS = parser.get(\"versioneer\", \"VCS\") # mandatory\n\n def get(parser, name):\n if parser.has_option(\"versioneer\", name):\n return parser.get(\"versioneer\", name)\n return None\n cfg = VersioneerConfig()\n cfg.VCS = VCS\n cfg.style = get(parser, \"style\") or \"\"\n cfg.versionfile_source = get(parser, \"versionfile_source\")\n cfg.versionfile_build = get(parser, \"versionfile_build\")\n cfg.tag_prefix = get(parser, \"tag_prefix\")\n if cfg.tag_prefix in (\"''\", '\"\"'):\n cfg.tag_prefix = \"\"\n cfg.parentdir_prefix = get(parser, \"parentdir_prefix\")\n cfg.verbose = get(parser, \"verbose\")\n return cfg", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_NotThisMethod_register_vcs_handler.return.decorate": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_NotThisMethod_register_vcs_handler.return.decorate", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 434, "end_line": 450, "span_ids": ["impl:3", "NotThisMethod", "register_vcs_handler"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NotThisMethod(Exception):\n \"\"\"Exception raised if a method is not valid for the current scenario.\"\"\"\n\n# these dictionaries contain VCS-specific tools\nLONG_VERSION_PY = {}\nHANDLERS = {}\n\n\ndef register_vcs_handler(vcs, method): # decorator\n \"\"\"Decorator to mark a method as the handler for a particular VCS.\"\"\"\n def decorate(f):\n \"\"\"Store f in HANDLERS[vcs][method].\"\"\"\n if vcs not in HANDLERS:\n HANDLERS[vcs] = {}\n HANDLERS[vcs][method] = f\n return f\n return decorate", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_run_command_run_command.return.stdout": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_run_command_run_command.return.stdout", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 453, "end_line": 484, "span_ids": ["run_command"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):\n \"\"\"Call the given command(s).\"\"\"\n assert isinstance(commands, list)\n p = None\n for c in commands:\n try:\n dispcmd = str([c] + args)\n # remember shell=False, so use git.cmd on windows, not just git\n p = subprocess.Popen([c] + args, cwd=cwd, stdout=subprocess.PIPE,\n stderr=(subprocess.PIPE if hide_stderr\n else None))\n break\n except EnvironmentError:\n e = sys.exc_info()[1]\n if e.errno == errno.ENOENT:\n continue\n if verbose:\n print(\"unable to run %s\" % dispcmd)\n print(e)\n return None\n else:\n if verbose:\n print(\"unable to find command, tried %s\" % (commands,))\n return None\n stdout = p.communicate()[0].strip()\n if sys.version_info[0] >= 3:\n stdout = stdout.decode()\n if p.returncode != 0:\n if verbose:\n print(\"unable to run %s (error)\" % dispcmd)\n return None\n return stdout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_get_keywords_git_get_keywords.return.keywords": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_get_keywords_git_get_keywords.return.keywords", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 972, "end_line": 994, "span_ids": ["git_get_keywords"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"get_keywords\")\ndef git_get_keywords(versionfile_abs):\n \"\"\"Extract version information from the given file.\"\"\"\n # the code embedded in _version.py can just fetch the value of these\n # keywords. When used from setup.py, we don't want to import _version.py,\n # so we do it with a regexp instead. This function is not used from\n # _version.py.\n keywords = {}\n try:\n f = open(versionfile_abs, \"r\")\n for line in f.readlines():\n if line.strip().startswith(\"git_refnames =\"):\n mo = re.search(r'=\\s*\"(.*)\"', line)\n if mo:\n keywords[\"refnames\"] = mo.group(1)\n if line.strip().startswith(\"git_full =\"):\n mo = re.search(r'=\\s*\"(.*)\"', line)\n if mo:\n keywords[\"full\"] = mo.group(1)\n f.close()\n except EnvironmentError:\n pass\n return keywords", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_versions_from_keywords_git_versions_from_keywords.return._version_0_unknown_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_versions_from_keywords_git_versions_from_keywords.return._version_0_unknown_", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 997, "end_line": 1040, "span_ids": ["git_versions_from_keywords"], "tokens": 558}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"keywords\")\ndef git_versions_from_keywords(keywords, tag_prefix, verbose):\n \"\"\"Get version information from git keywords.\"\"\"\n if not keywords:\n raise NotThisMethod(\"no keywords at all, weird\")\n refnames = keywords[\"refnames\"].strip()\n if refnames.startswith(\"$Format\"):\n if verbose:\n print(\"keywords are unexpanded, not using\")\n raise NotThisMethod(\"unexpanded keywords, not a git-archive tarball\")\n refs = set([r.strip() for r in refnames.strip(\"()\").split(\",\")])\n # starting in git-1.8.3, tags are listed as \"tag: foo-1.0\" instead of\n # just \"foo-1.0\". If we see a \"tag: \" prefix, prefer those.\n TAG = \"tag: \"\n tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])\n if not tags:\n # Either we're using git < 1.8.3, or there really are no tags. We use\n # a heuristic: assume all version tags have a digit. The old git %d\n # expansion behaves like git log --decorate=short and strips out the\n # refs/heads/ and refs/tags/ prefixes that would let us distinguish\n # between branches and tags. By ignoring refnames without digits, we\n # filter out many common branch names like \"release\" and\n # \"stabilization\", as well as \"HEAD\" and \"master\".\n tags = set([r for r in refs if re.search(r'\\d', r)])\n if verbose:\n print(\"discarding '%s', no digits\" % \",\".join(refs-tags))\n if verbose:\n print(\"likely tags: %s\" % \",\".join(sorted(tags)))\n for ref in sorted(tags):\n # sorting will prefer e.g. \"2.0\" over \"2.0rc1\"\n if ref.startswith(tag_prefix):\n r = ref[len(tag_prefix):]\n if verbose:\n print(\"picking %s\" % r)\n return {\"version\": r,\n \"full-revisionid\": keywords[\"full\"].strip(),\n \"dirty\": False, \"error\": None\n }\n # no suitable tags, so version is \"0+unknown\", but full hex is still there\n if verbose:\n print(\"no suitable tags, using unknown + full revision id\")\n return {\"version\": \"0+unknown\",\n \"full-revisionid\": keywords[\"full\"].strip(),\n \"dirty\": False, \"error\": \"no suitable tags\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_git_pieces_from_vcs_git_pieces_from_vcs.return.pieces", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1043, "end_line": 1124, "span_ids": ["git_pieces_from_vcs"], "tokens": 772}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@register_vcs_handler(\"git\", \"pieces_from_vcs\")\ndef git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):\n \"\"\"Get version from 'git describe' in the root of the source tree.\n\n This only gets called if the git-archive 'subst' keywords were *not*\n expanded, and _version.py hasn't already been rewritten with a short\n version string, meaning we're inside a checked out source tree.\n \"\"\"\n if not os.path.exists(os.path.join(root, \".git\")):\n if verbose:\n print(\"no .git in %s\" % root)\n raise NotThisMethod(\"no .git directory\")\n\n GITS = [\"git\"]\n if sys.platform == \"win32\":\n GITS = [\"git.cmd\", \"git.exe\"]\n # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]\n # if there isn't one, this yields HEX[-dirty] (no NUM)\n describe_out = run_command(GITS, [\"describe\", \"--tags\", \"--dirty\",\n \"--always\", \"--long\",\n \"--match\", \"%s*\" % tag_prefix],\n cwd=root)\n # --long was added in git-1.5.5\n if describe_out is None:\n raise NotThisMethod(\"'git describe' failed\")\n describe_out = describe_out.strip()\n full_out = run_command(GITS, [\"rev-parse\", \"HEAD\"], cwd=root)\n if full_out is None:\n raise NotThisMethod(\"'git rev-parse' failed\")\n full_out = full_out.strip()\n\n pieces = {}\n pieces[\"long\"] = full_out\n pieces[\"short\"] = full_out[:7] # maybe improved later\n pieces[\"error\"] = None\n\n # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]\n # TAG might have hyphens.\n git_describe = describe_out\n\n # look for -dirty suffix\n dirty = git_describe.endswith(\"-dirty\")\n pieces[\"dirty\"] = dirty\n if dirty:\n git_describe = git_describe[:git_describe.rindex(\"-dirty\")]\n\n # now we have TAG-NUM-gHEX or HEX\n\n if \"-\" in git_describe:\n # TAG-NUM-gHEX\n mo = re.search(r'^(.+)-(\\d+)-g([0-9a-f]+)$', git_describe)\n if not mo:\n # unparseable. Maybe git-describe is misbehaving?\n pieces[\"error\"] = (\"unable to parse git-describe output: '%s'\"\n % describe_out)\n return pieces\n\n # tag\n full_tag = mo.group(1)\n if not full_tag.startswith(tag_prefix):\n if verbose:\n fmt = \"tag '%s' doesn't start with prefix '%s'\"\n print(fmt % (full_tag, tag_prefix))\n pieces[\"error\"] = (\"tag '%s' doesn't start with prefix '%s'\"\n % (full_tag, tag_prefix))\n return pieces\n pieces[\"closest-tag\"] = full_tag[len(tag_prefix):]\n\n # distance: number of commits since tag\n pieces[\"distance\"] = int(mo.group(2))\n\n # commit: short hex revision ID\n pieces[\"short\"] = mo.group(3)\n\n else:\n # HEX: no tags\n pieces[\"closest-tag\"] = None\n count_out = run_command(GITS, [\"rev-list\", \"HEAD\", \"--count\"],\n cwd=root)\n pieces[\"distance\"] = int(count_out) # total number of commits\n\n return pieces", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_vcs_install_do_vcs_install.run_command_GITS_add_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_vcs_install_do_vcs_install.run_command_GITS_add_", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1127, "end_line": 1162, "span_ids": ["do_vcs_install"], "tokens": 299}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def do_vcs_install(manifest_in, versionfile_source, ipy):\n \"\"\"Git-specific installation logic for Versioneer.\n\n For Git, this means creating/changing .gitattributes to mark _version.py\n for export-time keyword substitution.\n \"\"\"\n GITS = [\"git\"]\n if sys.platform == \"win32\":\n GITS = [\"git.cmd\", \"git.exe\"]\n files = [manifest_in, versionfile_source]\n if ipy:\n files.append(ipy)\n try:\n me = __file__\n if me.endswith(\".pyc\") or me.endswith(\".pyo\"):\n me = os.path.splitext(me)[0] + \".py\"\n versioneer_file = os.path.relpath(me)\n except NameError:\n versioneer_file = \"versioneer.py\"\n files.append(versioneer_file)\n present = False\n try:\n f = open(\".gitattributes\", \"r\")\n for line in f.readlines():\n if line.strip().startswith(versionfile_source):\n if \"export-subst\" in line.strip().split()[1:]:\n present = True\n f.close()\n except EnvironmentError:\n pass\n if not present:\n f = open(\".gitattributes\", \"a+\")\n f.write(\"%s export-subst\\n\" % versionfile_source)\n f.close()\n files.append(\".gitattributes\")\n run_command(GITS, [\"add\", \"--\"] + files)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_versions_from_parentdir_versions_from_parentdir.return._version_dirname_len_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_versions_from_parentdir_versions_from_parentdir.return._version_dirname_len_p", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1165, "end_line": 1179, "span_ids": ["versions_from_parentdir"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def versions_from_parentdir(parentdir_prefix, root, verbose):\n \"\"\"Try to determine the version from the parent directory name.\n\n Source tarballs conventionally unpack into a directory that includes\n both the project name and a version string.\n \"\"\"\n dirname = os.path.basename(root)\n if not dirname.startswith(parentdir_prefix):\n if verbose:\n print(\"guessing rootdir is '%s', but '%s' doesn't start with \"\n \"prefix '%s'\" % (root, dirname, parentdir_prefix))\n raise NotThisMethod(\"rootdir doesn't start with parentdir_prefix\")\n return {\"version\": dirname[len(parentdir_prefix):],\n \"full-revisionid\": None,\n \"dirty\": False, \"error\": None}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_SHORT_VERSION_PY_versions_from_file.return.json_loads_mo_group_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_SHORT_VERSION_PY_versions_from_file.return.json_loads_mo_group_1_", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1181, "end_line": 1211, "span_ids": ["versions_from_file", "impl:8"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "SHORT_VERSION_PY = \"\"\"\n# This file was generated by 'versioneer.py' (0.16) from\n# revision-control system data, or from the parent directory name of an\n# unpacked source archive. Distribution tarballs contain a pre-generated copy\n# of this file.\n\nimport json\nimport sys\n\nversion_json = '''\n%s\n''' # END VERSION_JSON\n\n\ndef get_versions():\n return json.loads(version_json)\n\"\"\"\n\n\ndef versions_from_file(filename):\n \"\"\"Try to determine the version from _version.py if present.\"\"\"\n try:\n with open(filename) as f:\n contents = f.read()\n except EnvironmentError:\n raise NotThisMethod(\"unable to read _version.py\")\n mo = re.search(r\"version_json = '''\\n(.*)''' # END VERSION_JSON\",\n contents, re.M | re.S)\n if not mo:\n raise NotThisMethod(\"no version_json in _version.py\")\n return json.loads(mo.group(1))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_write_to_version_file_plus_or_dot.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_write_to_version_file_plus_or_dot.return._", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1214, "end_line": 1229, "span_ids": ["plus_or_dot", "write_to_version_file"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def write_to_version_file(filename, versions):\n \"\"\"Write the given version number to the given _version.py file.\"\"\"\n os.unlink(filename)\n contents = json.dumps(versions, sort_keys=True,\n indent=1, separators=(\",\", \": \"))\n with open(filename, \"w\") as f:\n f.write(SHORT_VERSION_PY % contents)\n\n print(\"set %s to '%s'\" % (filename, versions[\"version\"]))\n\n\ndef plus_or_dot(pieces):\n \"\"\"Return a + if we don't already have one, else return a .\"\"\"\n if \"+\" in pieces.get(\"closest-tag\", \"\"):\n return \".\"\n return \"+\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_render_pep440_pre.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_render_pep440_pre.return.rendered", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1232, "end_line": 1270, "span_ids": ["render_pep440_pre", "render_pep440"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_pep440(pieces):\n \"\"\"Build up version string, with post-release \"local version identifier\".\n\n Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you\n get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty\n\n Exceptions:\n 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += plus_or_dot(pieces)\n rendered += \"%d.g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n if pieces[\"dirty\"]:\n rendered += \".dirty\"\n else:\n # exception #1\n rendered = \"0+untagged.%d.g%s\" % (pieces[\"distance\"],\n pieces[\"short\"])\n if pieces[\"dirty\"]:\n rendered += \".dirty\"\n return rendered\n\n\ndef render_pep440_pre(pieces):\n \"\"\"TAG[.post.devDISTANCE] -- No -dirty.\n\n Exceptions:\n 1: no tags. 0.post.devDISTANCE\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"]:\n rendered += \".post.dev%d\" % pieces[\"distance\"]\n else:\n # exception #1\n rendered = \"0.post.dev%d\" % pieces[\"distance\"]\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_post_render_pep440_post.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_post_render_pep440_post.return.rendered", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1273, "end_line": 1297, "span_ids": ["render_pep440_post"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_pep440_post(pieces):\n \"\"\"TAG[.postDISTANCE[.dev0]+gHEX] .\n\n The \".dev0\" means dirty. Note that .dev0 sorts backwards\n (a dirty tree will appear \"older\" than the corresponding clean one),\n but you shouldn't be releasing software with -dirty anyways.\n\n Exceptions:\n 1: no tags. 0.postDISTANCE[.dev0]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += \".post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n rendered += plus_or_dot(pieces)\n rendered += \"g%s\" % pieces[\"short\"]\n else:\n # exception #1\n rendered = \"0.post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n rendered += \"+g%s\" % pieces[\"short\"]\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_old_render_pep440_old.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_pep440_old_render_pep440_old.return.rendered", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1300, "end_line": 1319, "span_ids": ["render_pep440_old"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_pep440_old(pieces):\n \"\"\"TAG[.postDISTANCE[.dev0]] .\n\n The \".dev0\" means dirty.\n\n Eexceptions:\n 1: no tags. 0.postDISTANCE[.dev0]\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"] or pieces[\"dirty\"]:\n rendered += \".post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n else:\n # exception #1\n rendered = \"0.post%d\" % pieces[\"distance\"]\n if pieces[\"dirty\"]:\n rendered += \".dev0\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_render_git_describe.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_render_git_describe.return.rendered", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1322, "end_line": 1339, "span_ids": ["render_git_describe"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_git_describe(pieces):\n \"\"\"TAG[-DISTANCE-gHEX][-dirty].\n\n Like 'git describe --tags --dirty --always'.\n\n Exceptions:\n 1: no tags. HEX[-dirty] (note: no 'g' prefix)\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n if pieces[\"distance\"]:\n rendered += \"-%d-g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n else:\n # exception #1\n rendered = pieces[\"short\"]\n if pieces[\"dirty\"]:\n rendered += \"-dirty\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_long_render_git_describe_long.return.rendered": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_git_describe_long_render_git_describe_long.return.rendered", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1342, "end_line": 1359, "span_ids": ["render_git_describe_long"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render_git_describe_long(pieces):\n \"\"\"TAG-DISTANCE-gHEX[-dirty].\n\n Like 'git describe --tags --dirty --always -long'.\n The distance/hash is unconditional.\n\n Exceptions:\n 1: no tags. HEX[-dirty] (note: no 'g' prefix)\n \"\"\"\n if pieces[\"closest-tag\"]:\n rendered = pieces[\"closest-tag\"]\n rendered += \"-%d-g%s\" % (pieces[\"distance\"], pieces[\"short\"])\n else:\n # exception #1\n rendered = pieces[\"short\"]\n if pieces[\"dirty\"]:\n rendered += \"-dirty\"\n return rendered", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_VersioneerBadRootError._The_project_root_direc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_render_VersioneerBadRootError._The_project_root_direc", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1362, "end_line": 1393, "span_ids": ["VersioneerBadRootError", "render"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def render(pieces, style):\n \"\"\"Render the given version pieces into the requested style.\"\"\"\n if pieces[\"error\"]:\n return {\"version\": \"unknown\",\n \"full-revisionid\": pieces.get(\"long\"),\n \"dirty\": None,\n \"error\": pieces[\"error\"]}\n\n if not style or style == \"default\":\n style = \"pep440\" # the default\n\n if style == \"pep440\":\n rendered = render_pep440(pieces)\n elif style == \"pep440-pre\":\n rendered = render_pep440_pre(pieces)\n elif style == \"pep440-post\":\n rendered = render_pep440_post(pieces)\n elif style == \"pep440-old\":\n rendered = render_pep440_old(pieces)\n elif style == \"git-describe\":\n rendered = render_git_describe(pieces)\n elif style == \"git-describe-long\":\n rendered = render_git_describe_long(pieces)\n else:\n raise ValueError(\"unknown style '%s'\" % style)\n\n return {\"version\": rendered, \"full-revisionid\": pieces[\"long\"],\n \"dirty\": pieces[\"dirty\"], \"error\": None}\n\n\nclass VersioneerBadRootError(Exception):\n \"\"\"The project root directory is unknown or missing key files.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_versions_get_versions.return._version_0_unknown_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_versions_get_versions.return._version_0_unknown_", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1396, "end_line": 1468, "span_ids": ["get_versions"], "tokens": 609}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_versions(verbose=False):\n \"\"\"Get the project version from whatever source is available.\n\n Returns dict with two keys: 'version' and 'full'.\n \"\"\"\n if \"versioneer\" in sys.modules:\n # see the discussion in cmdclass.py:get_cmdclass()\n del sys.modules[\"versioneer\"]\n\n root = get_root()\n cfg = get_config_from_root(root)\n\n assert cfg.VCS is not None, \"please set [versioneer]VCS= in setup.cfg\"\n handlers = HANDLERS.get(cfg.VCS)\n assert handlers, \"unrecognized VCS '%s'\" % cfg.VCS\n verbose = verbose or cfg.verbose\n assert cfg.versionfile_source is not None, \\\n \"please set versioneer.versionfile_source\"\n assert cfg.tag_prefix is not None, \"please set versioneer.tag_prefix\"\n\n versionfile_abs = os.path.join(root, cfg.versionfile_source)\n\n # extract version from first of: _version.py, VCS command (e.g. 'git\n # describe'), parentdir. This is meant to work for developers using a\n # source checkout, for users of a tarball created by 'setup.py sdist',\n # and for users of a tarball/zipball created by 'git archive' or github's\n # download-from-tag feature or the equivalent in other VCSes.\n\n get_keywords_f = handlers.get(\"get_keywords\")\n from_keywords_f = handlers.get(\"keywords\")\n if get_keywords_f and from_keywords_f:\n try:\n keywords = get_keywords_f(versionfile_abs)\n ver = from_keywords_f(keywords, cfg.tag_prefix, verbose)\n if verbose:\n print(\"got version from expanded keyword %s\" % ver)\n return ver\n except NotThisMethod:\n pass\n\n try:\n ver = versions_from_file(versionfile_abs)\n if verbose:\n print(\"got version from file %s %s\" % (versionfile_abs, ver))\n return ver\n except NotThisMethod:\n pass\n\n from_vcs_f = handlers.get(\"pieces_from_vcs\")\n if from_vcs_f:\n try:\n pieces = from_vcs_f(cfg.tag_prefix, root, verbose)\n ver = render(pieces, cfg.style)\n if verbose:\n print(\"got version from VCS %s\" % ver)\n return ver\n except NotThisMethod:\n pass\n\n try:\n if cfg.parentdir_prefix:\n ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose)\n if verbose:\n print(\"got version from parentdir %s\" % ver)\n return ver\n except NotThisMethod:\n pass\n\n if verbose:\n print(\"unable to compute version\")\n\n return {\"version\": \"0+unknown\", \"full-revisionid\": None,\n \"dirty\": None, \"error\": \"unable to compute version\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_version_get_cmdclass.from_distutils_core_impor": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_version_get_cmdclass.from_distutils_core_impor", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1471, "end_line": 1496, "span_ids": ["get_cmdclass", "get_version"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_version():\n \"\"\"Get the short version string for this project.\"\"\"\n return get_versions()[\"version\"]\n\n\ndef get_cmdclass():\n \"\"\"Get the custom setuptools/distutils subclasses used by Versioneer.\"\"\"\n if \"versioneer\" in sys.modules:\n del sys.modules[\"versioneer\"]\n # this fixes the \"python setup.py develop\" case (also 'install' and\n # 'easy_install .'), in which subdependencies of the main project are\n # built (using setup.py bdist_egg) in the same python process. Assume\n # a main project A and a dependency B, which use different versions\n # of Versioneer. A's setup.py imports A's Versioneer, leaving it in\n # sys.modules by the time B's setup.py is executed, causing B to run\n # with the wrong versioneer. Setuptools wraps the sub-dep builds in a\n # sandbox that restores sys.modules to it's pre-build state, so the\n # parent is protected against the child's \"import versioneer\". By\n # removing ourselves from sys.modules here, before the child build\n # happens, we protect the child from the parent's versioneer too.\n # Also see https://github.com/warner/python-versioneer/issues/52\n\n cmds = {}\n\n # we add \"version\" to both distutils and setuptools\n from distutils.core import Command\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_version_get_cmdclass.cmd_version.run.if_vers_error_.print_error_s_vers": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_version_get_cmdclass.cmd_version.run.if_vers_error_.print_error_s_vers", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1498, "end_line": 1515, "span_ids": ["get_cmdclass"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_cmdclass():\n # ... other code\n\n class cmd_version(Command):\n description = \"report generated version string\"\n user_options = []\n boolean_options = []\n\n def initialize_options(self):\n pass\n\n def finalize_options(self):\n pass\n\n def run(self):\n vers = get_versions(verbose=True)\n print(\"Version: %s\" % vers[\"version\"])\n print(\" full-revisionid: %s\" % vers.get(\"full-revisionid\"))\n print(\" dirty: %s\" % vers.get(\"dirty\"))\n if vers[\"error\"]:\n print(\" error: %s\" % vers[\"error\"])\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_version_cmd_ver_get_cmdclass.if_setuptools_in_sys_mo.else_.from_distutils_command_bu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_version_cmd_ver_get_cmdclass.if_setuptools_in_sys_mo.else_.from_distutils_command_bu", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1516, "end_line": 1532, "span_ids": ["get_cmdclass"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_cmdclass():\n # ... other code\n cmds[\"version\"] = cmd_version\n\n # we override \"build_py\" in both distutils and setuptools\n #\n # most invocation pathways end up running build_py:\n # distutils/build -> build_py\n # distutils/install -> distutils/build ->..\n # setuptools/bdist_wheel -> distutils/install ->..\n # setuptools/bdist_egg -> distutils/install_lib -> build_py\n # setuptools/install -> bdist_egg ->..\n # setuptools/develop -> ?\n\n # we override different \"build_py\" commands for both environments\n if \"setuptools\" in sys.modules:\n from setuptools.command.build_py import build_py as _build_py\n else:\n from distutils.command.build_py import build_py as _build_py\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_build_py_get_cmdclass.cmd_build_py.run.if_cfg_versionfile_build_.write_to_version_file_tar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_build_py_get_cmdclass.cmd_build_py.run.if_cfg_versionfile_build_.write_to_version_file_tar", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1534, "end_line": 1546, "span_ids": ["get_cmdclass"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_cmdclass():\n # ... other code\n\n class cmd_build_py(_build_py):\n def run(self):\n root = get_root()\n cfg = get_config_from_root(root)\n versions = get_versions()\n _build_py.run(self)\n # now locate _version.py in the new build/ directory and replace\n # it with an updated value\n if cfg.versionfile_build:\n target_versionfile = os.path.join(self.build_lib,\n cfg.versionfile_build)\n print(\"UPDATING %s\" % target_versionfile)\n write_to_version_file(target_versionfile, versions)\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_build_py_cmd_bu_get_cmdclass.None_3.else_.from_distutils_command_sd": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmds_build_py_cmd_bu_get_cmdclass.None_3.else_.from_distutils_command_sd", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1547, "end_line": 1579, "span_ids": ["get_cmdclass"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_cmdclass():\n # ... other code\n cmds[\"build_py\"] = cmd_build_py\n\n if \"cx_Freeze\" in sys.modules: # cx_freeze enabled?\n from cx_Freeze.dist import build_exe as _build_exe\n\n class cmd_build_exe(_build_exe):\n def run(self):\n root = get_root()\n cfg = get_config_from_root(root)\n versions = get_versions()\n target_versionfile = cfg.versionfile_source\n print(\"UPDATING %s\" % target_versionfile)\n write_to_version_file(target_versionfile, versions)\n\n _build_exe.run(self)\n os.unlink(target_versionfile)\n with open(cfg.versionfile_source, \"w\") as f:\n LONG = LONG_VERSION_PY[cfg.VCS]\n f.write(LONG %\n {\"DOLLAR\": \"$\",\n \"STYLE\": cfg.style,\n \"TAG_PREFIX\": cfg.tag_prefix,\n \"PARENTDIR_PREFIX\": cfg.parentdir_prefix,\n \"VERSIONFILE_SOURCE\": cfg.versionfile_source,\n })\n cmds[\"build_exe\"] = cmd_build_exe\n del cmds[\"build_py\"]\n\n # we override different \"sdist\" commands for both environments\n if \"setuptools\" in sys.modules:\n from setuptools.command.sdist import sdist as _sdist\n else:\n from distutils.command.sdist import sdist as _sdist\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_sdist_get_cmdclass.return.cmds": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_get_cmdclass.cmd_sdist_get_cmdclass.return.cmds", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1581, "end_line": 1603, "span_ids": ["get_cmdclass"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_cmdclass():\n # ... other code\n\n class cmd_sdist(_sdist):\n def run(self):\n versions = get_versions()\n self._versioneer_generated_versions = versions\n # unless we update this, the command will keep using the old\n # version\n self.distribution.metadata.version = versions[\"version\"]\n return _sdist.run(self)\n\n def make_release_tree(self, base_dir, files):\n root = get_root()\n cfg = get_config_from_root(root)\n _sdist.make_release_tree(self, base_dir, files)\n # now locate _version.py in the new base_dir directory\n # (remembering that it may be a hardlink) and replace it with an\n # updated value\n target_versionfile = os.path.join(base_dir, cfg.versionfile_source)\n print(\"UPDATING %s\" % target_versionfile)\n write_to_version_file(target_versionfile,\n self._versioneer_generated_versions)\n cmds[\"sdist\"] = cmd_sdist\n\n return cmds", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_CONFIG_ERROR_INIT_PY_SNIPPET._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_CONFIG_ERROR_INIT_PY_SNIPPET._", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1606, "end_line": 1647, "span_ids": ["impl:10"], "tokens": 243}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "CONFIG_ERROR = \"\"\"\nsetup.cfg is missing the necessary Versioneer configuration. You need\na section like:\n\n [versioneer]\n VCS = git\n style = pep440\n versionfile_source = src/myproject/_version.py\n versionfile_build = myproject/_version.py\n tag_prefix =\n parentdir_prefix = myproject-\n\nYou will also need to edit your setup.py to use the results:\n\n import versioneer\n setup(version=versioneer.get_version(),\n cmdclass=versioneer.get_cmdclass(), ...)\n\nPlease read the docstring in ./versioneer.py for configuration instructions,\nedit setup.cfg, and re-run the installer or 'python versioneer.py setup'.\n\"\"\"\n\nSAMPLE_CONFIG = \"\"\"\n# See the docstring in versioneer.py for instructions. Note that you must\n# re-run 'versioneer.py setup' after changing this section, and commit the\n# resulting files.\n\n[versioneer]\n#VCS = git\n#style = pep440\n#versionfile_source =\n#versionfile_build =\n#tag_prefix =\n#parentdir_prefix =\n\n\"\"\"\n\nINIT_PY_SNIPPET = \"\"\"\nfrom ._version import get_versions\n__version__ = get_versions()['version']\ndel get_versions\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_setup_do_setup.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_do_setup_do_setup.return.0", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1650, "end_line": 1729, "span_ids": ["do_setup"], "tokens": 758}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def do_setup():\n \"\"\"Main VCS-independent setup function for installing Versioneer.\"\"\"\n root = get_root()\n try:\n cfg = get_config_from_root(root)\n except (EnvironmentError, configparser.NoSectionError,\n configparser.NoOptionError) as e:\n if isinstance(e, (EnvironmentError, configparser.NoSectionError)):\n print(\"Adding sample versioneer config to setup.cfg\",\n file=sys.stderr)\n with open(os.path.join(root, \"setup.cfg\"), \"a\") as f:\n f.write(SAMPLE_CONFIG)\n print(CONFIG_ERROR, file=sys.stderr)\n return 1\n\n print(\" creating %s\" % cfg.versionfile_source)\n with open(cfg.versionfile_source, \"w\") as f:\n LONG = LONG_VERSION_PY[cfg.VCS]\n f.write(LONG % {\"DOLLAR\": \"$\",\n \"STYLE\": cfg.style,\n \"TAG_PREFIX\": cfg.tag_prefix,\n \"PARENTDIR_PREFIX\": cfg.parentdir_prefix,\n \"VERSIONFILE_SOURCE\": cfg.versionfile_source,\n })\n\n ipy = os.path.join(os.path.dirname(cfg.versionfile_source),\n \"__init__.py\")\n if os.path.exists(ipy):\n try:\n with open(ipy, \"r\") as f:\n old = f.read()\n except EnvironmentError:\n old = \"\"\n if INIT_PY_SNIPPET not in old:\n print(\" appending to %s\" % ipy)\n with open(ipy, \"a\") as f:\n f.write(INIT_PY_SNIPPET)\n else:\n print(\" %s unmodified\" % ipy)\n else:\n print(\" %s doesn't exist, ok\" % ipy)\n ipy = None\n\n # Make sure both the top-level \"versioneer.py\" and versionfile_source\n # (PKG/_version.py, used by runtime code) are in MANIFEST.in, so\n # they'll be copied into source distributions. Pip won't be able to\n # install the package without this.\n manifest_in = os.path.join(root, \"MANIFEST.in\")\n simple_includes = set()\n try:\n with open(manifest_in, \"r\") as f:\n for line in f:\n if line.startswith(\"include \"):\n for include in line.split()[1:]:\n simple_includes.add(include)\n except EnvironmentError:\n pass\n # That doesn't cover everything MANIFEST.in can do\n # (https://docs.python.org/2/distutils/sourcedist.html#commands), so\n # it might give some false negatives. Appending redundant 'include'\n # lines is safe, though.\n if \"versioneer.py\" not in simple_includes:\n print(\" appending 'versioneer.py' to MANIFEST.in\")\n with open(manifest_in, \"a\") as f:\n f.write(\"include versioneer.py\\n\")\n else:\n print(\" 'versioneer.py' already in MANIFEST.in\")\n if cfg.versionfile_source not in simple_includes:\n print(\" appending versionfile_source ('%s') to MANIFEST.in\" %\n cfg.versionfile_source)\n with open(manifest_in, \"a\") as f:\n f.write(\"include %s\\n\" % cfg.versionfile_source)\n else:\n print(\" versionfile_source already in MANIFEST.in\")\n\n # Make VCS-specific changes. For git, this means creating/changing\n # .gitattributes to mark _version.py for export-time keyword\n # substitution.\n do_vcs_install(manifest_in, cfg.versionfile_source, ipy)\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_scan_setup_py_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_dask__dask/versioneer.py_scan_setup_py_", "embedding": null, "metadata": {"file_path": "versioneer.py", "file_name": "versioneer.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1732, "end_line": 1775, "span_ids": ["scan_setup_py", "impl:16"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def scan_setup_py():\n \"\"\"Validate the contents of setup.py against Versioneer's expectations.\"\"\"\n found = set()\n setters = False\n errors = 0\n with open(\"setup.py\", \"r\") as f:\n for line in f.readlines():\n if \"import versioneer\" in line:\n found.add(\"import\")\n if \"versioneer.get_cmdclass()\" in line:\n found.add(\"cmdclass\")\n if \"versioneer.get_version()\" in line:\n found.add(\"get_version\")\n if \"versioneer.VCS\" in line:\n setters = True\n if \"versioneer.versionfile_source\" in line:\n setters = True\n if len(found) != 3:\n print(\"\")\n print(\"Your setup.py appears to be missing some important items\")\n print(\"(but I might be wrong). Please make sure it has something\")\n print(\"roughly like the following:\")\n print(\"\")\n print(\" import versioneer\")\n print(\" setup( version=versioneer.get_version(),\")\n print(\" cmdclass=versioneer.get_cmdclass(), ...)\")\n print(\"\")\n errors += 1\n if setters:\n print(\"You should remove lines like 'versioneer.VCS = ' and\")\n print(\"'versioneer.versionfile_source = ' . This configuration\")\n print(\"now lives in setup.cfg, and should be removed from setup.py\")\n print(\"\")\n errors += 1\n return errors\n\nif __name__ == \"__main__\":\n cmd = sys.argv[1]\n if cmd == \"setup\":\n errors = do_setup()\n errors += scan_setup_py()\n if errors:\n sys.exit(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}}}
\ No newline at end of file