<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to count the adjacent cells that have a different value in a raster dataset? in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221037#M3092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a raster dataset and I'm trying to determine a value for land use adjacency as used by&amp;nbsp;Stathakis &amp;amp; Tsilimigkas (2014) (Measuring the compactness of European medium-sized cities by spatial metrics based on fused data sets. International Journal of Image and Data Fusion, 6(1), 42-64. doi:10.1080/19479832.2014.941018)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This involves counting the number of adjacent cells that have a value different to the centre cell. The attached image illustrates this concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It needs to return a new raster dataset where the value of each cell equals this count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a method for doing this in ArcMap 10?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Dan, you're an absolute legend! Amazing dedication and perseverance to assist a total stranger on the other side of the world. Thank you so much for all your effort on this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to update, the main issues experienced had much to do with a combination of differences in arcmap 10.3's and ArcGIS Pro's arcpy, and some major changes in numpy that is used by python 2.7 and python 3.6. Dan worked through them and ended up producing the Toolbox/Script I've attached to this edited post. As a final tip, make sure you run the script in a blank dataframe. You will need to manually set the projection of the final output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2018 02:18:35 GMT</pubDate>
    <dc:creator>MarkLimb</dc:creator>
    <dc:date>2018-08-09T02:18:35Z</dc:date>
    <item>
      <title>How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221037#M3092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a raster dataset and I'm trying to determine a value for land use adjacency as used by&amp;nbsp;Stathakis &amp;amp; Tsilimigkas (2014) (Measuring the compactness of European medium-sized cities by spatial metrics based on fused data sets. International Journal of Image and Data Fusion, 6(1), 42-64. doi:10.1080/19479832.2014.941018)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This involves counting the number of adjacent cells that have a value different to the centre cell. The attached image illustrates this concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It needs to return a new raster dataset where the value of each cell equals this count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest a method for doing this in ArcMap 10?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Dan, you're an absolute legend! Amazing dedication and perseverance to assist a total stranger on the other side of the world. Thank you so much for all your effort on this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to update, the main issues experienced had much to do with a combination of differences in arcmap 10.3's and ArcGIS Pro's arcpy, and some major changes in numpy that is used by python 2.7 and python 3.6. Dan worked through them and ended up producing the Toolbox/Script I've attached to this edited post. As a final tip, make sure you run the script in a blank dataframe. You will need to manually set the projection of the final output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 02:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221037#M3092</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-09T02:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221038#M3093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/image-analyst/focal-statistics.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/image-analyst/focal-statistics.htm"&gt;Focal Statistics—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp; using &lt;STRONG&gt;variety&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;….if you are using arcmap or ArcGIS pro (need spatial analyst extension)&lt;/P&gt;&lt;P&gt;numpy if you need more than the number of different values within the neighborhood (ie count by the different classes)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 02:36:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221038#M3093</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-09T02:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221039#M3094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's the tool I was looking for!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't quite get there though as I'm looking for a count of the number cells in the neighborhood that are different to the centre cell. The VARIETY statistics type only tells me the count of the unique values (which would also include the value of the centre cell).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you mean by numpy? Do you mean this:&amp;nbsp;&lt;A class="link-titled" href="http://www.numpy.org/" title="http://www.numpy.org/"&gt;NumPy — NumPy&lt;/A&gt;&amp;nbsp;?&amp;nbsp; I've never used it before, are you aware of any useful guides that would help with what I'm trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 03:17:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221039#M3094</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-09T03:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221040#M3095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;I think this is what you want.&lt;/P&gt;&lt;P&gt;Don't worry about how I got it for now, but it uses a moving/sliding 3x3 window on a "raster" as an array&lt;/P&gt;&lt;P&gt;See if this is what you really want...&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ---- consider this small 'raster'&lt;/SPAN&gt;
input array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- produce a moving/rolling version using a 3x3 kernel&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the first row only...&lt;/SPAN&gt;

strided array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; first block
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- look at them individually and calculate the 'statistic'&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- continue on&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221040#M3095</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T10:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221041#M3096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that's it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 11:34:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221041#M3096</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-09T11:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221042#M3097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok.. before we get to using numpy, see if you can use the focal statistics variety with an irregular neighborhood&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/spatial-analyst/nbrirregular-class.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/spatial-analyst/nbrirregular-class.htm"&gt;NbrIrregular—Spatial Analyst module | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;effectively you need a kernel file of form&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;3 3&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;1 1 1&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;1 0 1&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;1 1 1&lt;/P&gt;&lt;TABLE style="background-color: #ffffff; border-collapse: collapse; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-spacing: 0px 0px; color: #4c4c4c; font-family: &amp;amp;quot; avenir next w01&amp;amp;quot;,&amp;amp;quot;avenir next w00&amp;amp;quot;,&amp;amp;quot;avenir next&amp;amp;quot;,&amp;amp;quot;avenir&amp;amp;quot;,&amp;amp;quot;helvetica neue&amp;amp;quot;,sans-serif; font-size: 14.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 26.35px; margin-bottom: 26.35px; orphans: 2; overflow: auto; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; width: 768.41px; word-spacing: 0px; border: 0.5px solid #cccccc;"&gt;&lt;TBODY style="overflow: auto; width: 100%;"&gt;&lt;TR style="border-bottom-color: #4c4c4c; border-bottom-style: none; border-bottom-width: 0px; text-align: left;"&gt;&lt;TD style="border-left-color: #cccccc; border-left-style: solid; border-left-width: 1px; border-right-color: #cccccc; border-right-style: solid; border-right-width: 1px; font-weight: 300; padding: 8.67px;"&gt;&lt;DIV style="border-left-color: #4c4c4c; border-left-style: none; border-left-width: 0px; border-right-color: #4c4c4c; border-right-style: none; border-right-width: 0px; font-weight: 300; padding: 0px;"&gt;KernelFile&lt;/DIV&gt;&lt;/TD&gt;&lt;TD style="border-left-color: #cccccc; border-left-style: solid; border-left-width: 1px; border-right-color: #cccccc; border-right-style: solid; border-right-width: 1px; font-weight: 300; padding: 8.67px;"&gt;&lt;P style="margin-bottom: 0px; margin-top: 0px;"&gt;The irregular &lt;SPAN style="font-weight: bold;"&gt;inKernelFile&lt;/SPAN&gt; is an ASCII text file that defines the shape of an irregular neighborhood. A value of 0 for a cell position indicates that the cell is not a member of the neighborhood, and a nonzero number at a corresponding cell's position indicates that the cell value be included as a member of the neighborhood.&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-left-color: #cccccc; border-left-style: solid; border-left-width: 1px; border-right-color: #cccccc; border-right-style: solid; border-right-width: 1px; font-weight: 300; padding: 8.67px;"&gt;File&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which should blot out the core/focal cell&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/focal-statistics.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/spatial-analyst/focal-statistics.htm"&gt;Focal Statistics—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So as an example from PRO&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="346" src="https://community.esri.com/legacyfs/online/418381_kernel.png" width="329" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spent an inordinate amount of time making the kernel file to save you some time &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;Give the standard tool with the irregular kernel a shot otherwise I will have to put a short script together for you&lt;/P&gt;&lt;P&gt;PS, statistics type should be variety... didn't have any rasters to test on.. that is your job&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2018 11:57:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221042#M3097</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-09T11:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221043#M3098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank&amp;nbsp;you so much for your help Dan, I really appreciate the effort! The kernal is working well in terms of selecting the right neighbourhood, however the statistics aren't. I was thinking of using the annulus to do this, but your idea is more precise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically this is because I need the count of the surrounding cells that are different to the centre cell. The VARIETY statistics option only counts number of&amp;nbsp;&lt;EM&gt;unique&lt;/EM&gt; values. Also, it's currently counting cells that are the same as the centre cell.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The crudely drawn attached image demonstrates the current results vs. what I require. The underlying image is an extract of my raster data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Results table show the results returned by the Focal Stats tool for the grid I've drawn in red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Required table shows the results I would expect using the method described by &lt;SPAN style="background-color: #ffffff;"&gt;Stathakis &amp;amp; Tsilimigkas&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/418449_Capture.JPG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 00:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221043#M3098</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-10T00:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221044#M3099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so the kernel is basically calculating for 1 cell.&amp;nbsp; with the image you showed above, you have no difference in the values around the kernel/core cell... so cell B1 is giving you 1, where as it should give you 0.&lt;/P&gt;&lt;P&gt;But!!! a variety of 1, implies no variation since the core cell is assigned 0... it may be as simple subtracting 1 from the focal statistics. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Cells b1 to C2 support this, but if you are showing results from the edge of a raster all bets are off since some form of edge fudging may be occurring.&lt;/P&gt;&lt;P&gt;If you could zip and attach a small raster *tif for further inspection, I can look deeper and produce numpy variants like I have shown before... so make sure that those are good... but do the assessment a couple of cells in from edges.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 01:23:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221044#M3099</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-10T01:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221045#M3100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think just subtracting will work as it's not going to capture what I show in in cells A0 &amp;amp; B0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample I provided above isn't from the edge, it's from the centre of the raster (there are spots throughout that have no data (typically from roads), and this is intentional. Idea is for areas of no data to be ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find a sample attached as requested.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221045#M3100</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-10T02:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221046#M3101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A0 is surrounded by 5 green and 2 reddish...&amp;nbsp; It's variety is 2, the 'required' version is the frequency count like I showed in one of my numpy examples.&lt;/P&gt;&lt;P&gt;Soooo it sounds like you want the variety (2) but the count for the classes making up the one that is 'different' from the core/focal cell.&lt;/P&gt;&lt;P&gt;That is doable, but if you could articulate the algorithm, I can implement it in numpy...&lt;/P&gt;&lt;P&gt;all that is needed is a sample (small) raster zipped and attached to your original thread for testing.&amp;nbsp; You can do hand calculations, and I can run through variants oke the ones I have shown.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221046#M3101</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-10T02:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221047#M3102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's right: for each cell, I need a count of the number of surrounding cells that&amp;nbsp;have a different value to the core (excluding cells with no data).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For the sample you require... do you&amp;nbsp;a raster that includes the input data and another that includes the solved data for that area? If so, what grid size do you require?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:38:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221047#M3102</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-10T02:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221048#M3103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something to amuse you in the interim.... based on your example&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;input array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
strided array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;


 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
