passagemath-modules 10.5.32__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__cp310-cp310-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.

Potentially problematic release.


This version of passagemath-modules might be problematic. Click here for more details.

Files changed (334) hide show
  1. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +51 -46
  2. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +333 -323
  3. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +1 -1
  4. passagemath_modules.dylibs/libgcc_s.1.1.dylib +0 -0
  5. passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
  6. passagemath_modules.dylibs/libgsl.28.dylib +0 -0
  7. passagemath_modules.dylibs/libmpc.3.dylib +0 -0
  8. passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  9. passagemath_modules.dylibs/libquadmath.0.dylib +0 -0
  10. sage/algebras/clifford_algebra.py +2 -2
  11. sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
  12. sage/algebras/clifford_algebra_element.pyx +4 -2
  13. sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
  14. sage/algebras/exterior_algebra_groebner.pyx +2 -0
  15. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
  16. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
  17. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
  18. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
  19. sage/algebras/finite_gca.py +1 -1
  20. sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
  21. sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
  22. sage/algebras/lie_algebras/examples.py +2 -2
  23. sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
  24. sage/algebras/lie_algebras/heisenberg.py +4 -4
  25. sage/algebras/lie_algebras/lie_algebra.py +1 -1
  26. sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
  27. sage/algebras/lie_algebras/lie_algebra_element.pyx +65 -28
  28. sage/algebras/lie_algebras/quotient.py +40 -29
  29. sage/algebras/lie_algebras/subalgebra.py +76 -53
  30. sage/algebras/lie_algebras/verma_module.py +1 -3
  31. sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
  32. sage/algebras/octonion_algebra.pyx +1 -1
  33. sage/algebras/orlik_solomon.py +4 -4
  34. sage/algebras/orlik_terao.py +4 -4
  35. sage/algebras/steenrod/steenrod_algebra.py +37 -30
  36. sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
  37. sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
  38. sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
  39. sage/all__sagemath_modules.py +1 -0
  40. sage/calculus/integration.cpython-310-darwin.so +0 -0
  41. sage/calculus/integration.pyx +6 -5
  42. sage/calculus/interpolation.cpython-310-darwin.so +0 -0
  43. sage/calculus/interpolators.cpython-310-darwin.so +0 -0
  44. sage/calculus/ode.cpython-310-darwin.so +0 -0
  45. sage/calculus/ode.pxd +2 -2
  46. sage/calculus/ode.pyx +6 -4
  47. sage/calculus/riemann.cpython-310-darwin.so +0 -0
  48. sage/calculus/riemann.pyx +68 -48
  49. sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
  50. sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
  51. sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
  52. sage/coding/ag_code_decoders.pyx +31 -31
  53. sage/coding/binary_code.cpython-310-darwin.so +0 -0
  54. sage/coding/binary_code.pxd +6 -6
  55. sage/coding/binary_code.pyx +212 -173
  56. sage/coding/guruswami_sudan/utils.py +3 -5
  57. sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
  58. sage/coding/kasami_codes.pyx +20 -24
  59. sage/coding/linear_code.py +2 -2
  60. sage/coding/linear_code_no_metric.py +5 -5
  61. sage/coding/linear_rank_metric.py +81 -19
  62. sage/combinat/cartesian_product.py +1 -1
  63. sage/combinat/free_module.py +22 -2
  64. sage/combinat/root_system/all.py +1 -1
  65. sage/combinat/root_system/ambient_space.py +1 -1
  66. sage/combinat/root_system/associahedron.py +4 -4
  67. sage/combinat/root_system/braid_move_calculator.py +2 -2
  68. sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
  69. sage/combinat/root_system/braid_orbit.pyx +1 -1
  70. sage/combinat/root_system/branching_rules.py +3 -3
  71. sage/combinat/root_system/cartan_type.py +14 -14
  72. sage/combinat/root_system/coxeter_group.py +3 -3
  73. sage/combinat/root_system/coxeter_matrix.py +1 -1
  74. sage/combinat/root_system/coxeter_type.py +12 -1
  75. sage/combinat/root_system/extended_affine_weyl_group.py +9 -9
  76. sage/combinat/root_system/fundamental_group.py +3 -5
  77. sage/combinat/root_system/hecke_algebra_representation.py +1 -1
  78. sage/combinat/root_system/integrable_representations.py +1 -1
  79. sage/combinat/root_system/pieri_factors.py +3 -3
  80. sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
  81. sage/combinat/root_system/root_lattice_realizations.py +1 -1
  82. sage/combinat/root_system/type_folded.py +3 -3
  83. sage/combinat/root_system/type_reducible.py +8 -7
  84. sage/combinat/root_system/type_super_A.py +2 -2
  85. sage/combinat/root_system/weight_lattice_realizations.py +9 -8
  86. sage/combinat/root_system/weyl_characters.py +2 -2
  87. sage/crypto/__init__.py +1 -0
  88. sage/crypto/block_cipher/des.py +1 -1
  89. sage/crypto/block_cipher/miniaes.py +3 -3
  90. sage/crypto/block_cipher/present.py +3 -3
  91. sage/crypto/block_cipher/sdes.py +3 -3
  92. sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
  93. sage/crypto/boolean_function.pyx +22 -23
  94. sage/crypto/key_exchange/diffie_hellman.py +4 -9
  95. sage/crypto/mq/sr.py +1 -1
  96. sage/crypto/public_key/blum_goldwasser.py +3 -3
  97. sage/crypto/sbox.cpython-310-darwin.so +0 -0
  98. sage/crypto/sbox.pyx +1 -1
  99. sage/crypto/sboxes.py +22 -0
  100. sage/crypto/util.py +4 -6
  101. sage/ext/interpreters/__init__.py +1 -1
  102. sage/ext/interpreters/all__sagemath_modules.py +1 -1
  103. sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
  104. sage/ext/interpreters/wrapper_cc.pxd +5 -5
  105. sage/ext/interpreters/wrapper_cc.pyx +1 -1
  106. sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
  107. sage/ext/interpreters/wrapper_cdf.pxd +5 -7
  108. sage/ext/interpreters/wrapper_cdf.pyx +4 -10
  109. sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
  110. sage/ext/interpreters/wrapper_rdf.pxd +1 -1
  111. sage/ext/interpreters/wrapper_rdf.pyx +1 -1
  112. sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
  113. sage/ext/interpreters/wrapper_rr.pxd +5 -5
  114. sage/ext/interpreters/wrapper_rr.pyx +1 -2
  115. sage/geometry/toric_lattice.py +3 -3
  116. sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
  117. sage/groups/additive_abelian/additive_abelian_group.py +1 -1
  118. sage/groups/additive_abelian/qmodnz.py +4 -4
  119. sage/groups/matrix_gps/coxeter_group.py +17 -4
  120. sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
  121. sage/groups/misc_gps/argument_groups.py +2 -2
  122. sage/groups/misc_gps/imaginary_groups.py +4 -4
  123. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
  124. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
  125. sage/homology/chain_complex.py +0 -2
  126. sage/homology/hochschild_complex.py +3 -3
  127. sage/homology/homology_morphism.py +6 -6
  128. sage/homology/homology_vector_space_with_basis.py +1 -1
  129. sage/libs/gsl/array.cpython-310-darwin.so +0 -0
  130. sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
  131. sage/matrix/action.cpython-310-darwin.so +0 -0
  132. sage/matrix/args.cpython-310-darwin.so +0 -0
  133. sage/matrix/args.pyx +25 -10
  134. sage/matrix/benchmark.py +8 -4
  135. sage/matrix/compute_J_ideal.py +2 -2
  136. sage/matrix/constructor.cpython-310-darwin.so +0 -0
  137. sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
  138. sage/matrix/echelon_matrix.pyx +1 -1
  139. sage/matrix/matrix0.cpython-310-darwin.so +0 -0
  140. sage/matrix/matrix0.pxd +3 -3
  141. sage/matrix/matrix0.pyx +7 -5
  142. sage/matrix/matrix1.cpython-310-darwin.so +0 -0
  143. sage/matrix/matrix1.pyx +87 -48
  144. sage/matrix/matrix2.cpython-310-darwin.so +0 -0
  145. sage/matrix/matrix2.pxd +3 -3
  146. sage/matrix/matrix2.pyx +1261 -63
  147. sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
  148. sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
  149. sage/matrix/matrix_complex_double_dense.pyx +1 -1
  150. sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
  151. sage/matrix/matrix_dense.pyx +2 -3
  152. sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
  153. sage/matrix/matrix_double_dense.pyx +11 -5
  154. sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
  155. sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
  156. sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
  157. sage/matrix/matrix_generic_sparse.pyx +1 -1
  158. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
  159. sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
  160. sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
  161. sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
  162. sage/matrix/matrix_polynomial_dense.pyx +952 -261
  163. sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
  164. sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
  165. sage/matrix/matrix_sparse.pyx +6 -7
  166. sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
  167. sage/matrix/matrix_window.pyx +2 -2
  168. sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
  169. sage/matrix/operation_table.py +0 -2
  170. sage/matrix/special.py +5 -1
  171. sage/matrix/strassen.cpython-310-darwin.so +0 -0
  172. sage/matrix/strassen.pyx +1 -1
  173. sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
  174. sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
  175. sage/matroids/chow_ring.py +68 -65
  176. sage/matroids/chow_ring_ideal.py +41 -38
  177. sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
  178. sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
  179. sage/matroids/database_matroids.py +16 -5
  180. sage/matroids/dual_matroid.py +2 -2
  181. sage/matroids/extension.cpython-310-darwin.so +0 -0
  182. sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
  183. sage/matroids/gammoid.py +1 -1
  184. sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
  185. sage/matroids/graphic_matroid.pyx +3 -3
  186. sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
  187. sage/matroids/lean_matrix.pyx +22 -22
  188. sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
  189. sage/matroids/linear_matroid.pyx +13 -13
  190. sage/matroids/matroid.cpython-310-darwin.so +0 -0
  191. sage/matroids/matroid.pyx +15 -15
  192. sage/matroids/matroids_plot_helpers.py +48 -46
  193. sage/matroids/minor_matroid.py +2 -2
  194. sage/matroids/set_system.cpython-310-darwin.so +0 -0
  195. sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
  196. sage/matroids/transversal_matroid.pyx +3 -3
  197. sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
  198. sage/matroids/union_matroid.pyx +3 -0
  199. sage/matroids/unpickling.cpython-310-darwin.so +0 -0
  200. sage/matroids/utilities.py +2 -2
  201. sage/misc/c3.cpython-310-darwin.so +0 -0
  202. sage/misc/compat.py +1 -2
  203. sage/misc/pickle_old.cpython-310-darwin.so +0 -0
  204. sage/modules/diamond_cutting.py +117 -30
  205. sage/modules/fg_pid/fgp_module.py +3 -3
  206. sage/modules/filtered_vector_space.py +4 -4
  207. sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
  208. sage/modules/fp_graded/free_module.py +2 -2
  209. sage/modules/fp_graded/module.py +2 -2
  210. sage/modules/fp_graded/morphism.py +4 -4
  211. sage/modules/fp_graded/steenrod/morphism.py +1 -1
  212. sage/modules/free_module.py +162 -26
  213. sage/modules/free_module_element.cpython-310-darwin.so +0 -0
  214. sage/modules/free_module_element.pyx +4 -4
  215. sage/modules/free_module_integer.py +2 -2
  216. sage/modules/free_module_morphism.py +3 -3
  217. sage/modules/free_module_pseudohomspace.py +352 -0
  218. sage/modules/free_module_pseudomorphism.py +578 -0
  219. sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
  220. sage/modules/matrix_morphism.py +9 -9
  221. sage/modules/multi_filtered_vector_space.py +4 -4
  222. sage/modules/ore_module.py +2208 -0
  223. sage/modules/ore_module_element.py +178 -0
  224. sage/modules/ore_module_homspace.py +147 -0
  225. sage/modules/ore_module_morphism.py +968 -0
  226. sage/modules/quotient_module.py +11 -1
  227. sage/modules/submodule.py +1 -1
  228. sage/modules/torsion_quadratic_module.py +1 -1
  229. sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
  230. sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
  231. sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
  232. sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
  233. sage/modules/vector_integer_sparse.pyx +4 -4
  234. sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
  235. sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
  236. sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
  237. sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
  238. sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
  239. sage/modules/vector_rational_dense.pyx +1 -1
  240. sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
  241. sage/modules/vector_rational_sparse.pyx +5 -5
  242. sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
  243. sage/modules/vector_space_morphism.py +2 -2
  244. sage/modules/with_basis/cell_module.py +17 -0
  245. sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
  246. sage/modules/with_basis/indexed_element.pyx +1 -1
  247. sage/modules/with_basis/invariant.py +1 -1
  248. sage/modules/with_basis/representation.py +0 -1
  249. sage/modules/with_basis/subquotient.py +2 -2
  250. sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
  251. sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
  252. sage/quadratic_forms/binary_qf.py +11 -11
  253. sage/quadratic_forms/bqf_class_group.py +26 -92
  254. sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
  255. sage/quadratic_forms/extras.py +1 -1
  256. sage/quadratic_forms/quadratic_form.py +5 -4
  257. sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
  258. sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
  259. sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
  260. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
  261. sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
  262. sage/quadratic_forms/ternary_qf.py +50 -83
  263. sage/rings/cfinite_sequence.py +16 -17
  264. sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
  265. sage/rings/complex_double.cpython-310-darwin.so +0 -0
  266. sage/rings/complex_double.pxd +1 -0
  267. sage/rings/complex_double.pyx +37 -32
  268. sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
  269. sage/rings/complex_mpc.pyx +27 -23
  270. sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
  271. sage/rings/complex_mpfr.pyx +11 -11
  272. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
  273. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
  274. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
  275. sage/rings/function_field/drinfeld_modules/homset.py +1 -2
  276. sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
  277. sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
  278. sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
  279. sage/rings/function_field/khuri_makdisi.pyx +27 -25
  280. sage/rings/invariants/invariant_theory.py +61 -60
  281. sage/rings/invariants/reconstruction.py +8 -8
  282. sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
  283. sage/rings/polynomial/ore_function_element.py +1 -1
  284. sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
  285. sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
  286. sage/rings/polynomial/ore_polynomial_ring.py +134 -17
  287. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
  288. sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
  289. sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
  290. sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
  291. sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
  292. sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
  293. sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
  294. sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
  295. sage/rings/real_mpfr.pyx +25 -7
  296. sage/rings/ring_extension.cpython-310-darwin.so +0 -0
  297. sage/rings/ring_extension.pyx +4 -2
  298. sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
  299. sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
  300. sage/rings/ring_extension_element.pyx +42 -0
  301. sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
  302. sage/schemes/all__sagemath_modules.py +1 -0
  303. sage/schemes/projective/all__sagemath_modules.py +1 -0
  304. sage/schemes/projective/coherent_sheaf.py +300 -0
  305. sage/schemes/projective/cohomology.py +510 -0
  306. sage/stats/basic_stats.py +17 -15
  307. sage/stats/distributions/dgs_misc.h +11 -4
  308. sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
  309. sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
  310. sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
  311. sage/stats/hmm/chmm.pyx +13 -13
  312. sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
  313. sage/stats/hmm/distributions.pxd +3 -3
  314. sage/stats/hmm/distributions.pyx +3 -3
  315. sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
  316. sage/stats/hmm/hmm.pxd +3 -3
  317. sage/stats/hmm/hmm.pyx +6 -6
  318. sage/stats/hmm/util.cpython-310-darwin.so +0 -0
  319. sage/stats/hmm/util.pyx +6 -6
  320. sage/stats/intlist.cpython-310-darwin.so +0 -0
  321. sage/stats/intlist.pxd +3 -3
  322. sage/stats/time_series.cpython-310-darwin.so +0 -0
  323. sage/tensor/modules/alternating_contr_tensor.py +3 -3
  324. sage/tensor/modules/comp.py +3 -3
  325. sage/tensor/modules/ext_pow_free_module.py +3 -3
  326. sage/tensor/modules/format_utilities.py +3 -3
  327. sage/tensor/modules/free_module_linear_group.py +3 -3
  328. sage/tensor/modules/free_module_morphism.py +0 -1
  329. sage/tensor/modules/tensor_free_module.py +3 -3
  330. sage/tensor/modules/tensor_free_submodule.py +1 -1
  331. sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
  332. sage/tensor/modules/tensor_with_indices.py +5 -5
  333. passagemath_modules.dylibs/libopenblas_armv8p-r0.3.28.dylib +0 -0
  334. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
