Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
D2O
Commits
ebaea3a7
Commit
ebaea3a7
authored
Aug 30, 2016
by
theos
Browse files
Added tests for binary operations together with data with subslice shape.
parent
006ed9a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
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