Thanks Todd/Dan,
I'm trying to use numpy mask module. Not sure I'm getting the right syntax when calling the "NoData" (Null, NoData...) values.
I don't quite see how to do so in the documentation. This is how my code looks at the moment.
Any further help would be greatly appreciate it.
env.workspace = r"D:\PROGRAMMES\LFP_Source_Rocks\ArcGIS\00_LFP_GLOBAL\00_UPWELLING\OUTPUT_Test.gdb"
raster = env.workspace + "\\" + "percentile"
array = arcpy.RasterToNumPyArray(raster)
marray = numpy.ma.masked_values(array,NULL)
sarray = scipy.sort(marray)
per = 20
a = scipy.percentile(sarray,per)
print a