passagemath-modules 10.5.46__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 (320) hide show
  1. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +49 -44
  2. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +320 -314
  3. passagemath_modules.dylibs/libmpc.3.dylib +0 -0
  4. passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  5. sage/algebras/clifford_algebra.py +2 -2
  6. sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
  7. sage/algebras/clifford_algebra_element.pyx +4 -2
  8. sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
  9. sage/algebras/exterior_algebra_groebner.pyx +2 -0
  10. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
  11. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
  12. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
  13. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
  14. sage/algebras/finite_gca.py +1 -1
  15. sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
  16. sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
  17. sage/algebras/lie_algebras/examples.py +2 -2
  18. sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
  19. sage/algebras/lie_algebras/heisenberg.py +4 -4
  20. sage/algebras/lie_algebras/lie_algebra.py +1 -1
  21. sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
  22. sage/algebras/lie_algebras/lie_algebra_element.pyx +63 -27
  23. sage/algebras/lie_algebras/quotient.py +40 -29
  24. sage/algebras/lie_algebras/subalgebra.py +76 -53
  25. sage/algebras/lie_algebras/verma_module.py +1 -3
  26. sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
  27. sage/algebras/octonion_algebra.pyx +1 -1
  28. sage/algebras/orlik_solomon.py +4 -4
  29. sage/algebras/orlik_terao.py +4 -4
  30. sage/algebras/steenrod/steenrod_algebra.py +37 -30
  31. sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
  32. sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
  33. sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
  34. sage/all__sagemath_modules.py +1 -0
  35. sage/calculus/integration.cpython-310-darwin.so +0 -0
  36. sage/calculus/integration.pyx +6 -5
  37. sage/calculus/interpolation.cpython-310-darwin.so +0 -0
  38. sage/calculus/interpolators.cpython-310-darwin.so +0 -0
  39. sage/calculus/ode.cpython-310-darwin.so +0 -0
  40. sage/calculus/ode.pxd +2 -2
  41. sage/calculus/ode.pyx +6 -4
  42. sage/calculus/riemann.cpython-310-darwin.so +0 -0
  43. sage/calculus/riemann.pyx +68 -48
  44. sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
  45. sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
  46. sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
  47. sage/coding/ag_code_decoders.pyx +31 -31
  48. sage/coding/binary_code.cpython-310-darwin.so +0 -0
  49. sage/coding/binary_code.pxd +6 -6
  50. sage/coding/binary_code.pyx +212 -173
  51. sage/coding/guruswami_sudan/utils.py +3 -5
  52. sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
  53. sage/coding/kasami_codes.pyx +20 -24
  54. sage/coding/linear_code.py +2 -2
  55. sage/coding/linear_code_no_metric.py +5 -5
  56. sage/coding/linear_rank_metric.py +81 -19
  57. sage/combinat/free_module.py +22 -2
  58. sage/combinat/root_system/ambient_space.py +1 -1
  59. sage/combinat/root_system/associahedron.py +4 -4
  60. sage/combinat/root_system/braid_move_calculator.py +1 -1
  61. sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
  62. sage/combinat/root_system/branching_rules.py +2 -2
  63. sage/combinat/root_system/cartan_type.py +14 -14
  64. sage/combinat/root_system/coxeter_group.py +2 -2
  65. sage/combinat/root_system/coxeter_type.py +11 -0
  66. sage/combinat/root_system/extended_affine_weyl_group.py +8 -8
  67. sage/combinat/root_system/fundamental_group.py +2 -4
  68. sage/combinat/root_system/hecke_algebra_representation.py +1 -1
  69. sage/combinat/root_system/pieri_factors.py +2 -2
  70. sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
  71. sage/combinat/root_system/root_lattice_realizations.py +1 -1
  72. sage/combinat/root_system/type_folded.py +3 -3
  73. sage/combinat/root_system/type_reducible.py +8 -7
  74. sage/combinat/root_system/type_super_A.py +2 -2
  75. sage/combinat/root_system/weight_lattice_realizations.py +9 -8
  76. sage/combinat/root_system/weyl_characters.py +1 -1
  77. sage/crypto/__init__.py +1 -0
  78. sage/crypto/block_cipher/des.py +1 -1
  79. sage/crypto/block_cipher/miniaes.py +3 -3
  80. sage/crypto/block_cipher/present.py +3 -3
  81. sage/crypto/block_cipher/sdes.py +3 -3
  82. sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
  83. sage/crypto/boolean_function.pyx +22 -23
  84. sage/crypto/key_exchange/diffie_hellman.py +4 -9
  85. sage/crypto/mq/sr.py +1 -1
  86. sage/crypto/public_key/blum_goldwasser.py +3 -3
  87. sage/crypto/sbox.cpython-310-darwin.so +0 -0
  88. sage/crypto/sbox.pyx +1 -1
  89. sage/crypto/sboxes.py +22 -0
  90. sage/crypto/util.py +4 -6
  91. sage/ext/interpreters/__init__.py +1 -1
  92. sage/ext/interpreters/all__sagemath_modules.py +1 -1
  93. sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
  94. sage/ext/interpreters/wrapper_cc.pxd +5 -5
  95. sage/ext/interpreters/wrapper_cc.pyx +1 -1
  96. sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
  97. sage/ext/interpreters/wrapper_cdf.pxd +5 -7
  98. sage/ext/interpreters/wrapper_cdf.pyx +4 -10
  99. sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
  100. sage/ext/interpreters/wrapper_rdf.pxd +1 -1
  101. sage/ext/interpreters/wrapper_rdf.pyx +1 -1
  102. sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
  103. sage/ext/interpreters/wrapper_rr.pxd +5 -5
  104. sage/ext/interpreters/wrapper_rr.pyx +1 -2
  105. sage/geometry/toric_lattice.py +3 -3
  106. sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
  107. sage/groups/additive_abelian/additive_abelian_group.py +1 -1
  108. sage/groups/additive_abelian/qmodnz.py +4 -4
  109. sage/groups/matrix_gps/coxeter_group.py +17 -4
  110. sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
  111. sage/groups/misc_gps/argument_groups.py +2 -2
  112. sage/groups/misc_gps/imaginary_groups.py +4 -4
  113. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
  114. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
  115. sage/homology/chain_complex.py +0 -2
  116. sage/homology/hochschild_complex.py +3 -3
  117. sage/homology/homology_morphism.py +6 -6
  118. sage/homology/homology_vector_space_with_basis.py +1 -1
  119. sage/libs/gsl/array.cpython-310-darwin.so +0 -0
  120. sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
  121. sage/matrix/action.cpython-310-darwin.so +0 -0
  122. sage/matrix/args.cpython-310-darwin.so +0 -0
  123. sage/matrix/args.pyx +25 -10
  124. sage/matrix/benchmark.py +8 -4
  125. sage/matrix/compute_J_ideal.py +2 -2
  126. sage/matrix/constructor.cpython-310-darwin.so +0 -0
  127. sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
  128. sage/matrix/echelon_matrix.pyx +1 -1
  129. sage/matrix/matrix0.cpython-310-darwin.so +0 -0
  130. sage/matrix/matrix0.pxd +3 -3
  131. sage/matrix/matrix0.pyx +7 -5
  132. sage/matrix/matrix1.cpython-310-darwin.so +0 -0
  133. sage/matrix/matrix1.pyx +87 -48
  134. sage/matrix/matrix2.cpython-310-darwin.so +0 -0
  135. sage/matrix/matrix2.pxd +3 -3
  136. sage/matrix/matrix2.pyx +758 -75
  137. sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
  138. sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
  139. sage/matrix/matrix_complex_double_dense.pyx +1 -1
  140. sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
  141. sage/matrix/matrix_dense.pyx +2 -3
  142. sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
  143. sage/matrix/matrix_double_dense.pyx +11 -5
  144. sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
  145. sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
  146. sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
  147. sage/matrix/matrix_generic_sparse.pyx +1 -1
  148. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
  149. sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
  150. sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
  151. sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
  152. sage/matrix/matrix_polynomial_dense.pyx +952 -261
  153. sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
  154. sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
  155. sage/matrix/matrix_sparse.pyx +2 -3
  156. sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
  157. sage/matrix/matrix_window.pyx +2 -2
  158. sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
  159. sage/matrix/operation_table.py +0 -2
  160. sage/matrix/special.py +4 -0
  161. sage/matrix/strassen.cpython-310-darwin.so +0 -0
  162. sage/matrix/strassen.pyx +1 -1
  163. sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
  164. sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
  165. sage/matroids/chow_ring.py +68 -65
  166. sage/matroids/chow_ring_ideal.py +41 -38
  167. sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
  168. sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
  169. sage/matroids/database_matroids.py +16 -5
  170. sage/matroids/dual_matroid.py +2 -2
  171. sage/matroids/extension.cpython-310-darwin.so +0 -0
  172. sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
  173. sage/matroids/gammoid.py +1 -1
  174. sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
  175. sage/matroids/graphic_matroid.pyx +3 -3
  176. sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
  177. sage/matroids/lean_matrix.pyx +22 -22
  178. sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
  179. sage/matroids/linear_matroid.pyx +13 -13
  180. sage/matroids/matroid.cpython-310-darwin.so +0 -0
  181. sage/matroids/matroid.pyx +15 -15
  182. sage/matroids/matroids_plot_helpers.py +48 -46
  183. sage/matroids/minor_matroid.py +2 -2
  184. sage/matroids/set_system.cpython-310-darwin.so +0 -0
  185. sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
  186. sage/matroids/transversal_matroid.pyx +3 -3
  187. sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
  188. sage/matroids/union_matroid.pyx +3 -0
  189. sage/matroids/unpickling.cpython-310-darwin.so +0 -0
  190. sage/matroids/utilities.py +2 -2
  191. sage/misc/c3.cpython-310-darwin.so +0 -0
  192. sage/misc/compat.py +1 -2
  193. sage/misc/pickle_old.cpython-310-darwin.so +0 -0
  194. sage/modules/diamond_cutting.py +117 -30
  195. sage/modules/fg_pid/fgp_module.py +3 -3
  196. sage/modules/filtered_vector_space.py +4 -4
  197. sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
  198. sage/modules/fp_graded/free_module.py +2 -2
  199. sage/modules/fp_graded/module.py +2 -2
  200. sage/modules/fp_graded/morphism.py +4 -4
  201. sage/modules/fp_graded/steenrod/morphism.py +1 -1
  202. sage/modules/free_module.py +144 -15
  203. sage/modules/free_module_element.cpython-310-darwin.so +0 -0
  204. sage/modules/free_module_element.pyx +4 -4
  205. sage/modules/free_module_integer.py +2 -2
  206. sage/modules/free_module_morphism.py +3 -3
  207. sage/modules/free_module_pseudohomspace.py +352 -0
  208. sage/modules/free_module_pseudomorphism.py +578 -0
  209. sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
  210. sage/modules/matrix_morphism.py +9 -9
  211. sage/modules/multi_filtered_vector_space.py +4 -4
  212. sage/modules/ore_module.py +2208 -0
  213. sage/modules/ore_module_element.py +178 -0
  214. sage/modules/ore_module_homspace.py +147 -0
  215. sage/modules/ore_module_morphism.py +968 -0
  216. sage/modules/quotient_module.py +11 -1
  217. sage/modules/submodule.py +1 -1
  218. sage/modules/torsion_quadratic_module.py +1 -1
  219. sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
  220. sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
  221. sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
  222. sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
  223. sage/modules/vector_integer_sparse.pyx +4 -4
  224. sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
  225. sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
  226. sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
  227. sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
  228. sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
  229. sage/modules/vector_rational_dense.pyx +1 -1
  230. sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
  231. sage/modules/vector_rational_sparse.pyx +5 -5
  232. sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
  233. sage/modules/vector_space_morphism.py +2 -2
  234. sage/modules/with_basis/cell_module.py +17 -0
  235. sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
  236. sage/modules/with_basis/indexed_element.pyx +1 -1
  237. sage/modules/with_basis/invariant.py +1 -1
  238. sage/modules/with_basis/representation.py +0 -1
  239. sage/modules/with_basis/subquotient.py +2 -2
  240. sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
  241. sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
  242. sage/quadratic_forms/binary_qf.py +7 -7
  243. sage/quadratic_forms/bqf_class_group.py +26 -92
  244. sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
  245. sage/quadratic_forms/extras.py +1 -1
  246. sage/quadratic_forms/quadratic_form.py +5 -4
  247. sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
  248. sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
  249. sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
  250. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
  251. sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
  252. sage/quadratic_forms/ternary_qf.py +50 -83
  253. sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
  254. sage/rings/complex_double.cpython-310-darwin.so +0 -0
  255. sage/rings/complex_double.pxd +1 -0
  256. sage/rings/complex_double.pyx +37 -32
  257. sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
  258. sage/rings/complex_mpc.pyx +27 -23
  259. sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
  260. sage/rings/complex_mpfr.pyx +11 -9
  261. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
  262. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
  263. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
  264. sage/rings/function_field/drinfeld_modules/homset.py +1 -2
  265. sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
  266. sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
  267. sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
  268. sage/rings/function_field/khuri_makdisi.pyx +27 -25
  269. sage/rings/invariants/invariant_theory.py +61 -60
  270. sage/rings/invariants/reconstruction.py +8 -8
  271. sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
  272. sage/rings/polynomial/ore_function_element.py +1 -1
  273. sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
  274. sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
  275. sage/rings/polynomial/ore_polynomial_ring.py +134 -17
  276. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
  277. sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
  278. sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
  279. sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
  280. sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
  281. sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
  282. sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
  283. sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
  284. sage/rings/real_mpfr.pyx +25 -7
  285. sage/rings/ring_extension.cpython-310-darwin.so +0 -0
  286. sage/rings/ring_extension.pyx +4 -2
  287. sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
  288. sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
  289. sage/rings/ring_extension_element.pyx +42 -0
  290. sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
  291. sage/schemes/projective/cohomology.py +2 -2
  292. sage/stats/basic_stats.py +9 -6
  293. sage/stats/distributions/dgs_misc.h +11 -4
  294. sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
  295. sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
  296. sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
  297. sage/stats/hmm/chmm.pyx +13 -13
  298. sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
  299. sage/stats/hmm/distributions.pxd +3 -3
  300. sage/stats/hmm/distributions.pyx +3 -3
  301. sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
  302. sage/stats/hmm/hmm.pxd +3 -3
  303. sage/stats/hmm/hmm.pyx +6 -6
  304. sage/stats/hmm/util.cpython-310-darwin.so +0 -0
  305. sage/stats/hmm/util.pyx +6 -6
  306. sage/stats/intlist.cpython-310-darwin.so +0 -0
  307. sage/stats/intlist.pxd +3 -3
  308. sage/stats/time_series.cpython-310-darwin.so +0 -0
  309. sage/tensor/modules/alternating_contr_tensor.py +3 -3
  310. sage/tensor/modules/comp.py +3 -3
  311. sage/tensor/modules/ext_pow_free_module.py +3 -3
  312. sage/tensor/modules/format_utilities.py +3 -3
  313. sage/tensor/modules/free_module_linear_group.py +3 -3
  314. sage/tensor/modules/free_module_morphism.py +0 -1
  315. sage/tensor/modules/tensor_free_module.py +3 -3
  316. sage/tensor/modules/tensor_free_submodule.py +1 -1
  317. sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
  318. sage/tensor/modules/tensor_with_indices.py +5 -5
  319. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +0 -0
  320. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
