aotools icon indicating copy to clipboard operation
aotools copied to clipboard

Zernike.py pulling non-existant dependancies `emath`

Open CJonesANU opened this issue 1 year ago • 1 comments
trafficstars

Problem

Importing aotools in python12, on windows fails.

Cause

Within aotools\functions\zernike.py , zernikeRadialFunc calls numpy.emath.factorial which I believe was depreciated a while back.

Solution

Temporary Solution

I was able to monkey patch it in my loca environment by importing math and swapping references to numpy.math.factorial to math.factorial

Long term solution

I was going to try issue a pull request, but issues with verssioner.py are preventing me from installing it locally. (I think this is a different issue lol)

If you could make the changes that would be an easy fix to get windows users up and running.

Cheers Cam

CJonesANU avatar Sep 05 '24 01:09 CJonesANU