On 11/02/2008, Matthew Brett <[EMAIL PROTECTED]> wrote:
> > I can also see that this could possibly be improved by using a for
> > loop to iterate over the output elements, so that there was no need to
> > duplicate the large input array, or perhaps a "blocked" iteration that
> > duplicated arrays
Hi,
> I can also see that this could possibly be improved by using a for
> loop to iterate over the output elements, so that there was no need to
> duplicate the large input array, or perhaps a "blocked" iteration that
> duplicated arrays of modest size would be better. But how can a single
> floa
On 10/02/2008, Matthew Brett <[EMAIL PROTECTED]> wrote:
> > Ah, I see. You definitely do not want to reassign the .data buffer in
> > this case. An out= parameter does not reassign the memory location
> > that the array object points to. It should use the allocated memory
> > that was already there
Matthew Brett wrote:
>>> import numpy as np
>>> a = np.arange(10)
>>> b = np.arange(10)+1
>>> a.data = b.data # raises error, but I hope you see what I mean
>>>
>>> ?
>> Not really, no. Can you describe your use case in more detail?
>
> Yes - I am just writing the new median implementation. To al
On Feb 10, 2008 7:17 PM, Matthew Brett <[EMAIL PROTECTED]> wrote:
> > Ah, I see. You definitely do not want to reassign the .data buffer in
> > this case. An out= parameter does not reassign the memory location
> > that the array object points to. It should use the allocated memory
> > that was alr
> Ah, I see. You definitely do not want to reassign the .data buffer in
> this case. An out= parameter does not reassign the memory location
> that the array object points to. It should use the allocated memory
> that was already there. It shouldn't "copy" anything at all;
> otherwise, "median(x, o
On Feb 10, 2008 6:48 PM, Matthew Brett <[EMAIL PROTECTED]> wrote:
> > > import numpy as np
> > > a = np.arange(10)
> > > b = np.arange(10)+1
> > > a.data = b.data # raises error, but I hope you see what I mean
> > >
> > > ?
> >
> > Not really, no. Can you describe your use case in more detail?
>
>
> > import numpy as np
> > a = np.arange(10)
> > b = np.arange(10)+1
> > a.data = b.data # raises error, but I hope you see what I mean
> >
> > ?
>
> Not really, no. Can you describe your use case in more detail?
Yes - I am just writing the new median implementation. To allow
future optimization
On Feb 10, 2008 5:15 PM, Matthew Brett <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am sorry if I have missed something obvious, but is there any way in
> python of doing this:
>
> import numpy as np
> a = np.arange(10)
> b = np.arange(10)+1
> a.data = b.data # raises error, but I hope you see what I mea
Hi,
I am sorry if I have missed something obvious, but is there any way in
python of doing this:
import numpy as np
a = np.arange(10)
b = np.arange(10)+1
a.data = b.data # raises error, but I hope you see what I mean
?
Thanks a lot for any pointers.
Matthew
10 matches
Mail list logo