Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Relax numpy max version #72

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions neurots/generate/orientations.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def trunk_to_spherical_angles(trunk_angles, z_angles, phi_interval=None):
z_angles = np.asarray(z_angles)

n_angles = len(trunk_angles)
sorted_ids = np.argsort(trunk_angles)
sorted_ids = np.argsort(trunk_angles, kind="stable")

sorted_phi_devs = trunk_angles[sorted_ids]

Expand All @@ -376,7 +376,7 @@ def trunk_absolute_orientation_to_spherical_angles(orientation, trunk_absolute_a
tuple[numpy.ndarray[float], numpy.ndarray[float]]: The phi and theta angles.
"""
# Sort angles
sort_ids = np.argsort(trunk_absolute_angles)
sort_ids = np.argsort(trunk_absolute_angles, kind="stable")
sorted_phis = np.asarray(trunk_absolute_angles)[sort_ids]
sorted_thetas = np.asarray(z_angles)[sort_ids]

Expand Down
4 changes: 2 additions & 2 deletions neurots/generate/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ def end(self):
@staticmethod
def order_per_process(secs):
"""Orders sections according to process type, major first."""
return np.copy(secs)[np.argsort([ss.process for ss in secs])]
return np.copy(secs)[np.argsort([ss.process for ss in secs], kind="stable")]

@staticmethod
def order_per_bif(secs):
"""Orders sections according to bifurcation times."""
ordered_list = np.argsort([ss.stop_criteria["TMD"].bif for ss in secs])
ordered_list = np.argsort([ss.stop_criteria["TMD"].bif for ss in secs], kind="stable")
return np.copy(secs)[ordered_list]

def append_section(self, section):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"matplotlib>=3.4",
"morphio>=3.3.4,<4.0",
"neurom>=3.0,<4.0",
"numpy>=1.22.0,<1.25.0",
"numpy>=1.22.0",
"scipy>=1.6",
"tmd>=2.3.0",
"diameter-synthesis>=0.5.4",
Expand Down
62 changes: 32 additions & 30 deletions tests/data/bio_path_persistence_diagram.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
[[230.75389593157917, 174.56457422613303],
[211.8444787719784, 121.25272218846463],
[245.55485595950762, 109.70920446726689],
[203.63182074610373, 89.25957467437232],
[128.9362124173111, 118.5486705330162],
[158.5662110052575, 138.94545937805032],
[153.67408319151852, 102.27282442365426],
[296.44626617610606, 263.46819264109564],
[305.8307131313515, 260.42006340822644],
[408.72723870264605, 255.65781252339656],
[359.49069186274363, 223.32614801091603],
[292.12931728901725, 227.31214513217506],
[284.3482940368598, 217.61187240457087],
[948.0461094340942, 844.4180688487629],
[949.9041014387518, 789.6730105949981],
[875.1368893136628, 826.9883630591214],
[918.8558048173512, 838.300934909797],
[904.8466455322774, 882.465980613506],
[201.3564166212771, 71.08798169651931],
[198.25135130338018, 57.83075189486727],
[110.0395273998807, 42.523245550794634],
[331.4387095608543, 216.0867079733905],
[304.19061536841144, 204.8810610706671],
[894.8503677581632, 735.9890956878662],
[924.8510019185916, 788.7230363015565],
[907.7295889499369, 768.791430790255],
[947.242394623486, 711.5265712738037],
[412.61837150883343, 188.21024131774902],
[289.12339091590064, 28.817750930786133],
[1072.5500821184357, 0]]
[
[230.7538954615593, 174.5645745396614],
[211.8444786965847, 121.25272232294083],
[245.5548558831215, 109.70920467376709],
[203.63182109594345, 89.25957471132278],
[128.93621239066124, 118.54867050051689],
[158.5662106871605, 138.94545936584473],
[153.67408365011215, 102.27282452583313],
[296.44626665115356, 263.4681931734085],
[305.8307135105133, 260.42006397247314],
[408.72723972797394, 255.65781301259995],
[359.4906919002533, 223.32614827156067],
[292.12931779026985, 227.31214529275894],
[284.3482937216759, 217.6118724346161],
[948.0461094975471, 844.4180682301521],
[949.9041011333466, 789.6730102300644],
[875.1368893384933, 826.9883634448051],
[918.8558051586151, 838.3009353876114],
[904.8466463387012, 882.4659812748432],
[201.35641717910767, 71.08798170089722],
[198.25135153532028, 57.830751836299896],
[110.03952720761299, 42.52324539422989],
[331.438709795475, 216.08670818805695],
[304.1906150877476, 204.8810611963272],
[894.8503682017326, 735.9890956878662],
[924.8510028421879, 788.7230367064476],
[907.7295889854431, 768.7914308309555],
[947.2423948049545, 711.5265712738037],
[412.6183721125126, 188.21024131774902],
[289.12339040637016, 28.817750930786133],
[1072.5500807762146, 0]
]
Binary file modified tests/data/expected_bio_rat_L5_TPC_B_with_params1.h5
Binary file not shown.