Skip to content

Commit 7904e28

Browse files
Merge pull request sympy#18005 from oscarbenjamin/nonascii_rebase1.5
Nonascii rebase1.5
2 parents 9f1de8a + 3fe9b14 commit 7904e28

File tree

19 files changed

+304
-113
lines changed

19 files changed

+304
-113
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ matrix:
2525
sudo: true
2626
script: bin/test quality
2727
env:
28+
- python: 2.7
29+
dist: xenial
30+
sudo: true
31+
script: bin/test quality
32+
env:
2833

2934
- stage: baseline
3035
python: 3.8

sympy/combinatorics/free_groups.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from __future__ import print_function, division
32

43
from sympy.core import S
@@ -1181,7 +1180,7 @@ def is_cyclically_reduced(self):
11811180
r"""Returns whether the word is cyclically reduced or not.
11821181
A word is cyclically reduced if by forming the cycle of the
11831182
word, the word is not reduced, i.e a word w = `a_1 ... a_n`
1184-
is called cyclically reduced if `a_1 \ne a_n^{1}`.
1183+
is called cyclically reduced if `a_1 \ne a_n^{-1}`.
11851184
11861185
Examples
11871186
========

sympy/combinatorics/tests/test_coset_table.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from sympy.combinatorics.fp_groups import FpGroup
32
from sympy.combinatorics.coset_table import (CosetTable,
43
coset_enumeration_r, coset_enumeration_c)
@@ -140,7 +139,7 @@ def test_coset_enumeration():
140139
assert C_r.table == table1
141140
assert C_c.table == table1
142141

143-
# E₁ from [2] Pg. 474
142+
# E1 from [2] Pg. 474
144143
F, r, s, t = free_group("r, s, t")
145144
E1 = FpGroup(F, [t**-1*r*t*r**-2, r**-1*s*r*s**-2, s**-1*t*s*t**-2])
146145
C_r = coset_enumeration_r(E1, [])
@@ -663,7 +662,7 @@ def test_coset_enumeration():
663662
C_r.table == table3
664663
C_c.table == table3
665664

666-
# Group denoted by B₂,₄ from [2] Pg. 474
665+
# Group denoted by B2,4 from [2] Pg. 474
667666
F, a, b = free_group("a, b")
668667
B_2_4 = FpGroup(F, [a**4, b**4, (a*b)**4, (a**-1*b)**4, (a**2*b)**4, \
669668
(a*b**2)**4, (a**2*b**2)**4, (a**-1*b*a*b)**4, (a*b**-1*a*b)**4])

sympy/crypto/crypto.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
This file contains some classical ciphers and routines
53
implementing a linear-feedback shift register (LFSR)
@@ -587,12 +585,12 @@ def encipher_substitution(msg, old, new=None):
587585

588586

589587
######################################################################
590-
#################### Vigenère cipher examples ########################
588+
#################### Vigenere cipher examples ########################
591589
######################################################################
592590

593591
def encipher_vigenere(msg, key, symbols=None):
594592
"""
595-
Performs the Vigenère cipher encryption on plaintext ``msg``, and
593+
Performs the Vigenere cipher encryption on plaintext ``msg``, and
596594
returns the ciphertext.
597595
598596
Examples
@@ -619,28 +617,28 @@ def encipher_vigenere(msg, key, symbols=None):
619617
Notes
620618
=====
621619
622-
The Vigenère cipher is named after Blaise de Vigenère, a sixteenth
620+
The Vigenere cipher is named after Blaise de Vigenere, a sixteenth
623621
century diplomat and cryptographer, by a historical accident.
624-
Vigenère actually invented a different and more complicated cipher.
625-
The so-called *Vigenère cipher* was actually invented
622+
Vigenere actually invented a different and more complicated cipher.
623+
The so-called *Vigenere cipher* was actually invented
626624
by Giovan Batista Belaso in 1553.
627625
628626
This cipher was used in the 1800's, for example, during the American
629627
Civil War. The Confederacy used a brass cipher disk to implement the
630-
Vigenère cipher (now on display in the NSA Museum in Fort
628+
Vigenere cipher (now on display in the NSA Museum in Fort
631629
Meade) [1]_.
632630
633-
The Vigenère cipher is a generalization of the shift cipher.
631+
The Vigenere cipher is a generalization of the shift cipher.
634632
Whereas the shift cipher shifts each letter by the same amount
635-
(that amount being the key of the shift cipher) the Vigenère
633+
(that amount being the key of the shift cipher) the Vigenere
636634
cipher shifts a letter by an amount determined by the key (which is
637635
a word or phrase known only to the sender and receiver).
638636
639637
For example, if the key was a single letter, such as "C", then the
640638
so-called Vigenere cipher is actually a shift cipher with a
641639
shift of `2` (since "C" is the 2nd letter of the alphabet, if
642640
you start counting at `0`). If the key was a word with two
643-
letters, such as "CA", then the so-called Vigenère cipher will
641+
letters, such as "CA", then the so-called Vigenere cipher will
644642
shift letters in even positions by `2` and letters in odd positions
645643
are left alone (shifted by `0`, since "A" is the 0th letter, if
646644
you start counting at `0`).
@@ -687,7 +685,7 @@ def encipher_vigenere(msg, key, symbols=None):
687685
comprised of randomly selected characters -- a one-time pad -- the
688686
message is theoretically unbreakable.
689687
690-
The cipher Vigenère actually discovered is an "auto-key" cipher
688+
The cipher Vigenere actually discovered is an "auto-key" cipher
691689
described as follows.
692690
693691
ALGORITHM:
@@ -760,7 +758,7 @@ def encipher_vigenere(msg, key, symbols=None):
760758

761759
def decipher_vigenere(msg, key, symbols=None):
762760
"""
763-
Decode using the Vigenère cipher.
761+
Decode using the Vigenere cipher.
764762
765763
Examples
766764
========
@@ -3141,12 +3139,12 @@ def decipher_railfence(ciphertext,rails):
31413139
return ''.join(res)
31423140

31433141

3144-
################ BlumGoldwasser cryptosystem #########################
3142+
################ Blum-Goldwasser cryptosystem #########################
31453143

31463144
def bg_private_key(p, q):
31473145
"""
31483146
Check if p and q can be used as private keys for
3149-
the BlumGoldwasser cryptosystem.
3147+
the Blum-Goldwasser cryptosystem.
31503148
31513149
The three necessary checks for p and q to pass
31523150
so that they can be used as private keys:

sympy/discrete/transforms.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
Discrete Fourier Transform, Number Theoretic Transform,
53
Walsh Hadamard Transform, Mobius Transform
@@ -322,12 +320,12 @@ def ifwht(seq):
322320

323321
#----------------------------------------------------------------------------#
324322
# #
325-
# Möbius Transform for Subset Lattice #
323+
# Mobius Transform for Subset Lattice #
326324
# #
327325
#----------------------------------------------------------------------------#
328326

329327
def _mobius_transform(seq, sgn, subset):
330-
r"""Utility function for performing Möbius Transform using
328+
r"""Utility function for performing Mobius Transform using
331329
Yate's Dynamic Programming method"""
332330

333331
if not iterable(seq):
@@ -366,7 +364,7 @@ def _mobius_transform(seq, sgn, subset):
366364

367365
def mobius_transform(seq, subset=True):
368366
r"""
369-
Performs the Möbius Transform for subset lattice with indices of
367+
Performs the Mobius Transform for subset lattice with indices of
370368
sequence as bitmasks.
371369
372370
The indices of each argument, considered as bit strings, correspond
@@ -380,9 +378,9 @@ def mobius_transform(seq, subset=True):
380378
==========
381379
382380
seq : iterable
383-
The sequence on which Möbius Transform is to be applied.
381+
The sequence on which Mobius Transform is to be applied.
384382
subset : bool
385-
Specifies if Möbius Transform is applied by enumerating subsets
383+
Specifies if Mobius Transform is applied by enumerating subsets
386384
or supersets of the given set.
387385
388386
Examples

sympy/liealgebras/root_system.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
from .cartan_type import CartanType
32
from sympy.core.backend import Basic
43
from sympy.core.compatibility import range
@@ -10,21 +9,21 @@ class RootSystem(Basic):
109
system, we first consider the Cartan subalgebra of g, which is the maximal
1110
abelian subalgebra, and consider the adjoint action of g on this
1211
subalgebra. There is a root system associated with this action. Now, a
13-
root system over a vector space V is a set of finite vectors Φ (called
12+
root system over a vector space V is a set of finite vectors Phi (called
1413
roots), which satisfy:
1514
1615
1. The roots span V
17-
2. The only scalar multiples of x in Φ are x and -x
18-
3. For every x in Φ, the set Φ is closed under reflection
16+
2. The only scalar multiples of x in Phi are x and -x
17+
3. For every x in Phi, the set Phi is closed under reflection
1918
through the hyperplane perpendicular to x.
20-
4. If x and y are roots in Φ, then the projection of y onto
21-
the line through x is a half-integral multiple of x.
19+
4. If x and y are roots in Phi, then the projection of y onto
20+
the line through x is a half-integral multiple of x.
2221
23-
Now, there is a subset of Φ, which we will call Δ, such that:
24-
1. Δ is a basis of V
25-
2. Each root x in Φ can be written x = Σ k_y y for y in Δ
22+
Now, there is a subset of Phi, which we will call Delta, such that:
23+
1. Delta is a basis of V
24+
2. Each root x in Phi can be written x = sum k_y y for y in Delta
2625
27-
The elements of Δ are called the simple roots.
26+
The elements of Delta are called the simple roots.
2827
Therefore, we see that the simple roots span the root space of a given
2928
simple Lie algebra.
3029

sympy/liealgebras/weyl_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class WeylGroup(Basic):
99

1010
"""
1111
For each semisimple Lie group, we have a Weyl group. It is a subgroup of
12-
the isometry group of the root system. Specifically, its the subgroup
12+
the isometry group of the root system. Specifically, it's the subgroup
1313
that is generated by reflections through the hyperplanes orthogonal to
1414
the roots. Therefore, Weyl groups are reflection groups, and so a Weyl
1515
group is a finite Coxeter group.

sympy/ntheory/residue_ntheory.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
31
from __future__ import print_function, division
42

53
from sympy.core.compatibility import as_int, range
@@ -961,7 +959,7 @@ def jacobi_symbol(m, n):
961959

962960
class mobius(Function):
963961
"""
964-
Möbius function maps natural number to {-1, 0, 1}
962+
Mobius function maps natural number to {-1, 0, 1}
965963
966964
It is defined as follows:
967965
1) `1` if `n = 1`.
@@ -972,7 +970,7 @@ class mobius(Function):
972970
It is an important multiplicative function in number theory
973971
and combinatorics. It has applications in mathematical series,
974972
algebraic number theory and also physics (Fermion operator has very
975-
concrete realization with Möbius Function model).
973+
concrete realization with Mobius Function model).
976974
977975
Parameters
978976
==========

sympy/physics/mechanics/rigidbody.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- encoding: utf-8 -*-
21
from __future__ import print_function, division
32

43
from sympy.core.backend import sympify
@@ -162,7 +161,7 @@ def angular_momentum(self, point, frame):
162161
The angular momentum H of a rigid body B about some point O in a frame
163162
N is given by:
164163
165-
H = I·w + r×Mv
164+
H = I . w + r x Mv
166165
167166
where I is the central inertia dyadic of B, w is the angular velocity
168167
of body B in the frame, N, r is the position vector from point O to the

sympy/physics/optics/polarization.py

100755100644
File mode changed.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy