passagemath-graphs 10.5.38__cp313-cp313-macosx_14_0_arm64.whl → 10.5.44__cp313-cp313-macosx_14_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. {passagemath_graphs-10.5.38.dist-info → passagemath_graphs-10.5.44.dist-info}/METADATA +82 -11
  2. {passagemath_graphs-10.5.38.dist-info → passagemath_graphs-10.5.44.dist-info}/RECORD +84 -84
  3. {passagemath_graphs-10.5.38.dist-info → passagemath_graphs-10.5.44.dist-info}/WHEEL +1 -1
  4. sage/all__sagemath_graphs.py +5 -0
  5. sage/combinat/abstract_tree.py +1 -1
  6. sage/combinat/binary_tree.py +1 -1
  7. sage/combinat/cluster_algebra_quiver/all.py +1 -1
  8. sage/combinat/cluster_algebra_quiver/cluster_seed.py +18 -12
  9. sage/combinat/cluster_algebra_quiver/interact.py +4 -0
  10. sage/combinat/designs/MOLS_handbook_data.py +5 -5
  11. sage/combinat/designs/bibd.py +1 -1
  12. sage/combinat/designs/covering_array.py +3 -3
  13. sage/combinat/designs/covering_design.py +2 -1
  14. sage/combinat/designs/designs_pyx.cpython-313-darwin.so +0 -0
  15. sage/combinat/designs/difference_matrices.py +1 -1
  16. sage/combinat/designs/evenly_distributed_sets.cpython-313-darwin.so +0 -0
  17. sage/combinat/designs/ext_rep.py +9 -14
  18. sage/combinat/designs/gen_quadrangles_with_spread.cpython-313-darwin.so +0 -0
  19. sage/combinat/designs/group_divisible_designs.py +1 -1
  20. sage/combinat/designs/incidence_structures.py +8 -8
  21. sage/combinat/designs/latin_squares.py +1 -1
  22. sage/combinat/designs/orthogonal_arrays_find_recursive.cpython-313-darwin.so +0 -0
  23. sage/combinat/designs/resolvable_bibd.py +1 -1
  24. sage/combinat/designs/steiner_quadruple_systems.py +1 -1
  25. sage/combinat/designs/subhypergraph_search.cpython-313-darwin.so +0 -0
  26. sage/combinat/finite_state_machine_generators.py +2 -2
  27. sage/combinat/graph_path.py +3 -3
  28. sage/combinat/ordered_tree.py +1 -1
  29. sage/combinat/posets/cartesian_product.py +1 -1
  30. sage/combinat/posets/d_complete.py +1 -1
  31. sage/combinat/posets/forest.py +1 -1
  32. sage/combinat/posets/hasse_cython.cpython-313-darwin.so +0 -0
  33. sage/combinat/posets/incidence_algebras.py +1 -1
  34. sage/combinat/posets/linear_extension_iterator.cpython-313-darwin.so +0 -0
  35. sage/combinat/posets/linear_extension_iterator.pyx +2 -0
  36. sage/combinat/posets/linear_extensions.py +3 -12
  37. sage/combinat/posets/moebius_algebra.py +1 -1
  38. sage/combinat/rooted_tree.py +1 -1
  39. sage/graphs/asteroidal_triples.cpython-313-darwin.so +0 -0
  40. sage/graphs/base/boost_graph.cpython-313-darwin.so +0 -0
  41. sage/graphs/base/c_graph.cpython-313-darwin.so +0 -0
  42. sage/graphs/base/dense_graph.cpython-313-darwin.so +0 -0
  43. sage/graphs/base/graph_backends.cpython-313-darwin.so +0 -0
  44. sage/graphs/base/sparse_graph.cpython-313-darwin.so +0 -0
  45. sage/graphs/base/static_dense_graph.cpython-313-darwin.so +0 -0
  46. sage/graphs/base/static_sparse_backend.cpython-313-darwin.so +0 -0
  47. sage/graphs/base/static_sparse_graph.cpython-313-darwin.so +0 -0
  48. sage/graphs/centrality.cpython-313-darwin.so +0 -0
  49. sage/graphs/comparability.cpython-313-darwin.so +0 -0
  50. sage/graphs/connectivity.cpython-313-darwin.so +0 -0
  51. sage/graphs/convexity_properties.cpython-313-darwin.so +0 -0
  52. sage/graphs/distances_all_pairs.cpython-313-darwin.so +0 -0
  53. sage/graphs/edge_connectivity.cpython-313-darwin.so +0 -0
  54. sage/graphs/generators/distance_regular.cpython-313-darwin.so +0 -0
  55. sage/graphs/generators/distance_regular.pyx +1 -1
  56. sage/graphs/generic_graph_pyx.cpython-313-darwin.so +0 -0
  57. sage/graphs/genus.cpython-313-darwin.so +0 -0
  58. sage/graphs/graph.py +1 -1
  59. sage/graphs/graph_coloring.cpython-313-darwin.so +0 -0
  60. sage/graphs/graph_decompositions/bandwidth.cpython-313-darwin.so +0 -0
  61. sage/graphs/graph_decompositions/clique_separators.cpython-313-darwin.so +0 -0
  62. sage/graphs/graph_decompositions/cutwidth.cpython-313-darwin.so +0 -0
  63. sage/graphs/graph_decompositions/fast_digraph.cpython-313-darwin.so +0 -0
  64. sage/graphs/graph_decompositions/graph_products.cpython-313-darwin.so +0 -0
  65. sage/graphs/graph_decompositions/modular_decomposition.cpython-313-darwin.so +0 -0
  66. sage/graphs/graph_decompositions/slice_decomposition.cpython-313-darwin.so +0 -0
  67. sage/graphs/graph_decompositions/tree_decomposition.cpython-313-darwin.so +0 -0
  68. sage/graphs/graph_decompositions/vertex_separation.cpython-313-darwin.so +0 -0
  69. sage/graphs/graph_generators_pyx.cpython-313-darwin.so +0 -0
  70. sage/graphs/graph_list.py +2 -3
  71. sage/graphs/hyperbolicity.cpython-313-darwin.so +0 -0
  72. sage/graphs/independent_sets.cpython-313-darwin.so +0 -0
  73. sage/graphs/isoperimetric_inequalities.cpython-313-darwin.so +0 -0
  74. sage/graphs/line_graph.cpython-313-darwin.so +0 -0
  75. sage/graphs/path_enumeration.cpython-313-darwin.so +0 -0
  76. sage/graphs/spanning_tree.cpython-313-darwin.so +0 -0
  77. sage/graphs/strongly_regular_db.cpython-313-darwin.so +0 -0
  78. sage/graphs/traversals.cpython-313-darwin.so +0 -0
  79. sage/graphs/trees.cpython-313-darwin.so +0 -0
  80. sage/graphs/views.cpython-313-darwin.so +0 -0
  81. sage/graphs/weakly_chordal.cpython-313-darwin.so +0 -0
  82. sage/groups/perm_gps/partn_ref/refinement_graphs.cpython-313-darwin.so +0 -0
  83. sage/sandpiles/sandpile.py +1 -2
  84. {passagemath_graphs-10.5.38.dist-info → passagemath_graphs-10.5.44.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,11 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Known lower bounds on the number of Mutually Orthogonal Latin
4
- Squares (MOLS) of a given size.
3
+ Bounds on the number of mutually orthogonal Latin squares
5
4
 
6
- This module consists (almost) entirely of an internal, constant tuple
7
- of python integers corresponding to Table 3.87 in the Handbook of
8
- Combinatorial Designs, 2nd edition, by Colbourn and Dinitz. One public
5
+ This module contains known lower bounds on the number of mutually orthogonal
6
+ Latin squares (MOLS) of a given size, and consists (almost) entirely of an
7
+ internal, constant tuple of Python integers corresponding to Table 3.87 in the
8
+ Handbook of Combinatorial Designs, 2nd edition, by Colbourn and Dinitz. One public
9
9
  function, :func:`lower_bound`, is provided to access it.
10
10
 
11
11
  Make sure we have all of the entries::
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Balanced Incomplete Block Designs (BIBD)
3
+ Balanced incomplete block designs (BIBD)
4
4
 
5
5
  This module gathers everything related to Balanced Incomplete Block Designs. One can build a
6
6
  BIBD (or check that it can be built) with :func:`balanced_incomplete_block_design`::
@@ -1,13 +1,13 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Covering Arrays (CA)
3
+ Covering arrays
4
4
 
5
- A Covering Array, denoted `CA(N;t,k,v)`, is an `N` by `k` array with
5
+ A covering array, denoted `CA(N;t,k,v)`, is an `N` by `k` array with
6
6
  entries from a set of `v` elements with the property that in every
7
7
  selection of `t` columns, every sequence of `t` elements appears in at
8
8
  least one row.
9
9
 
10
- An Orthogonal Array, denoted `OA(N;t,k,v)` is a covering array with the
10
+ An orthogonal array, denoted `OA(N;t,k,v)` is a covering array with the
11
11
  property that every sequence of `t`-elements appears in exactly one row.
12
12
  (See :mod:`sage.combinat.designs.orthogonal_arrays`).
13
13
 
@@ -49,7 +49,6 @@ Classes and methods
49
49
  from urllib.request import urlopen
50
50
  from ssl import create_default_context as default_context
51
51
 
52
- from sage.misc.sage_eval import sage_eval
53
52
  from sage.structure.sage_object import SageObject
54
53
  from sage.rings.rational import Rational
55
54
  from sage.arith.misc import binomial
@@ -513,6 +512,8 @@ def best_known_covering_design_www(v, k, t, verbose=False):
513
512
  A :exc:`ValueError` is raised if the ``(v, k, t)`` parameters are not
514
513
  found in the database.
515
514
  """
515
+ from sage.misc.sage_eval import sage_eval
516
+
516
517
  v = int(v)
517
518
  k = int(k)
518
519
  t = int(t)
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.rings.finite_rings
3
3
  r"""
4
- Difference Matrices
4
+ Difference matrices
5
5
 
6
6
  This module gathers code related to difference matrices. One can build those
7
7
  objects (or know if they can be built) with :func:`difference_matrix`::
@@ -1,13 +1,13 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- External Representations of Block Designs
3
+ External representations of block designs
4
4
 
5
- The "ext_rep" module is an API to the abstract tree represented by
5
+ This module is an API to the abstract tree represented by
6
6
  an XML document containing the External Representation of a list of
7
7
  block designs. The module also provides the related I/O operations for
8
- reading/writing ext-rep files or data. The parsing is based on expat.
8
+ reading/writing ``ext-rep`` files or data. The parsing is based on expat.
9
9
 
10
- This is a modified form of the module ext_rep.py (version 0.8)
10
+ This is a modified form of the module ``ext_rep.py`` (version 0.8)
11
11
  written by Peter Dobcsanyi [Do2009]_ peter@designtheory.org.
12
12
 
13
13
  .. TODO::
@@ -16,12 +16,9 @@ written by Peter Dobcsanyi [Do2009]_ peter@designtheory.org.
16
16
  information about things like automorphism groups, transitivity, cycle type
17
17
  representatives, etc, but none of this data is made available through the
18
18
  current implementation.
19
-
20
- Functions
21
- ---------
22
19
  """
23
20
 
24
- ###########################################################################
21
+ # ***********************************************************************
25
22
  # This software is released under the terms of the GNU General Public
26
23
  # License, version 2 or above (your choice). For details on licensing,
27
24
  # see the accompanying documentation.
@@ -29,9 +26,9 @@ Functions
29
26
  # This is a modified form of the module ext_rep.py (version 0.8)
30
27
  # written by Peter Dobcsanyi peter@designtheory.org.
31
28
  #
32
- # Copyright 2004 by Peter Dobcsanyi peter@designtheory.org, and copyright
33
- # 2009 Carlo Hamalainen carlo.hamalainen@gmail.com
34
- ###########################################################################
29
+ # Copyright 2004 Peter Dobcsanyi peter@designtheory.org
30
+ # 2009 Carlo Hamalainen carlo.hamalainen@gmail.com
31
+ # ***********************************************************************
35
32
 
36
33
  import sys
37
34
  import xml.parsers.expat
@@ -598,7 +595,6 @@ def _encode_attribute(string):
598
595
  sage: _encode_attribute('E')
599
596
  'E'
600
597
  """
601
-
602
598
  if pattern_integer.match(string):
603
599
  return int(string)
604
600
  elif pattern_decimal.match(string):
@@ -611,8 +607,7 @@ class XTree:
611
607
  '''
612
608
  A lazy class to wrap a rooted tree representing an XML document.
613
609
  The tree's nodes are tuples of the structure:
614
-
615
- (name, {dictionary of attributes}, [list of children])
610
+ (name, {dictionary of attributes}, [list of children])
616
611
 
617
612
  Methods and services of an XTree object ``t``:
618
613
 
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.rings.finite_rings
3
3
  r"""
4
- Group-Divisible Designs (GDD)
4
+ Group-divisible designs (GDD)
5
5
 
6
6
  This module gathers everything related to Group-Divisible Designs. The
7
7
  constructions defined here can be accessed through ``designs.<tab>``::
@@ -365,11 +365,11 @@ class IncidenceStructure:
365
365
  True
366
366
  sage: ["Am", "I", "finally", "done ?"] in IS
367
367
  False
368
- sage: IS = designs.ProjectiveGeometryDesign(3, 1, GF(2), # needs sage.combinat
368
+ sage: IS = designs.ProjectiveGeometryDesign(3, 1, GF(2), # needs sage.combinat sage.modules
369
369
  ....: point_coordinates=False)
370
- sage: [3,8,7] in IS # needs sage.combinat
370
+ sage: [3,8,7] in IS # needs sage.combinat sage.modules
371
371
  True
372
- sage: [3,8,9] in IS # needs sage.combinat
372
+ sage: [3,8,9] in IS # needs sage.combinat sage.modules
373
373
  False
374
374
  """
375
375
  try:
@@ -1508,10 +1508,10 @@ class IncidenceStructure:
1508
1508
  sage: BD.is_t_design(0,6,3,7) or BD.is_t_design(0,7,4,7) or BD.is_t_design(0,7,3,8)
1509
1509
  False
1510
1510
 
1511
- sage: BD = designs.AffineGeometryDesign(3, 1, GF(2)) # needs sage.combinat
1512
- sage: BD.is_t_design(1) # needs sage.combinat
1511
+ sage: BD = designs.AffineGeometryDesign(3, 1, GF(2)) # needs sage.combinat sage.modules
1512
+ sage: BD.is_t_design(1) # needs sage.combinat sage.modules
1513
1513
  True
1514
- sage: BD.is_t_design(2) # needs sage.combinat
1514
+ sage: BD.is_t_design(2) # needs sage.combinat sage.modules
1515
1515
  True
1516
1516
 
1517
1517
  Steiner triple and quadruple systems are other names for `2-(v,3,1)` and
@@ -1924,8 +1924,8 @@ class IncidenceStructure:
1924
1924
  sage: TD.is_resolvable()
1925
1925
  True
1926
1926
 
1927
- sage: AG = designs.AffineGeometryDesign(3,1,GF(2)) # needs sage.combinat
1928
- sage: AG.is_resolvable() # needs sage.combinat
1927
+ sage: AG = designs.AffineGeometryDesign(3,1,GF(2)) # needs sage.combinat sage.modules
1928
+ sage: AG.is_resolvable() # needs sage.combinat sage.modules
1929
1929
  True
1930
1930
 
1931
1931
  Their classes::
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.modules
3
3
  r"""
4
- Mutually Orthogonal Latin Squares (MOLS)
4
+ Mutually orthogonal Latin squares (MOLS)
5
5
 
6
6
  The main function of this module is :func:`mutually_orthogonal_latin_squares`
7
7
  and can be can be used to generate MOLS (or check that they exist)::
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.rings.finite_rings
3
3
  r"""
4
- Resolvable Balanced Incomplete Block Design (RBIBD)
4
+ Resolvable balanced incomplete block design (RBIBD)
5
5
 
6
6
  This module contains everything related to resolvable Balanced Incomplete Block
7
7
  Designs. The constructions implemented here can be obtained through the
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Steiner Quadruple Systems
3
+ Steiner quadruple systems
4
4
 
5
5
  A Steiner Quadruple System on `n` points is a family `SQS_n \subset \binom {[n]}
6
6
  4` of `4`-sets, such that any set `S\subset [n]` of size three is a subset of
@@ -1,9 +1,9 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.graphs sage.modules
3
3
  r"""
4
- Common Automata and Transducers (Finite State Machines Generators)
4
+ Common automata and transducers (finite state machines generators)
5
5
 
6
- Automata and Transducers in Sage can be built through the
6
+ Automata and transducers in Sage can be built through the
7
7
  :class:`automata <AutomatonGenerators>`
8
8
  and :class:`transducers <TransducerGenerators>` objects, respectively.
9
9
  It contains generators for
@@ -1,8 +1,8 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Paths in Directed Acyclic Graphs
3
+ Paths in directed acyclic graphs
4
4
  """
5
- #*****************************************************************************
5
+ # ****************************************************************************
6
6
  # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
7
7
  #
8
8
  # Distributed under the terms of the GNU General Public License (GPL)
@@ -15,7 +15,7 @@ Paths in Directed Acyclic Graphs
15
15
  # The full text of the GPL is available at:
16
16
  #
17
17
  # http://www.gnu.org/licenses/
18
- #*****************************************************************************
18
+ # ****************************************************************************
19
19
 
20
20
  from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
21
21
  from sage.structure.parent import Parent
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  """
3
- Ordered Rooted Trees
3
+ Ordered rooted trees
4
4
 
5
5
  AUTHORS:
6
6
 
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  """
3
- Cartesian products of Posets
3
+ Cartesian products of posets
4
4
 
5
5
  AUTHORS:
6
6
 
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.combinat sage.modules
3
3
  r"""
4
- D-Complete Posets
4
+ D-complete posets
5
5
 
6
6
  AUTHORS:
7
7
 
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Forest Posets
3
+ Forest posets
4
4
 
5
5
  AUTHORS:
6
6
 
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.modules
3
3
  r"""
4
- Incidence Algebras
4
+ Incidence algebras
5
5
  """
6
6
  # ****************************************************************************
7
7
  # Copyright (C) 2014 Travis Scrimshaw <tscrim at ucdavis.edu>
@@ -160,6 +160,8 @@ def _linear_extension_gen(_D, list _le, list _a, list _b, list _is_plus, Py_ssiz
160
160
  if i == -1:
161
161
  return
162
162
 
163
+ import sage.matrix # otherwise there will be a lot of "Exception ignored in: 'linear_extension_iterator._linear_extension_right_b'"
164
+
163
165
  for e in _linear_extension_gen(_D, _le, _a, _b, _is_plus, i-1):
164
166
  yield e
165
167
  mrb = 0
@@ -1,16 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Linear Extensions of Posets
4
-
5
- This module defines two classes:
6
-
7
- - :class:`LinearExtensionOfPoset`
8
- - :class:`LinearExtensionsOfPoset`
9
- - :class:`LinearExtensionsOfPosetWithHooks`
10
- - :class:`LinearExtensionsOfForest`
11
-
12
- Classes and methods
13
- -------------------
3
+ Linear extensions of posets
14
4
  """
15
5
  # ****************************************************************************
16
6
  # Copyright (C) 2012 Anne Schilling <anne at math.ucdavis.edu>
@@ -532,7 +522,7 @@ class LinearExtensionsOfPoset(UniqueRepresentation, Parent):
532
522
  True
533
523
  sage: L._poset is P
534
524
  True
535
- sage: TestSuite(L).run()
525
+ sage: TestSuite(L).run() # needs sage.modules
536
526
 
537
527
  sage: P = Poset((divisors(15), attrcall("divides")))
538
528
  sage: L = P.linear_extensions()
@@ -732,6 +722,7 @@ class LinearExtensionsOfPoset(UniqueRepresentation, Parent):
732
722
 
733
723
  EXAMPLES::
734
724
 
725
+ sage: # needs sage.modules
735
726
  sage: P = Poset(([1,2,3,4], [[1,3],[1,4],[2,3]]), linear_extension=True)
736
727
  sage: L = P.linear_extensions()
737
728
  sage: G = L.markov_chain_digraph(); G
@@ -1,7 +1,7 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  # sage.doctest: needs sage.modules
3
3
  r"""
4
- Möbius Algebras
4
+ Möbius algebras
5
5
  """
6
6
  # ****************************************************************************
7
7
  # Copyright (C) 2014 Travis Scrimshaw <tscrim at ucdavis.edu>,
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-graphs
2
2
  r"""
3
- Rooted (Unordered) Trees
3
+ Rooted (unordered) trees
4
4
 
5
5
  AUTHORS:
6
6
 
@@ -2746,7 +2746,7 @@ def distance_regular_graph(list arr, existence=False, check=True):
2746
2746
  Graph on 1024 vertices
2747
2747
  sage: graphs.distance_regular_graph([6,5,5,5,1,1,1,6]) # optional - database_graphs
2748
2748
  Generalised octagon of order (1, 5): Graph on 312 vertices
2749
- sage: graphs.distance_regular_graph([64, 60, 1, 1, 15, 64], check=True)
2749
+ sage: graphs.distance_regular_graph([64, 60, 1, 1, 15, 64], check=True) # needs sage.libs.gap
2750
2750
  Graph on 325 vertices
2751
2751
  """
2752
2752
  from sage.misc.unknown import Unknown
Binary file
sage/graphs/graph.py CHANGED
@@ -379,7 +379,7 @@ suitable for inclusion in a `\LaTeX` document. More details on this are at the
379
379
 
380
380
  sage: from sage.graphs.graph_latex import check_tkz_graph
381
381
  sage: check_tkz_graph() # random - depends on TeX installation
382
- sage: latex(G)
382
+ sage: latex(G) # needs sage.plot
383
383
  \begin{tikzpicture}
384
384
  ...
385
385
  \end{tikzpicture}
sage/graphs/graph_list.py CHANGED
@@ -19,9 +19,6 @@ AUTHORS:
19
19
  # ****************************************************************************
20
20
 
21
21
 
22
- from sage.misc.misc import try_read
23
-
24
-
25
22
  def from_whatever(data):
26
23
  r"""
27
24
  Return a list of Sage Graphs, given a list of whatever kind of data.
@@ -78,6 +75,8 @@ def _from_whatever(data, fmt=None):
78
75
  if isinstance(data, str):
79
76
  lines = data.splitlines()
80
77
  else:
78
+ from sage.misc.misc import try_read
79
+
81
80
  lines = try_read(data, splitlines=True)
82
81
 
83
82
  if lines is not None and fmt is None:
Binary file
Binary file
@@ -339,7 +339,6 @@ from sage.graphs.digraph import DiGraph
339
339
  from sage.graphs.graph import Graph
340
340
  from sage.misc.functional import det, denominator
341
341
  from sage.misc.lazy_import import lazy_import
342
- from sage.misc.misc import exists
343
342
  from sage.misc.misc_c import prod
344
343
  from sage.misc.temporary_file import tmp_filename
345
344
  from sage.rings.integer import Integer
@@ -1542,7 +1541,7 @@ class Sandpile(DiGraph):
1542
1541
  else:
1543
1542
  rec = list(self.recurrents())
1544
1543
  for r in self.recurrents():
1545
- if exists(rec, lambda x: r > x)[0]:
1544
+ if any(r > x for x in rec):
1546
1545
  rec.remove(r)
1547
1546
  self._min_recurrents = rec
1548
1547