Bottom Page

Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 creating an empty NumPy array in Python
Explain different ways to create an empty NumPy array in Python.
You like this post
sounds like a homework question.
I refer you to numpy documentation:
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))
buran wrote Jan-18-2019, 08:33 PM:
Link removed
Larz60+ wrote Jan-16-2019, 01:08 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

You have been notified in previous posts to use bbcode tags, yet still not using. Warnings will follow.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Creating new rows and adding them to empty data frame kapilan15 0 102 May-31-2019, 10:19 AM
Last Post: kapilan15
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 484 May-29-2019, 02:48 AM
Last Post: heiner55
  Array in numpy Truman 5 2,903 May-26-2019, 10:14 AM
Last Post: snippsat
  [split] Array in numpy aapurdel 1 92 May-25-2019, 08:05 PM
Last Post: buran
  [numpy]add a value to an array elmismo999 1 126 May-23-2019, 04:15 PM
Last Post: michalmonday
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 179 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 180 Apr-06-2019, 11:52 AM
Last Post: scidam
  counting the occurence of a specified number in a numpy-matrix PhysChem 1 157 Apr-03-2019, 01:37 PM
Last Post: PhysChem
  How to get the size of a numpy array? mcgrim 2 229 Mar-23-2019, 02:25 PM
Last Post: perfringo
  How convert multidimensional array to two dimensional array tkkhan44 1 259 Feb-20-2019, 05:00 AM
Last Post: scidam

Forum Jump:

Users browsing this thread: 1 Guest(s)