jacopoantonello / zernike

Python code for Zernike polynomials
Apache License 2.0
133 stars 37 forks source link

ang in make_pol_grid is a float and doesn't have reshape method #1

Closed RichardPflaum closed 4 years ago

RichardPflaum commented 4 years ago

Hi, I just cloned this and am trying to understand the module, but my Linter is complaining: The line ang = self.angular(k, theta_i).reshape((L, 1), order='F') in the method make_pol_grid seems to be wrong, since self.angular returns a float.

RichardPflaum commented 4 years ago

Sorry, nevermind this must be a Pylint issue.

RichardPflaum commented 4 years ago

The issue is caused by the angular method in the baseclass. This can be fixed using ABCMeta as metaclass for Zern and using the @abstractmethod decorator for angular instead of simply returning 0.

jacopoantonello commented 4 years ago

Hi. Could you please check whether a1d85c32eb3256ca62fab253ef53269326044cbe fixes this problem? My linter didn't show any warning, so I can't reproduce this. Thank you.

RichardPflaum commented 4 years ago

Looks good! I'll check it tomorrow.

RichardPflaum commented 4 years ago

Yes that does it. Thanks!