Skip to content

Commit 95c37ff

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
fixup! Format Python code with psf/black push
1 parent a1be554 commit 95c37ff

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

linear_algebra/src/rayleigh_quotient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55

66

7-
def is_hermitian(matrix:np.matrix) -> bool:
7+
def is_hermitian(matrix: np.matrix) -> bool:
88
"""
99
Checks if a matrix is Hermitian.
1010
@@ -25,7 +25,7 @@ def is_hermitian(matrix:np.matrix) -> bool:
2525
return np.array_equal(matrix, matrix.H)
2626

2727

28-
def rayleigh_quotient(A:np.matrix, v:np.matrix) -> float:
28+
def rayleigh_quotient(A: np.matrix, v: np.matrix) -> float:
2929
"""
3030
Returns the Rayleigh quotient of a Hermitian matrix A and
3131
vector v.

maths/modular_exponential.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"""
66

77
"""Calculate Modular Exponential."""
8-
def modular_exponential(base : int, power : int, mod : int):
8+
9+
10+
def modular_exponential(base: int, power: int, mod: int):
911
"""
1012
>>> modular_exponential(5, 0, 10)
1113
1

maths/monte_carlo_dice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import random
22
from typing import List
33

4+
45
class Dice:
56
NUM_SIDES = 6
67

@@ -15,7 +16,7 @@ def _str_(self):
1516
return "Fair Dice"
1617

1718

18-
def throw_dice(num_throws: int, num_dice: int=2) -> List[float]:
19+
def throw_dice(num_throws: int, num_dice: int = 2) -> List[float]:
1920
"""
2021
Return probability list of all possible sums when throwing dice.
2122

0 commit comments

Comments
 (0)