-
Notifications
You must be signed in to change notification settings - Fork 225
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
Add bool dtype support for PLY files #321
Add bool dtype support for PLY files #321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nicholas-mitchell 🚀 !
@@ -242,7 +248,7 @@ def describe_element(name, df): | |||
------- | |||
element: list[str] | |||
""" | |||
property_formats = {'f': 'float', 'u': 'uchar', 'i': 'int'} | |||
property_formats = {'f': 'float', 'u': 'uchar', 'i': 'int', 'b': 'bool'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a test for write_ply
with bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor thing. Adding test for write_ply
5a85c8f
to
ba545d4
Compare
@daavoo - I've added a test that writes a PLY file containing Boolean data |
ba545d4
to
0e1372c
Compare
This PR addresses #309 and adds support for the file reader to deal with Boolean fields (writing boolean fields was already not an issue). It also adds a new test fixture file and a simple unit test.
The new test data PLY file contains the following header:
which loads to give the following dataframe - notice the newly inserted
is_green
column of typebool
: