Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create zero array in python

# WE CAN USE NUMPY FOR THIS 
import numpy as np
np.zeros(5) # Creates an array [0., 0., 0., 0., 0.]

# For integer array of zeros

np.zeros((5,), dtype=int) # Creates array [0, 0, 0, 0, 0]
 
PREVIOUS NEXT
Tagged: #create #array #python
ADD COMMENT
Topic
Name
6+5 =