Hello list,
I posted an issue many months ago [1] about confusing __array_wrap__
behavior in a subclass of np.matrix.
Since that time I wasn't really using the code that used the matrix
subclass, but lately I have starting using the code so I've run into
the issue again. Looking into a little more
Hello,
I'm attempting to implement a subclass of ndarray, and becoming confused
about the way __array_wrap__ and __array_finalize__ operate. I boiled it
down to a short subclass, which is the example on the website at
http://docs.scipy.org/doc/numpy-1.6.0/user/basics.subclassing.html, with one
add
On Wed, Sep 30, 2009 at 2:57 AM, Pauli Virtanen wrote:
> Tue, 29 Sep 2009 14:55:44 -0400, Neal Becker wrote:
>
>> This seems to work now, but I'm wondering if Charles is correct, that
>> inheritance isn't such a great idea here.
>>
>> The advantage of inheritance is I don't have to implement forwa
Tue, 29 Sep 2009 14:55:44 -0400, Neal Becker wrote:
> This seems to work now, but I'm wondering if Charles is correct, that
> inheritance isn't such a great idea here.
>
> The advantage of inheritance is I don't have to implement forwarding all
> the functions, a pretty big advantage. (I wonder i
On Tue, Sep 29, 2009 at 1:12 PM, Robert Kern wrote:
> On Tue, Sep 29, 2009 at 14:08, Charles R Harris
> wrote:
> >
> >
> > On Tue, Sep 29, 2009 at 12:48 PM, Robert Kern
> wrote:
> >>
> >> On Tue, Sep 29, 2009 at 13:35, Charles R Harris
> >> wrote:
> >> >
> >> > On Tue, Sep 29, 2009 at 12:23 PM
On Tue, Sep 29, 2009 at 14:08, Charles R Harris
wrote:
>
>
> On Tue, Sep 29, 2009 at 12:48 PM, Robert Kern wrote:
>>
>> On Tue, Sep 29, 2009 at 13:35, Charles R Harris
>> wrote:
>> >
>> > On Tue, Sep 29, 2009 at 12:23 PM, Robert Kern
>> > wrote:
>> >>
>> >> On Tue, Sep 29, 2009 at 13:09, Charle
On Tue, Sep 29, 2009 at 12:48 PM, Robert Kern wrote:
> On Tue, Sep 29, 2009 at 13:35, Charles R Harris
> wrote:
> >
> > On Tue, Sep 29, 2009 at 12:23 PM, Robert Kern
> wrote:
> >>
> >> On Tue, Sep 29, 2009 at 13:09, Charles R Harris
> >> wrote:
> >> >
> >> >
> >> > On Tue, Sep 29, 2009 at 11:0
On Tue, Sep 29, 2009 at 12:55 PM, Neal Becker wrote:
> This seems to work now, but I'm wondering if Charles is correct, that
> inheritance isn't such a great idea here.
>
> The advantage of inheritance is I don't have to implement forwarding all
> the
> functions, a pretty big advantage. (I wonde
This seems to work now, but I'm wondering if Charles is correct, that
inheritance isn't such a great idea here.
The advantage of inheritance is I don't have to implement forwarding all the
functions, a pretty big advantage. (I wonder if there is some way to do some
of these as a generic 'mixin'
On Tue, Sep 29, 2009 at 13:35, Charles R Harris
wrote:
>
> On Tue, Sep 29, 2009 at 12:23 PM, Robert Kern wrote:
>>
>> On Tue, Sep 29, 2009 at 13:09, Charles R Harris
>> wrote:
>> >
>> >
>> > On Tue, Sep 29, 2009 at 11:00 AM, Neal Becker
>> > wrote:
>> >>
>> >> fixed_pt arrays need to apply the
On Tue, Sep 29, 2009 at 12:23 PM, Robert Kern wrote:
> On Tue, Sep 29, 2009 at 13:09, Charles R Harris
> wrote:
> >
> >
> > On Tue, Sep 29, 2009 at 11:00 AM, Neal Becker
> wrote:
> >>
> >> fixed_pt arrays need to apply the overflow_policy after operations
> >> (overflow_policy could be clip, or
On Tue, Sep 29, 2009 at 12:35 PM, Charles R Harris <
charlesr.har...@gmail.com> wrote:
>
>
> On Tue, Sep 29, 2009 at 12:23 PM, Robert Kern wrote:
>
>> On Tue, Sep 29, 2009 at 13:09, Charles R Harris
>> wrote:
>> >
>> >
>> > On Tue, Sep 29, 2009 at 11:00 AM, Neal Becker
>> wrote:
>> >>
>> >> fixe
On Tue, Sep 29, 2009 at 13:09, Charles R Harris
wrote:
>
>
> On Tue, Sep 29, 2009 at 11:00 AM, Neal Becker wrote:
>>
>> fixed_pt arrays need to apply the overflow_policy after operations
>> (overflow_policy could be clip, or throw exception).
>>
>> I thought __array_wrap__ would work for this, bu
On Tue, Sep 29, 2009 at 11:00 AM, Neal Becker wrote:
> fixed_pt arrays need to apply the overflow_policy after operations
> (overflow_policy could be clip, or throw exception).
>
> I thought __array_wrap__ would work for this, but it seems to not be called
> when I need it. For example:
>
> In [
fixed_pt arrays need to apply the overflow_policy after operations
(overflow_policy could be clip, or throw exception).
I thought __array_wrap__ would work for this, but it seems to not be called
when I need it. For example:
In [13]: obj
Out[13]: fixed_pt_array([ 0, 32, 64, 96, 128])
In [
15 matches
Mail list logo