๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ stable โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v2.5 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... Try it in your browser!
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ numpy โ€บ numpy_array_split.asp
NumPy Splitting Array
Use the hsplit() method to split the 2-D array into three 2-D arrays along columns. import numpy as np arr = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]) newarr = np.hsplit(arr, 3) print(newarr) Try it ...
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v2.6.dev0 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... Try it in your browser!
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.4 โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v2.4 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... Try it in your browser!
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ numpy โ€บ numpy_hsplit.htm
Numpy hsplit() Function
The Numpy hsplit() Function is used to split an array into multiple sub-arrays along its horizontal axis i.e. axis 1. This function takes two main arguments one is the input array and the number or array of indices where the splits should occur.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 1.25 โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v1.25 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... >>> x = np.arange(16.0).reshape(4, 4) >>> x ...
๐ŸŒ
w3resource
w3resource.com โ€บ numpy โ€บ manipulation โ€บ hsplit.php
NumPy: numpy.hsplit() function - w3resource
April 24, 2026 - In the above code, a NumPy array 'a' is created using arange() function, and then reshaped to a 4x4 matrix. The np.hsplit() function is then used to horizontally split the array into 2 parts.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 1.18 โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v1.18 Manual
May 24, 2020 - Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension. See also ยท split ยท Split an array into multiple sub-arrays of equal size. Examples ยท >>> x = np.arange(16.0).reshape(4, 4) ...
Find elsewhere
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.0 โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v2.0 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... >>> x = np.arange(16.0).reshape(4, 4) >>> x ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ numpy-hsplit-function-python
numpy.hsplit() function | Python - GeeksforGeeks
July 12, 2025 - In this article, we learned how numpy.hsplit() splits arrays horizontally (column-wise) along the second axis.
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.1 โ€บ reference โ€บ generated โ€บ numpy.ma.hsplit.html
numpy.ma.hsplit โ€” NumPy v2.1 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... The function is applied to both the _data and ...
๐ŸŒ
Codecademy
codecademy.com โ€บ article โ€บ split-numpy-arrays
How to Split Arrays in NumPy? | Codecademy
We can use the np.hsplit() function to split a NumPy array along the columns or the horizontal axis.
๐ŸŒ
SciPy
docs.scipy.org โ€บ doc โ€บ numpy-1.15.1 โ€บ reference โ€บ generated โ€บ numpy.hsplit.html
numpy.hsplit โ€” NumPy v1.15 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis regardless of the array dimension. See also ยท split ยท Split an array into multiple sub-arrays of equal size. Examples ยท >>> x = np.arange(16.0).reshape(4, 4) ...
๐ŸŒ
NumPy
numpy.org โ€บ doc โ€บ 2.0 โ€บ reference โ€บ generated โ€บ numpy.ma.hsplit.html
numpy.ma.hsplit โ€” NumPy v2.0 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... The function is applied to both the _data and ...
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-is-the-numpyhsplit-function-in-numpy
What is the numpy.hsplit() function in NumPy?
The hsplit() function in NumPy is used to split an input array into multiple subarrays horizontally.
๐ŸŒ
NumPy
numpy.org โ€บ devdocs โ€บ reference โ€บ generated โ€บ numpy.ma.hsplit.html
numpy.ma.hsplit โ€” NumPy v2.6.dev0 Manual
Please refer to the split documentation. hsplit is equivalent to split with axis=1, the array is always split along the second axis except for 1-D arrays, where it is split at axis=0. ... Split an array into multiple sub-arrays of equal size. ... The function is applied to both the _data and ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ splitting-arrays-in-numpy
Splitting Arrays in NumPy - GeeksforGeeks
December 22, 2023 - Regardless of the dimensionality of the input array, numpy.hsplit() always divides the array along its second axis (column
Top answer
1 of 2
6

A comment pointed out that if the slit is uneven, the result can't be a array, at least not one that has the same dtype. At best it would be an object dtype.

But lets consider the case of equal length subarrays:

In [124]: x = np.arange(10)
In [125]: np.split(x,2)
Out[125]: [array([0, 1, 2, 3, 4]), array([5, 6, 7, 8, 9])]
In [126]: np.array(_)     # make an array from that
Out[126]: 
array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9]])

But we can get the same array without split - just reshape:

In [127]: x.reshape(2,-1)
Out[127]: 
array([[0, 1, 2, 3, 4],
       [5, 6, 7, 8, 9]])

Now look at the code for split. It just passes the task to array_split. Ignoring the details about alternative axes, it just does

sub_arys = []
for i in range(Nsections):
    # st and end from `div_points
    sub_arys.append(sary[st:end])
return sub_arys

In other words, it just steps through array and returns successive slices. Those (often) are views of the original.

So split is not that sophisticate a function. You could generate such a list of subarrays yourself without a lot of numpy expertise.

Another point. Documentation notes that split can be reversed with an appropriate stack. concatenate (and family) takes a list of arrays. If give an array of arrays, or a higher dim array, it effectively iterates on the first dimension, e.g. concatenate(arr) => concatenate(list(arr)).

2 of 2
-2

Actually you are right it returns a list

import numpy as np 
a=np.random.randint(1,30,(2,2))
b=np.hsplit(a,2)
type(b)

it will return type(b) as list so, there is nothing wrong in the documentation, i also first thought that the documentation is wrong it doesn't return a array, but when i checked

type(b[0])
type(b[1])

it returned type as ndarray.

it means it returns a list of ndarrary's.

๐ŸŒ
Codepointtech
codepointtech.com โ€บ home โ€บ numpy array splitting: split, hsplit, vsplit explained
NumPy Array Splitting: Split, Hsplit, Vsplit Explained - codepointtech.com
July 4, 2026 - While np.split() offers the most flexibility with explicit axis control, np.hsplit() and np.vsplit() provide convenient, readable shortcuts for common horizontal and vertical splitting tasks on 2D (and higher) arrays.