<｜begin▁of▁sentence｜>### Instruction:
Given a networkx graph that potentially contains self-loops (edges connecting nodes to themselves), how can we use the remove_loops function provided by graspologic.utils to create a new adjacency matrix for the graph with all self-loops removed?
### Response:
import numpy as np
import networkx as nx
from graspologic.utils import remove_loops

# Create a graph with self-loops
g = nx.Graph()
g.add_edges_from([(1,2), (2,3), (3,3)]) # Note that node 3 has a self-loop

# Convert to adjacency matrix
A = nx.to_numpy_array(g)

# Use remove_loops to clean self-loops from the adjacency matrix
A_no_loops = remove_loops(A)

# Convert back to a networkx graph
g_clean = nx.from_numpy_array(A_no_loops)
print(nx.info(g_clean))
<|EOT|>
