[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361461#comment-16361461
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

wesm closed pull request #1586: ARROW-2124: [Python] Add test for empty item in 
array
URL: https://github.com/apache/arrow/pull/1586
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/pyarrow/tests/test_convert_pandas.py 
b/python/pyarrow/tests/test_convert_pandas.py
index 026cd2507..b73522d17 100644
--- a/python/pyarrow/tests/test_convert_pandas.py
+++ b/python/pyarrow/tests/test_convert_pandas.py
@@ -800,6 +800,14 @@ def test_column_of_lists(self):
 field = schema.field_by_name(column)
 _check_array_roundtrip(df[column], type=field.type)
 
+def test_column_of_lists_first_empty(self):
+# ARROW-2124
+num_lists = [[], [2, 3, 4], [3, 6, 7, 8], [], [2]]
+series = pd.Series([np.array(s, dtype=float) for s in num_lists])
+arr = pa.array(series)
+result = pd.Series(arr.to_pandas())
+tm.assert_series_equal(result, series)
+
 def test_column_of_lists_chunked(self):
 # ARROW-1357
 df = pd.DataFrame({


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361462#comment-16361462
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

wesm commented on issue #1586: ARROW-2124: [Python] Add test for empty item in 
array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-365067123
 
 
   thanks @xhochy!


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361433#comment-16361433
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

wesm commented on issue #1586: ARROW-2124: [Python] Add test for empty item in 
array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-365059580
 
 
   Appveyor build running here 
https://ci.appveyor.com/project/xhochy/arrow/build/1.0.572. I will merge once 
that advances some more


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16361276#comment-16361276
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

xhochy commented on issue #1586: ARROW-2124: [Python] Add test for empty item 
in array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-365025598
 
 
   @pitrou yes, I'm a frequent rebaser and force-pusher :D


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360859#comment-16360859
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

wesm commented on issue #1586: ARROW-2124: [Python] Add test for empty item in 
array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-364952601
 
 
   Rebased


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360739#comment-16360739
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

pitrou commented on issue #1586: ARROW-2124: [Python] Add test for empty item 
in array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-364921417
 
 
   See https://github.com/apache/arrow/pull/1590


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360714#comment-16360714
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

pitrou commented on issue #1586: ARROW-2124: [Python] Add test for empty item 
in array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-364917208
 
 
   @xhochy My guess is that you force-pushed in the meantime, for example after 
rebasing, and therefore the original changeset doesn't exist in the repo 
anymore? I will try to make this more robust.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-12 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360440#comment-16360440
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

xhochy commented on issue #1586: ARROW-2124: [Python] Add test for empty item 
in array
URL: https://github.com/apache/arrow/pull/1586#issuecomment-364857558
 
 
   @pitrou your change detection script fails here, can you have a short look 
what the problem may be?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359990#comment-16359990
 ] 

ASF GitHub Bot commented on ARROW-2124:
---

xhochy opened a new pull request #1586: ARROW-2124: [Python] Add test for empty 
item in array
URL: https://github.com/apache/arrow/pull/1586
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Assignee: Uwe L. Korn
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARROW-2124) [Python] ArrowInvalid raised if the first item of a nested list of numpy arrays is empty

2018-02-11 Thread Uwe L. Korn (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359989#comment-16359989
 ] 

Uwe L. Korn commented on ARROW-2124:


This issues seems to be fixed with 0.9.0, nevertheless I will add an explicit 
unit test for this.

> [Python] ArrowInvalid raised if the first item of a nested list of numpy 
> arrays is empty
> 
>
> Key: ARROW-2124
> URL: https://issues.apache.org/jira/browse/ARROW-2124
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: Python
>Affects Versions: 0.8.0
>Reporter: George Sakkis
>Priority: Major
> Fix For: 0.9.0
>
>
> See example below:
> {noformat}
> In [1]: import numpy as np
> In [2]: import pandas as pd
> In [3]: import pyarrow as pa
> In [4]: num_lists = [[2,3,4], [3,6,7,8], [], [2]]
> In [5]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [6]: pa.array(series)
> Out[6]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0]
> ]
> In [7]: num_lists.append([])
> In [8]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [9]: pa.array(series)
> Out[9]: 
> 
> [
>   [2.0,
>3.0,
>4.0],
>   [3.0,
>6.0,
>7.0,
>8.0],
>   [],
>   [2.0],
>   []
> ]
> In [10]: num_lists.insert(0, [])
> In [11]: series = pd.Series([np.array(s, dtype=float) for s in num_lists])
> In [12]: pa.array(series)
> ---
> ArrowInvalid  Traceback (most recent call last)
>  in ()
> > 1 pa.array(series)
> array.pxi in pyarrow.lib.array()
> array.pxi in pyarrow.lib._ndarray_to_array()
> error.pxi in pyarrow.lib.check_status()
> ArrowInvalid: trying to convert NumPy type object but got float64
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)