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/crypto/util.py CHANGED
@@ -12,21 +12,19 @@ AUTHORS:
12
12
  ``is_blum_prime``, ``least_significant_bits``, ``random_blum_prime``.
13
13
  """
14
14
 
15
- #*****************************************************************************
15
+ # ***************************************************************************
16
16
  # Copyright (c) 2009, 2010 Minh Van Nguyen <nguyenminh2@gmail.com>
17
17
  #
18
18
  # This program is free software: you can redistribute it and/or modify
19
19
  # it under the terms of the GNU General Public License as published by
20
20
  # the Free Software Foundation, either version 2 of the License, or
21
21
  # (at your option) any later version.
22
- # http://www.gnu.org/licenses/
23
- #*****************************************************************************
22
+ # https://www.gnu.org/licenses/
23
+ # ***************************************************************************
24
24
 
25
- from sage.arith.functions import lcm
26
25
  from sage.arith.misc import is_prime, primes, random_prime
27
26
  from sage.misc.lazy_import import lazy_import
28
27
  from sage.rings.finite_rings.integer_mod import Mod as mod
29
- from sage.rings.integer import Integer
30
28
 
31
29
  lazy_import('sage.arith.misc', ('carmichael_lambda'), deprecation=34719)
32
30
  lazy_import('sage.monoids.string_monoid', 'BinaryStrings')
@@ -259,7 +257,7 @@ def bin_to_ascii(B):
259
257
  return "".join(A)
260
258
 
261
259
 
262
- def has_blum_prime(lbound, ubound):
260
+ def has_blum_prime(lbound, ubound) -> bool:
263
261
  r"""
264
262
  Determine whether or not there is a Blum prime within the specified closed
265
263
  interval.
@@ -1 +1 @@
1
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
1
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
@@ -1,2 +1,2 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
@@ -1,15 +1,15 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
-
4
- from cpython.ref cimport PyObject
5
-
6
- from sage.ext.fast_callable cimport Wrapper
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
7
3
 
8
4
  from sage.rings.real_mpfr cimport RealNumber
9
5
  from sage.libs.mpfr cimport *
10
6
  from sage.rings.complex_mpfr cimport ComplexNumber
11
7
  from sage.libs.mpc cimport *
12
8
 
9
+ from cpython.ref cimport PyObject
10
+
11
+ from sage.ext.fast_callable cimport Wrapper
12
+
13
13
  cdef class Wrapper_cc(Wrapper):
14
14
  cdef object domain
15
15
  cdef ComplexNumber domain_element
@@ -1,5 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
3
  # distutils: libraries = mpfr mpc gmp
4
4
 
