<?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: arcpy.da.TableToNumPyArray with a short field tied to an encoded domain in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041769#M5836</link>
    <description>&lt;P&gt;&lt;EM&gt;TableToNumPyArray (in_table, field_names, {where_clause}, {skip_nulls}, {null_value})&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What options are you using the optional parameters, if any&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have nulls and you don't provide a conversion, then you will get errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcpy.da import TableToNumPyArray
fc00 = r"C:\Git_Dan\npgeom_bak\Project_npg\npgeom.gdb\Ontario_singlepart"

arr = TableToNumPyArray(fc00, "*")
Traceback (most recent call last):
  File "&amp;lt;ipython-input-3-3fe0a3115378&amp;gt;", line 1, in &amp;lt;module&amp;gt;
    arr = TableToNumPyArray(fc00, "*")
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

arr = TableToNumPyArray(fc00, "*", skip_nulls=True)  # -- works&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Mar 2021 23:17:09 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-03-29T23:17:09Z</dc:date>
    <item>
      <title>arcpy.da.TableToNumPyArray with a short field tied to an encoded domain</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041763#M5835</link>
      <description>&lt;P&gt;I am working with ArcPy in ArcGIS Pro 2.7.2.&amp;nbsp; I am using the&amp;nbsp;arcpy.da.TableToNumPyArray function and specifying fields in a list.&amp;nbsp; One of the fields in the source table is defined as a short integer field, but it is tied to an encoded value domain.&amp;nbsp; The underlying values of this domain are valid widths like 2, 4, and 6.&amp;nbsp; The display values of this domain use the inch quotation mark like 2", 4", and 6".&amp;nbsp; Anyway, when I include this field in the call to TableToNumPyArray, I get this error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class="ansi-red-fg"&gt;TypeError&lt;/SPAN&gt;: int() argument must be a string, a bytes-like object or a number, not 'NoneType'&lt;/PRE&gt;&lt;P&gt;When I do&amp;nbsp;&lt;STRONG&gt;not&lt;/STRONG&gt; include this field in the function call, everything works just fine.&amp;nbsp; How do I get my numpy array with values like 2, 4, and 6 if the function is creating a short field and trying to put values like 2" into it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 22:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041763#M5835</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-29T22:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.TableToNumPyArray with a short field tied to an encoded domain</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041769#M5836</link>
      <description>&lt;P&gt;&lt;EM&gt;TableToNumPyArray (in_table, field_names, {where_clause}, {skip_nulls}, {null_value})&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;What options are you using the optional parameters, if any&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have nulls and you don't provide a conversion, then you will get errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcpy.da import TableToNumPyArray
fc00 = r"C:\Git_Dan\npgeom_bak\Project_npg\npgeom.gdb\Ontario_singlepart"

arr = TableToNumPyArray(fc00, "*")
Traceback (most recent call last):
  File "&amp;lt;ipython-input-3-3fe0a3115378&amp;gt;", line 1, in &amp;lt;module&amp;gt;
    arr = TableToNumPyArray(fc00, "*")
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

arr = TableToNumPyArray(fc00, "*", skip_nulls=True)  # -- works&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 23:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041769#M5836</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-03-29T23:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.TableToNumPyArray with a short field tied to an encoded domain</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041774#M5837</link>
      <description>&lt;P&gt;That worked.&amp;nbsp; There were nulls in the short field, but not in the other fields.&amp;nbsp; It had nothing to do with field type or with a domain.&amp;nbsp; I had seen these two optional parameters, but didn't know the one was required if the underlying data had nulls in it.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Mar 2021 23:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-tabletonumpyarray-with-a-short-field-tied/m-p/1041774#M5837</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-29T23:57:23Z</dc:date>
    </item>
  </channel>
</rss>

