6/7/2013 12:30 PM, Will Lee wrote:
> > Can somebody tell me why these operations are not the same in numpy?
>
>
> http://docs.python.org/2/reference/datamodel.html#object.__rmul__
>
> hth,
> Alan Isaac
>
> ___
> NumPy-D
Can somebody tell me why these operations are not the same in numpy?
In [2]: a = numpy.array([1, 2, 3.])
In [4]: matrix = numpy.matrix([[1, 2, 3.], [4, 5, 6], [7, 8, 9]])
In [5]: a.__mul__(matrix)
matrix([[ 1., 4., 9.],
[ 4., 10., 18.],
[ 7., 16., 27.]])
In [6]: a
This seems to be a old problem but I've recently hit with this in a very
random way (I'm using numpy 1.6.1). There seems to be a ticket (1239)
but it seems the issue is unscheduled. Can somebody tell me if this is
fixed?
In particular, it makes for a very unstable behavior when you try to
refer
at 12:47 PM, Robert Kern <[EMAIL PROTECTED]>
> wrote:
>
> > On Fri, Apr 4, 2008 at 9:56 AM, Will Lee <[EMAIL PROTECTED]> wrote:
> > > I understand the implication for the floating point comparison and the
> > need
> > > for allclose. However, I think in a d
I understand the implication for the floating point comparison and the need
for allclose. However, I think in a doctest context, this behavior makes
the doc much harder to read. For example, if you have this in your doctest:
def doSomething(a):
'''
>>> print doSomething(0.0011)[0]
>>
Hi,
I seem to have problem with floating point printing with the latest numpy,
python 2.5.2, gcc 4.1.4, and 64-bit linux:
In [24]: print str(0.0012)
0.0012
In [25]: a = numpy.array([0.0012])
In [26]: print str(a[0])
0.0011999
In [27]: print numpy.__version__
1.0.5.dev4950
It seems