<｜begin▁of▁sentence｜>### Instruction:
Suppose you have a directed graph 'G' with nodes that may or may not have self-loops. Can you use graspologic.utils.remove_loops to get an adjacency matrix that represents the graph without any self-loops?
### Response:
import numpy as np
import networkx as nx
from graspologic.utils import remove_loops

# Creating a graph with self-loops
G = nx.DiGraph()
G.add_edges_from([(1, 1), (1, 2), (2, 3), (3, 3)])

# Using remove_loops to get an adjacency matrix without self-loops
adjacency_matrix_no_loops = remove_loops(nx.to_numpy_array(G))

# Convert the adjacency matrix back to a networkx graph without self-loops
G_no_loops = nx.from_numpy_array(adjacency_matrix_no_loops, create_using=nx.DiGraph)

# Verify that the loops have been removed
print(nx.to_numpy_array(G_no_loops))
<|EOT|>
