From 14626f3ffdfec0ff190351cdf0e30630195f849a Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 07:43:05 +0200 Subject: [PATCH 1/6] Get rid of nptyping --- cadquery/occ_impl/sketch_solver.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cadquery/occ_impl/sketch_solver.py b/cadquery/occ_impl/sketch_solver.py index 0dede03e2..1f4e10c50 100644 --- a/cadquery/occ_impl/sketch_solver.py +++ b/cadquery/occ_impl/sketch_solver.py @@ -1,7 +1,7 @@ from typing import Tuple, Union, Any, Callable, List, Optional, Iterable, Dict, Sequence from typing import Literal -from nptyping import NDArray as Array -from nptyping import Float +from numpy.typing import NDArray as Array +from numpy import float64 as Float from itertools import accumulate, chain from math import sin, cos, radians @@ -263,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[Float] ) -> Tuple[ - Callable[[Array[Any, Float]], float], - Callable[[Array[Any, Float], Array[Any, Float]], None], - Array[Any, Float], - Array[Any, Float], + Callable[[Array[Float]], float], + Callable[[Array[Float], Array[Float]], None], + Array[Float], + Array[Float], ]: ixs = self.ixs From e8867c20521c9c00a49ffcb97e2699ff4d8bc06a Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 07:51:47 +0200 Subject: [PATCH 2/6] Remove nptyping from environment.yml --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index e27ec3f9d..0315f09fe 100644 --- a/environment.yml +++ b/environment.yml @@ -15,7 +15,6 @@ dependencies: - pytest-cov - ezdxf - typing_extensions - - nptyping=2.0.1 - nlopt - path - casadi From 12c200fa9120088aaeccbd17fa85bdb350d719e6 Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 07:52:22 +0200 Subject: [PATCH 3/6] Remove nptyping from setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 3b3abf28d..09d5def43 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,6 @@ "ezdxf", "multimethod>=1.11,<2.0", "nlopt", - "nptyping==2.0.1", "typish", "casadi", "path", From f57eac02fb6de8285e84f989fe0aac18b3732bbf Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 07:53:03 +0200 Subject: [PATCH 4/6] Remove nptyping from meta.yaml --- conda/meta.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/conda/meta.yaml b/conda/meta.yaml index ea4df37e7..28019a300 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -22,7 +22,6 @@ requirements: - ezdxf - ipython - typing_extensions - - nptyping >=2.0.1 - nlopt - multimethod >=1.11,<2.0 - casadi From 879004ac2a4b4d4eed74e303ff16dbbe99a66ef6 Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 08:03:22 +0200 Subject: [PATCH 5/6] Add typish to meta.yaml --- conda/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/meta.yaml b/conda/meta.yaml index 28019a300..a9b491087 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -25,6 +25,7 @@ requirements: - nlopt - multimethod >=1.11,<2.0 - casadi + - typish test: requires: From ea21034220792cdb4d6d46cdc4154dc4e18e249f Mon Sep 17 00:00:00 2001 From: AU Date: Fri, 28 Jun 2024 08:04:10 +0200 Subject: [PATCH 6/6] Add typish to environment.yml --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 0315f09fe..000fcc770 100644 --- a/environment.yml +++ b/environment.yml @@ -18,6 +18,7 @@ dependencies: - nlopt - path - casadi + - typish - multimethod >=1.11,<2.0 - typed-ast - regex