Python Developer Question:

Download Job Interview Questions and Answers PDF

Tell me what Are Different Ways To Create An Empty NumPy Array In Python?

Python Developer Interview Question
Python Developer Interview Question

Answer:

There are two methods which we can apply to create empty NumPy arrays.

☛ The First Method To Create An Empty Array.
import numpy
numpy.array([])

☛ The Second Method To Create An Empty Array.
# Make an empty NumPy array
numpy.empty(shape=(0,0))

Download Python Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what are the tools that help to find bugs or perform static analysis?Do you know what Are The Optional Statements That Can Be Used Inside A <Try-Except> Block In Python?