<?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 Script not working in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-not-working/m-p/1101238#M62534</link>
    <description>&lt;P&gt;The script below is not doing what I want. The script needs to calculate the mean and the standard deviation value in Gamma_CPS then for all values below the mean assign a "0" value,&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 standard deviation above mean assign an "1"&lt;/P&gt;&lt;P&gt;2 standard deviation above mean assign an "2" etc up to 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me why it assigns everything a value of 5???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# val: inout value - mu, sig: normal dist params,&lt;/P&gt;&lt;P&gt;# inc: std increments (def: 1)&lt;/P&gt;&lt;P&gt;# cat: category limit (def: virtually unlimited)&lt;/P&gt;&lt;P&gt;# Call the method with 'val' as the field and other params in desired config.&lt;BR /&gt;def z_score(val, mu, sigma, inc=1.0, cat=5):&lt;BR /&gt;return (0 if val &amp;lt; mu else min(cat, int(abs(val-mu)/float(sigma)/inc)+1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 14:10:37 GMT</pubDate>
    <dc:creator>JHR</dc:creator>
    <dc:date>2021-09-23T14:10:37Z</dc:date>
    <item>
      <title>Script not working</title>
      <link>https://community.esri.com/t5/python-questions/script-not-working/m-p/1101238#M62534</link>
      <description>&lt;P&gt;The script below is not doing what I want. The script needs to calculate the mean and the standard deviation value in Gamma_CPS then for all values below the mean assign a "0" value,&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 standard deviation above mean assign an "1"&lt;/P&gt;&lt;P&gt;2 standard deviation above mean assign an "2" etc up to 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me why it assigns everything a value of 5???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;# val: inout value - mu, sig: normal dist params,&lt;/P&gt;&lt;P&gt;# inc: std increments (def: 1)&lt;/P&gt;&lt;P&gt;# cat: category limit (def: virtually unlimited)&lt;/P&gt;&lt;P&gt;# Call the method with 'val' as the field and other params in desired config.&lt;BR /&gt;def z_score(val, mu, sigma, inc=1.0, cat=5):&lt;BR /&gt;return (0 if val &amp;lt; mu else min(cat, int(abs(val-mu)/float(sigma)/inc)+1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 14:10:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-not-working/m-p/1101238#M62534</guid>
      <dc:creator>JHR</dc:creator>
      <dc:date>2021-09-23T14:10:37Z</dc:date>
    </item>
  </channel>
</rss>

