New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-2491: [Python] raise NotImplementedError on from_buffers with nested types #1927

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@xhochy
Member

xhochy commented Apr 21, 2018

No description provided.

@xhochy xhochy force-pushed the xhochy:ARROW-2491 branch from dc70f54 to 08b788c Apr 21, 2018

@pitrou pitrou changed the title from ARROW-2491: raise NotImplementedError on from_buffers with nested types to ARROW-2491: [Python] raise NotImplementedError on from_buffers with nested types Apr 23, 2018

@@ -75,6 +75,11 @@ cdef bytes _datatype_to_pep3118(CDataType* type):
return char
def _is_primitive(Type type):

This comment has been minimized.

@pitrou

pitrou Apr 23, 2018

Contributor

Can't this be a DataType method or property instead?

This comment has been minimized.

@xhochy

xhochy Apr 24, 2018

Member

Yes, this could also be a DataType but as the comment suggests, I have just added this definition here so I can call the C++ function from Python. The user-facing is_primitive accepts a DataType.

@crepererum

test exception

@@ -411,6 +411,10 @@ cdef class Array:
vector[shared_ptr[CBuffer]] c_buffers
shared_ptr[CArrayData] ad
if not is_primitive(type.id):
raise NotImplementedError("from_buffers is only supported for "

This comment has been minimized.

@crepererum

crepererum Apr 26, 2018

Contributor

This raise should probably be tested as well.

This comment has been minimized.

@xhochy

xhochy May 1, 2018

Member

Done

@pitrou

pitrou approved these changes May 2, 2018

LGTM.

@pitrou

This comment has been minimized.

Contributor

pitrou commented May 2, 2018

Note you've got a flake8 failure.

@xhochy xhochy force-pushed the xhochy:ARROW-2491 branch from 13a8797 to f2300db May 8, 2018

@xhochy

This comment has been minimized.

Member

xhochy commented May 8, 2018

Failure is due to Plasma

@xhochy xhochy closed this in bb67939 May 8, 2018

@xhochy xhochy deleted the xhochy:ARROW-2491 branch May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment