From 171d299b55ea25d29baa7526fc09ea5749d67b8d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Aug 2024 13:14:29 -0700 Subject: [PATCH] src/sage/graphs/generic_graph.py: Add another numpy.set_printoptions --- src/sage/graphs/generic_graph.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 46523fdfda5..614186f04e4 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -15993,7 +15993,11 @@ def clustering_coeff(self, {0: 1/3, 1: 1/3, 2: 0, 3: 1/3, 4: 1/3, 5: 1/3, 6: 1/3, 7: 1/3, 8: 0, 9: 1/3, 10: 1/3, 11: 0} - sage: (graphs.FruchtGraph()).clustering_coeff(weight=True) # needs networkx + sage: # needs networkx + sage: import numpy + sage: if int(numpy.version.short_version[0]) > 1: + ....: numpy.set_printoptions(legacy="1.25") + sage: (graphs.FruchtGraph()).clustering_coeff(weight=True) {0: 0.3333333333333333, 1: 0.3333333333333333, 2: 0, 3: 0.3333333333333333, 4: 0.3333333333333333, 5: 0.3333333333333333, 6: 0.3333333333333333,