[Numpy-discussion] blank values '--'

Bryan Woods bwoods at aer.com
Thu Feb 24 13:00:09 EST 2011


Hello,

I am loading in data from the GRIB2 files using PyNIO. Once I load them 
into numpy arrays I am left with a halo of values near the array 
boundaries that appear to be empty. When I print them or use them in 
conditional statements I see values of '--'. I'd like to turn these 
values into zeroes at the very least.

As an example if I print the array I see:

[[-- -- -- ..., -- -- --]
  [-- -- -- ..., -- -- --]
  [-- -- -- ..., -- -- --]
  ...,
  [-- -- -- ..., -- -- --]
  [-- -- -- ..., -- -- --]
  [-- -- -- ..., -- -- --]]

though I know that there are valid values in the interior of the domain 
which plot properly.

I can't find anything in the numpy documentation that addresses this 
type of missing value. Has anyone dealt with this before?

Thanks,
Bryan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bwoods.vcf
Type: text/x-vcard
Size: 341 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110224/2fd85a82/attachment.vcf>


More information about the NumPy-Discussion mailing list