ltfatpy merge requestshttps://gitlab.lis-lab.fr/dev/ltfatpy/-/merge_requests2016-08-02T14:28:00+02:00https://gitlab.lis-lab.fr/dev/ltfatpy/-/merge_requests/1Fix VisibleDeprecation warning by converting float indexes in int2016-08-02T14:28:00+02:00Florent JailletFix VisibleDeprecation warning by converting float indexes in intAs reported in Issue dev/ltfatpy#2, 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 b...As reported in Issue dev/ltfatpy#2, 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 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)