From 97731fac47db5e36c0e4c3e42f27b50f3f168e61 Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Wed, 20 Apr 2022 13:45:24 +0200 Subject: [PATCH] Fix for nptyping>=2 (#101) --- neuror/main.py | 8 ++++---- setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/neuror/main.py b/neuror/main.py index f04ac0f..25039b0 100644 --- a/neuror/main.py +++ b/neuror/main.py @@ -19,7 +19,7 @@ from neurom.core.dataformat import COLS from neurom.core import Section from neurom.features.section import branch_order, section_path_length -from nptyping import NDArray +from nptyping import NDArray, Shape, Float from scipy.spatial.distance import cdist from neuror import axon, cut_plane @@ -234,10 +234,10 @@ def __init__(self, # pylint: disable=too-many-arguments inputfile: Path, axons: Optional[Path] = None, seed: Optional[int] = 0, - cut_leaves_coordinates: Optional[NDArray[(3, Any)]] = None, + cut_leaves_coordinates: Optional[NDArray[Shape["3"], Any]] = None, legacy_detection: bool = False, repair_flags: Optional[Dict[RepairType, bool]] = None, - apical_point: NDArray[3, float] = None, + apical_point: NDArray[Shape["3"], Float] = None, params: Dict = None): '''Repair the input morphology @@ -677,7 +677,7 @@ def repair(inputfile: Path, # pylint: disable=too-many-arguments outputfile: Path, axons: Optional[List[Path]] = None, seed: int = 0, - cut_leaves_coordinates: Optional[NDArray[(3, Any)]] = None, + cut_leaves_coordinates: Optional[NDArray[Shape["3"], Any]] = None, legacy_detection: bool = False, plot_file: Optional[Path] = None, repair_flags: Optional[Dict[RepairType, bool]] = None, diff --git a/setup.py b/setup.py index 4be1de5..6b9e904 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ 'morphio>=3.0.0,<4.0', 'neurom>=3.0.1,<4.0', 'numpy>=1.19.2', - 'nptyping>=1.3.0', + 'nptyping>=2', 'pandas>=0.24.2', 'pyquaternion>=0.9.2', 'scipy>=1.2.0',