sage/stats/hmm/chmm.pyx CHANGED
@@ -8,22 +8,22 @@ AUTHOR:
8
8
  - William Stein, 2010-03
9
9
  """
10
10
 
11
- #*****************************************************************************
11
+ # ***************************************************************************
12
12
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
13
13
  #
14
14
  # This program is free software: you can redistribute it and/or modify
15
15
  # it under the terms of the GNU General Public License as published by
16
16
  # the Free Software Foundation, either version 2 of the License, or
17
17
  # (at your option) any later version.
18
- # http://www.gnu.org/licenses/
19
- #*****************************************************************************
18
+ # https://www.gnu.org/licenses/
19
+ # ***************************************************************************
20
20
 
21
21
  from cpython.object cimport PyObject_RichCompare
22
22
  from libc.math cimport log, sqrt, exp, isnormal, isfinite, M_PI
23
23
  cdef double sqrt2pi = sqrt(2*M_PI)
24
24
  from cysignals.signals cimport sig_on, sig_off
25
25
 
26
- from sage.misc.flatten import flatten
26
+ from sage.misc.flatten import flatten
27
27
  from sage.structure.element import Matrix
28
28
 
29
29
  from sage.stats.time_series cimport TimeSeries
@@ -331,10 +331,10 @@ cdef class GaussianHiddenMarkovModel(HiddenMarkovModel):
331
331
  sage: hmm.GaussianHiddenMarkovModel([[.1,.9],[.5,.5]], [(1,.5), (-1,3)], [.1,.9]).__repr__()
332
332
  'Gaussian Hidden Markov Model with 2 States\nTransition matrix:\n[0.1 0.9]\n[0.5 0.5]\nEmission parameters:\n[(1.0, 0.5), (-1.0, 3.0)]\nInitial probabilities: [0.1000, 0.9000]'
333
333
  """
