A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.scipy.org/doc/numpy/reference/generated/numpy.asmatrix.html below:

numpy.asmatrix — NumPy v2.3 Manual

numpy.asmatrix#
numpy.asmatrix(data, dtype=None)[source]#

Interpret the input as a matrix.

Unlike matrix, asmatrix does not make a copy if the input is already a matrix or an ndarray. Equivalent to matrix(data, copy=False).

Parameters:
dataarray_like

Input data.

dtypedata-type

Data-type of the output matrix.

Returns:
matmatrix

data interpreted as a matrix.

Examples

>>> import numpy as np
>>> x = np.array([[1, 2], [3, 4]])
>>> m = np.asmatrix(x)
>>> x[0,0] = 5
>>> m
matrix([[5, 2],
        [3, 4]])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4