1. Home
  2. Data Science
  3. NumPy
  4. What does the dtype attribute of a NumPy array represent?

Added 24 Feb 2024

What does the dtype attribute of a NumPy array represent?

  1. Data type of the array Correct answer
  2. Dimension of the array
  3. Shape of the array
  4. Size of the array

Correct answer

A. Data type of the array

14 views

MCQSEXAM

Explanation

The dtype attribute gives the data type of the array's elements, such as int64, float32 or bool.

The related attributes are ndim (number of dimensions), shape (size along each dimension) and size (total number of elements).

Want more practice? Try the full set of Data Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More NumPy MCQs

Practise all NumPy MCQs

Similar MCQs