Skip to content
  • Lukas Platz's avatar
    fix FutureWarning 'non-tuple sequence for multidim. indexing' · 05140339
    Lukas Platz authored
    See relevant error message below:
    
    $ python nifty-dev/demos/getting_started_1.py
    […]/python3.6/site-packages/nifty5/utilities.py:227: FutureWarning: Using a non-tuple sequence for
    multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array
    index, `arr[np.array(seq)]`, which will result either in an error or a different result.
      np.add(tmp.real, tmp.imag, out=res[slice1])
    […]/python3.6/site-packages/nifty5/utilities.py:239: FutureWarning: Using a non-tuple sequence for […]
      np.subtract(tmp[slice2].real, tmp[slice2].imag, out=res[slice1])
    […]/python3.6/site-packages/nifty5/utilities.py:243: FutureWarning: Using a non-tuple sequence for […]
      _fill_upper_half(tmp[dim1], res[dim1], axes2)
    05140339