Fix VisibleDeprecation warning by converting float indexes in int
There are no commits yet
Push commits to the source branch or add previously merged commits to review them.
As reported in Issue #2 (closed), VisibleDeprecationWarning is raised when indexing array with a non-integer value.
This is solved in two differents ways:
X/2
, changing to X//2 (for any X)np.func(X/2)
, changing to int(np.func(X/2))
(with func being floor
or ceil
])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)
Push commits to the source branch or add previously merged commits to review them.