<?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: Rounding issues using Python in ArcGIS Pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421834#M18752</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/3/whatsnew/3.0.html" title="https://docs.python.org/3/whatsnew/3.0.html"&gt;What’s New In Python 3.0 — Python 3.6.4 documentation&lt;/A&gt; :&lt;/P&gt;&lt;UL class="" style="color: #222222; font-family: 'Lucida Grande', Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;LI style="text-align: justify; line-height: 20.8px;"&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.python.org/3/library/functions.html#round" style="color: #6363bb; text-decoration: none;" title="round"&gt;&lt;CODE class="" style="background-color: transparent; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; font-weight: normal; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function rounding strategy and return type have changed. Exact halfway cases are now rounded to the nearest even result instead of away from zero. (For example,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round(2.5)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now returns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;2&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;rather than&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;3&lt;/SPAN&gt;&lt;/CODE&gt;.)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round(x[,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="hyphens: none;"&gt;n])&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now delegates to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;x.__round__(&lt;N&gt;)&lt;/N&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;instead of always returning a float. It generally returns an integer when called with a single argument and a value of the same type as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;x&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when called with two arguments.&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Feb 2018 19:06:49 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2018-02-05T19:06:49Z</dc:date>
    <item>
      <title>Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421828#M18746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to me that ArcGIS Pro is not rounding my numbers correctly when I use Python in Calculate Field. Or my expression is incorrect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my example:&lt;/P&gt;&lt;P&gt;The Shape_Area of a feature is 7464.72748&lt;/P&gt;&lt;P&gt;My Calculate Field expression is&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;str(int(round(round(!Shape_Area!), -1)))&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would think this should result in a string value of 7470, but it gave me 7460.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am I going wrong? Shouldn't round(7464.72748) give me 7465 more or less?&lt;/P&gt;&lt;P&gt;And then round(7465, -1) give me 7470?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 16:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421828#M18746</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2018-02-05T16:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421829#M18747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are now in python 3... did you see the docs first? It works as expected&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.python.org/3/library/functions.html#round" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.python.org/3/library/functions.html#round&lt;/A&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;7464.72748&lt;/SPAN&gt;

round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&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="number token"&gt;7464.7&lt;/SPAN&gt;

round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;7465.0&lt;/SPAN&gt;

round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&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="number token"&gt;7460.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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;skip the round round round thing, that will get confusing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421829#M18747</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421830#M18748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering if Python 3 had anything to do with it since when I carried out the expression in Python 2, it worked as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, to get this straight, Python no longer rounds like normal arithmetic (like Excel would do). It rounds to the nearest even number first, unless it's far down the decimal chain, then it's "&lt;SPAN style="color: #222222; background-color: #eeeeee;"&gt;surprising&lt;/SPAN&gt;" as the text puts it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The round round was due to having to join up a table in Excel that had already rounded once - it's complicated but worked better than just one round.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So, is there way to round like Excel rounds?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For another example, when&amp;nbsp;Shape_Area is 2725.059761, how do I make it round to 2730 versus 2720 (like I would in Excel and normal arithmetic)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 17:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421830#M18748</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2018-02-05T17:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421831#M18749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dozens of ways.... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; time to explore, this will get you going.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; math&amp;nbsp; &lt;SPAN class="comment token"&gt;# which is available in arcmap and the field calculator&lt;/SPAN&gt;
math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ceil&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2725.059761&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;2726&lt;/SPAN&gt;

int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ceil&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2725.059761&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;2730&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# or if you understand base 9 and base 10 differences&lt;/SPAN&gt;

