[Chicago] Segments in binary array

Randy Baxley randy7771026 at gmail.com
Wed Dec 26 00:43:32 CET 2012


Someday I will get to understand numpy, scipy, maximal, single range and
boundary cases.

Today though I am just hoping we can figure out why my emails are not
getting through to chipy.

Here is my latest fun with the Rice course for folks to try and crash or to
make comments on towards better programming practices.

http://www.codeskulptor.org/#user8-ffQ0VDPc4LqtZuS-3.py


On Sun, Dec 23, 2012 at 8:39 AM, Oren Livne <livne at uchicago.edu> wrote:

> Dear Ken and Carl,
>
> Thank you so much! I always get quality responses from this group!
> I referred to maximal ranges. So there's a single range in both 0,0,0,0
> and 0,0,0,0,0,0.
> Ken's solution, with boundary cases treatment, will work for me.
>
> Happy Holidays,
> Oren
>
> On 12/21/2012 8:03 PM, Carl Karsten wrote:
>
>> for L = 3, how many ranges are in:
>> 0,0,0,0 ?
>>
>> I can find 3:
>> 1,2,3
>> 1,2,3,4
>>    2,3,4
>>
>> But if you are not allowed to reuse, then just the 1234 one is all there
>> is.
>>
>> but that still leaves 0,0,0,0,0,0
>> 123 and 456 give you 2 ranges with no reuse.  Is that better than one
>> long one?
>>
>> On Fri, Dec 21, 2012 at 4:36 PM, Oren Livne <livne at uchicago.edu> wrote:
>>
>>> Dear All,
>>>
>>> I have a binary numpy array A. I would like to find all ranges of
>>> consecutive 0's of length >= L in A. What would be an efficient
>>> implementation?
>>>
>>> Thanks,
>>> Oren
>>> ______________________________**_________________
>>> Chicago mailing list
>>> Chicago at python.org
>>> http://mail.python.org/**mailman/listinfo/chicago<http://mail.python.org/mailman/listinfo/chicago>
>>>
>>
>>
>>
>
> --
> A person is just about as big as the things that make him angry.
>
> ______________________________**_________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/**mailman/listinfo/chicago<http://mail.python.org/mailman/listinfo/chicago>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20121225/e9675513/attachment.html>


More information about the Chicago mailing list