Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 15611

About Numpy,a=np.array([1,2,3,4]),print a.shape[0]. why it will output 4?

$
0
0
import numpy as npa = np.array([1,2,3,4])print a.shape[0]

Why it will output 4?

The array [1,2,3,4], it's rows should be 1, I think , so who can explain the reason for me?


Viewing all articles
Browse latest Browse all 15611

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>