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
5a6ece03
"vscode:/vscode.git/clone" did not exist on "8868141e816879942cbee86c572c2e5dc01a17bd"
Commit
5a6ece03
authored
Mar 03, 2011
by
Christopher Bruns
Browse files
Add optimization to possibly speed up units code.
parent
05199afa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
wrappers/python/simtk/unit/unit_operators.py
wrappers/python/simtk/unit/unit_operators.py
+3
-1
No files found.
wrappers/python/simtk/unit/unit_operators.py
View file @
5a6ece03
...
@@ -93,7 +93,9 @@ def _unit_class_mul(self, other):
...
@@ -93,7 +93,9 @@ def _unit_class_mul(self, other):
# print "scalar * unit"
# print "scalar * unit"
value
=
other
value
=
other
unit
=
self
unit
=
self
return
Quantity
(
other
,
self
).
reduce_unit
(
self
)
# Is reduce_unit needed here? I hope not, there is a performance issue...
# return Quantity(other, self).reduce_unit(self)
return
Quantity
(
other
,
self
)
Unit
.
__mul__
=
_unit_class_mul
Unit
.
__mul__
=
_unit_class_mul
Unit
.
__rmul__
=
Unit
.
__mul__
Unit
.
__rmul__
=
Unit
.
__mul__
...
...
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