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

How can I create an empty NumPy array in Python.

P: 9
Can you explain me different ways to create an empty NumPy array in Python.
Mar 13 '19 #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)
Mar 14 '19 #2

Post your reply

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