[Numpy-discussion] Changing a matrix element into a scalar

Skipper Seabold jsseabold@gmail....
Tue Aug 3 11:28:24 CDT 2010

On Tue, Aug 3, 2010 at 12:23 PM, Wayne Watson
<sierra_mtnview@sbcglobal.net> wrote:
> How do I access 1.2 in such a way as to end up with a float? I keep
> getting a matrix.
> from numpy import matrix
> m = matrix([[1.2],[2.3]])

m[0].item() ?


More information about the NumPy-Discussion mailing list