Answers for "Python NumPy dsplit Function"

0

Python NumPy dsplit Function

# welcome to softhunt.net
import numpy as np


# Making of a 3x3x3 array.
b = np.arange(27).reshape(3, 3, 3)

# Depth-wise splitting of array
# 'b' using np.dsplit().
print("The array :\n {} \n\n gets splitted depth-wise to form: \n\n {}".format(b, np.dsplit(b, 3)))
Posted by: Guest on April-25-2022

Python Answers by Framework

Browse Popular Code Answers by Language