Bottom Page

Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 creating an empty NumPy array in Python
#1
Explain different ways to create an empty NumPy array in Python.
You like this post
Quote
#2
sounds like a homework question.
I refer you to numpy documentation: https://docs.scipy.org/doc/
Quote
#3
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.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Numpy structured array Nitram 3 105 Sep-17-2019, 10:09 PM
Last Post: jefsummers
  numpy.copy / numpy.delete paul18fr 3 195 Jul-26-2019, 01:51 PM
Last Post: paul18fr
  Creating new rows and adding them to empty data frame kapilan15 0 231 May-31-2019, 10:19 AM
Last Post: kapilan15
  AttributeError: module 'numpy' has no attribute 'array aapurdel 7 2,041 May-29-2019, 02:48 AM
Last Post: heiner55
  Array in numpy Truman 5 3,897 May-26-2019, 10:14 AM
Last Post: snippsat
  [split] Array in numpy aapurdel 1 235 May-25-2019, 08:05 PM
Last Post: buran
  [numpy]add a value to an array elmismo999 1 287 May-23-2019, 04:15 PM
Last Post: michalmonday
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 336 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 342 Apr-06-2019, 11:52 AM
Last Post: scidam
  How to get the size of a numpy array? mcgrim 2 390 Mar-23-2019, 02:25 PM
Last Post: perfringo

Forum Jump:


Users browsing this thread: 1 Guest(s)