If you push your latest changes, I'll show you how to do it and send a PR against your branch?

Johannes Schönberger

Am 30.06.2013 um 15:02 schrieb AnkitAgrawal <notifications@github.com>:

> In skimage/feature/_brief.py:
> 
> > +	keypoints = _remove_border_keypoints(image, keypoints, (PATCH_SIZE[0] / 2, PATCH_SIZE[1] / 2))
> > +
> > +	descriptor = np.zeros((len(keypoints), descriptor_size * 8), dtype=int)
> > +
> > +	image = gaussian_filter(image, 2)
> > +
> > +	if mode == 'uniform':
> > +		np.random.seed(1)
> > +		first = np.random.randint(-24, 25, (descriptor_size * 8, 2))
> > +		np.random.seed(2)
> > +		second = np.random.randint(-24, 25, (descriptor_size * 8, 2))
> > +	else:
> > +		#TODO mode='normal'
> > +		pass
> > +
> > +	for i in range(len(keypoints)):
> 
> @ahojnnes Since we only want the for loop to be outsourced, I am still confused about how the two files .py and .pyx will manage the program flow among themselves once the function brief is called. My doubts about Cython here are pretty low-level like - Would I need to write the whole program in Cython? If I just need to implement the for loop in Cython, how would that be imported and called from .py file. I looked at this tutorial(https://python.g-node.org/python-summerschool-2011/_media/materials/cython/cython-slides.pdf) but it discussed about writing complete Cython programs, unlike the case here. Any pointers/examples in the codebase would be appreciated. Till then I will push the amendments since the last commit.
> 
> —
> Reply to this email directly or view it on GitHub.
>