With the Numpy matrix.tobytes ()
method we can find the matrix bytecode using the matrix.tobytes ()
method.
Syntax:
matrix.tobytes ()
Return: Return byte code for matrix
Example # 1:
In this example we can see that using matrix.tobytes ( )
we can find the bytecode for the given matrix.

Exit:
b`x04x00x00x00x00x00x00x00x01x00x00x00x00x00x00x00x0cx00x00x00x00x00x00x00x03x00x00x00x00x00x00x00 ′
# import important module in python
import
numpy as np
# make a matrix with NumPy
gfg
=
np.matrix (
`[ 4, 1, 9; 12, 3, 1; 4, 5, 6] `
)
# using the matrix.tobytes () method
geek
=
gfg.tobytes ()
(geek)
Exit:
b`x04x00x00x00x00x00x00x00x01x00x00x00x00x00x00x00 x00x00x00x00x00x00x00x0cx00x00x00x00x00x00x00x03x00x00x00x00x00x00x00x01x00x00x00x00x00x00x00x04x00x00x00x00x00x00x00x05x00x00x00x00x00x00x00x06x00x00x00x00x00x00x00 `
A recipe for having fun and getting things done with the Raspberry Pi ...
12/08/2021
Why this Book? Hadoop has been the base for most of the emerging technologies in today’s big data world. It changed the face of distributed processing by using commodity hardware for large data set...
10/07/2020
Since you are interested in learning more about designing data visualizations (by virtue of the fact that you’re reading this book), then chances are good that you have been the reader of other peop...
10/07/2020
Target knows. Apple Computer knows, too. So do LinkedIn, Netflix, Facebook, Twitter, Expedia, national and local political campaigns, and dozens of other organizations that all generate enormous eco...
10/07/2020