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

Method A

numpy/matrixlib/defmatrix.py:844–871  ·  view source on GitHub ↗

Return `self` as an `ndarray` object. Equivalent to ``np.asarray(self)``. Parameters ---------- None Returns ------- ret : ndarray `self` as an `ndarray` Examples -------- >>> x = np.matrix(np.ar

(self)

Source from the content-addressed store, hash-verified

842
843 @property
844 def A(self):
845 """
846 Return `self` as an `ndarray` object.
847
848 Equivalent to ``np.asarray(self)``.
849
850 Parameters
851 ----------
852 None
853
854 Returns
855 -------
856 ret : ndarray
857 `self` as an `ndarray`
858
859 Examples
860 --------
861 >>> x = np.matrix(np.arange(12).reshape((3,4))); x
862 matrix([[ 0, 1, 2, 3],
863 [ 4, 5, 6, 7],
864 [ 8, 9, 10, 11]])
865 >>> x.getA()
866 array([[ 0, 1, 2, 3],
867 [ 4, 5, 6, 7],
868 [ 8, 9, 10, 11]])
869
870 """
871 return self.__array__()
872
873 @property
874 def A1(self):

Callers 1

test_frompyfunc_leaksMethod · 0.45

Calls 1

__array__Method · 0.45

Tested by 1

test_frompyfunc_leaksMethod · 0.36