Numpy.asmatrix() in Python

The asmatrix() function returns the specified input as a matrix. It does not make a copy if the input is already a matrix or an ndarray.



data  :This parameter represents thearray-like input data

dtype :It depicts the data type of returned array


This function interprets the input as a matrix.

 Example 1


Pin It on Pinterest

Share This