334
- s = "Gaussian Hidden Markov Model with %s States"%self.N
335
- s += '\nTransition matrix:\n%s'%self.transition_matrix()
336
- s += '\nEmission parameters:\n%s'%self.emission_parameters()
337
- s += '\nInitial probabilities: %s'%self.initial_probabilities()
334
+ s = "Gaussian Hidden Markov Model with %s States" % self.N
335
+ s += '\nTransition matrix:\n%s' % self.transition_matrix()
336
+ s += '\nEmission parameters:\n%s' % self.emission_parameters()
337
+ s += '\nInitial probabilities: %s' % self.initial_probabilities()
338
338
  return s
339
339
 
340
340
  def generate_sequence(self, Py_ssize_t length, starting_state=None):
@@ -422,7 +422,7 @@ cdef class GaussianHiddenMarkovModel(HiddenMarkovModel):
422
422
  else:
423
423
  q = starting_state
424
424
  if q < 0 or q>= self.N:
425
- raise ValueError("starting state must be between 0 and %s"%(self.N-1))
425
+ raise ValueError("starting state must be between 0 and %s" % (self.N-1))
426
426
 
427
427
  states._values[0] = q
428
428
  obs._values[0] = self.random_sample(q, rstate)
@@ -1144,10 +1144,10 @@ cdef class GaussianMixtureHiddenMarkovModel(GaussianHiddenMarkovModel):
1144
1144
  sage: hmm.GaussianMixtureHiddenMarkovModel([[.9,.1],[.4,.6]], [[(.4,(0,1)), (.6,(1,0.1))],[(1,(0,1))]], [.7,.3]).__repr__()
1145
1145
  'Gaussian Mixture Hidden Markov Model with 2 States\nTransition matrix:\n[0.9 0.1]\n[0.4 0.6]\nEmission parameters:\n[0.4*N(0.0,1.0) + 0.6*N(1.0,0.1), 1.0*N(0.0,1.0)]\nInitial probabilities: [0.7000, 0.3000]'
1146
1146
  """
1147
- s = "Gaussian Mixture Hidden Markov Model with %s States"%self.N
1148
- s += '\nTransition matrix:\n%s'%self.transition_matrix()
1149
- s += '\nEmission parameters:\n%s'%self.emission_parameters()
1150
- s += '\nInitial probabilities: %s'%self.initial_probabilities()
1147
+ s = "Gaussian Mixture Hidden Markov Model with %s States" % self.N
1148
+ s += '\nTransition matrix:\n%s' % self.transition_matrix()
1149
+ s += '\nEmission parameters:\n%s' % self.emission_parameters()
1150
+ s += '\nInitial probabilities: %s' % self.initial_probabilities()
1151
1151
  return s
1152
1152
 
1153
1153
  def __reduce__(self):
@@ -1,10 +1,10 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- #############################################################################
2
+ # ##########################################################################
3
3
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
4
4
  # Distributed under the terms of the GNU General Public License (GPL)
5
5
  # The full text of the GPL is available at:
6
- # http://www.gnu.org/licenses/
7
- #############################################################################
6
+ # https://www.gnu.org/licenses/
7
+ # ##########################################################################
8
8
 
9
9
  from sage.stats.time_series cimport TimeSeries
10
10
  from sage.stats.intlist cimport IntList
@@ -13,12 +13,12 @@ AUTHOR:
13
13
  - William Stein, 2010-03
14
14
  """
15
15
 
16
- #############################################################################
16
+ # ##########################################################################
17
17
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
18
18
  # Distributed under the terms of the GNU General Public License (GPL)
19
19
  # The full text of the GPL is available at:
20
- # http://www.gnu.org/licenses/
21
- #############################################################################
20
+ # https://www.gnu.org/licenses/
21
+ # ##########################################################################
22
22
 
23
23
  from cpython.object cimport PyObject_RichCompare
24
24
 
Binary file
sage/stats/hmm/hmm.pxd CHANGED
@@ -1,10 +1,10 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- #############################################################################
2
+ # ##########################################################################
3
3
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
4
4
  # Distributed under the terms of the GNU General Public License (GPL) v2+.
5
5
  # The full text of the GPL is available at:
6
- # http://www.gnu.org/licenses/
7
- #############################################################################
6
+ # https://www.gnu.org/licenses/
7
+ # ##########################################################################
8
8
 
9
9
 
10
10
  from sage.stats.time_series cimport TimeSeries
sage/stats/hmm/hmm.pyx CHANGED
@@ -444,13 +444,13 @@ cdef class DiscreteHiddenMarkovModel(HiddenMarkovModel):
444
444
  sage: m.__repr__()
445
445
  'Discrete Hidden Markov Model with 2 States and 2 Emissions\nTransition matrix:\n[0.4 0.6]\n[0.1 0.9]\nEmission matrix:\n[0.1 0.9]\n[0.5 0.5]\nInitial probabilities: [0.2000, 0.8000]'
446
446
  """
447
- s = "Discrete Hidden Markov Model with %s States and %s Emissions"%(
447
+ s = "Discrete Hidden Markov Model with %s States and %s Emissions" % (
448
448
  self.N, self.n_out)
449
- s += '\nTransition matrix:\n%s'%self.transition_matrix()
450
- s += '\nEmission matrix:\n%s'%self.emission_matrix()
451
- s += '\nInitial probabilities: %s'%self.initial_probabilities()
449
+ s += '\nTransition matrix:\n%s' % self.transition_matrix()
450
+ s += '\nEmission matrix:\n%s' % self.emission_matrix()
451
+ s += '\nInitial probabilities: %s' % self.initial_probabilities()
452
452
  if self._emission_symbols is not None:
453
- s += '\nEmission symbols: %s'%self._emission_symbols
453
+ s += '\nEmission symbols: %s' % self._emission_symbols
454
454
  return s
455
455
 
456
456
  def _emission_symbols_to_IntList(self, obs):
@@ -774,7 +774,7 @@ cdef class DiscreteHiddenMarkovModel(HiddenMarkovModel):
774
774
  else:
775
775
  q = starting_state
776
776
  if q < 0 or q >= self.N:
777
- raise ValueError("starting state must be between 0 and %s"%(self.N-1))
777
+ raise ValueError("starting state must be between 0 and %s" % (self.N-1))
778
778
 
779
779
  states._values[0] = q
780
780
  # Generate a symbol from state q
Binary file
sage/stats/hmm/util.pyx CHANGED
@@ -5,19 +5,20 @@ Hidden Markov Models -- Utility functions
5
5
 
6
6
  AUTHOR:
7
7
 
8
- - William Stein, 2010-03
8
+ - William Stein, 2010-03
9
9
  """
10
10
 
11
- #############################################################################
11
+ # ##########################################################################
12
12
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
13
13
  # Distributed under the terms of the GNU General Public License (GPL) v2+.
14
14
  # The full text of the GPL is available at:
15
- # http://www.gnu.org/licenses/
16
- #############################################################################
15
+ # https://www.gnu.org/licenses/
16
+ # ##########################################################################
17
17
 
18
18
 
19
19
  from sage.structure.element import Matrix
20
- from sage.misc.flatten import flatten
20
+ from sage.misc.flatten import flatten
21
+
21
22
 
22
23
  cdef class HMM_Util:
23
24
  """
@@ -124,7 +125,6 @@ cdef class HMM_Util:
124
125
  This function is used internally by the ``__init__`` methods of
125
126
  Hidden Markov Models to make a transition matrix from ``A``.
126
127
 
127
-
128
128
  INPUT:
129
129
 
130
130
  - ``A`` -- matrix, list, list of lists, or :class:`TimeSeries`
Binary file
sage/stats/intlist.pxd CHANGED
@@ -1,10 +1,10 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
- #############################################################################
2
+ # ##########################################################################
3
3
  # Copyright (C) 2010 William Stein <wstein@gmail.com>
4
4
  # Distributed under the terms of the GNU General Public License (GPL) v2+.
5
5
  # The full text of the GPL is available at:
6
- # http://www.gnu.org/licenses/
7
- #############################################################################
6
+ # https://www.gnu.org/licenses/
7
+ # ##########################################################################
8
8
 
9
9
  cdef class IntList:
10
10
  cdef int* _values
@@ -28,14 +28,14 @@ REFERENCES:
28
28
  - Chap. 23 of R. Godement : *Algebra* [God1968]_
29
29
  - Chap. 15 of S. Lang : *Algebra* [Lan2002]_
30
30
  """
31
- #******************************************************************************
31
+ # ****************************************************************************
32
32
  # Copyright (C) 2017 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
33
33
  #
34
34
  # Distributed under the terms of the GNU General Public License (GPL)
35
35
  # as published by the Free Software Foundation; either version 2 of
36
36
  # the License, or (at your option) any later version.
37
- # http://www.gnu.org/licenses/
38
- #******************************************************************************
37
+ # https://www.gnu.org/licenses/
38
+ # ****************************************************************************
39
39
 
40
40
  from sage.tensor.modules.free_module_tensor import FreeModuleTensor
41
41
  from sage.tensor.modules.comp import Components, CompFullyAntiSym
@@ -233,7 +233,7 @@ In case of symmetries, only non-redundant components are stored::
233
233
  {(0, 1): 3}
234
234
  """
235
235
 
236
- # *****************************************************************************
236
+ # ****************************************************************************
237
237
  # Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
238
238
  # Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
239
239
  # Copyright (C) 2015 Marco Mancini <marco.mancini@obspm.fr>
@@ -241,8 +241,8 @@ In case of symmetries, only non-redundant components are stored::
241
241
  # Distributed under the terms of the GNU General Public License (GPL)
242
242
  # as published by the Free Software Foundation; either version 2 of
243
243
  # the License, or (at your option) any later version.
244
- # http://www.gnu.org/licenses/
245
- #******************************************************************************
244
+ # https://www.gnu.org/licenses/
245
+ # ****************************************************************************
246
246
 
247
247
  from sage.structure.sage_object import SageObject
248
248
  from sage.rings.integer import Integer
@@ -46,14 +46,14 @@ REFERENCES:
46
46
  - \K. Conrad: *Exterior powers* [Con2013]_
47
47
  - Chap. 19 of S. Lang: *Algebra* [Lan2002]_
48
48
  """
49
- #******************************************************************************
49
+ # ****************************************************************************
50
50
  # Copyright (C) 2017 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
51
51
  #
52
52
  # Distributed under the terms of the GNU General Public License (GPL)
53
53
  # as published by the Free Software Foundation; either version 2 of
54
54
  # the License, or (at your option) any later version.
55
- # http://www.gnu.org/licenses/
56
- #******************************************************************************
55
+ # https://www.gnu.org/licenses/
56
+ # ****************************************************************************
57
57
 
58
58
  from sage.misc.cachefunc import cached_method
59
59
  from sage.rings.integer import Integer
@@ -11,15 +11,15 @@ AUTHORS:
11
11
  - Michael Jung (2020): extended usage of :func:`is_atomic()`
12
12
  """
13
13
 
14
- #******************************************************************************
14
+ # ****************************************************************************
15
15
  # Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
16
16
  # Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
17
17
  #
18
18
  # Distributed under the terms of the GNU General Public License (GPL)
19
19
  # as published by the Free Software Foundation; either version 2 of
20
20
  # the License, or (at your option) any later version.
21
- # http://www.gnu.org/licenses/
22
- #******************************************************************************
21
+ # https://www.gnu.org/licenses/
22
+ # ****************************************************************************
23
23
  from __future__ import annotations
24
24
 
25
25
  from typing import TYPE_CHECKING
@@ -20,14 +20,14 @@ REFERENCES:
20
20
 
21
21
  - Chap. 15 of R. Godement : *Algebra* [God1968]_
22
22
  """
23
- #******************************************************************************
23
+ # ****************************************************************************
24
24
  # Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
25
25
  #
26
26
  # Distributed under the terms of the GNU General Public License (GPL)
27
27
  # as published by the Free Software Foundation; either version 2 of
28
28
  # the License, or (at your option) any later version.
29
- # http://www.gnu.org/licenses/
30
- #******************************************************************************
29
+ # https://www.gnu.org/licenses/
30
+ # ****************************************************************************
31
31
 
32
32
  from sage.misc.cachefunc import cached_method
33
33
  from sage.structure.unique_representation import UniqueRepresentation
@@ -1359,7 +1359,6 @@ class FiniteRankFreeModuleEndomorphism(FiniteRankFreeModuleMorphism):
1359
1359
  sage: latex(phi)
1360
1360
  \mathrm{Id}
1361
1361
  """
1362
- from sage.matrix.special import identity_matrix
1363
1362
  from sage.misc.constant_function import ConstantFunction
1364
1363
 
1365
1364
  fmodule = parent.domain()
@@ -48,15 +48,15 @@ REFERENCES:
48
48
  - Chap. 21 (Exer. 4) of R. Godement: *Algebra* [God1968]_
49
49
  - Chap. 16 of S. Lang: *Algebra* [Lan2002]_
50
50
  """
51
- #******************************************************************************
51
+ # ****************************************************************************
52
52
  # Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
53
53
  # Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
54
54
  #
55
55
  # Distributed under the terms of the GNU General Public License (GPL)
56
56
  # as published by the Free Software Foundation; either version 2 of
57
57
  # the License, or (at your option) any later version.
58
- # http://www.gnu.org/licenses/
59
- #******************************************************************************
58
+ # https://www.gnu.org/licenses/
59
+ # ****************************************************************************
60
60
 
61
61
  from sage.categories.modules import Modules
62
62
  from sage.misc.cachefunc import cached_method
@@ -13,7 +13,7 @@ AUTHORS:
13
13
  # Distributed under the terms of the GNU General Public License (GPL)
14
14
  # as published by the Free Software Foundation; either version 2 of
15
15
  # the License, or (at your option) any later version.
16
- # http://www.gnu.org/licenses/
16
+ # https://www.gnu.org/licenses/
17
17
  # ******************************************************************************
18
18
 
19
19
  import itertools
@@ -13,7 +13,7 @@ AUTHORS:
13
13
  # Distributed under the terms of the GNU General Public License (GPL)
14
14
  # as published by the Free Software Foundation; either version 2 of
15
15
  # the License, or (at your option) any later version.
16
- # http://www.gnu.org/licenses/
16
+ # https://www.gnu.org/licenses/
17
17
  # ******************************************************************************
18
18
 
19
19
  from sage.tensor.modules.free_module_basis import Basis_abstract
@@ -8,19 +8,19 @@ AUTHORS:
8
8
  - Eric Gourgoulhon, Michal Bejger (2014-2015): initial version
9
9
  - Léo Brunswic (2019): add multiple symmetries and multiple contractions
10
10
  """
11
- #******************************************************************************
11
+ # ****************************************************************************
12
12
  # Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
13
13
  # Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
14
14
  #
15
15
  # Distributed under the terms of the GNU General Public License (GPL)
16
16
  # as published by the Free Software Foundation; either version 2 of
17
17
  # the License, or (at your option) any later version.
18
- # http://www.gnu.org/licenses/
19
- #******************************************************************************
18
+ # https://www.gnu.org/licenses/
19
+ # ****************************************************************************
20
+ from itertools import combinations
21
+ import re
20
22
 
21
23
  from sage.structure.sage_object import SageObject
22
- import re
23
- from itertools import combinations
24
24
 
25
25
  # Regular expression for the allowed characters in index notation.
26
26
  # This includes Unicode word constituents but excludes digits and underscores.