next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
Questions
4 of 4
1
How do you create a NumPy array?
2
How do you create arrays of zeros or ones?
3
What are the restrictions on data in numpy arrays?
4
What are the attributes of array in numpy?
numpy
Basics
Arrays
Array Manipulation
Array Indexing Slicing
Universal Functions
Modules
Linear Algebra
Statistical Math
Random Numbers
Data Wrangling and Transformation
Debugging and Profiling
Interoperability
Scenarios
Questions
All Topics
A-
Reset
A+
04 / 04
What are the attributes of array in numpy?
ndim, shape, size, and dtype are the attributes of an array.
The number of dimensions of an array is contained in the ndim attribute.
Copy
The shape of an array is a tuple of non-negative integers that specify the number of elements along each dimension.
Copy
The total number of elements in array is contained in the size attribute.
Copy
Arrays are typically “homogeneous”, meaning that they contain elements of only one “data type”. The data type is recorded in the dtype attribute.
Copy
Suggest Improvement