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
322d7cec
Commit
322d7cec
authored
Jan 30, 2019
by
Martin Reinecke
Browse files
unrelated fixes
parent
761685e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/energy_operators.py
View file @
322d7cec
...
@@ -261,7 +261,6 @@ class BernoulliEnergy(EnergyOperator):
...
@@ -261,7 +261,6 @@ class BernoulliEnergy(EnergyOperator):
"""
"""
def
__init__
(
self
,
d
):
def
__init__
(
self
,
d
):
print
(
d
.
dtype
)
if
not
isinstance
(
d
,
Field
)
or
not
np
.
issubdtype
(
d
.
dtype
,
np
.
integer
):
if
not
isinstance
(
d
,
Field
)
or
not
np
.
issubdtype
(
d
.
dtype
,
np
.
integer
):
raise
TypeError
raise
TypeError
if
not
np
.
all
(
np
.
logical_or
(
d
.
local_data
==
0
,
d
.
local_data
==
1
)):
if
not
np
.
all
(
np
.
logical_or
(
d
.
local_data
==
0
,
d
.
local_data
==
1
)):
...
...
nifty5/operators/regridding_operator.py
View file @
322d7cec
...
@@ -47,7 +47,6 @@ class RegriddingOperator(LinearOperator):
...
@@ -47,7 +47,6 @@ class RegriddingOperator(LinearOperator):
if
not
isinstance
(
dom
,
RGSpace
):
if
not
isinstance
(
dom
,
RGSpace
):
raise
TypeError
(
"RGSpace required"
)
raise
TypeError
(
"RGSpace required"
)
if
len
(
new_shape
)
!=
len
(
dom
.
shape
):
if
len
(
new_shape
)
!=
len
(
dom
.
shape
):
print
(
new_shape
,
dom
.
shape
)
raise
ValueError
(
"Shape mismatch"
)
raise
ValueError
(
"Shape mismatch"
)
if
any
([
a
>
b
for
a
,
b
in
zip
(
new_shape
,
dom
.
shape
)]):
if
any
([
a
>
b
for
a
,
b
in
zip
(
new_shape
,
dom
.
shape
)]):
raise
ValueError
(
"New shape must not be larger than old shape"
)
raise
ValueError
(
"New shape must not be larger than old shape"
)
...
...
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