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.

Syntax

Parameter

data  :This parameter represents thearray-like input data

dtype :It depicts the data type of returned array

 Return

This function interprets the input as a matrix.

 Example 1

Output

Pin It on Pinterest

Share This