Indexing errors will be reported even when index result is empty ---------------------------------------------------------------- In the future, NumPy will raise an IndexError when an integer array index contains out of bound values even if a non-indexed dimension is of length 0. This will now emit a DeprecationWarning. This can happen when the array is previously empty, or an empty slice is involved:: arr1 = np.zeros((5, 0)) arr1[[20]] arr2 = np.zeros((5, 5)) arr2[[20], :0] Previously the non-empty index ``[20]`` was not checked for correctness. It will now be checked causing a deprecation warning which will be turned into an error. This also applies to assignments.