U
    a+d                     @   s   d dl Zdd ZdS )    Nc                    s    fdd}|  |S )z Replaces each frame at time t by the mean of `nframes` equally spaced frames
    taken in the interval [t-d, t+d]. This results in motion blur.c                    sJ   t | | }t jdt j fdd|D dd dd}|dS )	Ng      ?c                    s   g | ]} |qS  r   ).0Zt_gfr   @/tmp/pip-unpacked-wheel-0yp4gafk/moviepy/video/fx/supersample.py
<listcomp>
   s     z+supersample.<locals>.fl.<locals>.<listcomp>Zuint16)Zdtyper   )ZaxisZuint8)npZlinspaceZmeanarrayZastype)r   tttavgdnframesr   r   fl   s    *zsupersample.<locals>.fl)r   )Zclipr   r   r   r   r   r   supersample   s    r   )Znumpyr   r   r   r   r   r   <module>   s   