Is it possible to create an array with all values as zero in python?

0 votes
Is it possible to create an array with all values as zero in python?
May 24 in Python by Fariba
30 views

1 answer to this question.

0 votes

You can use 

np.zeros(4,3)

This will create a 4 X 3 array with the value zero.

answered May 24 by Anjali

Related Questions In Python

+4 votes
7 answers
0 votes
1 answer

Is it possible to print all the modules imported in a python script?

Since I am using Python 3.6, I ...READ MORE

answered Jul 3 in Python by Neel
• 1,350 points
10 views
0 votes
1 answer

is it possible to create zip of a directory in Python?

Please go through this code. This should ...READ MORE

answered 5 days ago in Python by Arvind
• 1,290 points
14 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 122 views
+4 votes
6 answers
+1 vote
1 answer

is it possible to compare a values to a backslash in Python?

The backslash "\" character is used to ...READ MORE

answered Jun 28 in Python by Neel
• 1,350 points
24 views
0 votes
1 answer

Is arr.__len__() the preferred way to get the length of an array in Python?

my_list = [1,2,3,4,5,6,7] len(my_list) # 7 The same works for ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 12,120 points
43 views