numpy.hsplit() function with example in python

Spread the love

numpy.hsplit(): This function Split an array into multiple sub-arrays horizontally (column-wise).
Syntax: numpy.hsplit(ary, indices_or_sections)[source]

import numpy as np x=np.array([1,2,3,4,5,6,7,8,9]) y=np.hsplit(x, 3) print(y)
admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *