简体   繁体   中英

Python, How to find length of the dimensions of array with 3 dimensions?

I have an array of bool like this, and I want to reach the length of its first and second dimensions. How do I do that:

在此处输入图像描述

在此处输入图像描述

So I want to get the sizes of these dimensions like:

Size_Of_First_Dimension(mask_points) 
--> 480

If it is a numpy array, then mask_points.shape is a tuple of the sizes of the dimensions (in this case, the 0th and the 1st).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM