<｜begin▁of▁sentence｜>### Instruction:
Given a weighted adjacency matrix where edge weights are represented as a list of lists, how would you create an undirected graph using igraph's Weighted_Adjacency function, storing edge weights with an attribute named 'weight' while ignoring any diagonal entries that represent loops?
### Response:
import igraph as ig

# Assuming 'matrix' is a weighted adjacency matrix given as a list of lists
matrix = [[0, 1, 0.5], [1, 0, 1], [0.5, 1, 0]]

# Create an undirected graph from the weighted adjacency matrix
# 'attr' is set to 'weight' to store the edge weights
# 'loops' is set to 'ignore' to ignore diagonal elements in case they exist
graph = ig.Graph.Weighted_Adjacency(matrix, mode='undirected', attr='weight', loops='ignore')

# Print the summary of the graph
print(graph.summary())

# Print edge weights
e_weights = graph.es['weight']
print('Edge Weights:', e_weights)
<|EOT|>
