Skip to content

Commit 9c6cb00

Browse files
committed
testing tools
1 parent 35d8d70 commit 9c6cb00

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version = 3.8
2+
python_version = 3.9
33
warn_redundant_casts = True
44
warn_unused_ignores = True
55

requirements_tests.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ pytest
22
wheel
33
twine==1.13.0
44
flake8
5+
isort
6+
black

stochman/curves.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(
1313
end: torch.Tensor,
1414
num_nodes: int = 5,
1515
requires_grad: bool = True,
16-
device = None,
16+
device=None,
1717
*args,
1818
**kwargs,
1919
) -> None:
@@ -41,11 +41,11 @@ def _init_params(self, *args, **kwargs) -> None:
4141

4242
@property
4343
def device(self):
44-
""" Returns the device of the curve. """
44+
"""Returns the device of the curve."""
4545
return self.params.device
4646

4747
def __len__(self):
48-
""" Returns the batch dimension e.g. the number of curves """
48+
"""Returns the batch dimension e.g. the number of curves"""
4949
return self.begin.shape[0]
5050

5151
def plot(self, t0: float = 0.0, t1: float = 1.0, N: int = 100, *plot_args, **plot_kwargs):

stochman/geodesic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def closure():
9494
break
9595
# if k % (max_iter // 10) == 0:
9696
# curve.constant_speed(manifold)
97-
#curve.constant_speed(manifold)
97+
# curve.constant_speed(manifold)
9898
return max_grad < thresh
9999

100100

stochman/nnj.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __repr__(self):
5151
tensor_repr = tensor_repr.replace("tensor", "jacobian")
5252
tensor_repr += f"\n jactype={self.jactype.value if isinstance(self.jactype, Enum) else self.jactype}"
5353
return tensor_repr
54-
54+
5555
def view(self, *args, **kwargs):
5656
out = super().view(*args, **kwargs)
5757
return jacobian(out, self.jactype)
@@ -102,7 +102,7 @@ def __matmul__(self, other):
102102

103103

104104
def jacobian(tensor, jactype):
105-
""" Initialize a jacobian tensor by a specified jacobian type """
105+
"""Initialize a jacobian tensor by a specified jacobian type"""
106106
return Jacobian(tensor, jactype)
107107

108108

0 commit comments

Comments
 (0)