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
@@ -453,12 +453,13 @@ examples.
453
453
  # Distributed under the terms of the GNU General Public License (GPL)
454
454
  # ****************************************************************************
455
455
 
456
- from sage.combinat.free_module import CombinatorialFreeModule
457
- from sage.misc.lazy_attribute import lazy_attribute
458
- from sage.misc.cachefunc import cached_method
456
+ from sage.categories.homset import Hom
459
457
  from sage.categories.modules_with_basis import ModulesWithBasis
460
458
  from sage.categories.tensor import tensor
461
- from sage.categories.homset import Hom
459
+ from sage.combinat.free_module import CombinatorialFreeModule
460
+ from sage.misc.cachefunc import cached_method
461
+ from sage.misc.lazy_attribute import lazy_attribute
462
+ from sage.sets.family import Family
462
463
 
463
464
  ######################################################
464
465
  # the main class
@@ -2109,7 +2110,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2109
2110
  sage: A1._element_constructor_(Sq(4)) # Sq(4) not in A1
2110
2111
  Traceback (most recent call last):
2111
2112
  ...
2112
- ValueError: Element does not lie in this Steenrod algebra
2113
+ ValueError: element does not lie in this Steenrod algebra
2113
2114
  sage: A1({(2,): 1, (1,): 13})
2114
2115
  Sq(1) + Sq(2)
2115
2116
  """
@@ -2131,7 +2132,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2131
2132
  if self.basis_name() == 'milnor':
2132
2133
  return a
2133
2134
  return a.change_basis(self.basis_name())
2134
- raise ValueError("Element does not lie in this Steenrod algebra")
2135
+ raise ValueError("element does not lie in this Steenrod algebra")
2135
2136
 
2136
2137
  def __contains__(self, x):
2137
2138
  r"""
@@ -2343,7 +2344,8 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2343
2344
  """
2344
2345
  from sage.rings.integer import Integer
2345
2346
  if self.basis_name() != 'milnor':
2346
- return self(SteenrodAlgebra(p=self.prime(),generic=self._generic).P(*nums))
2347
+ return self(SteenrodAlgebra(p=self.prime(),
2348
+ generic=self._generic).P(*nums))
2347
2349
  while nums and nums[-1] == 0:
2348
2350
  nums = nums[:-1]
2349
2351
  if len(nums) == 0 or (len(nums) == 1 and nums[0] == 0):
@@ -2359,10 +2361,11 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2359
2361
  else:
2360
2362
  t = ((), nums)
2361
2363
  if self._check_profile_on_basis(t):
2362
- A = SteenrodAlgebra_generic(p=self.prime(),generic=self._generic)
2364
+ A = SteenrodAlgebra_generic(p=self.prime(),
2365
+ generic=self._generic)
2363
2366
  a = A.monomial(t)
2364
2367
  return self(a)
2365
- raise ValueError("Element not in this algebra")
2368
+ raise ValueError("element not in this algebra")
2366
2369
 
2367
2370
  def Q_exp(self, *nums):
2368
2371
  r"""
@@ -2399,7 +2402,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2399
2402
  Q_0 Q_2
2400
2403
  """
2401
2404
  if not all(x in (0, 1) for x in nums):
2402
- raise ValueError("The tuple %s should consist " % (nums,) +
2405
+ raise ValueError("the tuple %s should consist " % (nums,) +
2403
2406
  "only of 0s and 1s")
2404
2407
  else:
2405
2408
  if self.basis_name() != 'milnor':
@@ -2452,13 +2455,14 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2452
2455
  sage: H.Q(4)
2453
2456
  Traceback (most recent call last):
2454
2457
  ...
2455
- ValueError: Element not in this algebra
2458
+ ValueError: element not in this algebra
2456
2459
  """
2457
2460
  if len(nums) != len(set(nums)):
2458
2461
  return self(0)
2459
2462
  else:
2460
2463
  if self.basis_name() != 'milnor':
2461
- return self(SteenrodAlgebra(p=self.prime(),generic=self._generic).Q(*nums))
2464
+ return self(SteenrodAlgebra(p=self.prime(),
2465
+ generic=self._generic).Q(*nums))
2462
2466
  if not self._generic:
2463
2467
  if len(nums) == 0:
2464
2468
  return self.one()
@@ -2474,9 +2478,9 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2474
2478
  t = answer.leading_support()
2475
2479
  if self._check_profile_on_basis(t):
