You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/30 13:00:57 UTC

[GitHub] [arrow] kszucs opened a new pull request #7866: ARROW-7218: [Python] Conversion from boolean numpy scalars not working

kszucs opened a new pull request #7866:
URL: https://github.com/apache/arrow/pull/7866


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou closed pull request #7866: ARROW-7218: [Python] Conversion from boolean numpy scalars not working

Posted by GitBox <gi...@apache.org>.
pitrou closed pull request #7866:
URL: https://github.com/apache/arrow/pull/7866


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on a change in pull request #7866: ARROW-7218: [Python] Conversion from boolean numpy scalars not working

Posted by GitBox <gi...@apache.org>.
pitrou commented on a change in pull request #7866:
URL: https://github.com/apache/arrow/pull/7866#discussion_r465747920



##########
File path: python/pyarrow/tests/test_convert_builtin.py
##########
@@ -182,6 +182,19 @@ def test_sequence_numpy_boolean(seq):
     assert arr.to_pylist() == expected
 
 
+@parametrize_with_iterable_types
+def test_sequence_mixed_numpy_python_bools(seq):
+    values = np.array([True, False])
+    arr = pa.array(seq([values[0], None, values[1], True, False]))
+    assert len(arr) == 5
+    assert arr.null_count == 1
+    assert arr.type == pa.bool_()
+    assert arr[0].as_py() is True

Review comment:
       You can simply compare `arr.as_py()` ;-)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7866: ARROW-7218: [Python] Conversion from boolean numpy scalars not working

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7866:
URL: https://github.com/apache/arrow/pull/7866#issuecomment-666351589


   https://issues.apache.org/jira/browse/ARROW-7218


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org