def to_xy_array(self):
result = np.zeros((len(self.keypoints), <NUM_LIT:2>), dtype=np.float32)<EOL>for i, keypoint in enumerate(self.keypoints):<EOL><INDENT>result[i, <NUM_LIT:0>] = keypoint.x<EOL>result[i, <NUM_LIT:1>] = keypoint.y<EOL><DEDENT>return result<EOL>
Convert keypoint coordinates to ``(N,2)`` array.

Returns
-------
(N, 2) ndarray
    Array containing the coordinates of all keypoints.
    Shape is ``(N,2)`` with coordinates in xy-form.