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

error on examples using scipy #33

Open
FloGom opened this issue Oct 17, 2023 · 3 comments
Open

error on examples using scipy #33

FloGom opened this issue Oct 17, 2023 · 3 comments

Comments

@FloGom
Copy link

FloGom commented Oct 17, 2023

Hello,

I have installed the package as explained in the documentation and I have tried to run the examples.
Some examples like ex_axes_1.py or ex_BMI.py are working great.
Others more complex like LC_filter.py or ex_amortized_loan.py are failling with the following error (last part) :

File "C:\_UsersDatas\Miniconda3\envs\nomography\Lib\site-packages\scipy\optimize\_optimize.py", line 899, in _minimize_neldermead
    fsim[k] = func(sim[k])
    ~~~~^^^
TypeError: float() argument must be a string or a real number, not 'complex'

I guess it is linked to a change in the last version of scipy.
The version I am using is scipy 1.11.3 py311hc1ccb85_0 on windows.

What was the version of scipy used to develop PyNomo?

By the way, nice work! 😃
I try to use Nomography in my current research work to obtain a fast design tool and at the same time more insights from the equation.

@FloGom
Copy link
Author

FloGom commented Oct 17, 2023

After reading the old issues, I have found a solution.
Reverting back to python 3.5 solves the problem.
The following commands worked for me:

conda create -n nomography python=3.5 scipy six cython
pip install pyx
pip install pynomo

It remains some warnings in some example due to numerical problem or type inconsistency (complex vs float).

@tevorbl
Copy link
Contributor

tevorbl commented Jun 2, 2024

I've now tested on python 3.11 and fixed these and a few other bugs that have appeared.
The fixes have been pushed and should appear in the master soon.

My fixes are here, if you need them sooner:
https://github.com/tevorbl/pynomo/tree/master/nomogen

@lefakkomies
Copy link
Owner

lefakkomies commented Jun 2, 2024 via email

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

3 participants