<?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 Re: Maximum size of an array for Mean Center to work in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362793#M28659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/mean-center.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/mean-center.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Mean Center—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use featureclasstonumpyarray to get the coordinates out to an array&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/featureclasstonumpyarray.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/featureclasstonumpyarray.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;FeatureClassToNumPyArray—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a million points could of microseconds.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np
&amp;gt;&amp;gt;&amp;gt; a = np.random.randint(300000,400000,2000000)
&amp;gt;&amp;gt;&amp;gt; a=a.reshape((1000000,2))
&amp;gt;&amp;gt;&amp;gt; np.mean(a,axis=0)
array([ 349993.646074,&amp;nbsp; 349992.998863])
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:54:49 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-11T16:54:49Z</dc:date>
    <item>
      <title>Maximum size of an array for Mean Center to work</title>
      <link>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362791#M28657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know what record count would be too big for mean center to work? Or any other way around these errors. My file sets are not going to be smaller on future work, I would love to know how, where to fix this.&lt;/P&gt;&lt;P&gt;I keep having it fail, and I'd rather not spend all day looking for its optimum size by trial and error. Right now I know its less than 700,000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original error message was:&amp;nbsp;&amp;nbsp; ValueError: Array is too big.&lt;/P&gt;&lt;P&gt;New error message after reducing the file size is:&amp;nbsp;&amp;nbsp; MemoryError&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 18:41:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362791#M28657</guid>
      <dc:creator>VirginiaWalgren</dc:creator>
      <dc:date>2016-03-02T18:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum size of an array for Mean Center to work</title>
      <link>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362792#M28658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't tested but have you tried numpy it works great with arrays&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import numpy as np 
import arcpy


field_names = 'your field names


newarr = arcpy.da.FeatureClassToNumPyArray(originFC,(field_names),null_value=-9999)
np.mean(newarr)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362792#M28658</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-11T16:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Maximum size of an array for Mean Center to work</title>
      <link>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362793#M28659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/mean-center.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-statistics-toolbox/mean-center.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Mean Center—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use featureclasstonumpyarray to get the coordinates out to an array&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/featureclasstonumpyarray.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/featureclasstonumpyarray.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;FeatureClassToNumPyArray—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a million points could of microseconds.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import numpy as np
&amp;gt;&amp;gt;&amp;gt; a = np.random.randint(300000,400000,2000000)
&amp;gt;&amp;gt;&amp;gt; a=a.reshape((1000000,2))
&amp;gt;&amp;gt;&amp;gt; np.mean(a,axis=0)
array([ 349993.646074,&amp;nbsp; 349992.998863])
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:54:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maximum-size-of-an-array-for-mean-center-to-work/m-p/362793#M28659</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T16:54:49Z</dc:date>
    </item>
  </channel>
</rss>

