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
tsoc
openmm
Commits
742c13c4
Commit
742c13c4
authored
Jun 19, 2015
by
Jason Swails
Browse files
Add Quantity multiplication to tests.
parent
ba1af1ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
wrappers/python/tests/TestUnits.py
wrappers/python/tests/TestUnits.py
+3
-0
No files found.
wrappers/python/tests/TestUnits.py
View file @
742c13c4
...
@@ -690,3 +690,6 @@ class TestNumpyUnits(QuantityTestCase):
...
@@ -690,3 +690,6 @@ class TestNumpyUnits(QuantityTestCase):
def
testMultiplication
(
self
):
def
testMultiplication
(
self
):
""" Tests that units override numpy.ndarray multiplication """
""" Tests that units override numpy.ndarray multiplication """
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
u
.
angstroms
,
u
.
Quantity
)
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
u
.
angstroms
,
u
.
Quantity
)
x
=
np
.
array
([
1
])
*
u
.
liters
self
.
assertIsInstance
(
x
,
u
.
Quantity
)
self
.
assertIsInstance
(
np
.
arange
(
10
)
*
x
,
u
.
Quantity
)
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