On Tue, Mar 30, 2010 at 3:40 PM, Robert Kern wrote:
> On Tue, Mar 30, 2010 at 16:35, Ryan May wrote:
>> On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
>> wrote:
>
>>> x *= ((x <= 23) | (x >= 45)) .
>>
>> Interesting. In an ideal world, I'd love to see why exactly that is,
>> because I don'
2010/3/30 Ryan May :
> On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
> wrote:
>> We recently found out that it executes faster using:
>>
>> x *= ((x <= 23) | (x >= 45)) .
>
> Interesting. In an ideal world, I'd love to see why exactly that is,
> because I don't think multiplication should b
On Tue, Mar 30, 2010 at 16:35, Ryan May wrote:
> On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
> wrote:
>> x *= ((x <= 23) | (x >= 45)) .
>
> Interesting. In an ideal world, I'd love to see why exactly that is,
> because I don't think multiplication should be faster than a boolean
> op.
On Tue, Mar 30, 2010 at 3:16 PM, Friedrich Romstedt
wrote:
> 2010/3/30 Ryan May :
>> On Tue, Mar 30, 2010 at 11:12 AM, Alan G Isaac wrote:
>>> On 3/30/2010 12:56 PM, Sean Mulcahy wrote:
512x512 arrays. I would like to set elements of the array whose value
fall within a specified range
2010/3/30 Ryan May :
> On Tue, Mar 30, 2010 at 11:12 AM, Alan G Isaac wrote:
>> On 3/30/2010 12:56 PM, Sean Mulcahy wrote:
>>> 512x512 arrays. I would like to set elements of the array whose value fall
>>> within a specified range to zero (eg 23< x< 45).
>>
>> x[(23
> Or a version that seems a
On Tue, Mar 30, 2010 at 11:12 AM, Alan G Isaac wrote:
> On 3/30/2010 12:56 PM, Sean Mulcahy wrote:
>> 512x512 arrays. I would like to set elements of the array whose value fall
>> within a specified range to zero (eg 23< x< 45).
>
> x[(23http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 3/30/2010 12:56 PM, Sean Mulcahy wrote:
> 512x512 arrays. I would like to set elements of the array whose value fall
> within a specified range to zero (eg 23< x< 45).
x[(23http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hello all,
I'm relatively new to numpy. I'm working with text images as 512x512 arrays.
I would like to set elements of the array whose value fall within a specified
range to zero (eg 23 < x < 45). Any advice is much appreciated.
Sean
___
NumPy-Dis