Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwright committed Apr 19, 2022
2 parents 5802092 + 6217431 commit 252c9dd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions cadquery/occ_impl/sketch_solver.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Tuple, Union, Any, Callable, List, Optional, Iterable, Dict, Sequence
from typing_extensions import Literal
from nptyping import NDArray as Array
from nptyping import Float
from itertools import accumulate, chain
from math import sin, cos, radians

Expand Down Expand Up @@ -262,12 +263,12 @@ def __init__(
self.ixs = [0] + list(accumulate(len(e) for e in self.entities))

def _cost(
self, x0: Array[(Any,), float]
self, x0: Array[Any, Float]
) -> Tuple[
Callable[[Array[(Any,), float]], float],
Callable[[Array[(Any,), float], Array[(Any,), float]], None],
Array[(Any,), float],
Array[(Any,), float],
Callable[[Array[Any, Float]], float],
Callable[[Array[Any, Float], Array[Any, Float]], None],
Array[Any, Float],
Array[Any, Float],
]:

ixs = self.ixs
Expand Down
5 changes: 3 additions & 2 deletions cadquery/occ_impl/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Type,
)
from nptyping import NDArray as Array
from nptyping import Float
from math import radians
from typish import instance_of, get_type
from numpy import array, eye, pi
Expand Down Expand Up @@ -448,8 +449,8 @@ def _build_transform(
def _cost(
self,
) -> Tuple[
Callable[[Array[(Any,), float]], float],
Callable[[Array[(Any,), float], Array[(Any,), float]], None],
Callable[[Array[Any, Float]], float],
Callable[[Array[Any, Float], Array[Any, Float]], None],
]:

constraints = self.constraints
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ requirements:
- ezdxf
- ipython
- typing_extensions
- nptyping
- nptyping >=2.0.0
- nlopt
- multimethod 1.6

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
- ezdxf
- ipython
- typing_extensions
- nptyping
- nptyping>=2.0.0
- nlopt
- path
- pip
Expand Down

0 comments on commit 252c9dd

Please sign in to comment.