What are the different ways to create an empty numpy array in python?
Answer / Veer Vikram Singh
Creating an empty NumPy array can be done using several methods: 1) np.zeros(shape), where shape is the size of the array, initializes all elements to zero. 2) np.empty(shape), which returns a contiguous array with an uninitialized data type. 3) np.array([]).
| Is This Answer Correct ? | 0 Yes | 0 No |
List down some of the pdb commands for debugging python programs?
What are the applications of python?
What applications can you build with python?
Does Python support enums?
How to sort a dictionary by key in python?
What is decorators?
Do you know how memory is managed in python?
Is string empty python?
How many functions are in python?
Explain about pickling and unpickling?
Is python an oops?
What made you to choose python as a programming language?