sub array
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; number different than &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;

&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221048#M3103</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T10:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221049#M3104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark, I don't need any specific cell size.&amp;nbsp; The sample you sent is sufficient, I can make my array from it.&lt;/P&gt;&lt;P&gt;Tonight...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221049#M3104</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-10T02:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221050#M3105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that's exactly what I'm looking for. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 02:59:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221050#M3105</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-10T02:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221051#M3106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to trim off a lot of nodata area to get to the crux of the data… a couple of visuals.&lt;/P&gt;&lt;P&gt;I trimmed, ran the 'algorithm', made a fishnet so you could see cell outlines, and zoomed into a random area for you to have a look at.&amp;nbsp; I then converted the 'result' to a point file so that I could use labelling as well.&amp;nbsp; So if the colors aren't great, you dan check a cell value against the number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first image is the original values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second is the number of cells around the original cell that are different.&lt;/P&gt;&lt;P&gt;Check the logic.&lt;/P&gt;&lt;P&gt;EDIT See images in a subsequent thread&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 04:30:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221051#M3106</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-10T04:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221052#M3107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for this Dan, very clearly explained!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless I'm missing something, I'm not sure if this is quite doing it though?&amp;nbsp; Two issues I can see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Values are being calculated for cells with no data (I'm assuming that's what the black is in the first image?). For example cell 7,B (x,y). It's a null cell but appears to be calculating the two adjacent red cells. The no data cells should be skipped&lt;/LI&gt;&lt;LI&gt;Others don't seem to be working as expected. For example, cell 8,B is shown as 5 when&amp;nbsp;0 was expected. Or cell 8,F which is 3, when 0 would be expected. Cell 2,H is 5 when 3 was expected&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Aug 2018 05:17:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221052#M3107</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-10T05:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221053#M3108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark... forget the other images.&lt;/P&gt;&lt;P&gt;Sorry for the delay (holidays.. sort of)&lt;/P&gt;&lt;P&gt;So, nulls have been removed as being a different value around the focal cell... wasn't sure about that one.&lt;/P&gt;&lt;P&gt;That affects the results. &amp;nbsp;&lt;/P&gt;&lt;P&gt;A newly clipped sample and result... have a gander&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="418523" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/418523_sample_clip_01.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the result... notice that most of the areas are classes as 0 difference which is to be expected, now that null values are removed from consideration.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="418524" alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/418524_sample_result_01.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2018 05:25:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221053#M3108</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-11T05:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221054#M3109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's the ticket, perfect!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks Dan! The question now of course is... how did you do it? &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2018 00:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221054#M3109</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-13T00:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221055#M3110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just got back, so I am putting it into a useable script form in a toolbox, but I only use PRO, so you will be the tester of whether saving a toolbox to an ArcMap version actually works... so ArcMap 10.????? after the dot would help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2018 01:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221055#M3110</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-08-13T01:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to count the adjacent cells that have a different value in a raster dataset?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221056#M3111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not in the office today so not certain... I think it is 10.3 but will need to confirm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2018 01:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/how-to-count-the-adjacent-cells-that-have-a/m-p/221056#M3111</guid>
      <dc:creator>MarkLimb</dc:creator>
      <dc:date>2018-08-13T01:54:31Z</dc:date>
    </item>
  </channel>
</rss>

