<?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: Is there a reason lists don't have a .sum() method? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/is-there-a-reason-lists-don-t-have-a-sum-method/m-p/34358#M25113</link>
    <description>&lt;P&gt;I think reason is that list can contain different type of objects than just integers and floats (so nested lists, string and all possible other kind of objects) so it doesn't make sense to implement .sum method as it would fail in many cases.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Nov 2021 12:19:56 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2021-11-26T12:19:56Z</dc:date>
    <item>
      <title>Is there a reason lists don't have a .sum() method?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-reason-lists-don-t-have-a-sum-method/m-p/34357#M25112</link>
      <description>&lt;P&gt;I do a lot of work with numpy arrays and pytorch tensors, but occasionally throw some native lists around. I naturally want to write &amp;lt;list&amp;gt;.sum(), which would work for these other third-party iterables, but doesn't work for native lists.&lt;/P&gt;&lt;P&gt;It'd be very simple to give the native iterables a .sum() method (as opposed to using the built-in sum(...) function), but maybe there's a reason why this doesn't exist. Or is this just some python quirk? &lt;A href="https://azar.pro" target="test_blank"&gt;https://azar.pro&lt;/A&gt; &lt;A href="https://chatrandom.download/" target="test_blank"&gt;https://chatrandom.download/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 12:13:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-reason-lists-don-t-have-a-sum-method/m-p/34357#M25112</guid>
      <dc:creator>missyT</dc:creator>
      <dc:date>2021-11-26T12:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a reason lists don't have a .sum() method?</title>
      <link>https://community.databricks.com/t5/data-engineering/is-there-a-reason-lists-don-t-have-a-sum-method/m-p/34358#M25113</link>
      <description>&lt;P&gt;I think reason is that list can contain different type of objects than just integers and floats (so nested lists, string and all possible other kind of objects) so it doesn't make sense to implement .sum method as it would fail in many cases.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Nov 2021 12:19:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/is-there-a-reason-lists-don-t-have-a-sum-method/m-p/34358#M25113</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2021-11-26T12:19:56Z</dc:date>
    </item>
  </channel>
</rss>

