<?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: memory error with python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538686#M42109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I noticed same. So far i dont have any workaround to this. ArcGIS 10 enables handling large raster dataset but arcpy on the other hand fails to cater such requirement. I do hope that someone from ESRI can shed some light on this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Aug 2011 05:55:08 GMT</pubDate>
    <dc:creator>IbraheemKhan1</dc:creator>
    <dc:date>2011-08-17T05:55:08Z</dc:date>
    <item>
      <title>memory error with python</title>
      <link>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538684#M42107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I developed a python script for geoprocessing. It fails at following line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import numpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from numpy import *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;n1 = zeros((2962,4625,11))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it says MemoryError&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please can someone help to fix it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ibe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 14:31:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538684#M42107</guid>
      <dc:creator>IbraheemKhan1</dc:creator>
      <dc:date>2011-08-16T14:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: memory error with python</title>
      <link>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538685#M42108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It fails because you are using a lot of memory (RAM). I tested this out on my computer, and:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;n1 = zeros((2962,4476,11))&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;uses up 1,147,692KB - i.e. about one GB... But:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;n1 = zeros((2962,4477,11))&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;fails; with MemoryError.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your matrix is bigger than that, so it fails...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This actually doesn't have anything to do with ArcGIS... Try googling 'numpy MemoryError'. If that doesn't work, you have two options:&lt;/SPAN&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Make your matrix smaller.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Only if you have a 64bit operating system,&lt;STRONG&gt; AND&lt;/STRONG&gt; you don't need to use &lt;STRONG&gt;arcpy &lt;/STRONG&gt;functions in your script you could &lt;STRONG style="font-style: italic;"&gt;try&lt;/STRONG&gt; installing 64bit Python and 64bit Numpy. 64bit programs let you use more RAM than normal; &lt;STRONG style="font-style: italic;"&gt;BUT I don't know if this will work, or if it will solve your problem.&lt;/STRONG&gt; &lt;SPAN style="text-decoration:underline;"&gt;However this will &lt;STRONG&gt;NOT&lt;/STRONG&gt; work with &lt;STRONG&gt;arcpy &lt;/STRONG&gt;stuff...&lt;/SPAN&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 05:48:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538685#M42108</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2011-08-17T05:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: memory error with python</title>
      <link>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538686#M42109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I noticed same. So far i dont have any workaround to this. ArcGIS 10 enables handling large raster dataset but arcpy on the other hand fails to cater such requirement. I do hope that someone from ESRI can shed some light on this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Aug 2011 05:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538686#M42109</guid>
      <dc:creator>IbraheemKhan1</dc:creator>
      <dc:date>2011-08-17T05:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: memory error with python</title>
      <link>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538687#M42110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try &lt;/SPAN&gt;&lt;STRONG&gt;Create Normal Raster (Spatial Analyst)&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outNormalRaster = CreateNormalRaster(2, Extent(0, 0, 150, 150))
outNormalRaster.save("C:/sapyexamples/output/outnormal")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No idea how big that can go...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Numpy is nothing to do with Arcpy; both are simply libraries that you can use (at the same time, if you want) within the Python programming language. Numpy lets you do complex numerical stuff, Arcpy is way to access Arc functionality programatically...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:22:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/memory-error-with-python/m-p/538687#M42110</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2021-12-11T23:22:32Z</dc:date>
    </item>
  </channel>
</rss>

