>>> From: numpy-discussion-boun...@scipy.org
>>> [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Wayne Watson
>>> Sent: Tuesday, August 03, 2010 9:24 AM
>>> To: Discussion of Numerical Python
>>> Subject: [Numpy-discussion] Ch
On Tue, Aug 3, 2010 at 10:44 AM, Alan G Isaac wrote:
> On 8/3/2010 1:29 PM, Joshua Holbrook wrote:
>> What's the
>> advantage of the matrix datatype?
>
>
> As it turns out, that's a controversial question. ;-)
>
> One answer: pedagogy (for those used to matrices).
>
> A related answer: succinctne
On 8/3/2010 1:29 PM, Joshua Holbrook wrote:
> What's the
> advantage of the matrix datatype?
As it turns out, that's a controversial question. ;-)
One answer: pedagogy (for those used to matrices).
A related answer: succinctness and readability of *some* code.
>>> a,b,c = np.array([[
gt;> From: numpy-discussion-boun...@scipy.org
>> [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Wayne Watson
>> Sent: Tuesday, August 03, 2010 9:24 AM
>> To: Discussion of Numerical Python
>> Subject: [Numpy-discussion] Changing a matrix element
numpy-discussion-boun...@scipy.org] On Behalf Of Wayne Watson
> Sent: Tuesday, August 03, 2010 9:24 AM
> To: Discussion of Numerical Python
> Subject: [Numpy-discussion] Changing a matrix element into a scalar
>
> How do I access 1.2 in such a way as to end up with a float? I
On 8/3/2010 12:23 PM, Wayne Watson 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]])
Matrices have the odd (and imo undesirable) property that
m[0,0] != m[0][0]
You want the former.
For a
-discussion-boun...@scipy.org] On Behalf Of Wayne Watson
Sent: Tuesday, August 03, 2010 9:24 AM
To: Discussion of Numerical Python
Subject: [Numpy-discussion] Changing a matrix element into a scalar
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
On Tue, Aug 3, 2010 at 12:23 PM, Wayne Watson
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() ?
Skipper
___
NumPy-Discussion mailing lis
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]])
--
Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
(121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
Obz S