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, 2019 in Python by Fariba
72 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, 2019 by Anjali

Related Questions In Python

+4 votes
7 answers
0 votes
1 answer
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, 2019 in Python by Neel
• 3,010 points
45 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 Jul 10, 2019 in Python by Arvind
• 2,980 points
41 views
0 votes
1 answer
+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, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 533 views
0 votes
0 answers
+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, 2019 in Python by Neel
• 3,010 points
56 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
• 13,230 points
101 views