Skip to content

Commit

Permalink
Hot-fix for numpy v1.10
Browse files Browse the repository at this point in the history
Changing to numpy 1.10.1 caused metutils.convert to raise a TypeError when
the function input was of type int. Forcing the type to be float fixes the
error.
  • Loading branch information
wcarthur committed Oct 13, 2015
1 parent b15b676 commit 0361c7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utilities/metutils.py
Expand Up @@ -386,7 +386,7 @@ def convert(value, input, output):
"""
startValue = value
value = numpy.array(value)
value = numpy.array(value, dtype=float)
if input == output:
# Do nothing:
return value
Expand Down Expand Up @@ -490,6 +490,6 @@ def genesisPotential(zeta, rh, vmax, shear):
"""
Calculate genesis potential index
"""
gpi = power(abs((10**5)*zeta),
gpi = numpy.power(abs((10**5)*zeta),
1.5)*((rh/50.)**3)*((vmax/70.)**3)/((1.+0.1*shear)**2)
return gpi

0 comments on commit 0361c7c

Please sign in to comment.