Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
Nabu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tomotools
Nabu
Commits
ff5cffb3
Commit
ff5cffb3
authored
Nov 10, 2020
by
myron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using np.iterable and np.isscalar instead of isinstance(....
parent
0ed254cf
Pipeline
#37011
passed with stages
in 1 minute and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nabu/preproc/alignment.py
nabu/preproc/alignment.py
+2
-2
No files found.
nabu/preproc/alignment.py
View file @
ff5cffb3
...
...
@@ -787,7 +787,7 @@ class CenterOfRotationAdaptiveSearch(CenterOfRotation):
messagge_template
=
(
"The guess parameter can be None, a sequence of one or two scalars, or a scalar. It was instead %s
\n
"
)
if
isinstance
(
guess
,
(
list
,
tuple
,
np
.
ndarray
)
):
if
np
.
iterable
(
guess
):
if
len
(
guess
)
==
2
:
guess_x
=
guess
[
0
]
guess_r
=
guess
[
1
]
...
...
@@ -798,7 +798,7 @@ class CenterOfRotationAdaptiveSearch(CenterOfRotation):
message
=
message_template
%
(
guess
)
raise
ValueError
(
message
)
elif
isinstance
(
guess
,
(
float
,
int
)
):
elif
np
.
isscalar
(
guess
):
guess_x
=
guess
guess_r
=
None
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment