The sample you code you posted uses something called "DOCELL" notation (sometimes called neighborhood notation) to refer to neighboring cells using relative coordinates (for example, 1,-1). Unfortunately, ESRI still has not ported that functionality in ArcGIS.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.