Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #706 from Upabjojr/long_python3
Browse files Browse the repository at this point in the history
fix type check in thermo.util._ensure_umbrella_center
  • Loading branch information
marscher committed Feb 24, 2016
2 parents cbaeea3 + 3143dd3 commit 71083d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyemma/thermo/util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import numpy as _np
from pyemma.util import types

__all__ = [
'get_averaged_bias_matrix',
Expand Down Expand Up @@ -63,7 +64,7 @@ def _ensure_umbrella_center(candidate, dimension):
assert candidate.ndim == 1
assert candidate.shape[0] == dimension
return candidate.astype(_np.float64)
elif isinstance(candidate, (int, long, float)):
elif types.is_int(candidate) or types.is_float(candidate):
return candidate * _np.ones(shape=(dimension,), dtype=_np.float64)
else:
raise TypeError("unsupported type")
Expand Down

0 comments on commit 71083d7

Please sign in to comment.