<｜begin▁of▁sentence｜>### Instruction:
{'description': 'Given a graph with the edge set [(1, 2), (1, 3), (2, 3)], convert the adjacency matrix from a dictionary of dictionaries to a NumPy array using NetworkX.', 'problem_solved': 'The code converts the adjacency matrix of a graph, represented as a dictionary of dictionaries, into a NumPy array. This can be useful for performing matrix operations or using the graph in algorithms that require matrix inputs.'}
### Response:
import networkx as nx
import numpy as np

# Create a graph
G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 3)])

# Get the adjacency matrix as a dictionary of dictionaries
adj_dict = nx.to_dict_of_dicts(G)

# Convert to numpy array
adj_matrix = nx.linalg.graphmatrix.dict_to_numpy_array(adj_dict)

print(adj_matrix)
<|EOT|>
