I was writing an adjacency matrix, and was trying to use the np.ndarray.resize to add all-zero rows and columns. According to the np.resize documentation:
np.ndarray.resize