MCPcopy Index your code
hub / github.com/numpy/numpy / A1

Method A1

numpy/matrixlib/defmatrix.py:874–900  ·  view source on GitHub ↗

Return `self` as a flattened `ndarray`. Equivalent to ``np.asarray(x).ravel()`` Parameters ---------- None Returns ------- ret : ndarray `self`, 1-D, as an `ndarray` Examples -------- >>> x = np.

(self)

Source from the content-addressed store, hash-verified

872
873 @property
874 def A1(self):
875 """
876 Return `self` as a flattened `ndarray`.
877
878 Equivalent to ``np.asarray(x).ravel()``
879
880 Parameters
881 ----------
882 None
883
884 Returns
885 -------
886 ret : ndarray
887 `self`, 1-D, as an `ndarray`
888
889 Examples
890 --------
891 >>> x = np.matrix(np.arange(12).reshape((3,4))); x
892 matrix([[ 0, 1, 2, 3],
893 [ 4, 5, 6, 7],
894 [ 8, 9, 10, 11]])
895 >>> x.getA1()
896 array([ 0, 1, 2, ..., 9, 10, 11])
897
898
899 """
900 return self.__array__().ravel()
901
902 def ravel(self, order='C'):
903 """

Callers

nothing calls this directly

Calls 2

ravelMethod · 0.45
__array__Method · 0.45

Tested by

no test coverage detected