pyntcloud icon indicating copy to clipboard operation
pyntcloud copied to clipboard

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

Open hansen7 opened this issue 6 years ago • 2 comments

also see here #136

hansen7 avatar Aug 29 '19 14:08 hansen7

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

hansen7 avatar Aug 29 '19 14:08 hansen7

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)

daavoo avatar Sep 21 '19 19:09 daavoo