5
5
  cdef public bint cc_py_call_helper(object domain, object fn,
@@ -1,16 +1,14 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
+
4
+ # distutils: language = c++
5
+ cimport libcpp.complex
6
+ ctypedef libcpp.complex.complex[double] double_complex
3
7
 
4
8
  from cpython.ref cimport PyObject
5
9
 
6
10
  from sage.ext.fast_callable cimport Wrapper
7
11
 
8
- # We need the type double_complex to work around
9
- # http://trac.cython.org/ticket/869
10
- # so this is a bit hackish.
11
- cdef extern from "complex.h":
12
- ctypedef double double_complex "double complex"
13
-
14
12
  cdef class Wrapper_cdf(Wrapper):
15
13
  cdef int _n_args
16
14
  cdef double_complex* _args
@@ -1,22 +1,17 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
3
  from sage.libs.gsl.complex cimport *
4
4
  from sage.rings.complex_double cimport ComplexDoubleElement
5
5
  import sage.rings.complex_double
6
6
  cdef object CDF = sage.rings.complex_double.CDF
7
7
 
8
- cdef extern from "complex.h":
9
- cdef double creal(double_complex)
10
- cdef double cimag(double_complex)
11
- cdef double_complex _Complex_I
12
-
13
8
  cdef inline double_complex CDE_to_dz(zz) noexcept:
14
9
  cdef ComplexDoubleElement z = <ComplexDoubleElement>(zz if isinstance(zz, ComplexDoubleElement) else CDF(zz))
15
- return GSL_REAL(z._complex) + _Complex_I * GSL_IMAG(z._complex)
10
+ return double_complex(GSL_REAL(z._complex), GSL_IMAG(z._complex))
16
11
 
17
12
  cdef inline ComplexDoubleElement dz_to_CDE(double_complex dz):
18
13
  cdef ComplexDoubleElement z = <ComplexDoubleElement>ComplexDoubleElement.__new__(ComplexDoubleElement)
19
- GSL_SET_COMPLEX(&z._complex, creal(dz), cimag(dz))
14
+ GSL_SET_COMPLEX(&z._complex, dz.real(), dz.imag())
20
15
  return z
21
16
 
22
17
  cdef public bint cdf_py_call_helper(object fn,
@@ -36,7 +31,6 @@ cdef public bint cdf_py_call_helper(object fn,
36
31
  return 1
37
32
 
38
33
 
39
-
40
34
  from cpython.ref cimport PyObject
41
35
  cdef extern from "Python.h":
42
36
  void Py_DECREF(PyObject *o)
@@ -59,7 +53,7 @@ cdef extern from "interp_cdf.c":
59
53
  double_complex* constants,
60
54
  PyObject** py_constants,
61
55
  double_complex* stack,
62
- int* code) except? -1094648119105371
56
+ int* code) except *
63
57
 
64
58
  cdef class Wrapper_cdf(Wrapper):
65
59
  # attributes are declared in corresponding .pxd file
@@ -1,5 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
3
 
4
4
  from cpython.ref cimport PyObject
5
5
 
@@ -1,5 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
3
  cimport sage.libs.gsl.math # Add dependency on GSL
4
4
 
5
5
  from cpython.ref cimport PyObject
@@ -1,14 +1,14 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
-
4
- from cpython.ref cimport PyObject
5
-
6
- from sage.ext.fast_callable cimport Wrapper
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
7
3
 
8
4
  from sage.rings.real_mpfr cimport RealField_class, RealNumber
9
5
  from sage.libs.mpfr cimport *
10
6
 
11
7
 
8
+ from cpython.ref cimport PyObject
9
+
10
+ from sage.ext.fast_callable cimport Wrapper
11
+
12
12
  cdef class Wrapper_rr(Wrapper):
13
13
  cdef RealField_class domain
14
14
  cdef int _n_args
@@ -1,5 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- # Automatically generated by /private/var/folders/w5/_8wgjw3j5cg6mgrth3s2kg9m0000gn/T/build-env-y9u5bbi3/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
2
+ # Automatically generated by /private/var/folders/y6/nj790rtn62lfktb1sh__79hc0000gn/T/build-env-dhl06n4x/lib/python3.10/site-packages/sage_setup/autogen/interpreters/internal/generator.py. Do not edit!
3
3
  cdef public bint rr_py_call_helper(object domain, object fn,
4
4
  int n_args,
5
5
  mpfr_t* args, mpfr_t retval) except 0:
@@ -15,7 +15,6 @@ cdef public bint rr_py_call_helper(object domain, object fn,
15
15
  return 1
16
16
 
17
17
 
18
-
19
18
  from cpython.ref cimport PyObject
20
19
  cdef extern from "Python.h":
21
20
  void Py_DECREF(PyObject *o)
@@ -1057,7 +1057,7 @@ class ToricLattice_ambient(ToricLattice_generic, FreeModule_ambient_pid):
1057
1057
  EXAMPLES::
1058
1058
 
1059
1059
  sage: N = ToricLattice(3)
1060
- sage: N.plot() # needs sage.plot
1060
+ sage: N.plot() # needs sage.geometry.polyhedron sage.plot
1061
1061
  Graphics3d Object
1062
1062
  """
1063
1063
  if "show_lattice" not in options:
@@ -1188,12 +1188,12 @@ class ToricLattice_sublattice_with_basis(ToricLattice_generic,
1188
1188
 
1189
1189
  sage: N = ToricLattice(3)
1190
1190
  sage: sublattice = N.submodule_with_basis([(1,1,0), (3,2,1)])
1191
- sage: sublattice.plot() # needs sage.plot
1191
+ sage: sublattice.plot() # needs sage.geometry.polyhedron sage.plot
1192
1192
  Graphics3d Object
1193
1193
 
1194
1194
  Now we plot both the ambient lattice and its sublattice::
1195
1195
 
1196
- sage: N.plot() + sublattice.plot(point_color='red') # needs sage.plot
1196
+ sage: N.plot() + sublattice.plot(point_color='red') # needs sage.geometry.polyhedron sage.plot
1197
1197
  Graphics3d Object
1198
1198
  """
1199
1199
  if "show_lattice" not in options:
@@ -365,7 +365,7 @@ class AdditiveAbelianGroup_class(FGP_Module_class):
365
365
 
366
366
  def is_multiplicative(self):
367
367
  r"""
368
- Return False since this is an additive group.
368
+ Return ``False`` since this is an additive group.
369
369
 
370
370
  EXAMPLES::
371
371
 
@@ -70,7 +70,7 @@ class QmodnZ(Parent, UniqueRepresentation):
70
70
  """
71
71
  Element = QmodnZ_Element
72
72
 
73
- def __init__(self, n=1):
73
+ def __init__(self, n=1) -> None:
74
74
  r"""
75
75
  Initialization.
76
76
 
@@ -91,7 +91,7 @@ class QmodnZ(Parent, UniqueRepresentation):
91
91
  Parent.__init__(self, base=ZZ, category=category)
92
92
  self._populate_coercion_lists_(coerce_list=[QQ])
93
93
 
94
- def _repr_(self):
94
+ def _repr_(self) -> str:
95
95
  r"""
96
96
  Display the group.
97
97
 
@@ -157,7 +157,7 @@ class QmodnZ(Parent, UniqueRepresentation):
157
157
  """
158
158
  return self.element_class(self, QQ(x))
159
159
 
160
- def an_element(self):
160
+ def _an_element_(self):
161
161
  """
162
162
  Return an element, for use in coercion system.
163
163
 
@@ -168,7 +168,7 @@ class QmodnZ(Parent, UniqueRepresentation):
168
168
  """
169
169
  return self(0)
170
170
 
171
- def some_elements(self):
171
+ def some_elements(self) -> list:
172
172
  """
173
173
  Return some elements, for use in testing.
174
174
 
@@ -256,7 +256,7 @@ class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gene
256
256
  sage: CoxeterGroup(['D',4], base_ring=QQ).category()
257
257
  Category of finite irreducible Coxeter groups
258
258
 
259
- sage: # needs sage.rings.number_field
259
+ sage: # needs sage.rings.number_field sage.symbolic
260
260
  sage: CoxeterGroup(['H',4], base_ring=QQbar).category()
261
261
  Category of finite irreducible Coxeter groups
262
262
  sage: F = CoxeterGroups().Finite()
@@ -547,6 +547,18 @@ class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gene
547
547
  [-1 1] [ 0 -1] [ 1 0]
548
548
  [ 0 1], [-1 0], [ 1 -1]
549
549
  ]
550
+
551
+ TESTS::
552
+
553
+ sage: W = CoxeterGroup(CoxeterType(['A', 2]).relabel({1: 'r', 2: 's'}))
554
+ sage: F = W._positive_roots_reflections()
555
+ sage: F.keys()
556
+ [(1, 0), (1, 1), (0, 1)]
557
+ sage: list(F)
558
+ [
559
+ [-1 1] [ 0 -1] [ 1 0]
560
+ [ 0 1], [-1 0], [ 1 -1]
561
+ ]
550
562
  """
551
563
  if not self.is_finite():
552
564
  raise NotImplementedError('not available for infinite groups')
@@ -558,13 +570,14 @@ class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gene
558
570
  simple_roots = FreeModule(self.base_ring(), self.ngens()).gens()
559
571
 
560
572
  refls = self.simple_reflections()
573
+ refls_index = {refl_i[1]: refl_i[0] for refl_i in enumerate(refls.keys())}
561
574
  resu = []
562
575
  d = {}
563
576
  for i in range(1, N + 1):
564
577
  segment = word[:i]
565
578
  last = segment.pop()
566
579
  ref = refls[last]
567
- rt = simple_roots[last - 1]
580
+ rt = simple_roots[refls_index[last]]
568
581
  while segment:
569
582
  last = segment.pop()
570
583
  cr = refls[last]
@@ -722,7 +735,7 @@ class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gene
722
735
  def first_descent(self, side='right', index_set=None, positive=False):
723
736
  """
724
737
  Return the first left (resp. right) descent of ``self``, as
725
- ane element of ``index_set``, or ``None`` if there is none.
738
+ an element of ``index_set``, or ``None`` if there is none.
726
739
 
727
740
  See :meth:`descents` for a description of the options.
728
741
 
@@ -798,7 +811,7 @@ class CoxeterMatrixGroup(UniqueRepresentation, FinitelyGeneratedMatrixGroup_gene
798
811
  return [I[i] for i in index_set if not _matrix_test_right_descent(M, i, n, zero)]
799
812
  return [I[i] for i in index_set if _matrix_test_right_descent(M, i, n, zero)]
800
813
 
801
- def has_right_descent(self, i):
814
+ def has_right_descent(self, i) -> bool:
802
815
  r"""
803
816
  Return whether ``i`` is a right descent of ``self``.
804
817
 
@@ -778,7 +778,7 @@ class UnitCircleGroup(AbstractArgumentGroup):
778
778
  raise ValueError('{} is not in {}'.format(data, self))
779
779
 
780
780
  elif not isinstance(data, int) or data != 0:
781
- raise ValueError('input is ambigous: '
781
+ raise ValueError('input is ambiguous: '
782
782
  '{} as well as exponent={} '
783
783
  'specified'.format(data, exponent))
784
784
 
@@ -1835,7 +1835,7 @@ class ArgumentGroupFactory(UniqueFactory):
1835
1835
  domain is not None,
1836
1836
  exponents is not None)):
1837
1837
  raise ValueError(
1838
- 'input ambigous: ' +
1838
+ 'input ambiguous: ' +
1839
1839
  ', '.join('{}={}'.format(s, v) for s, v in
1840
1840
  [('data', data), ('specification', specification),
1841
1841
  ('domain', domain), ('exponents', exponents)]
@@ -20,15 +20,15 @@ AUTHORS:
20
20
  Classes and Methods
21
21
  ===================
22
22
  """
23
- #*****************************************************************************
23
+ # ****************************************************************************
24
24
  # Copyright (C) 2018 Daniel Krenn <dev@danielkrenn.at>
25
25
  #
26
26
  # This program is free software: you can redistribute it and/or modify
27
27
  # it under the terms of the GNU General Public License as published by
28
28
  # the Free Software Foundation, either version 2 of the License, or
29
29
  # (at your option) any later version.
30
- # http://www.gnu.org/licenses/
31
- #*****************************************************************************
30
+ # https://www.gnu.org/licenses/
31
+ # ****************************************************************************
32
32
 
33
33
  from sage.structure.element import AdditiveGroupElement
34
34
  from sage.structure.parent import Parent
@@ -472,7 +472,7 @@ class ImaginaryGroup(UniqueRepresentation, Parent):
472
472
  raise ValueError('{} is not in {}'.format(data, self))
473
473
 
474
474
  elif not isinstance(data, int) or data != 0:
475
- raise ValueError('input is ambigous: '
475
+ raise ValueError('input is ambiguous: '
476
476
  '{} as well as imag={} '
477
477
  'specified'.format(data, imag))
478
478
 
@@ -55,13 +55,11 @@ from sage.structure.element import ModuleElement, Vector, coercion_model
55
55
  from sage.misc.cachefunc import cached_method
56
56
 
57
57
  from sage.rings.integer_ring import ZZ
58
- from sage.rings.rational_field import QQ
59
58
  from sage.modules.free_module import FreeModule
60
59
  from sage.modules.free_module_element import vector
61
60
  from sage.matrix.matrix0 import Matrix
62
61
  from sage.matrix.constructor import matrix
63
62
  from sage.misc.latex import latex
64
- from sage.misc.superseded import deprecation
65
63
  from sage.rings.fast_arith import prime_range
66
64
  from sage.homology.homology_group import HomologyGroup
67
65
  from sage.misc.persist import register_unpickle_override
@@ -226,13 +226,13 @@ class HochschildComplex(UniqueRepresentation, Parent):
226
226
  sage: d1 = H.boundary(1)
227
227
  sage: x = d1.domain().an_element(); x
228
228
  2*s[] # s[] + 2*s[] # s[1] + 3*s[] # s[2]
229
- sage: d1(x) # needs lrcalc
229
+ sage: d1(x) # needs lrcalc_python
230
230
  0
231
231
  sage: y = tensor([s.an_element(), s.an_element()])
232
- sage: d1(y) # needs lrcalc
232
+ sage: d1(y) # needs lrcalc_python
233
233
  0
234
234
  sage: z = tensor([s[2,1] + s[3], s.an_element()])
235
- sage: d1(z) # needs lrcalc
235
+ sage: d1(z) # needs lrcalc_python
236
236
  0
237
237
 
238
238
  TESTS::
@@ -13,15 +13,15 @@ AUTHORS:
13
13
  - John H. Palmieri (2015.09)
14
14
  """
15
15
 
16
- ########################################################################
16
+ # ######################################################################
17
17
  # Copyright (C) 2015 John H. Palmieri <palmieri@math.washington.edu>
18
18
  #
19
19
  # Distributed under the terms of the GNU General Public License (GPL)
20
20
  # as published by the Free Software Foundation; either version 2 of
21
21
  # the License, or (at your option) any later version.
22
22
  #
23
- # http://www.gnu.org/licenses/
24
- ########################################################################
23
+ # https://www.gnu.org/licenses/
24
+ # ######################################################################
25
25
 
26
26
  # To do: implement morphisms of cubical complexes, with methods
27
27
  # - domain
@@ -131,7 +131,7 @@ class InducedHomologyMorphism(Morphism):
131
131
  sage: diag_c(c)
132
132
  h^{1,0}
133
133
  """
134
- def __init__(self, map, base_ring=None, cohomology=False):
134
+ def __init__(self, map, base_ring=None, cohomology=False) -> None:
135
135
  """
136
136
  INPUT:
137
137
 
@@ -387,7 +387,7 @@ class InducedHomologyMorphism(Morphism):
387
387
  """
388
388
  return self.to_matrix().right_nullity() == 0
389
389
 
390
- def _repr_type(self):
390
+ def _repr_type(self) -> str:
391
391
  """
392
392
  EXAMPLES::
393
393
 
@@ -401,7 +401,7 @@ class InducedHomologyMorphism(Morphism):
401
401
  """
402
402
  return "Graded vector space" if not self._cohomology else "Graded algebra"
403
403
 
404
- def _repr_defn(self):
404
+ def _repr_defn(self) -> str:
405
405
  """
406
406
  EXAMPLES::
407
407
 
@@ -445,7 +445,7 @@ class HomologyVectorSpaceWithBasis(CombinatorialFreeModule):
445
445
  tester = self._tester(**options)
446
446
  dual = self.dual()
447
447
  dims = [a[0] for a in self._indices]
448
- for dim in range(max(max(dims), tester._max_runs) + 1):
448
+ for dim in range(max(*dims, tester._max_runs) + 1):
449
449
  n = len(self.basis(dim))
450
450
  m = matrix(n, n, [a.eval(b) for a in self.basis(dim) for b in dual.basis(dim)])
451
451
  tester.assertEqual(m, 1, f"error in dimension {dim}")
Binary file
Binary file
Binary file
sage/matrix/args.pyx CHANGED
@@ -298,9 +298,12 @@ cdef class MatrixArgs:
298
298
  Test invalid input::
299
299
 
300
300
  sage: MatrixArgs(ZZ, 2, 2, entries='abcd').finalized()
301
+ <MatrixArgs for Full MatrixSpace of 2 by 2 dense matrices
302
+ over Integer Ring; typ=SCALAR; entries='abcd'>
303
+ sage: matrix(ZZ, 2, 2, entries='abcd')
301
304
  Traceback (most recent call last):
302
305
  ...
303
- TypeError: unable to convert 'abcd' to a matrix
306
+ TypeError: unable to convert 'abcd' to an integer
304
307
  sage: MatrixArgs(ZZ, 2, 2, entries=MatrixArgs()).finalized()
305
308
  Traceback (most recent call last):
306
309
  ...
@@ -396,7 +399,7 @@ cdef class MatrixArgs:
396
399
  # but do not check for positional row_keys, column_keys arguments
397
400
  # -- we do not allow those, as they would be too easy to
398
401
  # confuse with entries
399
- cdef int k
402
+ cdef Py_ssize_t k
400
403
  cdef long v
401
404
  if self.nrows == -1 and self.ncols == -1:
402
405
  for k in range(2):
@@ -1522,12 +1525,19 @@ cdef class MatrixArgs:
1522
1525
  [() 0 0]
1523
1526
  [ 0 () 0]
1524
1527
  [ 0 0 ()]
1528
+
1529
+ Verify that :issue:`34821` is fixed::
1530
+
1531
+ sage: matrix(ZZ, 2, 2, "3")
1532
+ [3 0]
1533
+ [0 3]
1525
1534
  """
1526
1535
  # Check basic Python types. This is very fast, so it doesn't
1527
1536
  # hurt to do these first.
1528
1537
  if self.entries is None:
1529
1538
  return MA_ENTRIES_ZERO
1530
- if isinstance(self.entries, (int, float, complex, Integer)):
1539
+ if isinstance(self.entries, (int, float, complex, Integer, str)):
1540
+ # Note that a string is not considered to be a sequence.
1531
1541
  if self.entries:
1532
1542
  return MA_ENTRIES_SCALAR
1533
1543
  return MA_ENTRIES_ZERO
@@ -1572,9 +1582,6 @@ cdef class MatrixArgs:
1572
1582
  if isinstance(self.entries, MatrixArgs):
1573
1583
  # Prevent recursion
1574
1584
  return MA_ENTRIES_UNKNOWN
1575
- if isinstance(self.entries, str):
1576
- # Blacklist strings, we don't want them to be considered a sequence
1577
- return MA_ENTRIES_UNKNOWN
1578
1585
  try:
1579
1586
  self.entries = list(self.entries)
1580
1587
  except TypeError:
@@ -1593,6 +1600,16 @@ cdef class MatrixArgs:
1593
1600
  is a sequence.
1594
1601
 
1595
1602
  If the entries are invalid, return ``MA_ENTRIES_UNKNOWN``.
1603
+
1604
+ TESTS:
1605
+
1606
+ Verify that :issue:`34821` is fixed::
1607
+
1608
+ sage: matrix(ZZ, 1,2, ["1", "2"])
1609
+ [1 2]
1610
+ sage: matrix(ZZ, 2,1, ["1", "2"])
1611
+ [1]
1612
+ [2]
1596
1613
  """
1597
1614
  if not self.entries:
1598
1615
  return MA_ENTRIES_SEQ_FLAT
@@ -1608,13 +1625,11 @@ cdef class MatrixArgs:
1608
1625
  return MA_ENTRIES_SEQ_SEQ
1609
1626
  else:
1610
1627
  return MA_ENTRIES_SEQ_FLAT
1611
- if isinstance(x, (int, float, complex)):
1628
+ if isinstance(x, (int, float, complex, str)):
1629
+ # Note that a string is not considered to be a sequence.
1612
1630
  return MA_ENTRIES_SEQ_FLAT
1613
1631
  if isinstance(x, Element) and element_is_scalar(<Element>x):
1614
1632
  return MA_ENTRIES_SEQ_FLAT
1615
- if isinstance(x, str):
1616
- # Blacklist strings, we don't want them to be considered a sequence
1617
- return MA_ENTRIES_UNKNOWN
1618
1633
  try:
1619
1634
  iter(x)
1620
1635
  except TypeError:
sage/matrix/benchmark.py CHANGED
@@ -19,13 +19,17 @@ The basic command syntax is as follows::
19
19
  ======================================================================
20
20
  """
21
21
 
22
- from .constructor import random_matrix, Matrix
22
+ import sys
23
+
24
+ from sage.matrix.constructor import Matrix, random_matrix
23
25
  from sage.misc.lazy_import import lazy_import
26
+ from sage.misc.timing import cputime
27
+ from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF
24
28
  from sage.rings.integer_ring import ZZ
25
29
  from sage.rings.rational_field import QQ
26
- from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF
27
- from sage.misc.timing import cputime
28
- from cysignals.alarm import AlarmInterrupt, alarm, cancel_alarm
30
+
31
+ if sys.platform != 'win32':
32
+ from cysignals.alarm import AlarmInterrupt, alarm, cancel_alarm
29
33
 
30
34
  lazy_import('sage.interfaces.magma', 'magma')
31
35
 
@@ -494,7 +494,7 @@ class ComputeMinimalPolynomials(SageObject):
494
494
  verbose("Generators with (p^t)-generating property:")
495
495
  verbose(generators)
496
496
 
497
- heap = list((f.degree(), f) for f in generators)
497
+ heap = [(f.degree(), f) for f in generators]
498
498
  heapq.heapify(heap)
499
499
 
500
500
  # find poly of minimal degree
@@ -795,7 +795,7 @@ class ComputeMinimalPolynomials(SageObject):
795
795
  if s_max < t:
796
796
  result = {r: polynomial
797
797
  for r, polynomial in p_min_polys.items() if r < s_max}
798
- next_t_candidates = list(r for r in p_min_polys if r >= s_max)
798
+ next_t_candidates = [r for r in p_min_polys if r >= s_max]
799
799
  if next_t_candidates:
800
800
  next_t = min(next_t_candidates)
801
801
  result.update({s_max: p_min_polys[next_t] % p**s_max})
@@ -107,7 +107,7 @@ def reduced_echelon_matrix_iterator(K, k, n, bint sparse=False, bint copy=True,
107
107
  True
108
108
  """
109
109
  cdef Matrix m0,m,mm
110
- cdef int i
110
+ cdef Py_ssize_t i
111
111
  n = int(n)
112
112
  k = int(k)
113
113
 
Binary file