I've written a self-contained example that shows that numpy indeed
tries to call the __float__ method.
What is buggy is what happens if calling the __float__ method raises
an Exception.
Then numpy assumes (in this case wrongly) that the object should be
casted to the neutral element.
I'd guess
Hello,
I have a question about the augmented assignment statements *=, +=, etc.
Apparently, the casting of types is not working correctly. Is this
known resp. intended behavior of numpy?
(I'm using numpy.__version__ = '1.4.0.dev7039' on this machine but I
remember a recent checkout of numpy
On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
sebastian.wal...@gmail.com wrote:
Hello,
I have a question about the augmented assignment statements *=, +=, etc.
Apparently, the casting of types is not working correctly. Is this
known resp. intended behavior of numpy?
Augmented assignment
On Tue, Jan 12, 2010 at 1:05 PM, Sebastian Walter
sebastian.wal...@gmail.com wrote:
Hello,
I have a question about the augmented assignment statements *=, +=, etc.
Apparently, the casting of types is not working correctly. Is this
known resp. intended behavior of numpy?
(I'm using
On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern robert.k...@gmail.com wrote:
On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
sebastian.wal...@gmail.com wrote:
Hello,
I have a question about the augmented assignment statements *=, +=, etc.
Apparently, the casting of types is not working
On Tue, Jan 12, 2010 at 12:31, Sebastian Walter
sebastian.wal...@gmail.com wrote:
On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern robert.k...@gmail.com wrote:
On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
sebastian.wal...@gmail.com wrote:
Hello,
I have a question about the augmented assignment
On Tue, Jan 12, 2010 at 7:38 PM, Robert Kern robert.k...@gmail.com wrote:
On Tue, Jan 12, 2010 at 12:31, Sebastian Walter
sebastian.wal...@gmail.com wrote:
On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern robert.k...@gmail.com wrote:
On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
Sebastian Walter wrote:
However, this particular problem occurs when you try to automatically
differentiate an algorithm by using an Algorithmic Differentiation
(AD) tool.
E.g. given a function
x = numpy.ones(2)
def f(x):
a = numpy.ones(2)
a *= x
return numpy.sum(a)
I don't know