<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def Conv1D(a, f, strides, padding, data_format):
 """ 1D conv op. """

    if data_format.decode("ascii") == "NCHW":
        a = np.rollaxis(a, 1, -1),

    patches = _conv_patches(a, f, 3 * [strides], padding.decode("ascii"))
    conv = np.sum(patches, axis=tuple(range(-f.ndim, -1)))

    if data_format.decode("ascii") == "NCHW":
        conv = np.rollaxis(conv, -1, 1)

    return conv,