Skip to content
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

change the storage into 64 bits, since sometimes it encounter the overflow multiplication #258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hansen7
Copy link
Contributor

@hansen7 hansen7 commented Aug 29, 2019

also see here #136

@hansen7 hansen7 changed the title change the input files into 64 bits, since it encounter the overflow … change the storage into 64 bits, since sometimes it encounter the overflow multiplication Aug 29, 2019
@hansen7
Copy link
Contributor Author

hansen7 commented Aug 29, 2019

is there a way to automatically convert the np.float64 with np.float32 in the test code...

@daavoo
Copy link
Owner

daavoo commented Sep 21, 2019

Hola @hansen7 ! Thanks for the contribution!

I think that it might be better to make float64 an optional argument maybe passed to init instead of always forcing this dtype, which might not be what everybody wants by default.

Regardless I think that the conversion to float64 is still possible to be manually applied after the PyntCloud creation, which could be a good enough workflow if you just want float64 for edge cases (like avoiding overflow).

ou can use the utility function convert_columns_dtype:

from pyntcloud.utils.dataframe import convert_columns_dtype
cloud = PyntCloud.from_file("foo.ply")
convert_columns_dtype(self.points, np.float32, np.float64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants