Suppress NumPy warning in threshold_graph