Subarray partition technique is widely employed in large phased array radar system design with purposes of low complexity and computation burden. In order to reduce the performance loss caused by inappropriate subarray partition, optimization of subarray partition should be considered. An optimal method based on a weighted K-means clustering is investigated in this paper. The optimization can be formulated as a clustering problem according to the excitation matching principle. When the elements are weighted uniformly, K-means clustering method can provide the minimum excitation matching error. However, the error cannot be minimized completely when the elements are weighted non-uniformly for specific intensions such as low sidelobes. Therefore, a weighted K-means clustering method is proposed in this paper to reduce the error for non-uniform element weights, which takes full advantages of the element weights by modifying the membership rule and clustering center of K-means clustering. Numerical simulations are carried out to verify the effectiveness of proposed method.