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
7992fd7b
Commit
7992fd7b
authored
Feb 21, 2018
by
Martin Reinecke
Browse files
add default distaxis
parent
7b999234
Changes
2
Show whitespace changes
Inline
Side-by-side
nifty4/data_objects/distributed_do.py
View file @
7992fd7b
...
...
@@ -383,7 +383,7 @@ def distaxis(arr):
return
arr
.
_distaxis
def
from_local_data
(
shape
,
arr
,
distaxis
):
def
from_local_data
(
shape
,
arr
,
distaxis
=
0
):
return
data_object
(
shape
,
arr
,
distaxis
)
...
...
nifty4/data_objects/numpy_do.py
View file @
7992fd7b
...
...
@@ -79,7 +79,7 @@ def distaxis(arr):
return
-
1
def
from_local_data
(
shape
,
arr
,
distaxis
):
def
from_local_data
(
shape
,
arr
,
distaxis
=-
1
):
if
shape
!=
arr
.
shape
:
raise
ValueError
return
arr
...
...
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