Convert an Array of ints to Date-Objects
<p>I have an array of ints that I would like to convert to date-type objects:</p>

<pre><code>[[19480916 19480901 19480917 19480901 19480901 19481019]
 [19480917 19480916 19481019 19480922 19480922 19490902]
 [19481004 19480917 19481021 19480924 19481004 19501124]]
</code></pre>

<p>I have the following code that is supposed to iterate through the array and convert each number into a date object and append it to a new list:</p>

<pre><code>Date_List = []
from datetime import date, datetime, timedelta
for s in myArray:
    date1 = datetime(year=int(s[0:4]), month=int(s[4:6]), day=int(s[6:8]))
    Date_List.append(date1)
</code></pre>

<p>When I run this, I get the following error:</p>

<pre><code>TypeError: only length-1 arrays can be converted to Python scalars.
</code></pre>

<p>Is there a way where I am able to do this?</p>