Of course you should define circular_mask as a typed memoryview object.