Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
D2O
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
D2O
Commits
ebaea3a7
Commit
ebaea3a7
authored
Aug 30, 2016
by
theos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for binary operations together with data with subslice shape.
parent
006ed9a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
test/test_distributed_data_object.py
test/test_distributed_data_object.py
+19
-0
No files found.
test/test_distributed_data_object.py
View file @
ebaea3a7
...
...
@@ -1357,6 +1357,25 @@ class Test_unary_and_binary_operations(unittest.TestCase):
assert_equal
(
getattr
(
obj
,
function
)(
b
).
get_full_data
(),
getattr
(
a
,
function
)(
b
))
###############################################################################
@
parameterized
.
expand
(
itertools
.
product
(
binary_non_inplace_operators
,
all_distribution_strategies
,
all_distribution_strategies
,
[(
1
,
8
,
9
),
(
7
,
1
,
9
),
(
1
,
1
,
1
)]),
testcase_func_name
=
custom_name_func
)
def
test_binary_operations_with_subslice_d2o
(
self
,
function
,
strat1
,
strat2
,
reduced_shape
):
full_shape
=
(
7
,
8
,
9
)
(
a
,
obj
)
=
generate_data
(
full_shape
,
np
.
dtype
(
'float'
),
strat1
)
(
b
,
p
)
=
generate_data
(
reduced_shape
,
np
.
dtype
(
'float'
),
strat2
)
b
**=
3
p
**=
3
assert_equal
(
getattr
(
obj
,
function
)(
p
).
get_full_data
(),
getattr
(
a
,
function
)(
b
))
###############################################################################
def
test_binary_operation_with_dtype_conversion
(
self
):
...
...
Write
Preview
Markdown
is supported
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