Python Numpy Tutorial Split Array

preview_player
Показать описание


python import numpy as np

create random matrix A. split takes in an array, the number of splits and the axis to split on.

a split 3 defaults to axis = 0 so it splits on the rows that is the same as vsplit

Let’s look at A again. So depending on the axis you can split it this way or this way.

Lets look at the documentation . Again we have our three partakers: ann array, the mount of pieces to split it in, and the axis to split on.

As a reminder, the number of splits needs to be a divisor of the axis shape. And axis 0 refers to the rows and axis 1 refers the columns .

Please check out some of my other python videos and please consider subscribing for more python programming content.

This is a Python anaconda tutorial for help with coding, programming, or computer science. These are short python videos dedicated to troubleshooting python problems and learning Python syntax. For more videos see Python Marathon playlist by Rylan Fowers.





#PythonMarathon #LearnPython #PythonTutorial
Рекомендации по теме
Комментарии
Автор

That intro though. Still gives me the chills!

LoganBeck