Answers for "Create matrix of zeros Python"

11

declare numpy zeros matrix python

import numpy as np
dimensions = (3, 3)
np.zeros(dimensions) # 3x3 zeros matrix
Posted by: Guest on August-30-2020
0

initiate matrix python with zeros

matrix = [[ 0 for i in range(10) ] for j in range(10) ] #initiate matrix with 0
Posted by: Guest on October-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language