Fix VisibleDeprecation warning by converting float indexes in int
As reported in Issue #2 (closed), VisibleDeprecationWarning is raised when indexing array with a non-integer value.
This is solved in two differents ways:
- when indexing by
X/2
, changing to X//2 (for any X) - when indexing by
np.func(X/2)
, changing toint(np.func(X/2))
(with func beingfloor
orceil
])
Another issue has been found and solved, when reshaping array with non-integer values. this is solved by replacing
new_shape = np.ones((len(cphase.shape), ))
by
new_shape = np.ones((len(cphase.shape), ), dtype=int)
Finally, gcd
is now imported from math
instead of fractions
(DeprecationWarning)