2476
2480
  return answer
2477
- raise ValueError("Element not in this algebra")
2481
+ raise ValueError("element not in this algebra")
2478
2482
 
2479
- def an_element(self):
2483
+ def _an_element_(self):
2480
2484
  """
2481
2485
  An element of this Steenrod algebra.
2482
2486
 
@@ -2509,29 +2513,32 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2509
2513
  return self.one()
2510
2514
 
2511
2515
  if basis == 'milnor' and not self._generic:
2512
- return self.monomial((2,1))
2516
+ return self.monomial((2, 1))
2513
2517
  if basis == 'milnor' and self._generic:
2514
- return self.term(((1,3), (2,1)), GF(p)(p-1))
2518
+ return self.term(((1, 3), (2, 1)), GF(p)(p - 1))
2515
2519
  if basis == 'serre-cartan' and not self._generic:
2516
- return self.monomial((4,2,1))
2520
+ return self.monomial((4, 2, 1))
2517
2521
  if basis == 'serre-cartan' and self._generic:
2518
- return self.term((1,p,0,1,0), GF(p)(p-1))
2522
+ return self.term((1, p, 0, 1, 0), GF(p)(p - 1))
2519
2523
  if basis == 'woody' or basis == 'woodz':
2520
- return self._from_dict({((3,0),): 1, ((1, 1), (1, 0)): 1}, coerce=True)
2524
+ return self._from_dict({((3, 0),): 1,
2525
+ ((1, 1), (1, 0)): 1}, coerce=True)
2521
2526
  if basis.find('wall') >= 0:
2522
- return self._from_dict({((1,1), (1,0)): 1, ((2, 2), (0, 0)): 1}, coerce=True)
2527
+ return self._from_dict({((1, 1), (1, 0)): 1,
2528
+ ((2, 2), (0, 0)): 1}, coerce=True)
2523
2529
  if basis.find('arnona') >= 0:
2524
- return self._from_dict({((3,3),): 1, ((1, 1), (2, 1)): 1}, coerce=True)
2530
+ return self._from_dict({((3, 3),): 1,
2531
+ ((1, 1), (2, 1)): 1}, coerce=True)
2525
2532
  if basis == 'arnonc':
2526
2533
  return self._from_dict({(8,): 1, (4, 4): 1}, coerce=True)
2527
2534
  if basis.find('pst') >= 0:
2528
2535
  if not self._generic:
2529
2536
  return self.monomial(((3, 1),))
2530
- return self.term(((1,), (((1,1), 2),)), GF(p)(p-1))
2537
+ return self.term(((1,), (((1, 1), 2),)), GF(p)(p - 1))
2531
2538
  if basis.find('comm') >= 0:
2532
2539
  if not self._generic:
2533
2540
  return self.monomial(((1, 2),))
2534
- return self.term(((), (((1,2), 1),)), GF(p)(p-1))
2541
+ return self.term(((), (((1, 2), 1),)), GF(p)(p - 1))
2535
2542
 
2536
2543
  def pst(self, s, t):
2537
2544
  r"""
@@ -2564,7 +2571,8 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2564
2571
  """
2565
2572
  from sage.rings.integer import Integer
2566
2573
  if self.basis_name() != 'milnor':
2567
- return self(SteenrodAlgebra(p=self.prime(),generic=self._generic).pst(s,t))
2574
+ return self(SteenrodAlgebra(p=self.prime(),
2575
+ generic=self._generic).pst(s, t))
2568
2576
  if not isinstance(s, (Integer, int)) and s >= 0:
2569
2577
  raise ValueError("%s is not a nonnegative integer" % s)
2570
2578
  if not isinstance(t, (Integer, int)) and t > 0:
@@ -2620,7 +2628,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2620
2628
  return sum(self._profile)
2621
2629
  return sum(self._profile[0]) + len([a for a in self._profile[1] if a == 2])
2622
2630
 
2623
- def gens(self):
2631
+ def gens(self) -> Family:
2624
2632
  r"""
2625
2633
  Family of generators for this algebra.
2626
2634
 
@@ -2677,7 +2685,6 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2677
2685
  sage: SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]]).algebra_generators()
2678
2686
  Family (Q_0, P(1), P(5))
