Skip to content
Snippets Groups Projects
Commit 98f2b772 authored by Bruce Flynn's avatar Bruce Flynn
Browse files

modified linearConvert to support numpy arrays.

parent d39d2777
No related branches found
No related tags found
No related merge requests found
"""Functions for calculating the dervied data.
All linear conversion support ``numpy.ndarray`` objects.
"""
__version__ = '$Revision: 1.15 $'
#$Source: /cvsroot/TOOLS/dev/metobs/python/data/metobs/data/__init__.py,v $
......@@ -237,7 +239,7 @@ def linearConvert(data, factor=1, offset=0):
>>> linearConvert(1, 90, 10)
100.0
"""
return float(data) * factor + offset
return data * float(factor) + offset
def c2f (val):
"""Degrees celsius to fahrenheit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment