<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pad_to_3d(a):
 """Return 1- or 2-dimensional cartesian vectors, converted into a 3-dimensional representation, with additional dimensional coordinates assumed to be zero. Parameters a: array, shape (n, d), d < 3 Returns ------- ap: array, shape (n, 3) """

    a_pad = np.zeros([len(a), 3], dtype=a.dtype)
    a_pad[:, :a.shape[-1]] = a
    return a_pad