One quick approach is to use Numpy's genfromtext function. It allows you skip lines and specify a nodata value. Based on the asc file structure (pre-edit as @Joseph has done):
import numpy as np
asc_file = r".../yourfile.asc"
x = np.genfromtxt(asc_file,skip_header=12,missing_values='-9999')
This returns the value 0.7315
In regards to the nodata value not actually being ignored I found that using the usemask parameter worked better. It returns a masked array ensuring that subsequent operations will ignore the nodata values, or
missing_values. Alternatively, instead of genfromtxt you can use mafromtext which accepts the same arguments but sets
usemask=True by default. The following worked for me:
# usemask=True so masked array is returned
x = np.genfromtxt(asc_file,skip_header=12,missing_values='-9999',usemask=True)
# Equivalent using mafromtext
x = np.mafromtxt(asc_file,skip_header=12,missing_values='-9999')
# Now any calls to min/max will not include the NODATA values
The Numpy docs have a page which explains the use of
missing_values and other parameters in more detail.
Of course if you require more functionality in terms of raster processing and interrogation then GDAL is the way to go, as @iant and @Luke have mentioned.