summaryrefslogtreecommitdiff
path: root/numpy/lib/shape_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/shape_base.py')
-rw-r--r--numpy/lib/shape_base.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/numpy/lib/shape_base.py b/numpy/lib/shape_base.py
index b2beef0a8..615cf88f4 100644
--- a/numpy/lib/shape_base.py
+++ b/numpy/lib/shape_base.py
@@ -421,18 +421,9 @@ def array_split(ary, indices_or_sections, axis=0):
end = div_points[i + 1]
sub_arys.append(_nx.swapaxes(sary[st:end], axis, 0))
- # This "kludge" was introduced here to replace arrays shaped (0, 10)
- # or similar with an array shaped (0,).
- # There seems no need for this, so give a FutureWarning to remove later.
- if any(arr.size == 0 and arr.ndim != 1 for arr in sub_arys):
- warnings.warn("in the future np.array_split will retain the shape of "
- "arrays with a zero size, instead of replacing them by "
- "`array([])`, which always has a shape of (0,).",
- FutureWarning)
- sub_arys = _replace_zero_by_x_arrays(sub_arys)
-
return sub_arys
+
def split(ary,indices_or_sections,axis=0):
"""
Split an array into multiple sub-arrays.