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
d6800a9b
Commit
d6800a9b
authored
Jun 23, 2016
by
theos
Browse files
bug-fix related to field.shape
parent
cfcdd7d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty_field.py
View file @
d6800a9b
...
...
@@ -421,7 +421,7 @@ class field(object):
Dimension of space.
"""
return
np
.
prod
(
self
.
get_
shape
()
)
return
np
.
prod
(
self
.
shape
)
def
get_dof
(
self
,
split
=
False
):
dof_tuple
=
tuple
(
sp
.
get_dof
(
split
=
split
)
for
sp
in
self
.
domain
)
...
...
@@ -474,7 +474,7 @@ class field(object):
dtype
=
self
.
dtype
if
shape
is
None
:
shape
=
self
.
get_
shape
()
shape
=
self
.
shape
# Case 1: x is a distributed_data_object
if
isinstance
(
x
,
distributed_data_object
):
...
...
@@ -531,7 +531,7 @@ class field(object):
# Use general d2o casting
else
:
x
=
distributed_data_object
(
x
,
global_shape
=
self
.
get_
shape
()
,
global_shape
=
self
.
shape
,
dtype
=
dtype
,
distribution_strategy
=
self
.
datamodel
)
# Cast the d2o
...
...
@@ -567,7 +567,7 @@ class field(object):
new_val
=
self
.
get_val
()
if
spaces
is
None
:
spaces
=
range
(
len
(
self
.
get_
shape
()
))
spaces
=
range
(
len
(
self
.
shape
))
for
ind
in
spaces
:
new_val
=
self
.
domain
[
ind
].
calc_weigth
(
new_val
,
power
=
power
,
axis
=
self
.
_axis_list
[
...
...
@@ -752,7 +752,7 @@ class field(object):
new_val
=
self
.
get_val
()
if
spaces
is
None
:
spaces
=
range
(
len
(
self
.
get_
shape
()
))
spaces
=
range
(
len
(
self
.
shape
))
else
:
for
ind
in
spaces
:
new_val
=
self
.
domain
[
ind
].
calc_transform
(
new_val
,
...
...
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