By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,491 Members | 1,168 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,491 IT Pros & Developers. It's quick & easy.

How can I create an empty NumPy array in Python.

P: 7
Can you explain me different ways to create an empty NumPy array in Python.
1 Week Ago #1
Share this Question
Share on Google+
1 Reply


P: 5
We’ll talk about two methods to create NumPy array-

First method-
>>> import numpy
>>> numpy.array([])
array([], dtype=float64)

Second method-
>>> numpy.empty(shape=(0,0))
array([], shape=(0, 0), dtype=float64)
1 Week Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.