Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/nipyPublic

BF: groupwise_registration type checking#442

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
abrys wants to merge1 commit intonipy:main
base:main
Choose a base branch
Loading
fromabrys:master
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletionsnipy/algorithms/registration/groupwise_registration.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -560,12 +560,12 @@ def single_run_realign4d(im4d,
speedup : int or sequence
If a sequence, implement a multi-scale realignment
"""
if not type(loops) in (list, tuple, np.array):
if not type(loops) in (list, tuple, np.ndarray):
loops = [loops]
repeats = len(loops)

def format_arg(x):
if not type(x) in (list, tuple, np.array):
if not type(x) in (list, tuple, np.ndarray):
x = [x for i in range(repeats)]
else:
if not len(x) == repeats:
Expand DownExpand Up@@ -648,7 +648,7 @@ def realign4d(runs,
"""

# Single-session case
if not type(runs) in (list, tuple, np.array):
if not type(runs) in (list, tuple, np.ndarray):
runs = [runs]
nruns = len(runs)
if nruns == 1:
Expand DownExpand Up@@ -1171,7 +1171,7 @@ def __init__(self, images, slice_order=None,
# if slice_order is a key word, replace it with the
# appropriate array of slice indices
if slice_order in ('ascending', 'descending'):
if isinstance(images, (list, tuple, np.array)):
if isinstance(images, (list, tuple, np.ndarray)):
xyz_img = as_xyz_image(images[0])
else:
xyz_img = as_xyz_image(images)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp