Skip to content
GitLab
Menu
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
579f4362
Commit
579f4362
authored
Dec 20, 2013
by
Johannes Buchner
Browse files
missing raise statements for TypeErrors
parent
a52439f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty_core.py
View file @
579f4362
...
...
@@ -2443,7 +2443,7 @@ class rg_space(space):
try
:
spec
=
np
.
array
(
spec
(
kindex
),
dtype
=
self
.
datatype
)
except
:
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
raise
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
elif
(
np
.
isscalar
(
spec
)):
spec
=
np
.
array
([
spec
],
dtype
=
self
.
datatype
)
else
:
...
...
@@ -3548,7 +3548,7 @@ class lm_space(space):
try
:
spec
=
np
.
array
(
spec
(
np
.
arange
(
self
.
para
[
0
]
+
1
,
dtype
=
np
.
int
)),
dtype
=
self
.
datatype
)
except
:
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
raise
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
elif
(
np
.
isscalar
(
spec
)):
spec
=
np
.
array
([
spec
],
dtype
=
self
.
datatype
)
else
:
...
...
@@ -4384,7 +4384,7 @@ class gl_space(space):
try
:
spec
=
np
.
array
(
spec
(
np
.
arange
(
self
.
para
[
0
],
dtype
=
np
.
int
)),
dtype
=
self
.
datatype
)
except
:
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
raise
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
elif
(
np
.
isscalar
(
spec
)):
spec
=
np
.
array
([
spec
],
dtype
=
self
.
datatype
)
else
:
...
...
@@ -5027,7 +5027,7 @@ class hp_space(space):
try
:
spec
=
np
.
array
(
spec
(
np
.
arange
(
3
*
self
.
para
[
0
],
dtype
=
np
.
int
)),
dtype
=
self
.
datatype
)
except
:
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
raise
TypeError
(
about
.
_errors
.
cstring
(
"ERROR: invalid power spectra function."
))
## exception in ``spec(kindex)``
elif
(
np
.
isscalar
(
spec
)):
spec
=
np
.
array
([
spec
],
dtype
=
self
.
datatype
)
else
:
...
...
Write
Preview
Supports
Markdown
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