I have used zonal statistics from processing to calculate the raster statastics with polygon layer.
processing.runalg('qgis:zonalstatistics', rlayersource, 1, vlayer, None, True, Path)
But this is taking more time if the no of polygon blocks are more. So i found that we can use
scipy to calculate the statistics of the raster.
How can i do that?