Hello Tony,
I was actually looking for this type of function , i was unable to
found  so then i move to for loops .
I have updated that for loops using np.tri function.

Thanks :)

Umesh


On Sun, Apr 21, 2013 at 10:50 PM, Tony S Yu <notifications@github.com>wrote:

> In skimage/filter/tests/test_edges.py:
>
> > +def test_roberts_zeros():
> > +    """Roberts' on an array of all zeros"""
> > +    result = F.roberts(np.zeros((10, 10)), np.ones((10, 10), bool))
> > +    assert (np.all(result == 0))
> > +
> > +
> > +def test_roberts_diagonal1():
> > +    """Roberts' on an edge should be a diagonal"""
> > +    i = (10, 10)
> > +    n = (10, 10)
> > +    i = np.ones(i)
> > +    i = np.triu(i)
> > +    image = (i > 0).astype(float)
> > +    n = np.zeros(n)
> > +    for k in range(2, 10):
> > +        for t in range(0, k-1):
>
> Thanks for the tests!
>
> The tests are a bit difficult to follow, however. Could you simplify the
> creation of these test arrays? You can probably eliminate the loops (here
> and below) with np.tri?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scikit-image/scikit-image/pull/517/files#r3889235>
> .
>