[GRASS-dev] [GRASS GIS] #2269: r.univar silent instead of NaN

GRASS GIS trac at osgeo.org
Wed Apr 30 16:46:45 PDT 2014


#2269: r.univar silent instead of NaN
-------------------------+--------------------------------------------------
 Reporter:  neteler      |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  6.4.4                    
Component:  Raster       |     Version:  svn-releasebranch64      
 Keywords:  r.univar     |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

 Do we have a standard how to represent NaN (''not a number'') in GRASS (as
 a text)?

 For example in Python:
 {{{
 #!python
 >>> a = float('nan')
 >>> a
 nan
 >>> a = float('NaN')
 >>> a
 nan
 >>> a = float('NAN')
 >>> a
 nan
 >>> a = float('nAn')
 >>> a
 nan
 }}}

 (And the same for `inf`.)

 Is it even appropriate that `r.univar` would give NaNs? Wouldn't be non-
 zero return code and a error message more appropriate? (Perhaps not, but
 we should consider the options.)

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/2269#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list