2679
2687
  """
2680
- from sage.sets.family import Family
2681
2688
  from sage.sets.non_negative_integers import NonNegativeIntegers
2682
2689
  from sage.rings.infinity import Infinity
2683
2690
  n = self.ngens()
@@ -2739,7 +2746,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2739
2746
  sage: SteenrodAlgebra(profile=[1,2,1]).gen(5)
2740
2747
  Traceback (most recent call last):
2741
2748
  ...
2742
- ValueError: This algebra only has 4 generators, so call gen(i) with 0 <= i < 4
2749
+ ValueError: this algebra only has 4 generators, so call gen(i) with 0 <= i < 4
2743
2750
 
2744
2751
  sage: D = SteenrodAlgebra(profile=lambda n: n)
2745
2752
  sage: [D.gen(n) for n in range(5)]
@@ -2761,11 +2768,11 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
2761
2768
  num = self.ngens()
2762
2769
  if num < Infinity:
2763
2770
  if i >= num:
2764
- raise ValueError("This algebra only has %s generators, so call gen(i) with 0 <= i < %s" % (num, num))
2771
+ raise ValueError("this algebra only has %s generators, so call gen(i) with 0 <= i < %s" % (num, num))
2765
2772
  # check to see if equal to A(n) for some n.
2766
2773
  n = self.profile(1)
2767
2774
  if not self._generic and self._profile == AA(n-1, p=p)._profile:
2768
- return self.pst(i,1)
2775
+ return self.pst(i, 1)
2769
2776
  if self._generic and self._profile == AA(n, p=p)._profile:
2770
2777
  if i == 0:
2771
2778
  return self.Q(0)
@@ -3053,7 +3060,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
3053
3060
  """
3054
3061
  return self.is_field()
3055
3062
 
3056
- def is_noetherian(self):
3063
+ def is_noetherian(self) -> bool:
3057
3064
  """
3058
3065
  This algebra is Noetherian if and only if it is finite.
3059
3066
 
@@ -355,7 +355,7 @@ def steenrod_algebra_basis(n, basis='milnor', p=2, **kwds):
355
355
  profile = kwds.get("profile", None)
356
356
  if (profile is not None and profile != () and profile != ((), ())
357
357
  and basis != 'milnor' and basis.find('pst') == -1):
358
- raise ValueError("Profile functions may only be used with the Milnor or pst bases")
358
+ raise ValueError("profile functions may only be used with the Milnor or pst bases")
359
359
 
360
360
  # Milnor basis
361
361
  if basis_name == 'milnor':
@@ -377,7 +377,7 @@ def steenrod_algebra_basis(n, basis='milnor', p=2, **kwds):
377
377
  elif not generic and basis == 'arnonc':
378
378
  return arnonC_basis(n)
379
379
  else:
380
- raise ValueError("Unknown basis: %s at the prime %s" % (basis, p))
380
+ raise ValueError("unknown basis: %s at the prime %s" % (basis, p))
381
381
 
382
382
 
383
383
  # helper functions for producing bases
@@ -414,7 +414,7 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
414
414
  sage: normalize_profile(lambda n: 3, precision=4, truncation_type=0)
415
415
  Traceback (most recent call last):
416
416
  ...
417
- ValueError: Invalid profile
417
+ ValueError: invalid profile
418
418
  sage: normalize_profile(lambda n: 3, precision=4, truncation_type = Infinity)
419
419
  ((3, 3, 3), +Infinity)
420
420
 
@@ -458,7 +458,7 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
458
458
  sage: normalize_profile([[0,0,0], [1,2,3,2,1]], p=11)
459
459
  Traceback (most recent call last):
460
460
  ...
461
- ValueError: Invalid profile
461
+ ValueError: invalid profile
462
462
  """
463
463
  from sage.rings.infinity import Infinity
464
464
  if truncation_type == 'zero':
@@ -501,7 +501,7 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
501
501
  if is_valid_profile(new_profile, truncation_type, p):
502
502
  return new_profile, truncation_type
503
503
  else:
504
- raise ValueError("Invalid profile")
504
+ raise ValueError("invalid profile")
505
505
  else: # p odd
506
506
  if profile is None or profile == Infinity:
507
507
  # no specified profile or infinite profile: return profile
@@ -561,7 +561,7 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
561
561
  if is_valid_profile(new_profile, truncation_type, p, generic=True):
562
562
  return new_profile, truncation_type
563
563
  else:
564
- raise ValueError("Invalid profile")
564
+ raise ValueError("invalid profile")
565
565
 
566
566
  ######################################################
567
567
  # string representations for elements
@@ -195,10 +195,10 @@ squares or `p`-th power operations and Bocksteins into a dictionary
195
195
  representing a sum of admissible monomials.
196
196
  """
197
197
 
198
- #*****************************************************************************
198
+ # ****************************************************************************
199
199
  # Copyright (C) 2008-2010 John H. Palmieri <palmieri@math.washington.edu>
200
200
  # Distributed under the terms of the GNU General Public License (GPL)
201
- #*****************************************************************************
201
+ # ****************************************************************************
202
202
 
203
203
  from sage.misc.cachefunc import cached_function
204
204
 
@@ -1,4 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
+ # delvewheel: patch
2
3
  r"""
3
4
  Top level of the distribution package sagemath-modules
4
5
 
@@ -74,7 +74,7 @@ cdef double c_f(double t, void *params) noexcept:
74
74
 
75
75
  def numerical_integral(func, a, b=None,
76
76
  algorithm='qag',
77
- max_points=87, params=[], eps_abs=1e-6,
77
+ max_points=87, params=None, eps_abs=1e-6,
78
78
  eps_rel=1e-6, rule=6):
79
79
  r"""
80
80
  Return the numerical integral of the function on the interval
@@ -268,8 +268,6 @@ def numerical_integral(func, a, b=None,
268
268
  """
269
269
  cdef double abs_err # step size
270
270
  cdef double result
271
- cdef int i
272
- cdef int j
273
271
  cdef double _a, _b
274
272
  cdef PyFunctionWrapper wrapper # struct to pass information into GSL C function
275
273
 
@@ -289,6 +287,9 @@ def numerical_integral(func, a, b=None,
289
287
  cdef gsl_integration_workspace* W
290
288
  W = NULL
291
289
 
290
+ if params is None:
291
+ params = []
292
+
292
293
  if True:
293
294
  from sage.rings.infinity import Infinity
294
295
  try:
@@ -620,7 +621,7 @@ def monte_carlo_integral(func, xl, xu, size_t calls, algorithm='plain',
620
621
  if len(vars) < target_dim:
621
622
  raise ValueError(("The function to be integrated depends on "
622
623
  "{} variables {}, and so cannot be "
623
- "integrated in {} dimensions. Please fix "
624
+ "integrated in {} dimensions. Please fix "
624
625
  "additional variables with the 'params' "
625
626
  "argument").format(len(vars), tuple(vars),
626
627
  target_dim))
@@ -629,7 +630,7 @@ def monte_carlo_integral(func, xl, xu, size_t calls, algorithm='plain',
629
630
  "{} variables {}, and so cannot be "
630
631
  "integrated in {} dimensions. Please add "
631
632
  "more items in upper and lower limits"
632
- ).format(len(vars), tuple(vars), target_dim))
633
+ ).format(len(vars), tuple(vars), target_dim))
633
634
 
634
635
  from sage.structure.element import Expression
635
636
  if isinstance(func, Expression):
Binary file
sage/calculus/ode.pxd CHANGED
@@ -1,5 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
2
  cdef class ode_system:
3
- cdef int c_j(self, double , double *, double *, double *) noexcept
3
+ cdef int c_j(self, double , double *, double *, double *) noexcept
4
4
 
5
- cdef int c_f(self, double t, double* , double* ) noexcept
5
+ cdef int c_f(self, double t, double* , double*) noexcept
sage/calculus/ode.pyx CHANGED
@@ -343,7 +343,9 @@ class ode_solver():
343
343
  sage: with NamedTemporaryFile(suffix='.png') as f:
344
344
  ....: T.plot_solution(i=0, filename=f.name)
345
345
  """
346
- def __init__(self, function=None, jacobian=None, h=1e-2, error_abs=1e-10, error_rel=1e-10, a=False, a_dydt=False, scale_abs=False, algorithm='rkf45', y_0=None, t_span=None, params=[]):
346
+ def __init__(self, function=None, jacobian=None, h=1e-2, error_abs=1e-10,
347
+ error_rel=1e-10, a=False, a_dydt=False, scale_abs=False,
348
+ algorithm='rkf45', y_0=None, t_span=None, params=None):
347
349
  self.function = function
348
350
  self.jacobian = jacobian
349
351
  self.h = h
@@ -355,7 +357,7 @@ class ode_solver():
355
357
  self.algorithm = algorithm
356
358
  self.y_0 = y_0
357
359
  self.t_span = t_span
358
- self.params = params
360
+ self.params = [] if params is None else params
359
361
  self.solution = []
360
362
 
361
363
  def __setattr__(self, name, value):
@@ -408,7 +410,7 @@ class ode_solver():
408
410
  else:
409
411
  G.save(filename=filename)
410
412
 
411
- def ode_solve(self, t_span=False, y_0=False, num_points=False, params=[]):
413
+ def ode_solve(self, t_span=False, y_0=False, num_points=False, params=None):
412
414
  cdef double h # step size
413
415
  h = self.h
414
416
  cdef int i
@@ -416,7 +418,7 @@ class ode_solver():
416
418
  cdef int type
417
419
  cdef int dim
418
420
  cdef PyFunctionWrapper wrapper # struct to pass information into GSL C function
419
- self.params = params
421
+ self.params = [] if params is None else params
420
422
 
421
423
  if t_span:
422
424
  self.t_span = t_span
Binary file
sage/calculus/riemann.pyx CHANGED
@@ -52,7 +52,7 @@ from math import pi
52
52
  from math import sin
53
53
  from math import cos
54
54
 
55
- from math import log # used for complex plot lightness
55
+ from math import log # used for complex plot lightness
56
56
  from math import atan
57
57
 
58
58
  from cmath import exp
@@ -202,7 +202,7 @@ cdef class Riemann_Map:
202
202
  cdef exterior
203
203
 
204
204
  def __init__(self, fs, fprimes, COMPLEX_T a, int N=500, int ncorners=4,
205
- opp=False, exterior = False):
205
+ opp=False, exterior=False):
206
206
  """
207
207
  Initialize the ``Riemann_Map`` class. See the class :class:`Riemann_Map`
208
208
  for full documentation on the input of this initialization method.
@@ -228,7 +228,7 @@ cdef class Riemann_Map:
228
228
  self.f = fs[0]
229
229
  self.a = a
230
230
  self.ncorners = ncorners
231
- self.N = N # Number of collocation pts
231
+ self.N = N # Number of collocation pts
232
232
  self.opp = opp
233
233
  self.exterior = exterior
234
234
  self.tk = np.array(np.arange(N) * TWOPI / N + 0.001 / N,
@@ -237,14 +237,14 @@ cdef class Riemann_Map:
237
237
  for i in range(N):
238
238
  self.tk2[i] = self.tk[i]
239
239
  self.tk2[N] = TWOPI
240
- self.B = len(fs) # number of boundaries of the figure
240
+ self.B = len(fs) # number of boundaries of the figure
241
241
  if self.exterior and (self.B > 1):
242
242
  raise ValueError(
243
243
  "The exterior map is undefined for multiply connected domains")
244
244
  cdef np.ndarray[COMPLEX_T,ndim=2] cps = np.zeros([self.B, N],
245
- dtype=COMPLEX)
245
+ dtype=COMPLEX)
246
246
  cdef np.ndarray[COMPLEX_T,ndim=2] dps = np.zeros([self.B, N],
247
- dtype=COMPLEX)
247
+ dtype=COMPLEX)
248
248
  # Find the points on the boundaries and their derivatives.
249
249
  if self.exterior:
250
250
  for k in range(self.B):
@@ -322,14 +322,14 @@ cdef class Riemann_Map:
322
322
  hconj = h.conjugate()
323
323
  g = -sadp * hconj
324
324
  normalized_dp=dp/adp
325
- C = I / N * sadp # equivalent to -TWOPI / N * 1 / (TWOPI * I) * sadp
326
- errinvalid = np.geterr()['invalid'] # checks the current error handling for invalid
327
- errdivide = np.geterr()['divide'] # checks the current error handling for divide
325
+ C = I / N * sadp # equivalent to -TWOPI / N * 1 / (TWOPI * I) * sadp
326
+ errinvalid = np.geterr()['invalid'] # checks the current error handling for invalid
327
+ errdivide = np.geterr()['divide'] # checks the current error handling for divide
328
328
  np.seterr(divide='ignore',invalid='ignore')
329
329
  K = np.array([C * sadp[t] * (normalized_dp/(cp-cp[t]) -
330
- (normalized_dp[t]/(cp-cp[t])).conjugate())
331
- for t in np.arange(NB)], dtype=np.complex128)
332
- np.seterr(divide=errdivide,invalid=errinvalid) # resets the error handling
330
+ (normalized_dp[t]/(cp-cp[t])).conjugate())
331
+ for t in np.arange(NB)], dtype=np.complex128)
332
+ np.seterr(divide=errdivide,invalid=errinvalid) # resets the error handling
333
333
  for i in range(NB):
334
334
  K[i, i] = 1
335
335
  # Nystrom Method for solving 2nd kind integrals
@@ -337,7 +337,6 @@ cdef class Riemann_Map:
337
337
  # the all-important Szego kernel
338
338
  szego = np.array(phi.flatten() / np.sqrt(dp), dtype=COMPLEX)
339
339
  self.szego = szego.reshape([B, N])
340
- start = 0
341
340
  # Finding the theta correspondence using phase. Misbehaves for some
342
341
  # regions.
343
342
  if B != 1:
@@ -432,7 +431,6 @@ cdef class Riemann_Map:
432
431
  sage: sz0 = m.get_szego(boundary=0)
433
432
  sage: sz1 = m.get_szego(boundary=1)
434
433
  """
435
- cdef int k, B
436
434
  if boundary < 0:
437
435
  temptk = self.tk
438
436
  for i in range(self.B - 1):
@@ -707,10 +705,11 @@ cdef class Riemann_Map:
707
705
  else:
708
706
  return mapped
709
707
 
710
- def plot_boundaries(self, plotjoined=True, rgbcolor=[0,0,0], thickness=1):
708
+ def plot_boundaries(self, plotjoined=True, rgbcolor=None, thickness=1):
711
709
  """
712
- Plots the boundaries of the region for the Riemann map. Note that
713
- this method DOES work for multiply connected domains.
710
+ Plot the boundaries of the region for the Riemann map.
711
+
712
+ Note that this method DOES work for multiply connected domains.
714
713
 
715
714
  INPUT:
716
715
 
@@ -748,6 +747,9 @@ cdef class Riemann_Map:
748
747
  """
749
748
  from sage.plot.all import list_plot
750
749
 
750
+ if rgbcolor is None:
751
+ rgbcolor = [0, 0, 0]
752
+
751
753
  plots = list(range(self.B))
752
754
  for k in range(self.B):
753
755
  # This conditional should be eliminated when the thickness/pointsize
@@ -828,8 +830,9 @@ cdef class Riemann_Map:
828
830
 
829
831
  @options(interpolation='catrom')
830
832
  def plot_spiderweb(self, spokes=16, circles=4, pts=32, linescale=0.99,
831
- rgbcolor=[0, 0, 0], thickness=1, plotjoined=True, withcolor=False,
832
- plot_points=200, min_mag=0.001, **options):
833
+ rgbcolor=None, thickness=1,
834
+ plotjoined=True, withcolor=False,
835
+ plot_points=200, min_mag=0.001, **options):
833
836
  """
834
837
  Generate a traditional "spiderweb plot" of the Riemann map.
835
838
 
@@ -945,12 +948,16 @@ cdef class Riemann_Map:
945
948
  cdef int k, i
946
949
  if self.exterior:
947
950
  raise ValueError(
948
- "Spiderwebs for exterior maps are not currently supported")
951
+ "Spiderwebs for exterior maps are not currently supported")
952
+
953
+ if rgbcolor is None:
954
+ rgbcolor = [0, 0, 0]
955
+
949
956
  if self.B == 1: # The efficient simply connected
950
957
  edge = self.plot_boundaries(plotjoined=plotjoined,
951
- rgbcolor=rgbcolor, thickness=thickness)
958
+ rgbcolor=rgbcolor,
959
+ thickness=thickness)
952
960
  circle_list = list(range(circles))
953
- theta_array = self.theta_array[0]
954
961
  s = spline(np.column_stack([self.theta_array[0], self.tk2]).tolist())
955
962
  tmax = self.theta_array[0, self.N]
956
963
  tmin = self.theta_array[0, 0]
@@ -961,10 +968,13 @@ cdef class Riemann_Map:
961
968
  (k + 1) / (circles + 1.0) * exp(I*i * TWOPI / (2*pts)))
962
969
  if plotjoined:
963
970
  circle_list[k] = list_plot(comp_pt(temp, 1),
964
- rgbcolor=rgbcolor, thickness=thickness, plotjoined=True)
971
+ rgbcolor=rgbcolor,
972
+ thickness=thickness,
973
+ plotjoined=True)
965
974
  else:
966
975
  circle_list[k] = list_plot(comp_pt(temp, 1),
967
- rgbcolor=rgbcolor, pointsize=thickness)
976
+ rgbcolor=rgbcolor,
977
+ pointsize=thickness)
968
978
  line_list = list(range(spokes))
969
979
  for k in range(spokes):
970
980
  temp = list(range(pts))
@@ -990,24 +1000,31 @@ cdef class Riemann_Map:
990
1000
  self.plot_colored(plot_points=plot_points)
991
1001
  else:
992
1002
  return edge + sum(circle_list) + sum(line_list)
993
- else: # The more difficult multiply connected
1003
+ else: # The more difficult multiply connected
994
1004
  z_values, xmin, xmax, ymin, ymax = self.compute_on_grid([],
995
- plot_points)
1005
+ plot_points)
996
1006
  xstep = (xmax-xmin)/plot_points
997
1007
  ystep = (ymax-ymin)/plot_points
998
- dr, dtheta= get_derivatives(z_values, xstep, ystep) # clean later
1008
+ dr, dtheta= get_derivatives(z_values, xstep, ystep) # clean later
999
1009
 
1000
1010
  g = Graphics()
1001
- g.add_primitive(ComplexPlot(complex_to_spiderweb(z_values,dr,dtheta,
1002
- spokes, circles, rgbcolor,thickness, withcolor, min_mag),
1003
- (xmin, xmax), (ymin, ymax),options))
1011
+ g.add_primitive(ComplexPlot(complex_to_spiderweb(z_values, dr,
1012
+ dtheta, spokes,
1013
+ circles,
1014
+ rgbcolor,
1015
+ thickness,
1016
+ withcolor,
1017
+ min_mag),
1018
+ (xmin, xmax), (ymin, ymax),options))
1004
1019
  return g + self.plot_boundaries(thickness = thickness)
1005
1020
 
1006
1021
  @options(interpolation='catrom')
1007
- def plot_colored(self, plot_range=[], int plot_points=100, **options):
1022
+ def plot_colored(self, plot_range=None, int plot_points=100, **options):
1008
1023
  """
1009
- Generates a colored plot of the Riemann map. A red point on the
1010
- colored plot corresponds to a red point on the unit disc.
1024
+ Generate a colored plot of the Riemann map.
1025
+
1026
+ A red point on the colored plot corresponds to a red point on
1027
+ the unit disc.
1011
1028
 
1012
1029
  INPUT:
1013
1030
 
@@ -1054,11 +1071,14 @@ cdef class Riemann_Map:
1054
1071
  from sage.plot.complex_plot import ComplexPlot
1055
1072
  from sage.plot.all import Graphics
1056
1073
 
1074
+ if plot_range is None:
1075
+ plot_range = []
1076
+
1057
1077
  z_values, xmin, xmax, ymin, ymax = self.compute_on_grid(plot_range,
1058
- plot_points)
1078
+ plot_points)
1059
1079
  g = Graphics()
1060
1080
  g.add_primitive(ComplexPlot(complex_to_rgb(z_values), (xmin, xmax),
1061
- (ymin, ymax),options))
1081
+ (ymin, ymax), options))
1062
1082
  return g
1063
1083
 
1064
1084
  cdef comp_pt(clist, loop=True):
@@ -1090,8 +1110,8 @@ cdef comp_pt(clist, loop=True):
1090
1110
  list2.append(list2[0])
1091
1111
  return list2
1092
1112
 
1093
- cpdef get_derivatives(np.ndarray[COMPLEX_T, ndim=2] z_values, FLOAT_T xstep,
1094
- FLOAT_T ystep):
1113
+ cpdef get_derivatives(np.ndarray[COMPLEX_T, ndim=2] z_values,
1114
+ FLOAT_T xstep, FLOAT_T ystep):
1095
1115
  """
1096
1116
  Compute the r*e^(I*theta) form of derivatives from the grid of points. The
1097
1117
  derivatives are computed using quick-and-dirty taylor expansion and
@@ -1133,8 +1153,6 @@ cpdef get_derivatives(np.ndarray[COMPLEX_T, ndim=2] z_values, FLOAT_T xstep,
1133
1153
  """
1134
1154
  cdef np.ndarray[COMPLEX_T, ndim=2] xderiv
1135
1155
  cdef np.ndarray[FLOAT_T, ndim = 2] dr, dtheta, zabs
1136
- imax = len(z_values)-2
1137
- jmax = len(z_values[0])-2
1138
1156
  # (f(x+delta)-f(x-delta))/2delta
1139
1157
  xderiv = (z_values[1:-1,2:]-z_values[1:-1,:-2])/(2*xstep)
1140
1158
  # b/c the function is analytic, we know the magnitude of its
@@ -1142,12 +1160,14 @@ cpdef get_derivatives(np.ndarray[COMPLEX_T, ndim=2] z_values, FLOAT_T xstep,
1142
1160
  dr = np.abs(xderiv)
1143
1161
  # the abs(derivative) scaled by distance from origin
1144
1162
  zabs = np.abs(z_values[1:-1,1:-1])
1145
- dtheta = np.divide(dr,zabs)
1163
+ dtheta = np.divide(dr, zabs)
1146
1164
  return dr, dtheta
1147
1165
 
1148
1166
  cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
1149
- np.ndarray[FLOAT_T, ndim = 2] dr, np.ndarray[FLOAT_T, ndim = 2] dtheta,
1150
- spokes, circles, rgbcolor, thickness, withcolor, min_mag):
1167
+ np.ndarray[FLOAT_T, ndim = 2] dr,
1168
+ np.ndarray[FLOAT_T, ndim = 2] dtheta,
1169
+ spokes, circles, rgbcolor, thickness,
1170
+ withcolor, min_mag):
1151
1171
  """
1152
1172
  Convert a grid of complex numbers into a matrix containing rgb data
1153
1173
  for the Riemann spiderweb plot.
@@ -1222,9 +1242,9 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
1222
1242
  [1. , 1. , 1. ]]])
1223
1243
  """
1224
1244
  cdef Py_ssize_t i, j, imax, jmax
1225
- cdef FLOAT_T x, y, mag, arg, width, target, precision, dmag, darg
1245
+ cdef FLOAT_T mag, arg, target, precision, dmag, darg
1226
1246
  cdef COMPLEX_T z
1227
- cdef FLOAT_T DMAX = 70 # change to adjust rate_of_change cutoff below
1247
+ cdef FLOAT_T DMAX = 70 # change to adjust rate_of_change cutoff below
1228
1248
  precision = thickness/150.0
1229
1249
  imax = len(z_values)
1230
1250
  jmax = len(z_values[0])
@@ -1235,7 +1255,7 @@ cpdef complex_to_spiderweb(np.ndarray[COMPLEX_T, ndim = 2] z_values,
1235
1255
  rgb = np.zeros(dtype=FLOAT, shape=(imax, jmax, 3))
1236
1256
  rgb += 1
1237
1257
  if circles != 0:
1238
- circ_radii = srange(0,1.0,1.0/circles)
1258
+ circ_radii = srange(0, 1.0, 1.0/circles)
1239
1259
  else:
1240
1260
  circ_radii = []
1241
1261
  if spokes != 0:
@@ -1302,7 +1322,7 @@ cpdef complex_to_rgb(np.ndarray[COMPLEX_T, ndim=2] z_values):
1302
1322
  TypeError: Argument 'z_values' has incorrect type (expected numpy.ndarray, got list)
1303
1323
  """
1304
1324
  cdef Py_ssize_t i, j, imax, jmax
1305
- cdef FLOAT_T x, y, mag, arg
1325
+ cdef FLOAT_T mag, arg
1306
1326
  cdef FLOAT_T lightness, hue, top, bot
1307
1327
  cdef FLOAT_T r, g, b
1308
1328
  cdef int ihue
@@ -1495,7 +1515,7 @@ cpdef analytic_interior(COMPLEX_T z, int n, FLOAT_T epsilon):
1495
1515
  # evaluates the Cauchy integral of the boundary, split into the real
1496
1516
  # and imaginary results because numerical_integral can't handle complex data.
1497
1517
  rp = 1/(TWOPI)*numerical_integral(cauchy_kernel,0,2*pi,
1498
- params = [epsilon,z,n,'i'])[0]
1518
+ params = [epsilon,z,n,'i'])[0]
1499
1519
  ip = 1/(TWOPI*I)*numerical_integral(cauchy_kernel,0,2*pi,
1500
- params = [epsilon,z,n,'r'])[0]
1520
+ params = [epsilon,z,n,'r'])[0]
1501
1521
  return rp + ip