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
10daac87
Commit
10daac87
authored
Jun 23, 2015
by
Jason Swails
Browse files
Better fix.
parent
8e346de8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
wrappers/python/simtk/unit/quantity.py
wrappers/python/simtk/unit/quantity.py
+1
-4
No files found.
wrappers/python/simtk/unit/quantity.py
View file @
10daac87
...
@@ -604,7 +604,7 @@ class Quantity(object):
...
@@ -604,7 +604,7 @@ class Quantity(object):
return
bool
(
self
.
_value
)
return
bool
(
self
.
_value
)
def
__bool__
(
self
):
def
__bool__
(
self
):
return
self
.
_
_nonzero__
(
)
return
bool
(
self
.
_
value
)
def
__complex__
(
self
):
def
__complex__
(
self
):
return
Quantity
(
complex
(
self
.
_value
),
self
.
unit
)
return
Quantity
(
complex
(
self
.
_value
),
self
.
unit
)
...
@@ -819,9 +819,6 @@ def _is_string(x):
...
@@ -819,9 +819,6 @@ def _is_string(x):
except
StopIteration
:
except
StopIteration
:
return
False
return
False
if
sys
.
version_info
>=
(
3
,):
del
Quantity
.
__nonzero__
# run module directly for testing
# run module directly for testing
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# Test the examples in the docstrings
# Test the examples in the docstrings
...
...
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