Skip to content

Commit

Permalink
fix #18 tvariable missingvalue copy issue in subRegion (#21)
Browse files Browse the repository at this point in the history
* fix #18 tvariable missingvalue copy issue in subRegion

* space to trigger build
  • Loading branch information
dnadeau4 authored and doutriaux1 committed Feb 21, 2017
1 parent f5cde4d commit d6e3fe2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lib/tvariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"""
TransientVariable (created by createVariable)
is a child of both AbstractVariable and the masked array class.
is a child of both AbstractVariable and the masked array class.
Contains also the write part of the old cu interface.
"""
import json
Expand Down Expand Up @@ -152,7 +152,7 @@ def __init__(self, data, typecode=None, copy=1, savespace=0,
The savespace argument is ignored, for backward compatibility only.
"""
try:
if data.fill_value is not None:
if( (data.fill_value is not None) and (fill_value is None) ):
self._setmissing(data.fill_value)
fill_value = data.fill_value
except:
Expand Down
3 changes: 1 addition & 2 deletions Test/test_tvariable.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def testTV(self):
self.assertEqual(missing_value, -99.9)

tmv = tv.fill_value
# TODO: Did the default value of fill_value/missing change? This is failing.
#self.assertEqual(tmv, -99.9)
self.assertEqual(tmv, -99.9)

grid = tv.getGrid()
self.assertFalse(grid is None)
Expand Down

0 comments on commit d6e3fe2

Please sign in to comment.