o
    ¡¿¯i÷  ã                   @   s   d Z dd„ ZdS )z!Create mask for subsequent steps.c                 C   sF   |j \}}|  |¡}|d |dd…df kd }|  ||||f¡}|S )zµPrepare the history mask.

    Args:
        block (ndarray): Block with dimensions: (B x S).
    Returns:
        ndarray, np.ndarray: History mask with dimensions (B, S, S).

    N)N)ÚshapeÚarangeÚbroadcast_to)ÚxpÚblockÚbatchÚlengthr   Úhistory_mask© r	   ú`/home/ubuntu/.local/lib/python3.10/site-packages/espnet/nets/chainer_backend/transformer/mask.pyÚmake_history_mask   s   
	
ÿr   N)Ú__doc__r   r	   r	   r	   r
   Ú<module>   s    