Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
python create 4x4 matrix
xinhuijia233
Programming language:
Python
2021-06-17 17:04:27
0
Q:
python create 4x4 matrix
Brett Caswell
Code:
Python
2021-07-10 14:51:46
import numpy as np x = np.zeros((4, 4)) x[::2, 1::2] = 1 x[1::2, ::2] = 1 print(x)
0
Tags
python
matrix
create
Related
matrix representation in python
matrix multiplication python
pytorch - matrix multiplication
create square matrix python
numpy matrix in python 3
how to add two matrices in python
python numpy block diagonal matrix
how to create a matrix in python
python matrix multiplication
matrix in python3
python create n*n matrix
how to subtract two matrices in python
numpy subtract matrix from matrix
addition of two matrices in python
matrix multiplication in python
how to get matrix element in the form of matrix in python
compute the determinant of the matrix python
New to Communities?
Join the community