Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code that imports algopy in numdifftools nd_algopy.py #73

Open
nicholasferguson opened this issue Jun 6, 2024 · 0 comments
Open

code that imports algopy in numdifftools nd_algopy.py #73

nicholasferguson opened this issue Jun 6, 2024 · 0 comments

Comments

@nicholasferguson
Copy link

nicholasferguson commented Jun 6, 2024

My env
Python 3.11.6
Sympy 1.13.dev
Windows 10 Pro
OS Build: 19045.4412
numpy 1.26.4
algopy 0.5.7

===============
This code in numdifftools nd_algopy.py line 61

try:
import algopy
from algopy import UTPM
except ImportError:
UTPM = algopy = None

Can you make algopy a required package. This UTMP was defaulting to None when I ran
import doctest
import numdifftools as nd
nd.test('--doctest-modules', '--disable-warnings')

I did reach out to [email protected] who maintains algopy. I asked that he
comment out in its 'init.py' file
#testing
#from numpy.testing import Tester
#test = Tester().test
Sebastian asked that I open this:
b45ch1/algopy#56

Because numpy no longer has Tester. Thus ' import algopy' was failing. And UTPM was defaulting to None.

For your info...to run
import doctest
import numdifftools
nd.test('--doctest-modules', '--disable-warnings')

=============== 164 passed, 8 skipped, 1369 warnings in 42.86s ================

To get there I also had to comment out the following code in numpy file function_base.py line 4276

if a.dtype.kind == "c":

raise TypeError("a must be an array of real numbers")

So a scattering of issues......

@nicholasferguson nicholasferguson changed the title code that imports algopy in nd code that imports algopy in numdifftools nd_algopy.py Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant