siavashk / pycpd

Pure Numpy Implementation of the Coherent Point Drift Algorithm
MIT License
522 stars 118 forks source link

Incorrect Integer Division (?) #47

Closed evolvedmicrobe closed 3 years ago

evolvedmicrobe commented 4 years ago

Quick question on this line:

https://github.com/siavashk/pycpd/blob/3b0d10f6029ef6fdccfd231417e2cc1afbe58024/pycpd/emregistration.py#L165

In python 3 this is floating point division, but in python 2 this looks like it will perform integer (floor) division, was this supposed to be floating point division under both versions?

siavashk commented 4 years ago

Good catch! Yes, I should've done from __future__ import division. This is a bug.

evolvedmicrobe commented 4 years ago

Awesome, thanks @siavashk for the quick response!