sage/matroids/gammoid.py CHANGED
@@ -47,7 +47,7 @@ AUTHORS:
47
47
  # Distributed under the terms of the GNU General Public License (GPL)
48
48
  # as published by the Free Software Foundation; either version 2 of
49
49
  # the License, or (at your option) any later version.
50
- # http://www.gnu.org/licenses/
50
+ # https://www.gnu.org/licenses/
51
51
  # *****************************************************************************
52
52
 
53
53
  from sage.graphs.digraph import DiGraph
@@ -654,7 +654,7 @@ cdef class GraphicMatroid(Matroid):
654
654
  DS_vertices = DisjointSet_of_hashables(all_vertices)
655
655
  for u, v, l in not_our_edges:
656
656
  DS_vertices.union(u, v)
657
- return len(X) - (DS_vertices.number_of_subsets() - Integer(1))
657
+ return len(X) - (DS_vertices.number_of_subsets() - 1)
658
658
 
659
659
  cpdef bint _is_circuit(self, frozenset X) noexcept:
660
660
  """
@@ -1703,9 +1703,9 @@ cdef class GraphicMatroid(Matroid):
1703
1703
  # If a vertex has degree 1, or 2, or 3, we already handled it.
1704
1704
  for u in vertices:
1705
1705
  if G.degree(u) > 3:
1706
- elts_incident = [l for (_, _, l) in G.edges_incident(u)]
1706
+ elts_incident = [l for _, _, l in G.edges_incident(u)]
1707
1707
  x = elts_incident.pop()
1708
- for i in range(1, (len(elts_incident) - Integer(1))):
1708
+ for i in range(1, len(elts_incident) - 1):
1709
1709
  groups = combinations(elts_incident, i)
1710
1710
  for g in groups:
1711
1711
  g = list(g)
@@ -167,7 +167,7 @@ cdef class LeanMatrix:
167
167
  cdef long i, j
168
168
  cdef LeanMatrix A = type(self)(self.nrows(), self.ncols() + self.nrows())
169
169
  for i in range(self.nrows()):
170
- A.set_unsafe(i, i, self.base_ring()(1))
170
+ A.set_unsafe(i, i, self.base_ring().one())
171
171
  for j in range(self.ncols()):
172
172
  A.set_unsafe(i, self.nrows() + j, self.get_unsafe(i, j))
173
173
  return A
@@ -209,9 +209,9 @@ cdef class LeanMatrix:
209
209
  sage: A.base_ring()
210
210
  Traceback (most recent call last):
211
211
  ...
212
- NotImplementedError: subclasses need to implement this.
212
+ NotImplementedError: subclasses need to implement this
213
213
  """
214
- raise NotImplementedError("subclasses need to implement this.")
214
+ raise NotImplementedError("subclasses need to implement this")
215
215
 
216
216
  cpdef characteristic(self):
217
217
  """
@@ -358,7 +358,7 @@ cdef class LeanMatrix:
358
358
  and compatible dimensions.
359
359
  """
360
360
  cdef LeanMatrix A = type(self)(self.nrows(), other.ncols())
361
- cdef i, j, k
361
+ cdef long i, j, k
362
362
  for i in range(self.nrows()):
363
363
  for j in range(other.ncols()):
364
364
  for k in range(self.ncols()):
@@ -488,9 +488,9 @@ cdef class LeanMatrix:
488
488
  sage: A == loads(dumps(A)) # indirect doctest
489
489
  Traceback (most recent call last):
490
490
  ...
491
- NotImplementedError: subclasses need to implement this.
491
+ NotImplementedError: subclasses need to implement this
492
492
  """
493
- raise NotImplementedError("subclasses need to implement this.")
493
+ raise NotImplementedError("subclasses need to implement this")
494
494
 
495
495
  cdef shifting_all(self, P_rows, P_cols, Q_rows, Q_cols, int m):
496
496
  r"""
@@ -697,8 +697,8 @@ cdef class GenericMatrix(LeanMatrix):
697
697
  # Default:
698
698
  if self._base_ring is None:
699
699
  self._base_ring = ZZ
700
- self._zero = self._base_ring(0)
701
- self._one = self._base_ring(1)
700
+ self._zero = self._base_ring.zero()
701
+ self._one = self._base_ring.one()
702
702
  self._entries = [self._zero] * nrows * ncols
703
703
  if M is not None:
704
704
  if isinstance(M, GenericMatrix):
@@ -996,8 +996,8 @@ cdef class BinaryMatrix(LeanMatrix):
996
996
  global GF2, GF2_zero, GF2_one, GF2_not_defined
997
997
  if GF2_not_defined:
998
998
  GF2 = GF(2)
999
- GF2_zero = GF2(0)
1000
- GF2_one = GF2(1)
999
+ GF2_zero = GF2.zero()
1000
+ GF2_one = GF2.one()
1001
1001
  GF2_not_defined = False
1002
1002
  if M is not None:
1003
1003
  if isinstance(M, BinaryMatrix):
@@ -1434,7 +1434,7 @@ cdef class BinaryMatrix(LeanMatrix):
1434
1434
  if s_eq.nrows() != o_eq.nrows():
1435
1435
  return False
1436
1436
  if s_eq.nrows() == s_eq.ncols(): # s_eq and o_eq partition into singletons
1437
- morph = [0 for i in range(self._nrows)]
1437
+ morph = [0 for _ in range(self._nrows)]
1438
1438
  for i in range(self._nrows):
1439
1439
  morph[bitset_first(s_eq._M[i])] = bitset_first(o_eq._M[i])
1440
1440
  for i in range(self._nrows):
@@ -1581,8 +1581,8 @@ cdef class TernaryMatrix(LeanMatrix):
1581
1581
  global GF3, GF3_zero, GF3_one, GF3_minus_one, GF3_not_defined
1582
1582
  if GF3_not_defined:
1583
1583
  GF3 = GF(3)
1584
- GF3_zero = GF3(0)
1585
- GF3_one = GF3(1)
1584
+ GF3_zero = GF3.zero()
1585
+ GF3_one = GF3.one()
1586
1586
  GF3_minus_one = GF3(2)
1587
1587
  GF3_not_defined = False
1588
1588
 
@@ -2171,8 +2171,8 @@ cdef class QuaternaryMatrix(LeanMatrix):
2171
2171
  if M is not None:
2172
2172
  if isinstance(M, QuaternaryMatrix):
2173
2173
  self._gf4 = (<QuaternaryMatrix>M)._gf4
2174
- self._zero = self._gf4(0)
2175
- self._one = self._gf4(1)
2174
+ self._zero = self._gf4.zero()
2175
+ self._one = self._gf4.one()
2176
2176
  self._x_zero = self._gf4.gens()[0]
2177
2177
  self._x_one = self._x_zero + self._one
2178
2178
  for i in range((<QuaternaryMatrix>M)._nrows):
@@ -2180,8 +2180,8 @@ cdef class QuaternaryMatrix(LeanMatrix):
2180
2180
  bitset_copy(self._M1[i], (<QuaternaryMatrix>M)._M1[i])
2181
2181
  elif isinstance(M, LeanMatrix):
2182
2182
  self._gf4 = (<LeanMatrix>M).base_ring()
2183
- self._zero = self._gf4(0)
2184
- self._one = self._gf4(1)
2183
+ self._zero = self._gf4.zero()
2184
+ self._one = self._gf4.one()
2185
2185
  self._x_zero = self._gf4.gens()[0]
2186
2186
  self._x_one = self._x_zero + self._one
2187
2187
  for i in range(M.nrows()):
@@ -2189,19 +2189,19 @@ cdef class QuaternaryMatrix(LeanMatrix):
2189
2189
  self.set(i, j, (<LeanMatrix>M).get_unsafe(i, j))
2190
2190
  elif isinstance(M, Matrix):
2191
2191
  self._gf4 = (<Matrix>M).base_ring()
2192
- self._zero = self._gf4(0)
2193
- self._one = self._gf4(1)
2192
+ self._zero = self._gf4.zero()
2193
+ self._one = self._gf4.one()
2194
2194
  self._x_zero = self._gf4.gens()[0]
2195
2195
  self._x_one = self._x_zero + self._one
2196
2196
  for i in range(M.nrows()):
2197
2197
  for j in range(M.ncols()):
2198
2198
  self.set(i, j, (<Matrix>M).get_unsafe(i, j))
2199
2199
  else:
2200
- raise TypeError("unrecognized input type.")
2200
+ raise TypeError("unrecognized input type")
2201
2201
  else:
2202
2202
  self._gf4 = ring
2203
- self._zero = self._gf4(0)
2204
- self._one = self._gf4(1)
2203
+ self._zero = self._gf4.zero()
2204
+ self._one = self._gf4.one()
2205
2205
  self._x_zero = self._gf4.gens()[0]
2206
2206
  self._x_one = self._x_zero + self._one
2207
2207
 
@@ -879,8 +879,8 @@ cdef class LinearMatroid(BasisExchangeMatroid):
879
879
  try:
880
880
  if GF2_not_defined:
881
881
  GF2 = GF(2)
882
- GF2_zero = GF2(0)
883
- GF2_one = GF2(1)
882
+ GF2_zero = GF2.zero()
883
+ GF2_one = GF2.one()
884
884
  GF2_not_defined = False
885
885
  except ImportError:
886
886
  pass
@@ -1333,8 +1333,8 @@ cdef class LinearMatroid(BasisExchangeMatroid):
1333
1333
  sage: M = Matroid(groundset='abcdefgh', ring=GF(5),
1334
1334
  ....: reduced_matrix=[[2, 1, 1, 0],
1335
1335
  ....: [1, 1, 0, 1], [1, 0, 1, 1], [0, 1, 1, 2]])
1336
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
1337
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c']))
1336
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
1337
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
1338
1338
  Linear matroid of rank 3 on 5 elements represented over the Finite
1339
1339
  Field of size 5
1340
1340
  """
@@ -2848,7 +2848,7 @@ cdef class LinearMatroid(BasisExchangeMatroid):
2848
2848
  if sol:
2849
2849
  if certificate:
2850
2850
  (certX, certY) = cert_pair
2851
- cert = set([])
2851
+ cert = set()
2852
2852
  for x in certX:
2853
2853
  cert.add(dX[x])
2854
2854
  for y in certY:
@@ -3101,8 +3101,8 @@ cdef class BinaryMatroid(LinearMatroid):
3101
3101
  global GF2, GF2_zero, GF2_one, GF2_not_defined
3102
3102
  if GF2_not_defined:
3103
3103
  GF2 = GF(2)
3104
- GF2_zero = GF2(0)
3105
- GF2_one = GF2(1)
3104
+ GF2_zero = GF2.zero()
3105
+ GF2_one = GF2.one()
3106
3106
  GF2_not_defined = False
3107
3107
 
3108
3108
  # Setup representation; construct displayed basis
@@ -3785,8 +3785,8 @@ cdef class BinaryMatroid(LinearMatroid):
3785
3785
  EXAMPLES::
3786
3786
 
3787
3787
  sage: M = matroids.catalog.Fano()
3788
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
3789
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c']))
3788
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
3789
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
3790
3790
  Binary matroid of rank 2 on 4 elements, type (0, 6)
3791
3791
  """
3792
3792
  self._move_current_basis(contractions, deletions)
@@ -4820,8 +4820,8 @@ cdef class TernaryMatroid(LinearMatroid):
4820
4820
  EXAMPLES::
4821
4821
 
4822
4822
  sage: M = matroids.catalog.P8()
4823
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
4824
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c']))
4823
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
4824
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
4825
4825
  Ternary matroid of rank 3 on 5 elements, type 0-
4826
4826
  """
4827
4827
  self._move_current_basis(contractions, deletions)
@@ -5588,8 +5588,8 @@ cdef class QuaternaryMatroid(LinearMatroid):
5588
5588
  EXAMPLES::
5589
5589
 
5590
5590
  sage: M = matroids.catalog.Q10() # needs sage.rings.finite_rings
5591
- sage: N = M._minor(contractions=set(['a']), deletions=set([])) # needs sage.rings.finite_rings
5592
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c'])) # needs sage.rings.finite_rings
5591
+ sage: N = M._minor(contractions=set(['a']), deletions=set()) # needs sage.rings.finite_rings
5592
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c'])) # needs sage.rings.finite_rings
5593
5593
  Quaternary matroid of rank 4 on 7 elements
5594
5594
  """
5595
5595
  self._move_current_basis(contractions, deletions)
Binary file
sage/matroids/matroid.pyx CHANGED
@@ -906,7 +906,7 @@ cdef class Matroid(SageObject):
906
906
  True
907
907
  """
908
908
  cdef set XX = set(X)
909
- cdef set res = set([])
909
+ cdef set res = set()
910
910
  cdef int r = self._rank(frozenset(X))
911
911
  for e in Y:
912
912
  XX.add(e)
@@ -1167,8 +1167,8 @@ cdef class Matroid(SageObject):
1167
1167
  EXAMPLES::
1168
1168
 
1169
1169
  sage: M = matroids.catalog.Vamos()
1170
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
1171
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c']))
1170
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
1171
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
1172
1172
  M / {'a'} \ {'b', 'c'}, where M is Vamos:
1173
1173
  Matroid of rank 4 on 8 elements with circuit-closures
1174
1174
  {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'},
@@ -2615,7 +2615,7 @@ cdef class Matroid(SageObject):
2615
2615
  sage: [sorted(X) for X in CC[3]]
2616
2616
  [['a', 'b', 'c', 'd', 'e', 'f', 'g']]
2617
2617
  """
2618
- CC = [set([]) for r in range(self.rank() + 1)]
2618
+ CC = [set() for r in range(self.rank() + 1)]
2619
2619
  for C in self.circuits_iterator():
2620
2620
  CC[len(C) - 1].add(self.closure(C))
2621
2621
  return {r: CC[r] for r in range(self.rank() + 1) if CC[r]}
@@ -2646,7 +2646,7 @@ cdef class Matroid(SageObject):
2646
2646
  ...
2647
2647
  KeyError: 3
2648
2648
  """
2649
- CC = [set([]) for r in range(self.rank() + 1)]
2649
+ CC = [set() for r in range(self.rank() + 1)]
2650
2650
  for C in self.nonspanning_circuits_iterator():
2651
2651
  CC[len(C) - 1].add(self.closure(C))
2652
2652
  return {r: CC[r] for r in range(self.rank() + 1) if CC[r]}
@@ -4960,7 +4960,7 @@ cdef class Matroid(SageObject):
4960
4960
  """
4961
4961
  E = set(self.groundset())
4962
4962
  E.difference_update(self._closure(frozenset())) # groundset minus loops
4963
- res = set([])
4963
+ res = set()
4964
4964
 
4965
4965
  while E:
4966
4966
  e = E.pop()
@@ -4996,7 +4996,7 @@ cdef class Matroid(SageObject):
4996
4996
  """
4997
4997
  E = set(self.groundset())
4998
4998
  E.difference_update(self._coclosure(frozenset())) # groundset minus coloops
4999
- res = set([])
4999
+ res = set()
5000
5000
 
5001
5001
  while E:
5002
5002
  e = E.pop()
@@ -5428,7 +5428,7 @@ cdef class Matroid(SageObject):
5428
5428
  for R1 in map(set, combinations(R, r2)):
5429
5429
  R2 = R - R1
5430
5430
  # F is the set of elements cannot be in the extension of Q1
5431
- F = set([])
5431
+ F = set()
5432
5432
  U = E - R
5433
5433
  # if Q1|R1 is full
5434
5434
  if m-len(Q1)-len(R1) == 0:
@@ -5941,14 +5941,14 @@ cdef class Matroid(SageObject):
5941
5941
  ....: [0,0,0,0,1,1,1,1,0,0,1,1],
5942
5942
  ....: [0,0,0,0,0,0,0,0,1,1,1,1]])
5943
5943
  sage: M._shifting_all(M.basis(),
5944
- ....: set([0,1]), set([0,1]), set([]), set([]), 3)
5944
+ ....: set([0,1]), set([0,1]), set(), set(), 3)
5945
5945
  (False, None)
5946
5946
  sage: M = Matroid(field=GF(2), reduced_matrix=[[1,0,1,1,1],
5947
5947
  ....: [1,1,1,1,0],
5948
5948
  ....: [0,1,1,1,0],
5949
5949
  ....: [0,0,0,1,1]])
5950
5950
  sage: M._shifting_all(M.basis(),
5951
- ....: set([0,1]), set([5,8]), set([]), set([]), 3)[0]
5951
+ ....: set([0,1]), set([5,8]), set(), set(), 3)[0]
5952
5952
  True
5953
5953
  """
5954
5954
  Y = self.groundset()-X
@@ -6002,14 +6002,14 @@ cdef class Matroid(SageObject):
6002
6002
  ....: [0,0,0,0,1,1,1,1,0,0,1,1],
6003
6003
  ....: [0,0,0,0,0,0,0,0,1,1,1,1]])
6004
6004
  sage: M._shifting(M.basis(),
6005
- ....: set([0,1]), set([0,1]), set([]), set([]), 3)
6005
+ ....: set([0,1]), set([0,1]), set(), set(), 3)
6006
6006
  (False, None)
6007
6007
  sage: M = Matroid(field=GF(2), reduced_matrix=[[1,0,1,1,1],
6008
6008
  ....: [1,1,1,1,0],
6009
6009
  ....: [0,1,1,1,0],
6010
6010
  ....: [0,0,0,1,1]])
6011
6011
  sage: M._shifting(M.basis(),
6012
- ....: set([0,1]), set([5,8]), set([]), set([4]), 3)[0]
6012
+ ....: set([0,1]), set([5,8]), set(), set([4]), 3)[0]
6013
6013
  True
6014
6014
  """
6015
6015
 
@@ -7039,7 +7039,7 @@ cdef class Matroid(SageObject):
7039
7039
  raise ValueError("nonnegative weights were expected.")
7040
7040
  wt = sorted(wt, reverse=True)
7041
7041
  Y = [e for (w, e) in wt]
7042
- res = set([])
7042
+ res = set()
7043
7043
  r = 0
7044
7044
  for e in Y:
7045
7045
  res.add(e)
@@ -8018,8 +8018,8 @@ cdef class Matroid(SageObject):
8018
8018
  a = x
8019
8019
  b = y
8020
8020
  R = ZZ['x, y']
8021
- x, y = R._first_ngens(2)
8022
- T = R(0)
8021
+ x, y = R.gens()
8022
+ T = R.zero()
8023
8023
  for B in self.bases_iterator():
8024
8024
  T += x ** len(self._internal(B)) * y ** len(self._external(B))
8025
8025
  if a is not None and b is not None:
@@ -72,17 +72,16 @@ EXAMPLES::
72
72
  # https://www.gnu.org/licenses/
73
73
  # *****************************************************************************
74
74
 
75
- import scipy
76
- import scipy.interpolate
77
- import numpy as np
75
+ from sage.matroids.advanced import newlabel
78
76
  from sage.misc.lazy_import import lazy_import
79
- lazy_import("sage.plot.all", ["Graphics", "line", "text", "polygon2d", "point", "points"])
80
- lazy_import("sage.plot.colors", "Color")
81
77
  from sage.sets.set import Set
82
- from sage.matroids.advanced import newlabel
83
78
 
79
+ lazy_import("sage.plot.all", ["Graphics", "line", "text",
80
+ "polygon2d", "point", "points"])
81
+ lazy_import("sage.plot.colors", "Color")
84
82
 
85
- def it(M, B1, nB1, lps):
83
+
84
+ def it(M, B1, nB1, lps) -> tuple[dict, list, list, list]:
86
85
  r"""
87
86
  Return points on and off the triangle and lines to be drawn for a rank 3
88
87
  matroid.
@@ -179,7 +178,7 @@ def it(M, B1, nB1, lps):
179
178
  return pts, trilines, nontripts, curvedlines
180
179
 
181
180
 
182
- def trigrid(tripts):
181
+ def trigrid(tripts) -> list[list]:
183
182
  """
184
183
  Return a grid of 4 points inside given 3 points as a list.
185
184
 
@@ -206,7 +205,7 @@ def trigrid(tripts):
206
205
 
207
206
  .. NOTE::
208
207
 
209
- This method does NOT do any checks.
208
+ This method does NOT do any checks.
210
209
  """
211
210
  pairs = [[0, 1], [1, 2], [0, 2]]
212
211
  cpt = [float(tripts[0][0] + tripts[1][0] + tripts[2][0]) / 3,
@@ -219,7 +218,7 @@ def trigrid(tripts):
219
218
  return grid
220
219
 
221
220
 
222
- def addnontripts(tripts_labels, nontripts_labels, ptsdict):
221
+ def addnontripts(tripts_labels, nontripts_labels, ptsdict) -> dict:
223
222
  """
224
223
  Return modified ``ptsdict`` with additional keys and values corresponding
225
224
  to ``nontripts``.
@@ -261,16 +260,16 @@ def addnontripts(tripts_labels, nontripts_labels, ptsdict):
261
260
 
262
261
  .. NOTE::
263
262
 
264
- This method does NOT do any checks.
263
+ This method does NOT do any checks.
265
264
  """
266
265
  tripts = [list(ptsdict[p]) for p in tripts_labels]
267
266
  pairs = [[0, 1], [1, 2], [0, 2]]
268
267
  q = [tripts]
269
268
  num = len(nontripts_labels)
270
- gridpts = [[float((tripts[0][0]+tripts[1][0]+tripts[2][0])/3),
271
- float(tripts[0][1]+tripts[1][1]+tripts[2][1])/3]]
269
+ gridpts = [[float((tripts[0][0] + tripts[1][0] + tripts[2][0]) / 3),
270
+ float(tripts[0][1] + tripts[1][1] + tripts[2][1]) / 3]]
272
271
  n = 0
273
- while n < num+1:
272
+ while n < num + 1:
274
273
  g = trigrid(q[0])
275
274
  q.extend([[g[0], q[0][pairs[0][0]], q[0][pairs[0][1]]],
276
275
  [g[0], q[0][pairs[1][0]], q[0][pairs[1][1]]],
@@ -286,7 +285,7 @@ def addnontripts(tripts_labels, nontripts_labels, ptsdict):
286
285
  return ptsdict
287
286
 
288
287
 
289
- def createline(ptsdict, ll, lineorders2=None):
288
+ def createline(ptsdict, ll, lineorders2=None) -> tuple[list, list, list, list]:
290
289
  """
291
290
  Return ordered lists of coordinates of points to be traversed to draw a
292
291
  2D line.
@@ -335,8 +334,12 @@ def createline(ptsdict, ll, lineorders2=None):
335
334
 
336
335
  .. NOTE::
337
336
 
338
- This method does NOT do any checks.
337
+ This method does NOT do any checks.
339
338
  """
339
+ import scipy
340
+ import scipy.interpolate
341
+ import numpy as np
342
+
340
343
  x, lo = line_hasorder(ll, lineorders2)
341
344
  flip = False
342
345
  if not x:
@@ -368,7 +371,7 @@ def createline(ptsdict, ll, lineorders2=None):
368
371
  return sortedx, sortedy, x_i, y_i
369
372
 
370
373
 
371
- def slp(M1, pos_dict=None, B=None):
374
+ def slp(M1, pos_dict=None, B=None) -> tuple:
372
375
  """
373
376
  Return simple matroid, loops and parallel elements of given matroid.
374
377
 
@@ -396,7 +399,7 @@ def slp(M1, pos_dict=None, B=None):
396
399
  sage: M1 = Matroid(ring=GF(2), matrix=[[1, 0, 0, 0, 1, 1, 1,0,1,0,1],
397
400
  ....: [0, 1, 0, 1, 0, 1, 1,0,0,1,0],
398
401
  ....: [0, 0, 1, 1, 1, 0, 1,0,0,0,0]])
399
- sage: [M,L,P] = matroids_plot_helpers.slp(M1) # needs sage.rings.finite_rings
402
+ sage: M, L, P = matroids_plot_helpers.slp(M1) # needs sage.rings.finite_rings
400
403
  sage: M.is_simple() # needs sage.rings.finite_rings
401
404
  True
402
405
  sage: setprint([L,P]) # needs sage.rings.finite_rings
@@ -406,7 +409,7 @@ def slp(M1, pos_dict=None, B=None):
406
409
  ....: [0, 0, 1, 1, 1, 0, 1,0,0,0,0]])
407
410
  sage: posdict = {8: (0, 0), 1: (2, 0), 2: (1, 2), 3: (1.5, 1.0),
408
411
  ....: 4: (0.5, 1.0), 5: (1.0, 0.0), 6: (1.0, 0.6666666666666666)}
409
- sage: [M,L,P] = matroids_plot_helpers.slp(M1, pos_dict=posdict) # needs sage.rings.finite_rings
412
+ sage: M, L, P = matroids_plot_helpers.slp(M1, pos_dict=posdict) # needs sage.rings.finite_rings
410
413
  sage: M.is_simple() # needs sage.rings.finite_rings
411
414
  True
412
415
  sage: setprint([L,P]) # needs sage.rings.finite_rings
@@ -414,23 +417,23 @@ def slp(M1, pos_dict=None, B=None):
414
417
 
415
418
  .. NOTE::
416
419
 
417
- This method does NOT do any checks.
420
+ This method does NOT do any checks.
418
421
  """
419
422
  L = set(M1.loops())
420
423
  nP = L | set(M1.simplify().groundset())
421
- P = set(M1.groundset())-nP
424
+ P = set(M1.groundset()) - nP
422
425
  if P:
423
426
  if pos_dict is not None:
424
- pcls = list(set([frozenset(set(M1.closure([p])) - L)
425
- for p in list(P)]))
427
+ pcls = list({frozenset(set(M1.closure([p])) - L)
428
+ for p in list(P)})
426
429
  newP = []
427
430
  for pcl in pcls:
428
431
  pcl_in_dict = [p for p in list(pcl) if p in pos_dict.keys()]
429
- newP.extend(list(pcl-set([pcl_in_dict[0]])))
432
+ newP.extend(list(pcl - set([pcl_in_dict[0]])))
430
433
  return [M1.delete(L | set(newP)), L, set(newP)]
431
434
  elif B is not None:
432
- pcls = list(set([frozenset(set(M1.closure([p])) - L)
433
- for p in list(P)]))
435
+ pcls = list({frozenset(set(M1.closure([p])) - L)
436
+ for p in list(P)})
434
437
  newP = []
435
438
  for pcl in pcls:
436
439
  pcl_list = list(pcl)
@@ -446,7 +449,7 @@ def slp(M1, pos_dict=None, B=None):
446
449
  return [M1.delete(L | P), L, P]
447
450
 
448
451
 
449
- def addlp(M, M1, L, P, ptsdict, G=None, limits=None):
452
+ def addlp(M, M1, L, P, ptsdict, G=None, limits=None) -> tuple:
450
453
  """
451
454
  Return a graphics object containing loops (in inset) and parallel elements
452
455
  of matroid.
@@ -477,13 +480,13 @@ def addlp(M, M1, L, P, ptsdict, G=None, limits=None):
477
480
  sage: M = Matroid(ring=GF(2), matrix=[[1, 0, 0, 0, 1, 1, 1,0,1],
478
481
  ....: [0, 1, 0, 1, 0, 1, 1,0,0],
479
482
  ....: [0, 0, 1, 1, 1, 0, 1,0,0]])
480
- sage: [M1,L,P] = matroids_plot_helpers.slp(M) # needs sage.rings.finite_rings
483
+ sage: M1, L, P = matroids_plot_helpers.slp(M) # needs sage.rings.finite_rings
481
484
  sage: G, lims = matroids_plot_helpers.addlp(M,M1,L,P,{0:(0,0)}) # needs sage.plot sage.rings.finite_rings
482
485
  sage: G.show(axes=False) # needs sage.plot sage.rings.finite_rings
483
486
 
484
487
  .. NOTE::
485
488
 
486
- This method does NOT do any checks.
489
+ This method does NOT do any checks.
487
490
  """
488
491
  if G is None:
489
492
  G = Graphics()
@@ -552,7 +555,7 @@ def addlp(M, M1, L, P, ptsdict, G=None, limits=None):
552
555
  return G, limits
553
556
 
554
557
 
555
- def line_hasorder(l, lodrs=None):
558
+ def line_hasorder(l, lodrs=None) -> tuple[bool, list]:
556
559
  """
557
560
  Determine if an order is specified for a line.
558
561
 
@@ -582,7 +585,7 @@ def line_hasorder(l, lodrs=None):
582
585
 
583
586
  .. NOTE::
584
587
 
585
- This method does NOT do any checks.
588
+ This method does NOT do any checks.
586
589
  """
587
590
  if lodrs is not None:
588
591
  set_l = Set(l)
@@ -593,7 +596,7 @@ def line_hasorder(l, lodrs=None):
593
596
  return False, []
594
597
 
595
598
 
596
- def lineorders_union(lineorders1, lineorders2):
599
+ def lineorders_union(lineorders1, lineorders2) -> list:
597
600
  """
598
601
  Return a list of ordered lists of ground set elements that corresponds to
599
602
  union of two sets of ordered lists of ground set elements in a sense.
@@ -634,7 +637,7 @@ def lineorders_union(lineorders1, lineorders2):
634
637
  return None
635
638
 
636
639
 
637
- def posdict_is_sane(M1, pos_dict):
640
+ def posdict_is_sane(M1, pos_dict) -> bool:
638
641
  """
639
642
  Return a boolean establishing sanity of ``posdict`` wrt matroid ``M``.
640
643
 
@@ -666,25 +669,24 @@ def posdict_is_sane(M1, pos_dict):
666
669
 
667
670
  .. NOTE::
668
671
 
669
- This method does NOT do any checks. ``M1`` is assumed to be a
670
- matroid and ``posdict`` is assumed to be a dictionary.
672
+ This method does NOT do any checks. ``M1`` is assumed to be a
673
+ matroid and ``posdict`` is assumed to be a dictionary.
671
674
  """
672
675
  L = set(M1.loops())
673
676
  nP = L | set(M1.simplify().groundset())
674
- P = set(M1.groundset())-nP
675
- pcls = list(set([frozenset(set(M1.closure([p])) - L) for p in list(P)]))
677
+ P = set(M1.groundset()) - nP
678
+ pcls = list({frozenset(set(M1.closure([p])) - L) for p in list(P)})
676
679
  for pcl in pcls:
677
- pcl_list = list(pcl)
678
- if not any(x in pos_dict for x in pcl_list):
680
+ if not any(x in pos_dict for x in pcl):
679
681
  return False
680
682
  allP = []
681
683
  for pcl in pcls:
682
- allP.extend(list(pcl))
684
+ allP.extend(pcl)
683
685
  return all(x in pos_dict
684
686
  for x in list(set(M1.groundset()) - (L | set(allP))))
685
687
 
686
688
 
687
- def tracklims(lims, x_i=[], y_i=[]):
689
+ def tracklims(lims, x_i=[], y_i=[]) -> list:
688
690
  """
689
691
  Return modified limits list.
690
692
 
@@ -705,12 +707,12 @@ def tracklims(lims, x_i=[], y_i=[]):
705
707
 
706
708
  .. NOTE::
707
709
 
708
- This method does NOT do any checks.
710
+ This method does NOT do any checks.
709
711
  """
710
712
  if lims is not None and lims[0] is not None and lims[1] is not None and \
711
713
  lims[2] is not None and lims[3] is not None:
712
- lims = [min(min(x_i), lims[0]), max(max(x_i), lims[1]),
713
- min(min(y_i), lims[2]), max(max(y_i), lims[3])]
714
+ lims = [min(*x_i, lims[0]), max(*x_i, lims[1]),
715
+ min(*y_i, lims[2]), max(*y_i, lims[3])]
714
716
  else:
715
717
  lims = [min(x_i), max(x_i), min(y_i), max(y_i)]
716
718
  return lims
@@ -753,11 +755,11 @@ def geomrep(M1, B1=None, lineorders1=None, pd=None, sp=False):
753
755
 
754
756
  .. NOTE::
755
757
 
756
- This method does NOT do any checks.
758
+ This method does NOT do any checks.
757
759
  """
758
760
  G = Graphics()
759
761
  # create lists of loops and parallel elements and simplify given matroid
760
- [M, L, P] = slp(M1, pos_dict=pd, B=B1)
762
+ M, L, P = slp(M1, pos_dict=pd, B=B1)
761
763
  if B1 is None:
762
764
  B1 = list(M.basis())
763
765
  M._cached_info = M1._cached_info
@@ -325,8 +325,8 @@ class MinorMatroid(Matroid):
325
325
 
326
326
  sage: from sage.matroids.advanced import *
327
327
  sage: M = MinorMatroid(matroids.catalog.Vamos(), contractions=set('c'), deletions={'b', 'f'})
328
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
329
- sage: N._minor(contractions=set([]), deletions=set(['d']))
328
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
329
+ sage: N._minor(contractions=set(), deletions=set(['d']))
330
330
  M / {'a', 'c'} \ {'b', 'd', 'f'}, where M is Vamos:
331
331
  Matroid of rank 4 on 8 elements with circuit-closures
332
332
  {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'},