How to determine whether Raster statistics have been calculated

Discussion created by mstjernholm on Apr 15, 2011
Latest reply on Apr 19, 2011 by jskinner-esristaff

I have a script which fails when I use the GetRasterProperties_management function on a dataset where statistics have not yet been calculated.

How can I in a simple way check whether the statistics have been calculated ?

There is strangely enough not a Raster set attribute named "hasStatistics" or similar to get from Describe fuunction
neither does the GetRasterProperties simply rerturn a Null object
so I could use something like :

if arcpy.GetRasterProperties_management (outRaster, "MINIMUM") == None:
               CalculateStatistics_management (outRaster)

All help is most welcome