&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2725.059761&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;//&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;2730.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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;plus some numpy stuff.... the rest are tricks etc&lt;/P&gt;&lt;P&gt;Excel makes people dependent on masking the tricks that us old timers relied upon for years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:03:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421831#M18749</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T19:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421832#M18750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, this is good stuff to explore. I'm not sure I want to use the ceiling function since I don't always want it to round up.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, since this is really only for joining tables together to make a simple match, I can force excel to do the same. It looks like the function is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=CEILING.MATH(2725.059761,10) results in 2730&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Base 9 and 10?!? That's a thinker. I'll play around with that some... until my head hurts!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 18:00:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421832#M18750</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2018-02-05T18:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421833#M18751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adrian.... math.floor ... &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&amp;nbsp; homework...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;besides everyone rounds to the nearest 10ish&lt;/P&gt;&lt;P&gt;step outside the box... go all 8's&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;int(math.ceil(2725.059761 / 8.0)) * 8
2728&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or make it whatever you want&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;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;110.1567&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;clip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;108&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;109&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 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;109&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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:03:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421833#M18751</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T19:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421834#M18752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/3/whatsnew/3.0.html" title="https://docs.python.org/3/whatsnew/3.0.html"&gt;What’s New In Python 3.0 — Python 3.6.4 documentation&lt;/A&gt; :&lt;/P&gt;&lt;UL class="" style="color: #222222; font-family: 'Lucida Grande', Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;&lt;LI style="text-align: justify; line-height: 20.8px;"&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;The&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.python.org/3/library/functions.html#round" style="color: #6363bb; text-decoration: none;" title="round"&gt;&lt;CODE class="" style="background-color: transparent; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; font-weight: normal; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round()&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;function rounding strategy and return type have changed. Exact halfway cases are now rounded to the nearest even result instead of away from zero. (For example,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round(2.5)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now returns&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;2&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;rather than&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;3&lt;/SPAN&gt;&lt;/CODE&gt;.)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;round(x[,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="hyphens: none;"&gt;n])&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;now delegates to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;x.__round__(&lt;N&gt;)&lt;/N&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;instead of always returning a float. It generally returns an integer when called with a single argument and a value of the same type as&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="" style="background-color: #ecf0f3; padding: 0px 1px; font-size: 15.44px; font-family: monospace, sans-serif; border-radius: 3px;"&gt;&lt;SPAN class="" style="hyphens: none;"&gt;x&lt;/SPAN&gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;when called with two arguments.&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 19:06:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421834#M18752</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-02-05T19:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421835#M18753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;we are using 3.6 in PRO, my test environment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 19:15:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421835#M18753</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-05T19:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421836#M18754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure on your comment.&amp;nbsp; Pro 2.1 does come with Python 3.6, I don't think anyone is disagreeing with that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 21:57:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421836#M18754</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-02-05T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421837#M18755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes... python 3.6 is distributed with PRO.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was more to show people that the python 3.6 docs should be read and soon if they are going to be using PRO.&lt;/P&gt;&lt;P&gt;Besides, there are so many other ways options for 'rounding' that are available and most people haven't seen them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Feb 2018 22:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421837#M18755</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-05T22:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421838#M18756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please also have a look at the "decimal" module of Python:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.python.org/3.6/library/decimal.html"&gt;https://docs.python.org/3.6/library/decimal.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may offer functions you need as well. You can import the module in e.g. the Calculate Field tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 10:42:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421838#M18756</guid>
      <dc:creator>MarcoBoeringa</dc:creator>
      <dc:date>2018-02-06T10:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421839#M18757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rounding is ridiculous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joining up an "engineer's" spreadsheet with sorta-rounded-area numbers (integers) with a converted CAD drawing takes more effort than it should. This is what my code block Calculate Field expression had to look like to get as close as I could (though, I likely could have gotten closer with more ceilinging and flooring, but I got lazy):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;import math
def ceiling(parcel, area):
&amp;nbsp;&amp;nbsp;&amp;nbsp; return str(parcel) + " - " + str(int(math.ceil(math.floor(area) / 10)) * 10)

__esri_field_calculator_splitter__

ceiling(!Parcel!, !Shape_Area!)&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks, Dan, for all the assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:03:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421839#M18757</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2021-12-11T19:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding issues using Python in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421840#M18758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;engineers???&amp;nbsp; cool! &amp;nbsp; use the base 9 thing.. that will keep them going for a few hours &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Feb 2018 18:42:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/rounding-issues-using-python-in-arcgis-pro/m-p/421840#M18758</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-02-06T18:42:22Z</dc:date>
    </item>
  </channel>
</rss>

