CoolFace
Apppublic

nicoloddo/x-tree-search

sourceHugging Facecc-by-nc-4.0updated 1y agoView on Hugging Face
1likes
utils.cpython-312.pyc14 linesDownload Raw Back to __pycache__
1�

2�
h����ddlZd�Zd�Zd�Zy)�Nc���t|�t|�k7rtd��g}t||�D]1\}}t|t�r|g|z}n||g}|j|��3|S)a$3    Combine each element of the first array with the respective same position element(s) of the second array.4 5    Parameters:6    arr1 (list): First list of strings.7    arr2 (list): Second list of strings or lists.8 9    Returns:10    list: A list of lists containing combined elements.11    z&Both arrays must have the same length.)�len�12ValueError�zip�13isinstance�list�append)�arr1�arr2�combined_array�a�b�combined_elements      �Oc:\Users\nicom\Projects\x-tree-search\workspace\x-tree-search\src\game\utils.py�join_arrays_respective_elementsrsp���4�y�C��I���A�B�B��N��D�$����1��a��� !�s�Q�w�� !�1�v�����.�/� ���c�R�ttjj|��S)N)r�	itertools�chain�
from_iterable)�14list_inputs r�flatten_listrs���	���-�-�j�9�:�:rc��t|�tur|Stt|j	d�jd��\}}||fS)Nz()�,)�type�tuple�map�int�strip�split)�	where_str�x�ys   r�parse_where_inputr$sA���I��%�����s�I�O�O�D�)�/�/��4�5�D�A�q�
�q�6�Mr)rrrr$�rr�<module>r&s����0;�r