<?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: Python calculation in field calculator in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453131#M15239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kathrin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for pointing out this issue. I logged a bug for math.pi and math.e constants being listed as functions in the field calculator, NIM074191.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2011 17:27:14 GMT</pubDate>
    <dc:creator>ChrisFox3</dc:creator>
    <dc:date>2011-10-18T17:27:14Z</dc:date>
    <item>
      <title>Python calculation in field calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453128#M15236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to do some simple calculation within the field calculator using Python instead of VB and keep on getting error messages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pre-logic script code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def rad (value):
&amp;nbsp; return math.sqrt(value / math.pi( ) )&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AEQU_RAD= rad (!area!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get the error message, that "float object is not callable". Field type is double.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 08:43:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453128#M15236</guid>
      <dc:creator>KathrinSchulte-Braucks</dc:creator>
      <dc:date>2011-10-17T08:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Python calculation in field calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453129#M15237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;pi() is the problem, see below&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;gt;&amp;gt;&amp;gt; import math
&amp;gt;&amp;gt;&amp;gt; print math.pi
3.14159265359
&amp;gt;&amp;gt;&amp;gt; print math.pi()
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;interactive input&amp;gt;", line 1, in &amp;lt;module&amp;gt;
TypeError: 'float' object is not callable
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:12:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453129#M15237</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T20:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python calculation in field calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453130#M15238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you so much, now it works. I just clicked on the proposed function in the box on the right. The implemented syntax in the box was math.pi(), so I assumed this is the correct syntax.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 13:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453130#M15238</guid>
      <dc:creator>KathrinSchulte-Braucks</dc:creator>
      <dc:date>2011-10-17T13:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python calculation in field calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453131#M15239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kathrin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for pointing out this issue. I logged a bug for math.pi and math.e constants being listed as functions in the field calculator, NIM074191.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2011 17:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453131#M15239</guid>
      <dc:creator>ChrisFox3</dc:creator>
      <dc:date>2011-10-18T17:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python calculation in field calculator</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453132#M15240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for processing this issue!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Oct 2011 08:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/python-calculation-in-field-calculator/m-p/453132#M15240</guid>
      <dc:creator>KathrinSchulte-Braucks</dc:creator>
      <dc:date>2011-10-20T08:14:40Z</dc:date>
    </item>
  </channel>
</rss>

