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 th
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
On Tue, Jan 12, 2010 at 7:38 PM, Robert Kern wrote:
> On Tue, Jan 12, 2010 at 12:31, Sebastian Walter
> wrote:
>> On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern wrote:
>>> On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
>>> wrote:
Hello,
I have a question about the augmented assignment
On Tue, Jan 12, 2010 at 12:31, Sebastian Walter
wrote:
> On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern wrote:
>> On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
>> wrote:
>>> Hello,
>>> I have a question about the augmented assignment statements *=, +=, etc.
>>> Apparently, the casting of types i
On Tue, Jan 12, 2010 at 7:09 PM, Robert Kern wrote:
> On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
> 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 behavi
On Tue, Jan 12, 2010 at 1:05 PM, Sebastian Walter
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 numpy.__version__ = '1.4.0.dev703
On Tue, Jan 12, 2010 at 12:05, Sebastian Walter
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 modifies numpy arrays in-p
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 yielded