Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
918c2443
Commit
918c2443
authored
Jun 16, 2018
by
Martin Reinecke
Browse files
avoid 'assert' statements
parent
2accbbe5
Pipeline
#31184
passed with stages
in 8 minutes and 58 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
nifty4/library/los_response.py
View file @
918c2443
...
...
@@ -147,10 +147,14 @@ class LOSResponse(LinearOperator):
sigmas_up
=
np
.
zeros
(
nlos
,
dtype
=
np
.
float32
)
sigmas_low
=
np
.
array
(
sigmas_low
)
sigmas_up
=
np
.
array
(
sigmas_up
)
assert
starts
.
shape
[
0
]
==
ndim
,
"dimension mismatch"
assert
nlos
==
sigmas_low
.
shape
[
0
],
"dimension mismatch"
assert
starts
.
shape
==
ends
.
shape
,
"dimension mismatch"
assert
sigmas_low
.
shape
==
sigmas_up
.
shape
,
"dimension mismatch"
if
starts
.
shape
[
0
]
!=
ndim
:
raise
TypeError
(
"dimension mismatch"
)
if
nlos
!=
sigmas_low
.
shape
[
0
]:
raise
TypeError
(
"dimension mismatch"
)
if
starts
.
shape
!=
ends
.
shape
:
raise
TypeError
(
"dimension mismatch"
)
if
sigmas_low
.
shape
!=
sigmas_up
.
shape
:
raise
TypeError
(
"dimension mismatch"
)
self
.
_local_shape
=
dobj
.
local_shape
(
self
.
domain
[
0
].
shape
)
local_zero_point
=
(
np
.
array
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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